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 beginRun(const edm::Run& run, const edm::EventSetup& ES) override;
28  void endRun() override;
29  void initializeEvent(const edm::Event& e, const edm::EventSetup& ES) override {}
30  void addSignals(const edm::Event& e, const edm::EventSetup& ES) override;
31  void addPileups(const PileUpEventPrincipal&, const edm::EventSetup& ES) override;
32  void put(edm::Event& e, const edm::EventSetup& ES, std::vector<PileupSummaryInfo> const& ps, int bs) override;
33 
34 private:
36 
38 
39  std::unique_ptr<MTDDigitizerBase> digitizer_;
40 };
41 
43  edm::ProducesCollector producesCollector,
45  : signalToken_(iC.consumes<PMTDSimAccumulator>(ps.getParameter<edm::InputTag>("digiTagSig"))),
46  pileInputTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
47  digitizer_(MTDDigitizerFactory::get()->create(
48  ps.getParameter<std::string>("digitizerName"), ps, producesCollector, iC)) {}
49 
50 void PreMixingMTDWorker::beginRun(const edm::Run& run, const edm::EventSetup& ES) { digitizer_->beginRun(ES); }
51 
53 
56  e.getByToken(signalToken_, handle);
57  digitizer_->accumulate(*handle);
58 }
59 
63  digitizer_->accumulate(*handle);
64 }
65 
67  const edm::EventSetup& ES,
68  std::vector<PileupSummaryInfo> const& ps,
69  int bs) {
71  digitizer_->finalizeEvent(e, ES, &rng->getEngine(e.streamID()));
72 }
73 
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:60
PMTDSimAccumulator.h
patZpeak.handle
handle
Definition: patZpeak.py:23
edm::Run
Definition: Run.h:45
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:29
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
PreMixingMTDWorker::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &ES) override
Definition: PreMixingMTDWorker.cc:50
edm::Handle
Definition: AssociativeIterator.h:50
ProducesCollector.h
cms::cuda::bs
bs
Definition: HistoContainer.h:127
PreMixingMTDWorker::endRun
void endRun() override
Definition: PreMixingMTDWorker.cc:52
PreMixingWorker.h
Service.h
PileUpEventPrincipal.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
PreMixingMTDWorker::addSignals
void addSignals(const edm::Event &e, const edm::EventSetup &ES) override
Definition: PreMixingMTDWorker.cc:54
Event.h
edmplugin::PluginFactory
Definition: PluginFactory.h:34
PreMixingMTDWorker::digitizer_
std::unique_ptr< MTDDigitizerBase > digitizer_
Definition: PreMixingMTDWorker.cc:39
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:66
PreMixingMTDWorker::signalToken_
edm::EDGetTokenT< PMTDSimAccumulator > signalToken_
Definition: PreMixingMTDWorker.cc:35
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
PreMixingMTDWorker::pileInputTag_
edm::InputTag pileInputTag_
Definition: PreMixingMTDWorker.cc:37
PreMixingWorkerFactory.h
PreMixingMTDWorker
Definition: PreMixingMTDWorker.cc:19
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
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:39
PreMixingMTDWorker::PreMixingMTDWorker
PreMixingMTDWorker(const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &&iC)
Definition: PreMixingMTDWorker.cc:42
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37