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
L1Analysis::L1AnalysisSimulation::~L1AnalysisSimulation
() {}
8
9
void
L1Analysis::L1AnalysisSimulation::Set
(
const
edm::Event
&
e
) {
10
if
(!(e.
eventAuxiliary
().
isRealData
())) {
11
// Grab the pileup information for this event
12
edm::Handle<std::vector<PileupSummaryInfo>
> puInfo;
13
e.
getByLabel
(
edm::InputTag
(
"addPileupInfo"
), puInfo);
14
15
if
(puInfo.
isValid
()) {
16
std::vector<PileupSummaryInfo>::const_iterator pvi;
17
18
for
(pvi = puInfo->begin(); pvi != puInfo->end(); ++pvi) {
19
int
bx
= pvi->getBunchCrossing();
20
21
if
(bx == 0) {
22
sim_
.
meanInt
= pvi->getTrueNumInteractions();
23
sim_
.
actualInt
= pvi->getPU_NumInteractions();
24
continue
;
25
}
26
}
27
}
28
}
else
{
29
sim_
.
meanInt
= -1.;
30
sim_
.
actualInt
= -1;
31
}
32
}
edm::EventAuxiliary::isRealData
bool isRealData() const
Definition:
EventAuxiliary.h:74
edm::Event::eventAuxiliary
EventAuxiliary const & eventAuxiliary() const override
Definition:
Event.h:93
L1Analysis::L1AnalysisSimulationDataFormat::actualInt
int actualInt
Definition:
L1AnalysisSimulationDataFormat.h:27
l1GtPatternGenerator_cfi.bx
bx
Definition:
l1GtPatternGenerator_cfi.py:18
edm::Handle
Definition:
AssociativeIterator.h:49
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:9
L1AnalysisSimulation.h
edm::HandleBase::isValid
bool isValid() const
Definition:
HandleBase.h:70
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition:
Event.h:488
L1Analysis::L1AnalysisSimulationDataFormat::meanInt
float meanInt
Definition:
L1AnalysisSimulationDataFormat.h:26
L1Analysis::L1AnalysisSimulation::sim_
L1AnalysisSimulationDataFormat sim_
Definition:
L1AnalysisSimulation.h:24
edm::InputTag
Definition:
InputTag.h:15
edm::Event
Definition:
Event.h:72
L1Analysis::L1AnalysisSimulation::~L1AnalysisSimulation
~L1AnalysisSimulation()
Definition:
L1AnalysisSimulation.cc:7
PileupSummaryInfo.h
Generated for CMSSW Reference Manual by
1.8.11