CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ClusterSummarySingleMultiplicity Class Reference

#include <Multiplicities.h>

Public Member Functions

 ClusterSummarySingleMultiplicity ()
 
 ClusterSummarySingleMultiplicity (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
 
 ClusterSummarySingleMultiplicity (const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
 
void getEvent (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
int mult () const
 

Private Attributes

std::vector< std::string > m_clustsummvar
 
edm::EDGetTokenT< ClusterSummarym_collection
 
int m_mult
 
int m_subdetenum
 
std::string m_subdetvar
 

Detailed Description

Definition at line 33 of file Multiplicities.h.

Constructor & Destructor Documentation

ClusterSummarySingleMultiplicity::ClusterSummarySingleMultiplicity ( )

Definition at line 3 of file Multiplicities.cc.

ClusterSummarySingleMultiplicity::ClusterSummarySingleMultiplicity ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iC 
)

Definition at line 6 of file Multiplicities.cc.

References m_clustsummvar.

6  :
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")),
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 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< std::string > m_clustsummvar
edm::EDGetTokenT< ClusterSummary > m_collection
ClusterSummarySingleMultiplicity::ClusterSummarySingleMultiplicity ( const edm::ParameterSet iConfig,
edm::ConsumesCollector iC 
)

Definition at line 23 of file Multiplicities.cc.

References m_clustsummvar.

23  :
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")),
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 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< std::string > m_clustsummvar
edm::EDGetTokenT< ClusterSummary > m_collection

Member Function Documentation

void ClusterSummarySingleMultiplicity::getEvent ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Definition at line 40 of file Multiplicities.cc.

References edm::Event::getByToken(), m_clustsummvar, m_collection, m_mult, m_subdetenum, and m_subdetvar.

40  {
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 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< std::string > m_clustsummvar
edm::EDGetTokenT< ClusterSummary > m_collection
int ClusterSummarySingleMultiplicity::mult ( ) const

Definition at line 53 of file Multiplicities.cc.

References m_mult.

Member Data Documentation

std::vector<std::string> ClusterSummarySingleMultiplicity::m_clustsummvar
private

Definition at line 51 of file Multiplicities.h.

Referenced by ClusterSummarySingleMultiplicity(), and getEvent().

edm::EDGetTokenT<ClusterSummary> ClusterSummarySingleMultiplicity::m_collection
private

Definition at line 47 of file Multiplicities.h.

Referenced by getEvent().

int ClusterSummarySingleMultiplicity::m_mult
private

Definition at line 52 of file Multiplicities.h.

Referenced by getEvent(), and mult().

int ClusterSummarySingleMultiplicity::m_subdetenum
private

Definition at line 49 of file Multiplicities.h.

Referenced by getEvent().

std::string ClusterSummarySingleMultiplicity::m_subdetvar
private

Definition at line 50 of file Multiplicities.h.

Referenced by getEvent().