CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
61 
69 };
70 
71 // Constructor
73  edm::ProducesCollector producesCollector,
75  : HBHEPileInputTag_(ps.getParameter<edm::InputTag>("HBHEPileInputTag")),
76  HOPileInputTag_(ps.getParameter<edm::InputTag>("HOPileInputTag")),
77  HFPileInputTag_(ps.getParameter<edm::InputTag>("HFPileInputTag")),
78  ZDCPileInputTag_(ps.getParameter<edm::InputTag>("ZDCPileInputTag")),
79  QIE10PileInputTag_(ps.getParameter<edm::InputTag>("QIE10PileInputTag")),
80  QIE11PileInputTag_(ps.getParameter<edm::InputTag>("QIE11PileInputTag")),
81  tokDB_(iC.esConsumes()),
82  myHcalDigitizer_(ps, iC) {
89 
96 
97  // Hcal
98  // Signal inputs now handled by HcalDigitizer - gets pSimHits directly
99 
100  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
101  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
102  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
103  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
104  QIE10DigiCollectionDM_ = ps.getParameter<std::string>("QIE10DigiCollectionDM");
105  QIE11DigiCollectionDM_ = ps.getParameter<std::string>("QIE11DigiCollectionDM");
106 
107  producesCollector.produces<HBHEDigiCollection>();
108  producesCollector.produces<HODigiCollection>();
109  producesCollector.produces<HFDigiCollection>();
110  producesCollector.produces<ZDCDigiCollection>();
111 
112  producesCollector.produces<QIE10DigiCollection>("HFQIE10DigiCollection");
113  producesCollector.produces<QIE11DigiCollection>("HBHEQIE11DigiCollection");
114 
115  // initialize HcalDigitizer here...
116  myHcalDigitizer_.setHBHENoiseSignalGenerator(&theHBHESignalGenerator);
122 }
123 
125  myHcalDigitizer_.beginRun(run, ES);
126 }
127 
130 }
131 
134 }
135 
137  const auto &ep = pep.principal();
138  LogDebug("PreMixingHcalWorker") << "\n===============> adding pileups from event " << ep.id()
139  << " for bunchcrossing " << pep.bunchCrossing();
140 
147 
148  // put digis from pileup event into digitizer
149 
150  const auto *mcc = pep.moduleCallingContext();
156 }
157 
159  const edm::EventSetup &ES,
160  std::vector<PileupSummaryInfo> const &ps,
161  int bs) {
163 }
164 
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup, const edm::ESGetToken< HcalDbService, HcalDbRecord > &tok)
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
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
const edm::ESGetToken< HcalDbService, HcalDbRecord > tokDB_
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_
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_
PreMixingHcalWorker(const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &&iC)
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)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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_
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_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
HFSignalGenerator theHFSignalGenerator
Definition: Run.h:45
std::string QIE11DigiCollectionDM_
#define LogDebug(id)
std::string QIE10DigiCollectionDM_