CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Multiplicities.cc
Go to the documentation of this file.
2 
4  m_collection(),m_subdetenum(ClusterSummary::STRIP),m_varenum(ClusterSummary::NCLUSTERS),m_mult(0) { }
5 
7  m_collection(iC.consumes<ClusterSummary>(iConfig.getParameter<edm::InputTag>("clusterSummaryCollection"))),
8  m_subdetenum((ClusterSummary::CMSTracker)iConfig.getParameter<int>("subDetEnum")),m_varenum((ClusterSummary::VariablePlacement)iConfig.getParameter<int>("varEnum")),
9  m_mult(0)
10 {}
11 
13  m_collection(iC.consumes<ClusterSummary>(iConfig.getParameter<edm::InputTag>("clusterSummaryCollection"))),
14  m_subdetenum((ClusterSummary::CMSTracker)iConfig.getParameter<int>("subDetEnum")),m_varenum((ClusterSummary::VariablePlacement)iConfig.getParameter<int>("varEnum")),
15  m_mult(0)
16 {}
17 
19 
20  m_mult = 0;
21 
23  iEvent.getByToken(m_collection,clustsumm);
24 
25  switch(m_varenum){
26  case ClusterSummary::NCLUSTERS : m_mult = int(clustsumm->getNClus (m_subdetenum)); break;
27  case ClusterSummary::CLUSTERSIZE : m_mult = int(clustsumm->getClusSize (m_subdetenum)); break;
28  case ClusterSummary::CLUSTERCHARGE : m_mult = int(clustsumm->getClusCharge(m_subdetenum)); break;
29  default : m_mult = -1;
30  }
31 }
32 
34 
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
void getEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup)
int iEvent
Definition: GenABIO.cc:230
ClusterSummary::VariablePlacement m_varenum
ClusterSummary::CMSTracker m_subdetenum
edm::EDGetTokenT< ClusterSummary > m_collection