CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1AnalysisSimulation.cc
Go to the documentation of this file.
2 
4 
6 
8 
10  if (!(e.eventAuxiliary().isRealData())) {
11  // Grab the pileup information for this event
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 }
bool isRealData() const
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:95
bool isValid() const
Definition: HandleBase.h:70
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500