CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
10 
11 
12 using namespace std;
13 namespace edm {
14  // Constructor
15  DataMixingHcalDigiWorkerProd::DataMixingHcalDigiWorkerProd(const edm::ParameterSet& ps) :
16  HBHEPileInputTag_(ps.getParameter<edm::InputTag>("HBHEPileInputTag")),
17  HOPileInputTag_(ps.getParameter<edm::InputTag>("HOPileInputTag")),
18  HFPileInputTag_(ps.getParameter<edm::InputTag>("HFPileInputTag")),
19  ZDCPileInputTag_(ps.getParameter<edm::InputTag>("ZDCPileInputTag")),
20  theHBHESignalGenerator(HBHEPileInputTag_),
21  theHOSignalGenerator(HOPileInputTag_),
22  theHFSignalGenerator(HFPileInputTag_),
23  theZDCSignalGenerator(ZDCPileInputTag_),
24  label_(ps.getParameter<std::string>("Label"))
25  {
26 
27  // get the subdetector names
28  // this->getSubdetectorNames(); //something like this may be useful to check what we are supposed to do...
29 
30  // declare the products to produce
31 
32  // Hcal
33  // Signal inputs now handled by HcalDigitizer - gets pSimHits directly
34 
35  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
36  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
37  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
38  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
39 
40  // initialize HcalDigitizer here...
41 
42  myHcalDigitizer_ = new HcalDigitizer( ps );
43 
44  myHcalDigitizer_->setHBHENoiseSignalGenerator( & theHBHESignalGenerator );
45  myHcalDigitizer_->setHFNoiseSignalGenerator( & theHFSignalGenerator );
46  myHcalDigitizer_->setHONoiseSignalGenerator( & theHOSignalGenerator );
47  myHcalDigitizer_->setZDCNoiseSignalGenerator( & theZDCSignalGenerator );
48 
49  }
50 
51  // Virtual destructor needed.
53  delete myHcalDigitizer_;
54  }
55 
57 
58  // nothing to do
59 
60  } // end of addHcalSignals
61 
62  void DataMixingHcalDigiWorkerProd::addHcalPileups(const int bcr, const EventPrincipal *ep, unsigned int eventNr,const edm::EventSetup& ES) {
63 
64  LogDebug("DataMixingHcalDigiWorkerProd") <<"\n===============> adding pileups from event "<<ep->id()<<" for bunchcrossing "<<bcr;
65 
70 
74  }
75 
77 
78  // Digitize
79 
82  }
83 
84 } //edm
85 
#define LogDebug(id)
T getParameter(std::string const &) const
void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES)
void addHcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES)
EventID const & id() const
void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
void putHcal(edm::Event &e, const edm::EventSetup &ES)
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup)
void finalizeEvent(edm::Event &e, edm::EventSetup const &c)