CMS 3D CMS Logo

PreMixingHcalWorker.cc
Go to the documentation of this file.
8 
18 
21 
23 public:
25  ~PreMixingHcalWorker() override = default;
26 
27  PreMixingHcalWorker(const PreMixingHcalWorker &) = delete;
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 private:
37  edm::InputTag HBHEPileInputTag_; // InputTag for Pileup Digis collection
38  edm::InputTag HOPileInputTag_; // InputTag for Pileup Digis collection
39  edm::InputTag HFPileInputTag_; // InputTag for Pileup Digis collection
40  edm::InputTag ZDCPileInputTag_; // InputTag for Pileup Digis collection
41  edm::InputTag QIE10PileInputTag_; // InputTag for Pileup Digis collection
42  edm::InputTag QIE11PileInputTag_; // InputTag for Pileup Digis collection
43  std::string HBHEDigiCollectionDM_; // secondary name to be given to collection
44  // 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
49  // collection of digis
50  std::string QIE11DigiCollectionDM_; // secondary name to be given to
51  // collection of digis
52 
59 
67 };
68 
69 // Constructor
73  : HBHEPileInputTag_(ps.getParameter<edm::InputTag>("HBHEPileInputTag")),
74  HOPileInputTag_(ps.getParameter<edm::InputTag>("HOPileInputTag")),
75  HFPileInputTag_(ps.getParameter<edm::InputTag>("HFPileInputTag")),
76  ZDCPileInputTag_(ps.getParameter<edm::InputTag>("ZDCPileInputTag")),
77  QIE10PileInputTag_(ps.getParameter<edm::InputTag>("QIE10PileInputTag")),
78  QIE11PileInputTag_(ps.getParameter<edm::InputTag>("QIE11PileInputTag")),
79  myHcalDigitizer_(ps, iC) {
86 
93 
94  // Hcal
95  // Signal inputs now handled by HcalDigitizer - gets pSimHits directly
96 
97  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
98  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
99  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
100  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
101  QIE10DigiCollectionDM_ = ps.getParameter<std::string>("QIE10DigiCollectionDM");
102  QIE11DigiCollectionDM_ = ps.getParameter<std::string>("QIE11DigiCollectionDM");
103 
104  producer.produces<HBHEDigiCollection>();
105  producer.produces<HODigiCollection>();
106  producer.produces<HFDigiCollection>();
107  producer.produces<ZDCDigiCollection>();
108 
109  producer.produces<QIE10DigiCollection>("HFQIE10DigiCollection");
110  producer.produces<QIE11DigiCollection>("HBHEQIE11DigiCollection");
111 
112  // initialize HcalDigitizer here...
113  myHcalDigitizer_.setHBHENoiseSignalGenerator(&theHBHESignalGenerator);
119 }
120 
122  myHcalDigitizer_.beginRun(run, ES);
123 }
124 
127 }
128 
131 }
132 
134  const auto &ep = pep.principal();
135  LogDebug("PreMixingHcalWorker") << "\n===============> adding pileups from event " << ep.id()
136  << " for bunchcrossing " << pep.bunchCrossing();
137 
144 
145  // put digis from pileup event into digitizer
146 
147  const auto *mcc = pep.moduleCallingContext();
153 }
154 
156  const edm::EventSetup &ES,
157  std::vector<PileupSummaryInfo> const &ps,
158  int bs) {
160 }
161 
#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:45
std::string QIE11DigiCollectionDM_
std::string QIE10DigiCollectionDM_