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 
11 
12 
13 using namespace std;
14 namespace edm {
15  // Constructor
16  DataMixingHcalDigiWorkerProd::DataMixingHcalDigiWorkerProd(const edm::ParameterSet& ps) :
17  HBHEPileInputTag_(ps.getParameter<edm::InputTag>("HBHEPileInputTag")),
18  HOPileInputTag_(ps.getParameter<edm::InputTag>("HOPileInputTag")),
19  HFPileInputTag_(ps.getParameter<edm::InputTag>("HFPileInputTag")),
20  ZDCPileInputTag_(ps.getParameter<edm::InputTag>("ZDCPileInputTag")),
21  theHBHESignalGenerator(HBHEPileInputTag_),
22  theHOSignalGenerator(HOPileInputTag_),
23  theHFSignalGenerator(HFPileInputTag_),
24  theZDCSignalGenerator(ZDCPileInputTag_),
25  label_(ps.getParameter<std::string>("Label"))
26  {
27 
28  // get the subdetector names
29  // this->getSubdetectorNames(); //something like this may be useful to check what we are supposed to do...
30 
31  // create input selector
32  // if (label_.size()>0){
33  // sel_=new Selector( ModuleLabelSelector(label_));
34  // }
35  //else {
36  // sel_=new Selector( MatchAllSelector());
37  //}
38 
39  // declare the products to produce
40 
41  // Hcal
42  // Signal inputs now handled by HcalDigitizer - gets pSimHits directly
43 
44  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
45  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
46  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
47  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
48 
49  // initialize HcalDigitizer here...
50 
51  myHcalDigitizer_ = new HcalDigitizer( ps );
52 
53  myHcalDigitizer_->setHBHENoiseSignalGenerator( & theHBHESignalGenerator );
54  myHcalDigitizer_->setHFNoiseSignalGenerator( & theHFSignalGenerator );
55  myHcalDigitizer_->setHONoiseSignalGenerator( & theHOSignalGenerator );
56  myHcalDigitizer_->setZDCNoiseSignalGenerator( & theZDCSignalGenerator );
57 
58  }
59 
60  // Virtual destructor needed.
62  delete myHcalDigitizer_;
63  //delete sel_;
64  //sel_=0;
65  }
66 
68 
69  // nothing to do
70 
71  } // end of addHcalSignals
72 
73  void DataMixingHcalDigiWorkerProd::addHcalPileups(const int bcr, EventPrincipal *ep, unsigned int eventNr,const edm::EventSetup& ES) {
74 
75  LogDebug("DataMixingHcalDigiWorkerProd") <<"\n===============> adding pileups from event "<<ep->id()<<" for bunchcrossing "<<bcr;
76 
81 
85  }
86 
88 
89  // Digitize
90 
91  myHcalDigitizer_->produce( e, ES );
92  }
93 
94 } //edm
95 
#define LogDebug(id)
T getParameter(std::string const &) const
void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES)
EventID const & id() const
void putHcal(edm::Event &e, const edm::EventSetup &ES)
void addHcalPileups(const int bcr, edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES)
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup)
virtual void produce(edm::Event &e, const edm::EventSetup &c)