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 15 of file L1AnalysisSimulation.h.

Constructor & Destructor Documentation

◆ L1AnalysisSimulation()

L1Analysis::L1AnalysisSimulation::L1AnalysisSimulation ( )

Definition at line 5 of file L1AnalysisSimulation.cc.

5 {}

◆ ~L1AnalysisSimulation()

L1Analysis::L1AnalysisSimulation::~L1AnalysisSimulation ( )

Definition at line 7 of file L1AnalysisSimulation.cc.

7 {}

Member Function Documentation

◆ getData()

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

Definition at line 21 of file L1AnalysisSimulation.h.

References sim_.

21 { return &sim_; }
L1AnalysisSimulationDataFormat sim_

◆ Reset()

void L1Analysis::L1AnalysisSimulation::Reset ( )
inline

◆ Set()

void L1Analysis::L1AnalysisSimulation::Set ( const edm::Event e)

Definition at line 9 of file L1AnalysisSimulation.cc.

References simKBmtfDigis_cfi::bx, MillePedeFileConverter_cfg::e, and edm::HandleBase::isValid().

9  {
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 }
L1AnalysisSimulationDataFormat sim_
bool isValid() const
Definition: HandleBase.h:70

Member Data Documentation

◆ sim_

L1AnalysisSimulationDataFormat L1Analysis::L1AnalysisSimulation::sim_
private

Definition at line 24 of file L1AnalysisSimulation.h.

Referenced by getData(), and Reset().