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(0),m_subdetvar(), m_clustsummvar(), m_mult(0) { }
5 
7  m_collection(iC.consumes<ClusterSummary>(iConfig.getParameter<edm::InputTag>("clusterSummaryCollection"))),
8  m_subdetenum(iConfig.getParameter<int>("subDetEnum")),
9  m_subdetvar(iConfig.getParameter<std::string>("subDetVariable")),
10  m_clustsummvar(),
11  m_mult(0)
12 {
13 
14  m_clustsummvar.push_back("cHits");
15  m_clustsummvar.push_back("cSize");
16  m_clustsummvar.push_back("cCharge");
17  m_clustsummvar.push_back("pHits");
18  m_clustsummvar.push_back("pSize");
19  m_clustsummvar.push_back("pCharge");
20 
21 }
22 
24  m_collection(iC.consumes<ClusterSummary>(iConfig.getParameter<edm::InputTag>("clusterSummaryCollection"))),
25  m_subdetenum(iConfig.getParameter<int>("subDetEnum")),
26  m_subdetvar(iConfig.getParameter<std::string>("subDetVariable")),
27  m_clustsummvar(),
28  m_mult(0)
29 {
30 
31  m_clustsummvar.push_back("cHits");
32  m_clustsummvar.push_back("cSize");
33  m_clustsummvar.push_back("cCharge");
34  m_clustsummvar.push_back("pHits");
35  m_clustsummvar.push_back("pSize");
36  m_clustsummvar.push_back("pCharge");
37 
38 }
39 
41 
42  m_mult = 0;
43 
45  iEvent.getByToken(m_collection,clustsumm);
46 
47  clustsumm->SetUserContent(m_clustsummvar);
48 
49  m_mult = int(clustsumm->GetGenericVariable(m_subdetvar,m_subdetenum));
50 
51 }
52 
54 
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void getEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup)
std::vector< std::string > m_clustsummvar
int iEvent
Definition: GenABIO.cc:230
edm::EDGetTokenT< ClusterSummary > m_collection