CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1Analysis::L1AnalysisSimulation Class Reference

#include <L1AnalysisSimulation.h>

Public Member Functions

L1AnalysisSimulationDataFormatgetData ()
 
 L1AnalysisSimulation ()
 
void Reset ()
 
void Set (const edm::Event &e)
 
 ~L1AnalysisSimulation ()
 

Private Attributes

L1AnalysisSimulationDataFormat sim_
 

Detailed Description

Definition at line 16 of file L1AnalysisSimulation.h.

Constructor & Destructor Documentation

L1Analysis::L1AnalysisSimulation::L1AnalysisSimulation ( )

Definition at line 5 of file L1AnalysisSimulation.cc.

6 {
7 }
L1Analysis::L1AnalysisSimulation::~L1AnalysisSimulation ( )

Definition at line 9 of file L1AnalysisSimulation.cc.

10 {
11 }

Member Function Documentation

L1AnalysisSimulationDataFormat* L1Analysis::L1AnalysisSimulation::getData ( void  )
inline

Definition at line 23 of file L1AnalysisSimulation.h.

References sim_.

23 {return &sim_;}
L1AnalysisSimulationDataFormat sim_
void L1Analysis::L1AnalysisSimulation::Reset ( )
inline
void L1Analysis::L1AnalysisSimulation::Set ( const edm::Event e)

Definition at line 13 of file L1AnalysisSimulation.cc.

References L1Analysis::L1AnalysisSimulationDataFormat::actualInt, edm::Event::eventAuxiliary(), edm::Event::getByLabel(), edm::EventAuxiliary::isRealData(), edm::HandleBase::isValid(), L1Analysis::L1AnalysisSimulationDataFormat::meanInt, and sim_.

Referenced by Reset().

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 }
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_

Member Data Documentation

L1AnalysisSimulationDataFormat L1Analysis::L1AnalysisSimulation::sim_
private

Definition at line 25 of file L1AnalysisSimulation.h.

Referenced by getData(), Reset(), and Set().