Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DPGAnalysis
SiStripTools
src
Multiplicities.cc
Go to the documentation of this file.
1
#include "
DPGAnalysis/SiStripTools/interface/Multiplicities.h
"
2
#include "
DataFormats/TrackerCommon/interface/ClusterSummary.h
"
3
4
ClusterSummarySingleMultiplicity::ClusterSummarySingleMultiplicity
():
5
m_collection(),m_subdetenum(0),m_subdetvar(), m_clustsummvar(), m_mult(0) { }
6
7
ClusterSummarySingleMultiplicity::ClusterSummarySingleMultiplicity
(
const
edm::ParameterSet
& iConfig):
8
m_collection(iConfig.getParameter<edm::InputTag>(
"clusterSummaryCollection"
)),
9
m_subdetenum(iConfig.getParameter<int>(
"subDetEnum"
)),
10
m_subdetvar(iConfig.getParameter<std::
string
>(
"subDetVariable"
)),
11
m_clustsummvar(),
12
m_mult(0)
13
{
14
15
m_clustsummvar
.push_back(
"cHits"
);
16
m_clustsummvar
.push_back(
"cSize"
);
17
m_clustsummvar
.push_back(
"cCharge"
);
18
m_clustsummvar
.push_back(
"pHits"
);
19
m_clustsummvar
.push_back(
"pSize"
);
20
m_clustsummvar
.push_back(
"pCharge"
);
21
22
}
23
24
void
ClusterSummarySingleMultiplicity::getEvent
(
const
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
25
26
m_mult
= 0;
27
28
edm::Handle<ClusterSummary>
clustsumm;
29
iEvent.
getByLabel
(
m_collection
,clustsumm);
30
31
clustsumm->SetUserContent(
m_clustsummvar
);
32
33
m_mult
= int(clustsumm->GetGenericVariable(
m_subdetvar
,
m_subdetenum
));
34
35
}
36
37
int
ClusterSummarySingleMultiplicity::mult
()
const
{
return
m_mult
; }
38
ClusterSummarySingleMultiplicity::m_subdetvar
std::string m_subdetvar
Definition:
Multiplicities.h:39
ClusterSummarySingleMultiplicity::getEvent
void getEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup)
Definition:
Multiplicities.cc:24
edm::Handle
Definition:
AssociativeIterator.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
ClusterSummarySingleMultiplicity::m_clustsummvar
std::vector< std::string > m_clustsummvar
Definition:
Multiplicities.h:40
ClusterSummarySingleMultiplicity::mult
int mult() const
Definition:
Multiplicities.cc:37
iEvent
int iEvent
Definition:
GenABIO.cc:243
ClusterSummarySingleMultiplicity::m_collection
edm::InputTag m_collection
Definition:
Multiplicities.h:37
ClusterSummary.h
edm::EventSetup
Definition:
EventSetup.h:44
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition:
Event.h:361
ClusterSummarySingleMultiplicity::m_mult
int m_mult
Definition:
Multiplicities.h:41
ClusterSummarySingleMultiplicity::m_subdetenum
int m_subdetenum
Definition:
Multiplicities.h:38
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:56
Multiplicities.h
ClusterSummarySingleMultiplicity::ClusterSummarySingleMultiplicity
ClusterSummarySingleMultiplicity()
Definition:
Multiplicities.cc:4
Generated for CMSSW Reference Manual by
1.8.5