CMS 3D CMS Logo

L1AnalysisSimulation.cc
Go to the documentation of this file.
2 
4 
6 {
7 }
8 
10 {
11 }
12 
14 {
15 
16 
17  if (!(e.eventAuxiliary().isRealData())) {
18 
19 // Grab the pileup information for this event
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 
bool isRealData() const
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:92
bool isValid() const
Definition: HandleBase.h:74
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:475
L1AnalysisSimulationDataFormat sim_