CMS 3D CMS Logo

MultiplicityAlgorithms.cc
Go to the documentation of this file.
2 
3 using namespace sistriptools::algorithm;
4 
7  : m_subdetenum((ClusterSummary::CMSTracker)iConfig.getParameter<int>("subDetEnum")),
8  m_varenum((ClusterSummary::VariablePlacement)iConfig.getParameter<int>("varEnum")),
9  m_collection(iC.consumes<ClusterSummary>(iConfig.getParameter<edm::InputTag>("clusterSummaryCollection"))),
10  m_warn(iConfig.getUntrackedParameter<bool>("warnIfModuleMissing", true)) {}
11 
14  : m_subdetenum((ClusterSummary::CMSTracker)iConfig.getParameter<int>("subDetEnum")),
15  m_varenum((ClusterSummary::VariablePlacement)iConfig.getParameter<int>("varEnum")),
16  m_collection(iC.consumes<ClusterSummary>(iConfig.getParameter<edm::InputTag>("clusterSummaryCollection"))),
17  m_warn(iConfig.getUntrackedParameter<bool>("warnIfModuleMissing", true)) {}
18 
20  const edm::Event& iEvent, const edm::EventSetup& iSetup) const {
21  int mult = 0;
22 
24  iEvent.getByToken(m_collection, clustsumm);
25 
26  switch (m_varenum) {
28  mult = int(clustsumm->getNClus(m_subdetenum, m_warn));
29  break;
31  mult = int(clustsumm->getClusSize(m_subdetenum, m_warn));
32  break;
34  mult = int(clustsumm->getClusCharge(m_subdetenum, m_warn));
35  break;
36  default:
37  mult = -1;
38  }
39  return value_t(mult);
40 }
int getClusSize(const CMSTracker mod, bool warn=true) const
value_t getEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) const
int getNClus(const CMSTracker mod, bool warn=true) const
int iEvent
Definition: GenABIO.cc:224
ClusterSummarySingleMultiplicity(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
float getClusCharge(const CMSTracker mod, bool warn=true) const
HLT enums.