1 #ifndef DPGAnalysis_SiStripTools_Multiplicities_H
2 #define DPGAnalysis_SiStripTools_Multiplicities_H
92 : m_modthr(iConfig.getUntrackedParameter<
int>(
"moduleThreshold")),
93 m_useQuality(iConfig.getUntrackedParameter<
bool>(
"useQuality",
false)),
94 m_qualityLabel(iConfig.getUntrackedParameter<
std::
string>(
"qualityLabel",
"")),
96 m_collection(iC.consumes<
T>(iConfig.getParameter<
edm::
InputTag>(
"collectionName"))) {}
99 : m_modthr(iConfig.getUntrackedParameter<
int>(
"moduleThreshold")),
100 m_useQuality(iConfig.getUntrackedParameter<
bool>(
"useQuality",
false)),
101 m_qualityLabel(iConfig.getUntrackedParameter<
std::
string>(
"qualityLabel",
"")),
103 m_collection(iC.consumes<
T>(iConfig.getParameter<
edm::
InputTag>(
"collectionName"))) {}
106 #ifndef __ROOTCLING__
117 iEvent.getByToken(m_collection, digis);
119 for (
typename T::const_iterator it = digis->begin(); it != digis->end(); it++) {
120 if (!m_useQuality || !qualityHandle->
IsModuleBad(it->detId())) {
121 if (m_modthr < 0 ||
int(it->size()) < m_modthr) {
122 m_mult += it->size();
135 template <
class T1,
class T2>
139 #ifndef __ROOTCLING__
153 template <
class T1,
class T2>
156 #ifndef __ROOTCLING__
157 template <
class T1,
class T2>
159 : m_multiplicity1(iConfig.getParameter<
edm::
ParameterSet>(
"firstMultiplicityConfig"), iC),
160 m_multiplicity2(iConfig.getParameter<
edm::
ParameterSet>(
"secondMultiplicityConfig"), iC) {}
161 template <
class T1,
class T2>
163 : m_multiplicity1(iConfig.getParameter<
edm::
ParameterSet>(
"firstMultiplicityConfig"), iC),
164 m_multiplicity2(iConfig.getParameter<
edm::
ParameterSet>(
"secondMultiplicityConfig"), iC) {}
167 template <
class T1,
class T2>
169 m_multiplicity1.getEvent(
iEvent, iSetup);
170 m_multiplicity2.getEvent(
iEvent, iSetup);
173 template <
class T1,
class T2>
175 return m_multiplicity1.mult();
178 template <
class T1,
class T2>
180 return m_multiplicity2.mult();
192 #endif // DPGAnalysis_SiStripTools_Multiplicities_H