CMS 3D CMS Logo

PreMixingMTDWorker.cc
Go to the documentation of this file.
8 
11 
15 
18 
20 public:
22  ~PreMixingMTDWorker() override = default;
23 
24  PreMixingMTDWorker(const PreMixingMTDWorker&) = delete;
26 
27  void initializeEvent(const edm::Event& e, const edm::EventSetup& ES) override;
28  void addSignals(const edm::Event& e, const edm::EventSetup& ES) override;
29  void addPileups(const PileUpEventPrincipal&, const edm::EventSetup& ES) override;
30  void put(edm::Event& e, const edm::EventSetup& ES, std::vector<PileupSummaryInfo> const& ps, int bs) override;
31 
32 private:
34 
36 
37  std::unique_ptr<MTDDigitizerBase> digitizer_;
38 };
39 
41  edm::ProducesCollector producesCollector,
43  : signalToken_(iC.consumes<PMTDSimAccumulator>(ps.getParameter<edm::InputTag>("digiTagSig"))),
44  pileInputTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
45  digitizer_(MTDDigitizerFactory::get()->create(
46  ps.getParameter<std::string>("digitizerName"), ps, producesCollector, iC)) {}
47 
49  digitizer_->initializeEvent(e, ES);
50 }
51 
54  e.getByToken(signalToken_, handle);
55  digitizer_->accumulate(*handle);
56 }
57 
61  digitizer_->accumulate(*handle);
62 }
63 
65  const edm::EventSetup& ES,
66  std::vector<PileupSummaryInfo> const& ps,
67  int bs) {
69  digitizer_->finalizeEvent(e, ES, &rng->getEngine(e.streamID()));
70 }
71 
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
Handle.h
MessageLogger.h
PreMixingMTDWorker::~PreMixingMTDWorker
~PreMixingMTDWorker() override=default
PreMixingMTDWorker::addPileups
void addPileups(const PileUpEventPrincipal &, const edm::EventSetup &ES) override
Definition: PreMixingMTDWorker.cc:58
PMTDSimAccumulator.h
patZpeak.handle
handle
Definition: patZpeak.py:23
edm::EDGetTokenT< PMTDSimAccumulator >
edm
HLT enums.
Definition: AlignableModifier.h:19
RandomNumberGenerator.h
PMTDSimAccumulator
Definition: PMTDSimAccumulator.h:9
PreMixingMTDWorker::initializeEvent
void initializeEvent(const edm::Event &e, const edm::EventSetup &ES) override
Definition: PreMixingMTDWorker.cc:48
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
PreMixingMTDWorker::operator=
PreMixingMTDWorker & operator=(const PreMixingMTDWorker &)=delete
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
edm::Handle
Definition: AssociativeIterator.h:50
ProducesCollector.h
cms::cuda::bs
bs
Definition: HistoContainer.h:127
PreMixingWorker.h
Service.h
PileUpEventPrincipal.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
PreMixingMTDWorker::addSignals
void addSignals(const edm::Event &e, const edm::EventSetup &ES) override
Definition: PreMixingMTDWorker.cc:52
Event.h
edmplugin::PluginFactory
Definition: PluginFactory.h:34
PreMixingMTDWorker::digitizer_
std::unique_ptr< MTDDigitizerBase > digitizer_
Definition: PreMixingMTDWorker.cc:37
MTDDigitizerBase.h
edm::Service< edm::RandomNumberGenerator >
PreMixingMTDWorker::put
void put(edm::Event &e, const edm::EventSetup &ES, std::vector< PileupSummaryInfo > const &ps, int bs) override
Definition: PreMixingMTDWorker.cc:64
PreMixingMTDWorker::signalToken_
edm::EDGetTokenT< PMTDSimAccumulator > signalToken_
Definition: PreMixingMTDWorker.cc:33
edm::EventSetup
Definition: EventSetup.h:58
get
#define get
PreMixingMTDWorker::pileInputTag_
edm::InputTag pileInputTag_
Definition: PreMixingMTDWorker.cc:35
PreMixingWorkerFactory.h
PreMixingMTDWorker
Definition: PreMixingMTDWorker.cc:19
std
Definition: JetResolutionObject.h:76
edm::ProducesCollector
Definition: ProducesCollector.h:43
DEFINE_PREMIXING_WORKER
#define DEFINE_PREMIXING_WORKER(TYPE)
Definition: PreMixingWorkerFactory.h:16
EventSetup.h
PreMixingWorker
Definition: PreMixingWorker.h:14
ConsumesCollector.h
ParameterSet.h
PileUpEventPrincipal::getByLabel
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
Definition: PileUpEventPrincipal.h:33
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
PreMixingMTDWorker::PreMixingMTDWorker
PreMixingMTDWorker(const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &&iC)
Definition: PreMixingMTDWorker.cc:40
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37