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:
36 
38 
40 };
41 
43  edm::ProducesCollector producesCollector,
45  : signalToken_(iC.consumes<PHGCSimAccumulator>(ps.getParameter<edm::InputTag>("digiTagSig"))),
46  pileInputTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
47  digitizer_(ps, iC) {
49 }
50 
52 
54 
57  e.getByToken(signalToken_, handle);
58  digitizer_.accumulate(*handle);
59 }
60 
63  pep.getByLabel(pileInputTag_, handle);
64  digitizer_.accumulate(*handle);
65 }
66 
68  const edm::EventSetup& ES,
69  std::vector<PileupSummaryInfo> const& ps,
70  int bs) {
72  digitizer_.finalizeEvent(e, ES, &rng->getEngine(e.streamID()));
73 }
74 
void finalizeEvent(edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
void addSignals(const edm::Event &e, const edm::EventSetup &ES) override
~PreMixingHGCalWorker() override=default
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
PreMixingHGCalWorker(const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &&iC)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
PreMixingHGCalWorker & operator=(const PreMixingHGCalWorker &)=delete
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
void beginRun(const edm::EventSetup &es)
actions at the start/end of run
void addPileups(const PileUpEventPrincipal &, const edm::EventSetup &ES) override
void beginRun(const edm::Run &run, const edm::EventSetup &ES) override
void put(edm::Event &e, const edm::EventSetup &ES, std::vector< PileupSummaryInfo > const &ps, int bs) override
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
handle SimHit accumulation
HLT enums.
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
StreamID streamID() const
Definition: Event.h:96
void initializeEvent(const edm::Event &e, const edm::EventSetup &ES) override
#define DEFINE_PREMIXING_WORKER(TYPE)
std::string digiCollection()
Definition: HGCDigitizer.h:77
Definition: Run.h:45
edm::EDGetTokenT< PHGCSimAccumulator > signalToken_