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
}
l1GtPatternGenerator_cfi.bx
bx
Definition:
l1GtPatternGenerator_cfi.py:18
edm::Handle
Definition:
AssociativeIterator.h:50
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::InputTag
Definition:
InputTag.h:15
edm::Event
Definition:
Event.h:73
L1Analysis::L1AnalysisSimulation::~L1AnalysisSimulation
~L1AnalysisSimulation()
Definition:
L1AnalysisSimulation.cc:7
PileupSummaryInfo.h
Generated for CMSSW Reference Manual by
1.8.14