CMS 3D CMS Logo

PreMixingHcalWorker.cc
Go to the documentation of this file.
8 
18 
21 
23 public:
25  ~PreMixingHcalWorker() override = default;
26 
29 
30  void beginRun(const edm::Run& run, const edm::EventSetup& ES) override;
31  void initializeEvent(const edm::Event &e, const edm::EventSetup& ES) override;
32  void addSignals(const edm::Event &e, const edm::EventSetup& ES) override;
33  void addPileups(const PileUpEventPrincipal&, const edm::EventSetup& ES) override;
34  void put(edm::Event &e,const edm::EventSetup& ES, std::vector<PileupSummaryInfo> const& ps, int bs) override;
35 
36 
37 private:
38  edm::InputTag HBHEPileInputTag_; // InputTag for Pileup Digis collection
39  edm::InputTag HOPileInputTag_ ; // InputTag for Pileup Digis collection
40  edm::InputTag HFPileInputTag_ ; // InputTag for Pileup Digis collection
41  edm::InputTag ZDCPileInputTag_ ; // InputTag for Pileup Digis collection
42  edm::InputTag QIE10PileInputTag_ ; // InputTag for Pileup Digis collection
43  edm::InputTag QIE11PileInputTag_ ; // InputTag for Pileup Digis collection
44  std::string HBHEDigiCollectionDM_; // secondary name to be given to collection of digis
45  std::string HODigiCollectionDM_ ; // secondary name to be given to collection of digis
46  std::string HFDigiCollectionDM_ ; // secondary name to be given to collection of digis
47  std::string ZDCDigiCollectionDM_ ; // secondary name to be given to collection of digis
48  std::string QIE10DigiCollectionDM_ ; // secondary name to be given to collection of digis
49  std::string QIE11DigiCollectionDM_ ; // secondary name to be given to collection of digis
50 
57 
65 };
66 
67 // Constructor
69  HBHEPileInputTag_(ps.getParameter<edm::InputTag>("HBHEPileInputTag")),
70  HOPileInputTag_(ps.getParameter<edm::InputTag>("HOPileInputTag")),
71  HFPileInputTag_(ps.getParameter<edm::InputTag>("HFPileInputTag")),
72  ZDCPileInputTag_(ps.getParameter<edm::InputTag>("ZDCPileInputTag")),
73  QIE10PileInputTag_(ps.getParameter<edm::InputTag>("QIE10PileInputTag")),
74  QIE11PileInputTag_(ps.getParameter<edm::InputTag>("QIE11PileInputTag")),
75  myHcalDigitizer_(ps, iC)
76 {
83 
90 
91  // Hcal
92  // Signal inputs now handled by HcalDigitizer - gets pSimHits directly
93 
94  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
95  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
96  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
97  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
98  QIE10DigiCollectionDM_ = ps.getParameter<std::string>("QIE10DigiCollectionDM");
99  QIE11DigiCollectionDM_ = ps.getParameter<std::string>("QIE11DigiCollectionDM");
100 
101  producer.produces< HBHEDigiCollection >();
102  producer.produces< HODigiCollection >();
103  producer.produces< HFDigiCollection >();
104  producer.produces< ZDCDigiCollection >();
105 
106  producer.produces<QIE10DigiCollection>("HFQIE10DigiCollection");
107  producer.produces<QIE11DigiCollection>("HBHEQIE11DigiCollection");
108 
109  // initialize HcalDigitizer here...
110  myHcalDigitizer_.setHBHENoiseSignalGenerator( & theHBHESignalGenerator );
116 
117 }
118 
120  myHcalDigitizer_.beginRun(run, ES);
121 }
122 
125 }
126 
129 }
130 
132  const auto& ep = pep.principal();
133  LogDebug("PreMixingHcalWorker") <<"\n===============> adding pileups from event "<<ep.id()<<" for bunchcrossing "<<pep.bunchCrossing();
134 
141 
142  // put digis from pileup event into digitizer
143 
144  const auto *mcc = pep.moduleCallingContext();
150 }
151 
152 void PreMixingHcalWorker::put(edm::Event &e,const edm::EventSetup& ES, std::vector<PileupSummaryInfo> const& ps, int bs) {
154 }
155 
#define LogDebug(id)
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
T getParameter(std::string const &) const
void addSignals(const edm::Event &e, const edm::EventSetup &ES) override
void accumulate(edm::Event const &, edm::EventSetup const &) override
HBHESignalGenerator theHBHESignalGenerator
std::string ZDCDigiCollectionDM_
HcalSignalGenerator< HcalQIE10DigitizerTraits > QIE10SignalGenerator
HcalSignalGenerator< HcalQIE11DigitizerTraits > QIE11SignalGenerator
PreMixingHcalWorker(const edm::ParameterSet &ps, edm::ProducerBase &producer, edm::ConsumesCollector &&iC)
void setQIE10NoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
void initializeEvent(const edm::Event &e, const edm::EventSetup &ES) override
~PreMixingHcalWorker() override=default
void addPileups(const PileUpEventPrincipal &, const edm::EventSetup &ES) override
HcalDigiProducer myHcalDigitizer_
void setQIE11NoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
edm::EDGetTokenT< ZDCDigitizerTraits::DigiCollection > tok_zdc_
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup)
virtual void fill(edm::ModuleCallingContext const *mcc)
edm::InputTag HFPileInputTag_
edm::EventPrincipal const & principal()
void put(edm::Event &e, const edm::EventSetup &ES, std::vector< PileupSummaryInfo > const &ps, int bs) override
edm::EDGetTokenT< HBHEDigitizerTraits::DigiCollection > tok_hbhe_
void beginRun(const edm::Run &run, const edm::EventSetup &ES) override
edm::InputTag HBHEPileInputTag_
void finalizeEvent(edm::Event &, edm::EventSetup const &) override
edm::InputTag HOPileInputTag_
HcalSignalGenerator< HFDigitizerTraits > HFSignalGenerator
QIE11SignalGenerator theQIE11SignalGenerator
QIE10SignalGenerator theQIE10SignalGenerator
std::string HBHEDigiCollectionDM_
ZDCSignalGenerator theZDCSignalGenerator
void initializeEvent(edm::Event const &, edm::EventSetup const &) override
edm::InputTag QIE10PileInputTag_
void setZDCNoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
HcalSignalGenerator< HODigitizerTraits > HOSignalGenerator
edm::EDGetTokenT< HFDigitizerTraits::DigiCollection > tok_hf_
edm::EDGetTokenT< HcalQIE10DigitizerTraits::DigiCollection > tok_qie10_
PreMixingHcalWorker & operator=(const PreMixingHcalWorker &)=delete
edm::ModuleCallingContext const * moduleCallingContext() const
edm::EDGetTokenT< HcalQIE11DigitizerTraits::DigiCollection > tok_qie11_
HLT enums.
HcalSignalGenerator< ZDCDigitizerTraits > ZDCSignalGenerator
void beginRun(edm::Run const &, edm::EventSetup const &) override
HcalSignalGenerator< HBHEDigitizerTraits > HBHESignalGenerator
HOSignalGenerator theHOSignalGenerator
void setHONoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
void setHFNoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
void setHBHENoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
edm::InputTag QIE11PileInputTag_
edm::EDGetTokenT< HODigitizerTraits::DigiCollection > tok_ho_
#define DEFINE_PREMIXING_WORKER(TYPE)
edm::InputTag ZDCPileInputTag_
HFSignalGenerator theHFSignalGenerator
Definition: Run.h:44
std::string QIE11DigiCollectionDM_
std::string QIE10DigiCollectionDM_