CMS 3D CMS Logo

PreMixingHGCalWorker.cc
Go to the documentation of this file.
8 
11 
15 
18 
20 public:
22  ~PreMixingHGCalWorker() override = default;
23 
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:
37 
39 };
40 
42  edm::ProducesCollector producesCollector,
44  : signalToken_(iC.consumes<PHGCSimAccumulator>(ps.getParameter<edm::InputTag>("digiTagSig"))),
45  pileupInputTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
46  digitizer_(ps, iC) {
48 }
49 
51 
53 
56  e.getByToken(signalToken_, handle);
58 }
59 
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 
PreMixingHGCalWorker::endRun
void endRun() override
Definition: PreMixingHGCalWorker.cc:52
PHGCSimAccumulator
Definition: PHGCSimAccumulator.h:8
PreMixingHGCalWorker::pileupInputTag_
edm::InputTag pileupInputTag_
Definition: PreMixingHGCalWorker.cc:36
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
Handle.h
PreMixingHGCalWorker::PreMixingHGCalWorker
PreMixingHGCalWorker(const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &&iC)
Definition: PreMixingHGCalWorker.cc:41
PreMixingHGCalWorker::put
void put(edm::Event &e, const edm::EventSetup &ES, std::vector< PileupSummaryInfo > const &ps, int bs) override
Definition: PreMixingHGCalWorker.cc:66
MessageLogger.h
HGCDigitizer::digiCollection
std::string digiCollection()
Definition: HGCDigitizer.h:85
PreMixingHGCalWorker::~PreMixingHGCalWorker
~PreMixingHGCalWorker() override=default
patZpeak.handle
handle
Definition: patZpeak.py:23
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< PHGCSimAccumulator >
PreMixingHGCalWorker::digitizer_
HGCDigitizer digitizer_
Definition: PreMixingHGCalWorker.cc:38
edm
HLT enums.
Definition: AlignableModifier.h:19
RandomNumberGenerator.h
HGCDigitizer::endRun
void endRun()
Definition: HGCDigitizer.cc:858
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
PreMixingHGCalWorker::initializeEvent
void initializeEvent(const edm::Event &e, const edm::EventSetup &ES) override
Definition: PreMixingHGCalWorker.cc:29
edm::SortedCollection
Definition: SortedCollection.h:49
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
HGCDigitizer::beginRun
void beginRun(const edm::EventSetup &es)
actions at the start/end of run
Definition: HGCDigitizer.cc:819
edm::Handle
Definition: AssociativeIterator.h:50
ProducesCollector.h
HGCDigitizer::accumulate_forPreMix
void accumulate_forPreMix(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
Definition: HGCDigitizer.cc:418
cms::cuda::bs
bs
Definition: HistoContainer.h:127
PreMixingHGCalWorker
Definition: PreMixingHGCalWorker.cc:19
PreMixingWorker.h
Service.h
PileUpEventPrincipal.h
PreMixingHGCalWorker::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &ES) override
Definition: PreMixingHGCalWorker.cc:50
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
HGCDigitizer::finalizeEvent
void finalizeEvent(edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
Definition: HGCDigitizer.cc:340
PreMixingHGCalWorker::signalToken_
edm::EDGetTokenT< PHGCSimAccumulator > signalToken_
Definition: PreMixingHGCalWorker.cc:35
edm::Service< edm::RandomNumberGenerator >
edm::ProducesCollector::produces
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
Definition: ProducesCollector.h:52
edm::EventSetup
Definition: EventSetup.h:57
PHGCSimAccumulator.h
PreMixingWorkerFactory.h
writedatasetfile.run
run
Definition: writedatasetfile.py:27
edm::ProducesCollector
Definition: ProducesCollector.h:43
HGCDigitizer.h
HGCDigitizer
Definition: HGCDigitizer.h:30
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
PreMixingHGCalWorker::addSignals
void addSignals(const edm::Event &e, const edm::EventSetup &ES) override
Definition: PreMixingHGCalWorker.cc:54
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
PreMixingHGCalWorker::operator=
PreMixingHGCalWorker & operator=(const PreMixingHGCalWorker &)=delete
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
PreMixingHGCalWorker::addPileups
void addPileups(const PileUpEventPrincipal &, const edm::EventSetup &ES) override
Definition: PreMixingHGCalWorker.cc:60