1 #ifndef DPGAnalysis_SiStripTools_Multiplicities_H 2 #define DPGAnalysis_SiStripTools_Multiplicities_H 70 : m_modthr(iConfig.getUntrackedParameter<
int>(
"moduleThreshold")),
71 m_useQuality(iConfig.getUntrackedParameter<
bool>(
"useQuality",
false)),
72 m_qualityToken(m_useQuality
75 : decltype(m_qualityToken){}),
77 m_collection(iC.consumes<
T>(iConfig.getParameter<
edm::InputTag>(
"collectionName"))) {}
80 : m_modthr(iConfig.getUntrackedParameter<
int>(
"moduleThreshold")),
81 m_useQuality(iConfig.getUntrackedParameter<
bool>(
"useQuality",
false)),
82 m_qualityToken(m_useQuality
85 : decltype(m_qualityToken){}),
87 m_collection(iC.consumes<
T>(iConfig.getParameter<
edm::InputTag>(
"collectionName"))) {}
99 iEvent.getByToken(m_collection, digis);
101 for (
typename T::const_iterator it = digis->begin(); it != digis->end(); it++) {
102 if (!m_useQuality || !
quality->IsModuleBad(it->detId())) {
103 if (m_modthr < 0 ||
int(it->size()) < m_modthr) {
104 m_mult += it->size();
116 template <
class T1,
class T2>
132 template <
class T1,
class T2>
135 template <
class T1,
class T2>
137 : m_multiplicity1(iConfig.getParameter<
edm::
ParameterSet>(
"firstMultiplicityConfig"), iC),
138 m_multiplicity2(iConfig.getParameter<
edm::
ParameterSet>(
"secondMultiplicityConfig"), iC) {}
139 template <
class T1,
class T2>
141 : m_multiplicity1(iConfig.getParameter<
edm::
ParameterSet>(
"firstMultiplicityConfig"), iC),
142 m_multiplicity2(iConfig.getParameter<
edm::
ParameterSet>(
"secondMultiplicityConfig"), iC) {}
144 template <
class T1,
class T2>
146 m_multiplicity1.getEvent(
iEvent, iSetup);
147 m_multiplicity2.getEvent(
iEvent, iSetup);
150 template <
class T1,
class T2>
152 return m_multiplicity1.mult();
155 template <
class T1,
class T2>
157 return m_multiplicity2.mult();
169 #endif // DPGAnalysis_SiStripTools_Multiplicities_H
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > m_qualityToken
void getEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup)
edm::EDGetTokenT< T > m_collection
MultiplicityPair< ClusterSummarySingleMultiplicity, ClusterSummarySingleMultiplicity > ClusterSummaryMultiplicityPair
MultiplicityPair< SingleMultiplicity< edmNew::DetSetVector< SiPixelCluster > >, SingleMultiplicity< edmNew::DetSetVector< SiStripCluster > > > SiPixelClusterSiStripClusterMultiplicityPair
void getEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup)
T getUntrackedParameter(std::string const &, T const &) const
SingleMultiplicity< edmNew::DetSetVector< SiPixelCluster > > SingleSiPixelClusterMultiplicity
SingleMultiplicity< edmNew::DetSetVector< SiStripCluster > > SingleSiStripClusterMultiplicity
ClusterSummary::VariablePlacement m_varenum
bool getData(T &iHolder) const
void getEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup)
ClusterSummary::CMSTracker m_subdetenum
SingleMultiplicity< edm::DetSetVector< SiStripDigi > > SingleSiStripDigiMultiplicity
ClusterSummarySingleMultiplicity()
edm::EDGetTokenT< ClusterSummary > m_collection