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, edm::ConsumesCollector& iC) :
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  label_(ps.getParameter<std::string>("Label"))
22  {
23 
28 
29  // get the subdetector names
30  // this->getSubdetectorNames(); //something like this may be useful to check what we are supposed to do...
31 
32  // declare the products to produce
33 
34  // Hcal
35  // Signal inputs now handled by HcalDigitizer - gets pSimHits directly
36 
37  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
38  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
39  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
40  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
41 
42  // initialize HcalDigitizer here...
43 
44  myHcalDigitizer_ = new HcalDigitizer( ps, iC );
45 
46  myHcalDigitizer_->setHBHENoiseSignalGenerator( & theHBHESignalGenerator );
47  myHcalDigitizer_->setHFNoiseSignalGenerator( & theHFSignalGenerator );
48  myHcalDigitizer_->setHONoiseSignalGenerator( & theHOSignalGenerator );
49  myHcalDigitizer_->setZDCNoiseSignalGenerator( & theZDCSignalGenerator );
50 
51  }
52 
53  // Virtual destructor needed.
55  delete myHcalDigitizer_;
56  }
57 
59 
60  // nothing to do
61 
62  } // end of addHcalSignals
63 
64  void DataMixingHcalDigiWorkerProd::addHcalPileups(const int bcr, const EventPrincipal *ep, unsigned int eventNr,const edm::EventSetup& ES,
65  edm::ModuleCallingContext const* mcc) {
66 
67  LogDebug("DataMixingHcalDigiWorkerProd") <<"\n===============> adding pileups from event "<<ep->id()<<" for bunchcrossing "<<bcr;
68 
73 
77  }
78 
80 
81  // Digitize
82 
85  }
86 
87 } //edm
88 
#define LogDebug(id)
T getParameter(std::string const &) const
void addHcalSignals(const edm::Event &e, const edm::EventSetup &ES)
edm::EDGetTokenT< HODigitizerTraits::DigiCollection > tok_ho_
edm::EDGetTokenT< ZDCDigitizerTraits::DigiCollection > tok_zdc_
EventID const & id() const
edm::EDGetTokenT< HFDigitizerTraits::DigiCollection > tok_hf_
void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
virtual void fill(edm::ModuleCallingContext const *mcc)
edm::EDGetTokenT< HBHEDigitizerTraits::DigiCollection > tok_hbhe_
HcalSignalGenerator< HFDigitizerTraits > HFSignalGenerator
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)
HcalSignalGenerator< ZDCDigitizerTraits > ZDCSignalGenerator
HcalSignalGenerator< HBHEDigitizerTraits > HBHESignalGenerator
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup)
void finalizeEvent(edm::Event &e, edm::EventSetup const &c)