test
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 
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  label_(ps.getParameter<std::string>("Label"))
25  {
26 
27  //
32 
37 
38  // get the subdetector names
39  // this->getSubdetectorNames(); //something like this may be useful to check what we are supposed to do...
40 
41  // declare the products to produce
42 
43  // Hcal
44  // Signal inputs now handled by HcalDigitizer - gets pSimHits directly
45 
46  HBHEDigiCollectionDM_ = ps.getParameter<std::string>("HBHEDigiCollectionDM");
47  HODigiCollectionDM_ = ps.getParameter<std::string>("HODigiCollectionDM");
48  HFDigiCollectionDM_ = ps.getParameter<std::string>("HFDigiCollectionDM");
49  ZDCDigiCollectionDM_ = ps.getParameter<std::string>("ZDCDigiCollectionDM");
50 
51  // initialize HcalDigitizer here...
52 
53  myHcalDigitizer_ = new HcalDigiProducer( ps, iC );
54 
55  myHcalDigitizer_->setHBHENoiseSignalGenerator( & theHBHESignalGenerator );
56  myHcalDigitizer_->setHFNoiseSignalGenerator( & theHFSignalGenerator );
57  myHcalDigitizer_->setHONoiseSignalGenerator( & theHOSignalGenerator );
58  myHcalDigitizer_->setZDCNoiseSignalGenerator( & theZDCSignalGenerator );
59 
60  }
61 
62  // Virtual destructor needed.
64  delete myHcalDigitizer_;
65  }
66 
68 
69  myHcalDigitizer_->beginRun(run, ES);
70  }
71 
74  }
75 
77 
79 
80  } // end of addHcalSignals
81 
82  void DataMixingHcalDigiWorkerProd::addHcalPileups(const int bcr, const EventPrincipal *ep, unsigned int eventNr,const edm::EventSetup& ES,
83  edm::ModuleCallingContext const* mcc) {
84 
85  LogDebug("DataMixingHcalDigiWorkerProd") <<"\n===============> adding pileups from event "<<ep->id()<<" for bunchcrossing "<<bcr;
86 
87 
92 
93  // put digis from pileup event into digitizer
94 
98  }
99 
101 
102  // Digitize
103  //edm::Service<edm::RandomNumberGenerator> rng;
104  //CLHEP::HepRandomEngine* engine = &rng->getEngine(e.streamID());
105 
106  //myHcalDigitizer_->initializeEvent( e, ES );
107 
108  // myHcalDigitizer_->finalizeEvent( e, ES, engine );
110 
111  }
112 
113 } //edm
114 
#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
edm::EDGetTokenT< HODigitizerTraits::DigiCollection > tok_ho_
edm::EDGetTokenT< ZDCDigitizerTraits::DigiCollection > tok_zdc_
EventID const & id() const
edm::EDGetTokenT< HFDigitizerTraits::DigiCollection > tok_hf_
virtual void finalizeEvent(edm::Event &, edm::EventSetup const &) override
virtual void fill(edm::ModuleCallingContext const *mcc)
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)
HcalSignalGenerator< ZDCDigitizerTraits > ZDCSignalGenerator
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
HcalSignalGenerator< HBHEDigitizerTraits > HBHESignalGenerator
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup)
void beginRun(const edm::Run &run, const edm::EventSetup &ES)
Definition: Run.h:41