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.

21 { return &sim_; }

References sim_.

◆ Reset()

void L1Analysis::L1AnalysisSimulation::Reset ( )
inline

Definition at line 19 of file L1AnalysisSimulation.h.

19 { sim_.Reset(); }

References L1Analysis::L1AnalysisSimulationDataFormat::Reset(), and sim_.

◆ Set()

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

Definition at line 9 of file L1AnalysisSimulation.cc.

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 }

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

Member Data Documentation

◆ sim_

L1AnalysisSimulationDataFormat L1Analysis::L1AnalysisSimulation::sim_
private

Definition at line 24 of file L1AnalysisSimulation.h.

Referenced by getData(), and Reset().

L1Analysis::L1AnalysisSimulationDataFormat::actualInt
int actualInt
Definition: L1AnalysisSimulationDataFormat.h:27
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1Analysis::L1AnalysisSimulationDataFormat::Reset
void Reset()
Definition: L1AnalysisSimulationDataFormat.h:19
edm::Handle
Definition: AssociativeIterator.h:50
L1Analysis::L1AnalysisSimulationDataFormat::meanInt
float meanInt
Definition: L1AnalysisSimulationDataFormat.h:26
L1Analysis::L1AnalysisSimulation::sim_
L1AnalysisSimulationDataFormat sim_
Definition: L1AnalysisSimulation.h:24
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag
Definition: InputTag.h:15
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37