CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PreMixingHGCalWorker.cc
Go to the documentation of this file.
8 
11 
15 
18 
20 public:
22  ~PreMixingHGCalWorker() override = default;
23 
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:
35 
37 };
38 
40  edm::ProducesCollector producesCollector,
42  : signalToken_(iC.consumes<PHGCSimAccumulator>(ps.getParameter<edm::InputTag>("digiTagSig"))),
43  pileupInputTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
44  digitizer_(ps, iC) {
46 }
47 
50 }
51 
54  e.getByToken(signalToken_, handle);
55  digitizer_.accumulate_forPreMix(*handle, false);
56 }
57 
60  pep.getByLabel(pileupInputTag_, handle);
61  digitizer_.accumulate_forPreMix(*handle, true);
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 
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:539
void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
actions at the start/end of event
PreMixingHGCalWorker & operator=(const PreMixingHGCalWorker &)=delete
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
tuple handle
Definition: patZpeak.py:23
void addPileups(const PileUpEventPrincipal &, const edm::EventSetup &ES) override
void put(edm::Event &e, const edm::EventSetup &ES, std::vector< PileupSummaryInfo > const &ps, int bs) override
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
StreamID streamID() const
Definition: Event.h:98
void accumulate_forPreMix(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
void initializeEvent(const edm::Event &e, const edm::EventSetup &ES) override
#define DEFINE_PREMIXING_WORKER(TYPE)
std::string digiCollection()
Definition: HGCDigitizer.h:76
edm::EDGetTokenT< PHGCSimAccumulator > signalToken_