1 #ifndef DPGAnalysis_SiStripTools_MultiplicityAlgorithms_H 2 #define DPGAnalysis_SiStripTools_MultiplicityAlgorithms_H 65 : m_modthr(iConfig.getUntrackedParameter<
int>(
"moduleThreshold")),
66 m_useQuality(iConfig.getUntrackedParameter<
bool>(
"useQuality",
false)),
67 m_qualityToken(m_useQuality
70 : decltype(m_qualityToken){}),
71 m_collection(iC.consumes<
T>(iConfig.getParameter<
edm::InputTag>(
"collectionName"))) {}
74 : m_modthr(iConfig.getUntrackedParameter<
int>(
"moduleThreshold")),
75 m_useQuality(iConfig.getUntrackedParameter<
bool>(
"useQuality",
false)),
76 m_qualityToken(m_useQuality
79 : decltype(m_qualityToken){}),
80 m_collection(iC.consumes<
T>(iConfig.getParameter<
edm::InputTag>(
"collectionName"))) {}
93 iEvent.getByToken(m_collection, digis);
95 for (
typename T::const_iterator it = digis->begin(); it != digis->end(); it++) {
96 if (!m_useQuality || !
quality->IsModuleBad(it->detId())) {
97 if (m_modthr < 0 ||
int(it->size()) < m_modthr) {
106 template <
class T1,
class T2>
121 template <
class T1,
class T2>
124 template <
class T1,
class T2>
126 : m_multiplicity1(iConfig.getParameter<
edm::
ParameterSet>(
"firstMultiplicityConfig"), iC),
127 m_multiplicity2(iConfig.getParameter<
edm::
ParameterSet>(
"secondMultiplicityConfig"), iC) {}
128 template <
class T1,
class T2>
130 : m_multiplicity1(iConfig.getParameter<
edm::
ParameterSet>(
"firstMultiplicityConfig"), iC),
131 m_multiplicity2(iConfig.getParameter<
edm::
ParameterSet>(
"secondMultiplicityConfig"), iC) {}
133 template <
class T1,
class T2>
136 auto m1 = m_multiplicity1.getEvent(
iEvent, iSetup);
137 auto m2 = m_multiplicity2.getEvent(
iEvent, iSetup);
151 #endif // DPGAnalysis_SiStripTools_Multiplicities_H
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
T getUntrackedParameter(std::string const &, T const &) const