CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCDigiProducer Class Reference

#include <HGCDigiProducer.h>

Inheritance diagram for HGCDigiProducer:
DigiAccumulatorMixMod

Public Member Functions

void accumulate (edm::Event const &, edm::EventSetup const &) override
 
void accumulate (PileUpEventPrincipal const &, edm::EventSetup const &, edm::StreamID const &) override
 
void finalizeEvent (edm::Event &, edm::EventSetup const &) override
 
 HGCDigiProducer (edm::ParameterSet const &pset, edm::ProducesCollector, edm::ConsumesCollector &iC)
 
 HGCDigiProducer (edm::ParameterSet const &pset, edm::ConsumesCollector &iC)
 
void initializeEvent (edm::Event const &, edm::EventSetup const &) override
 
 ~HGCDigiProducer () override=default
 
- Public Member Functions inherited from DigiAccumulatorMixMod
virtual void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void beginRun (edm::Run const &run, edm::EventSetup const &setup)
 
 DigiAccumulatorMixMod ()
 
 DigiAccumulatorMixMod (DigiAccumulatorMixMod const &)=delete
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void endRun (edm::Run const &run, edm::EventSetup const &setup)
 
virtual void finalizeBunchCrossing (edm::Event &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual PileupMixingContentgetEventPileupInfo ()
 
virtual void initializeBunchCrossing (edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing)
 
DigiAccumulatorMixMod const & operator= (DigiAccumulatorMixMod const &)=delete
 
virtual void StorePileupInformation (std::vector< int > &numInteractionList, std::vector< int > &bunchCrossingList, std::vector< float > &TrueInteractionList, std::vector< edm::EventID > &eventList, int bunchSpace)
 
virtual ~DigiAccumulatorMixMod ()
 

Private Attributes

bool premixStage1_
 
bool premixStage2_
 
CLHEP::HepRandomEngine * randomEngine_ = nullptr
 
HGCDigitizer theDigitizer_
 

Detailed Description

Definition at line 23 of file HGCDigiProducer.h.

Constructor & Destructor Documentation

◆ HGCDigiProducer() [1/2]

HGCDigiProducer::HGCDigiProducer ( edm::ParameterSet const &  pset,
edm::ProducesCollector  producesCollector,
edm::ConsumesCollector iC 
)

Definition at line 11 of file HGCDigiProducer.cc.

References HGCDigitizer::digiCollection(), premixStage1_, edm::ProducesCollector::produces(), muonDTDigis_cfi::pset, and theDigitizer_.

14  : HGCDigiProducer(pset, iC) {
15  premixStage1_ = pset.getParameter<bool>("premixStage1");
16  if (premixStage1_) {
18  } else {
20  }
21 }
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
HGCDigiProducer(edm::ParameterSet const &pset, edm::ProducesCollector, edm::ConsumesCollector &iC)
HGCDigitizer theDigitizer_
std::string digiCollection()
Definition: HGCDigitizer.h:76

◆ HGCDigiProducer() [2/2]

HGCDigiProducer::HGCDigiProducer ( edm::ParameterSet const &  pset,
edm::ConsumesCollector iC 
)

◆ ~HGCDigiProducer()

HGCDigiProducer::~HGCDigiProducer ( )
overridedefault

Member Function Documentation

◆ accumulate() [1/2]

void HGCDigiProducer::accumulate ( edm::Event const &  event,
edm::EventSetup const &  es 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 40 of file HGCDigiProducer.cc.

References HGCDigitizer::accumulate(), HGCDigitizer::accumulate_forPreMix(), premixStage1_, randomEngine_, and theDigitizer_.

40  {
41  if (premixStage1_) {
43  }
44 
45  else {
47  }
48 }
CLHEP::HepRandomEngine * randomEngine_
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
handle SimHit accumulation
HGCDigitizer theDigitizer_
void accumulate_forPreMix(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
Definition: event.py:1

◆ accumulate() [2/2]

void HGCDigiProducer::accumulate ( PileUpEventPrincipal const &  event,
edm::EventSetup const &  es,
edm::StreamID const &  streamID 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 50 of file HGCDigiProducer.cc.

References HGCDigitizer::accumulate(), HGCDigitizer::accumulate_forPreMix(), premixStage1_, randomEngine_, and theDigitizer_.

52  {
53  if (premixStage1_) {
55  } else {
57  }
58 }
CLHEP::HepRandomEngine * randomEngine_
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
handle SimHit accumulation
HGCDigitizer theDigitizer_
void accumulate_forPreMix(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
Definition: event.py:1

◆ finalizeEvent()

void HGCDigiProducer::finalizeEvent ( edm::Event event,
edm::EventSetup const &  es 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 34 of file HGCDigiProducer.cc.

References HGCDigitizer::finalizeEvent(), randomEngine_, and theDigitizer_.

34  {
36  randomEngine_ = nullptr; // to precent access outside event
37 }
void finalizeEvent(edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
CLHEP::HepRandomEngine * randomEngine_
HGCDigitizer theDigitizer_
Definition: event.py:1

◆ initializeEvent()

void HGCDigiProducer::initializeEvent ( edm::Event const &  event,
edm::EventSetup const &  es 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 27 of file HGCDigiProducer.cc.

References edm::RandomNumberGenerator::getEngine(), HGCDigitizer::initializeEvent(), randomEngine_, and theDigitizer_.

27  {
29  randomEngine_ = &rng->getEngine(event.streamID());
31 }
void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
actions at the start/end of event
CLHEP::HepRandomEngine * randomEngine_
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
HGCDigitizer theDigitizer_
Definition: event.py:1

Member Data Documentation

◆ premixStage1_

bool HGCDigiProducer::premixStage1_
private

Definition at line 36 of file HGCDigiProducer.h.

Referenced by accumulate(), and HGCDigiProducer().

◆ premixStage2_

bool HGCDigiProducer::premixStage2_
private

Definition at line 36 of file HGCDigiProducer.h.

◆ randomEngine_

CLHEP::HepRandomEngine* HGCDigiProducer::randomEngine_ = nullptr
private

Definition at line 38 of file HGCDigiProducer.h.

Referenced by accumulate(), finalizeEvent(), and initializeEvent().

◆ theDigitizer_

HGCDigitizer HGCDigiProducer::theDigitizer_
private

Definition at line 37 of file HGCDigiProducer.h.

Referenced by accumulate(), finalizeEvent(), HGCDigiProducer(), and initializeEvent().