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 
13  : m_subdetenum((ClusterSummary::CMSTracker)iConfig.getParameter<int>("subDetEnum")),
14  m_varenum((ClusterSummary::VariablePlacement)iConfig.getParameter<int>("varEnum")),
15  m_collection(iC.consumes<ClusterSummary>(iConfig.getParameter<edm::InputTag>("clusterSummaryCollection"))) {}
16 
18  const edm::Event& iEvent, const edm::EventSetup& iSetup) const {
19  int mult = 0;
20 
22  iEvent.getByToken(m_collection, clustsumm);
23 
24  switch (m_varenum) {
26  mult = int(clustsumm->getNClus(m_subdetenum));
27  break;
29  mult = int(clustsumm->getClusSize(m_subdetenum));
30  break;
32  mult = int(clustsumm->getClusCharge(m_subdetenum));
33  break;
34  default:
35  mult = -1;
36  }
37  return value_t(mult);
38 }
int getClusSize(const CMSTracker mod) const
float getClusCharge(const CMSTracker mod) const
value_t getEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) const
int iEvent
Definition: GenABIO.cc:224
ClusterSummarySingleMultiplicity(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
int getNClus(const CMSTracker mod) const
HLT enums.