CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
PreMixingHGCalWorker Class Reference
Inheritance diagram for PreMixingHGCalWorker:
PreMixingWorker

Public Member Functions

void addPileups (const PileUpEventPrincipal &, const edm::EventSetup &ES) override
 
void addSignals (const edm::Event &e, const edm::EventSetup &ES) override
 
void initializeEvent (const edm::Event &e, const edm::EventSetup &ES) override
 
PreMixingHGCalWorkeroperator= (const PreMixingHGCalWorker &)=delete
 
 PreMixingHGCalWorker (const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &&iC)
 
 PreMixingHGCalWorker (const PreMixingHGCalWorker &)=delete
 
void put (edm::Event &e, const edm::EventSetup &ES, std::vector< PileupSummaryInfo > const &ps, int bs) override
 
 ~PreMixingHGCalWorker () override=default
 
- Public Member Functions inherited from PreMixingWorker
virtual void beginLuminosityBlock (edm::LuminosityBlock const &iLumi, edm::EventSetup const &iSetup)
 
virtual void beginRun (edm::Run const &iRun, edm::EventSetup const &iSetup)
 
virtual void endRun ()
 
virtual void finalizeBunchCrossing (edm::Event &iEvent, edm::EventSetup const &iSetup, int bunchCrossing)
 
virtual void initializeBunchCrossing (edm::Event const &iEvent, edm::EventSetup const &iSetup, int bunchCrossing)
 
 PreMixingWorker ()=default
 
virtual ~PreMixingWorker ()=default
 

Private Attributes

HGCDigitizer digitizer_
 
edm::InputTag pileupInputTag_
 
edm::EDGetTokenT
< PHGCSimAccumulator
signalToken_
 

Detailed Description

Definition at line 19 of file PreMixingHGCalWorker.cc.

Constructor & Destructor Documentation

PreMixingHGCalWorker::PreMixingHGCalWorker ( const edm::ParameterSet ps,
edm::ProducesCollector  producesCollector,
edm::ConsumesCollector &&  iC 
)

Definition at line 39 of file PreMixingHGCalWorker.cc.

References HGCDigitizer::digiCollection(), digitizer_, and edm::ProducesCollector::produces().

43  pileupInputTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
44  digitizer_(ps, iC) {
46 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::string digiCollection()
Definition: HGCDigitizer.h:76
edm::EDGetTokenT< PHGCSimAccumulator > signalToken_
PreMixingHGCalWorker::~PreMixingHGCalWorker ( )
overridedefault
PreMixingHGCalWorker::PreMixingHGCalWorker ( const PreMixingHGCalWorker )
delete

Member Function Documentation

void PreMixingHGCalWorker::addPileups ( const PileUpEventPrincipal pep,
const edm::EventSetup ES 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 58 of file PreMixingHGCalWorker.cc.

References HGCDigitizer::accumulate_forPreMix(), digitizer_, PileUpEventPrincipal::getByLabel(), patZpeak::handle, and pileupInputTag_.

58  {
60  pep.getByLabel(pileupInputTag_, handle);
61  digitizer_.accumulate_forPreMix(*handle, true);
62 }
tuple handle
Definition: patZpeak.py:25
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
void accumulate_forPreMix(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
void PreMixingHGCalWorker::addSignals ( const edm::Event e,
const edm::EventSetup ES 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 52 of file PreMixingHGCalWorker.cc.

References HGCDigitizer::accumulate_forPreMix(), digitizer_, edm::Event::getByToken(), patZpeak::handle, and signalToken_.

52  {
54  e.getByToken(signalToken_, handle);
55  digitizer_.accumulate_forPreMix(*handle, false);
56 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
tuple handle
Definition: patZpeak.py:25
void accumulate_forPreMix(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
edm::EDGetTokenT< PHGCSimAccumulator > signalToken_
void PreMixingHGCalWorker::initializeEvent ( const edm::Event e,
const edm::EventSetup ES 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 48 of file PreMixingHGCalWorker.cc.

References digitizer_, and HGCDigitizer::initializeEvent().

48  {
50 }
void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
actions at the start/end of event
PreMixingHGCalWorker& PreMixingHGCalWorker::operator= ( const PreMixingHGCalWorker )
delete
void PreMixingHGCalWorker::put ( edm::Event e,
const edm::EventSetup ES,
std::vector< PileupSummaryInfo > const &  ps,
int  bs 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 64 of file PreMixingHGCalWorker.cc.

References digitizer_, HGCDigitizer::finalizeEvent(), edm::RandomNumberGenerator::getEngine(), and edm::Event::streamID().

67  {
69  digitizer_.finalizeEvent(e, ES, &rng->getEngine(e.streamID()));
70 }
void finalizeEvent(edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
StreamID streamID() const
Definition: Event.h:98

Member Data Documentation

HGCDigitizer PreMixingHGCalWorker::digitizer_
private
edm::InputTag PreMixingHGCalWorker::pileupInputTag_
private

Definition at line 34 of file PreMixingHGCalWorker.cc.

Referenced by addPileups().

edm::EDGetTokenT<PHGCSimAccumulator> PreMixingHGCalWorker::signalToken_
private

Definition at line 33 of file PreMixingHGCalWorker.cc.

Referenced by addSignals().