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  {
28 
29  //
36 
43 
44  // get the subdetector names
45  // this->getSubdetectorNames(); //something like this may be useful to check what we are supposed to do...
46 
47  // declare the products to produce
48 
49  // Hcal
50  // Signal inputs now handled by HcalDigitizer - gets pSimHits directly
51 
52  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
53  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
54  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
55  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
56  QIE10DigiCollectionDM_ = ps.getParameter<std::string>("QIE10DigiCollectionDM");
57  QIE11DigiCollectionDM_ = ps.getParameter<std::string>("QIE11DigiCollectionDM");
58 
59  // initialize HcalDigitizer here...
60 
61  myHcalDigitizer_ = new HcalDigiProducer( ps, iC );
62 
63  myHcalDigitizer_->setHBHENoiseSignalGenerator( & theHBHESignalGenerator );
64  myHcalDigitizer_->setHFNoiseSignalGenerator( & theHFSignalGenerator );
65  myHcalDigitizer_->setHONoiseSignalGenerator( & theHOSignalGenerator );
66  myHcalDigitizer_->setZDCNoiseSignalGenerator( & theZDCSignalGenerator );
67  myHcalDigitizer_->setQIE10NoiseSignalGenerator( & theQIE10SignalGenerator );
68  myHcalDigitizer_->setQIE11NoiseSignalGenerator( & theQIE11SignalGenerator );
69 
70  }
71 
72  // Virtual destructor needed.
74  delete myHcalDigitizer_;
75  }
76 
78  myHcalDigitizer_->beginRun(run, ES);
79  }
80 
83  }
84 
86 
88 
89  } // end of addHcalSignals
90 
91  void DataMixingHcalDigiWorkerProd::addHcalPileups(const int bcr, const EventPrincipal *ep, unsigned int eventNr,const edm::EventSetup& ES,
92  edm::ModuleCallingContext const* mcc) {
93 
94  LogDebug("DataMixingHcalDigiWorkerProd") <<"\n===============> adding pileups from event "<<ep->id()<<" for bunchcrossing "<<bcr;
95 
96 
103 
104  // put digis from pileup event into digitizer
105 
111  }
112 
114 
115  // Digitize
116  //edm::Service<edm::RandomNumberGenerator> rng;
117  //CLHEP::HepRandomEngine* engine = &rng->getEngine(e.streamID());
118 
119  //myHcalDigitizer_->initializeEvent( e, ES );
120 
121  // myHcalDigitizer_->finalizeEvent( e, ES, engine );
123 
124  }
125 
126 } //edm
127 
#define LogDebug(id)
T getParameter(std::string const &) const
void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES)
virtual 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)
virtual 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
virtual 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_
virtual 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:42