CMS 3D CMS Logo

DataMixingHcalDigiWorkerProd.cc
Go to the documentation of this file.
1 // File: DataMixingHcalDigiWorkerProd.cc
2 // Description: see DataMixingHcalDigiWorkerProd.h
3 // Author: Mike Hildreth, University of Notre Dame
4 //
5 //--------------------------------------------
6 
11 
15 
16 using namespace std;
17 namespace edm {
18  // Constructor
19  DataMixingHcalDigiWorkerProd::DataMixingHcalDigiWorkerProd(const edm::ParameterSet &ps, edm::ConsumesCollector &&iC)
20  : HBHEPileInputTag_(ps.getParameter<edm::InputTag>("HBHEPileInputTag")),
21  HOPileInputTag_(ps.getParameter<edm::InputTag>("HOPileInputTag")),
22  HFPileInputTag_(ps.getParameter<edm::InputTag>("HFPileInputTag")),
23  ZDCPileInputTag_(ps.getParameter<edm::InputTag>("ZDCPileInputTag")),
24  QIE10PileInputTag_(ps.getParameter<edm::InputTag>("QIE10PileInputTag")),
25  QIE11PileInputTag_(ps.getParameter<edm::InputTag>("QIE11PileInputTag")),
26  label_(ps.getParameter<std::string>("Label")) {
27  //
34 
41 
42  // get the subdetector names
43  // this->getSubdetectorNames(); //something like this may be useful to
44  // check what we are supposed to do...
45 
46  // declare the products to produce
47 
48  // Hcal
49  // Signal inputs now handled by HcalDigitizer - gets pSimHits directly
50 
51  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
52  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
53  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
54  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
55  QIE10DigiCollectionDM_ = ps.getParameter<std::string>("QIE10DigiCollectionDM");
56  QIE11DigiCollectionDM_ = ps.getParameter<std::string>("QIE11DigiCollectionDM");
57 
58  // initialize HcalDigitizer here...
59 
60  myHcalDigitizer_ = new HcalDigiProducer(ps, iC);
61 
62  myHcalDigitizer_->setHBHENoiseSignalGenerator(&theHBHESignalGenerator);
63  myHcalDigitizer_->setHFNoiseSignalGenerator(&theHFSignalGenerator);
64  myHcalDigitizer_->setHONoiseSignalGenerator(&theHOSignalGenerator);
65  myHcalDigitizer_->setZDCNoiseSignalGenerator(&theZDCSignalGenerator);
66  myHcalDigitizer_->setQIE10NoiseSignalGenerator(&theQIE10SignalGenerator);
67  myHcalDigitizer_->setQIE11NoiseSignalGenerator(&theQIE11SignalGenerator);
68  }
69 
70  // Virtual destructor needed.
72 
74  myHcalDigitizer_->beginRun(run, ES);
75  }
76 
79  }
80 
83 
84  } // end of addHcalSignals
85 
87  const EventPrincipal *ep,
88  unsigned int eventNr,
89  const edm::EventSetup &ES,
90  edm::ModuleCallingContext const *mcc) {
91  LogDebug("DataMixingHcalDigiWorkerProd")
92  << "\n===============> adding pileups from event " << ep->id() << " for bunchcrossing " << bcr;
93 
100 
101  // put digis from pileup event into digitizer
102 
108  }
109 
111  // Digitize
112  // edm::Service<edm::RandomNumberGenerator> rng;
113  // CLHEP::HepRandomEngine* engine = &rng->getEngine(e.streamID());
114 
115  // myHcalDigitizer_->initializeEvent( e, ES );
116 
117  // myHcalDigitizer_->finalizeEvent( e, ES, engine );
119  }
120 
121 } // namespace edm
#define LogDebug(id)
T getParameter(std::string const &) const
void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES)
void accumulate(edm::Event const &, edm::EventSetup const &) override
HcalSignalGenerator< HcalQIE10DigitizerTraits > QIE10SignalGenerator
HcalSignalGenerator< HcalQIE11DigitizerTraits > QIE11SignalGenerator
edm::EDGetTokenT< HODigitizerTraits::DigiCollection > tok_ho_
edm::EDGetTokenT< ZDCDigitizerTraits::DigiCollection > tok_zdc_
EventID const & id() const
edm::EDGetTokenT< HFDigitizerTraits::DigiCollection > tok_hf_
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup)
virtual void fill(edm::ModuleCallingContext const *mcc)
void finalizeEvent(edm::Event &, edm::EventSetup const &) override
void initializeEvent(const edm::Event &e, const edm::EventSetup &ES)
edm::EDGetTokenT< HBHEDigitizerTraits::DigiCollection > tok_hbhe_
HcalSignalGenerator< HFDigitizerTraits > HFSignalGenerator
void initializeEvent(edm::Event const &, edm::EventSetup const &) override
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES, edm::ModuleCallingContext const *)
HcalSignalGenerator< HODigitizerTraits > HOSignalGenerator
void putHcal(edm::Event &e, const edm::EventSetup &ES)
HLT enums.
HcalSignalGenerator< ZDCDigitizerTraits > ZDCSignalGenerator
edm::EDGetTokenT< HcalQIE11DigitizerTraits::DigiCollection > tok_qie11_
void beginRun(edm::Run const &, edm::EventSetup const &) override
HcalSignalGenerator< HBHEDigitizerTraits > HBHESignalGenerator
void beginRun(const edm::Run &run, const edm::EventSetup &ES)
edm::EDGetTokenT< HcalQIE10DigitizerTraits::DigiCollection > tok_qie10_
Definition: Run.h:45