CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PreMixingMTDWorker Class Reference
Inheritance diagram for PreMixingMTDWorker:
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
 
PreMixingMTDWorkeroperator= (const PreMixingMTDWorker &)=delete
 
 PreMixingMTDWorker (const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &&iC)
 
 PreMixingMTDWorker (const PreMixingMTDWorker &)=delete
 
void put (edm::Event &e, const edm::EventSetup &ES, std::vector< PileupSummaryInfo > const &ps, int bs) override
 
 ~PreMixingMTDWorker () 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

std::unique_ptr< MTDDigitizerBasedigitizer_
 
edm::InputTag pileInputTag_
 
edm::EDGetTokenT< PMTDSimAccumulatorsignalToken_
 

Detailed Description

Definition at line 19 of file PreMixingMTDWorker.cc.

Constructor & Destructor Documentation

◆ PreMixingMTDWorker() [1/2]

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

Definition at line 40 of file PreMixingMTDWorker.cc.

44  pileInputTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
46  ps.getParameter<std::string>("digitizerName"), ps, producesCollector, iC)) {}
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< PMTDSimAccumulator > signalToken_
std::unique_ptr< MTDDigitizerBase > digitizer_
def create(alignables, pedeDump, additionalData, outputFile, config)
edm::InputTag pileInputTag_
#define get

◆ ~PreMixingMTDWorker()

PreMixingMTDWorker::~PreMixingMTDWorker ( )
overridedefault

◆ PreMixingMTDWorker() [2/2]

PreMixingMTDWorker::PreMixingMTDWorker ( const PreMixingMTDWorker )
delete

Member Function Documentation

◆ addPileups()

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

Implements PreMixingWorker.

Definition at line 61 of file PreMixingMTDWorker.cc.

References digitizer_, PileUpEventPrincipal::getByLabel(), patZpeak::handle, and pileInputTag_.

61  {
64  if (handle.isValid())
65  digitizer_->accumulate(*handle);
66  else
67  edm::LogWarning("MtdMix") << "PreMixingMTDWorker::Cannot find PileUp collection";
68 }
std::unique_ptr< MTDDigitizerBase > digitizer_
edm::InputTag pileInputTag_
Log< level::Warning, false > LogWarning
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const

◆ addSignals()

void PreMixingMTDWorker::addSignals ( const edm::Event e,
const edm::EventSetup ES 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 52 of file PreMixingMTDWorker.cc.

References digitizer_, MillePedeFileConverter_cfg::e, patZpeak::handle, and signalToken_.

52  {
54  e.getByToken(signalToken_, handle);
55  if (handle.isValid())
56  digitizer_->accumulate(*handle);
57  else
58  edm::LogWarning("MtdMix") << "PreMixingMTDWorker::Cannot find Signal collection";
59 }
edm::EDGetTokenT< PMTDSimAccumulator > signalToken_
std::unique_ptr< MTDDigitizerBase > digitizer_
Log< level::Warning, false > LogWarning

◆ initializeEvent()

void PreMixingMTDWorker::initializeEvent ( const edm::Event e,
const edm::EventSetup ES 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 48 of file PreMixingMTDWorker.cc.

References digitizer_, and MillePedeFileConverter_cfg::e.

48  {
49  digitizer_->initializeEvent(e, ES);
50 }
std::unique_ptr< MTDDigitizerBase > digitizer_

◆ operator=()

PreMixingMTDWorker& PreMixingMTDWorker::operator= ( const PreMixingMTDWorker )
delete

◆ put()

void PreMixingMTDWorker::put ( edm::Event e,
const edm::EventSetup ES,
std::vector< PileupSummaryInfo > const &  ps,
int  bs 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 70 of file PreMixingMTDWorker.cc.

References digitizer_, MillePedeFileConverter_cfg::e, and edm::RandomNumberGenerator::getEngine().

73  {
75  digitizer_->finalizeEvent(e, ES, &rng->getEngine(e.streamID()));
76 }
std::unique_ptr< MTDDigitizerBase > digitizer_
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.

Member Data Documentation

◆ digitizer_

std::unique_ptr<MTDDigitizerBase> PreMixingMTDWorker::digitizer_
private

Definition at line 37 of file PreMixingMTDWorker.cc.

Referenced by addPileups(), addSignals(), initializeEvent(), and put().

◆ pileInputTag_

edm::InputTag PreMixingMTDWorker::pileInputTag_
private

Definition at line 35 of file PreMixingMTDWorker.cc.

Referenced by addPileups().

◆ signalToken_

edm::EDGetTokenT<PMTDSimAccumulator> PreMixingMTDWorker::signalToken_
private

Definition at line 33 of file PreMixingMTDWorker.cc.

Referenced by addSignals().