Main Page
Namespaces
Classes
Package Documentation
L1Trigger
L1TNtuples
src
L1AnalysisSimulation.cc
Go to the documentation of this file.
1
#include "
L1Trigger/L1TNtuples/interface/L1AnalysisSimulation.h
"
2
3
#include "
SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h
"
4
5
L1Analysis::L1AnalysisSimulation::L1AnalysisSimulation
()
6
{
7
}
8
9
L1Analysis::L1AnalysisSimulation::~L1AnalysisSimulation
()
10
{
11
}
12
13
void
L1Analysis::L1AnalysisSimulation::Set
(
const
edm::Event
&
e
)
14
{
15
16
17
if
(!(e.
eventAuxiliary
().
isRealData
())) {
18
19
// Grab the pileup information for this event
20
edm::Handle<std::vector< PileupSummaryInfo >
> puInfo;
21
e.
getByLabel
(
edm::InputTag
(
"addPileupInfo"
), puInfo);
22
23
if
(puInfo.
isValid
()) {
24
std::vector<PileupSummaryInfo>::const_iterator pvi;
25
26
for
(pvi = puInfo->begin(); pvi != puInfo->end(); ++pvi) {
27
28
int
bx = pvi->getBunchCrossing();
29
30
if
(bx == 0) {
31
sim_
.
meanInt
= pvi->getTrueNumInteractions();
32
sim_
.
actualInt
= pvi->getPU_NumInteractions();
33
continue
;
34
}
35
36
}
37
}
38
}
else
{
39
sim_
.
meanInt
= -1.;
40
sim_
.
actualInt
= -1;
41
}
42
}
43
edm::EventAuxiliary::isRealData
bool isRealData() const
Definition:
EventAuxiliary.h:68
edm::Event::eventAuxiliary
EventAuxiliary const & eventAuxiliary() const override
Definition:
Event.h:92
L1Analysis::L1AnalysisSimulationDataFormat::actualInt
int actualInt
Definition:
L1AnalysisSimulationDataFormat.h:32
edm::Handle
Definition:
AssociativeIterator.h:47
L1Analysis::L1AnalysisSimulation::L1AnalysisSimulation
L1AnalysisSimulation()
Definition:
L1AnalysisSimulation.cc:5
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
L1Analysis::L1AnalysisSimulation::Set
void Set(const edm::Event &e)
Definition:
L1AnalysisSimulation.cc:13
L1AnalysisSimulation.h
edm::HandleBase::isValid
bool isValid() const
Definition:
HandleBase.h:74
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition:
Event.h:475
L1Analysis::L1AnalysisSimulationDataFormat::meanInt
float meanInt
Definition:
L1AnalysisSimulationDataFormat.h:31
L1Analysis::L1AnalysisSimulation::sim_
L1AnalysisSimulationDataFormat sim_
Definition:
L1AnalysisSimulation.h:25
edm::InputTag
Definition:
InputTag.h:15
edm::Event
Definition:
Event.h:69
L1Analysis::L1AnalysisSimulation::~L1AnalysisSimulation
~L1AnalysisSimulation()
Definition:
L1AnalysisSimulation.cc:9
PileupSummaryInfo.h
Generated for CMSSW Reference Manual by
1.8.11