CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DataMixingEcalDigiWorkerProd.cc
Go to the documentation of this file.
1 // File: DataMixingEcalDigiWorkerProd.cc
2 // Description: see DataMixingEcalDigiWorkerProd.h
3 // Author: Mike Hildreth, University of Notre Dame
4 //
5 //--------------------------------------------
6 
11 
12 
13 using namespace std;
14 namespace edm {
15  // Constructor
16  DataMixingEcalDigiWorkerProd::DataMixingEcalDigiWorkerProd(const edm::ParameterSet& ps, edm::ConsumesCollector& iC) :
17  EBPileInputTag_(ps.getParameter<edm::InputTag>("EBPileInputTag")),
18  EEPileInputTag_(ps.getParameter<edm::InputTag>("EEPileInputTag")),
19  ESPileInputTag_(ps.getParameter<edm::InputTag>("ESPileInputTag")),
20  m_EBs25notCont(ps.getParameter<double>("EBs25notContainment") ) ,
21  m_EEs25notCont(ps.getParameter<double>("EEs25notContainment") ) ,
22  m_peToABarrel(ps.getParameter<double>("photoelectronsToAnalogBarrel") ) ,
23  m_peToAEndcap(ps.getParameter<double>("photoelectronsToAnalogEndcap") ) ,
24  label_(ps.getParameter<std::string>("Label"))
25  {
26 
30 
31  // get the subdetector names
32  // this->getSubdetectorNames(); //something like this may be useful to check what we are supposed to do...
33 
34  // declare the products to produce
35 
36  // Ecal
37  // Signal inputs now handled by EcalDigitizer - gets pSimHits directly
38 
39  EBDigiCollectionDM_ = ps.getParameter<std::string>("EBDigiCollectionDM");
40  EEDigiCollectionDM_ = ps.getParameter<std::string>("EEDigiCollectionDM");
41  ESDigiCollectionDM_ = ps.getParameter<std::string>("ESDigiCollectionDM");
42 
43  // initialize EcalDigitizer here...
44 
45  myEcalDigitizer_ = new EcalDigiProducer( ps , iC);
46 
47  myEcalDigitizer_->setEBNoiseSignalGenerator( & theEBSignalGenerator );
48  myEcalDigitizer_->setEENoiseSignalGenerator( & theEESignalGenerator );
49  myEcalDigitizer_->setESNoiseSignalGenerator( & theESSignalGenerator );
50 
51  }
52 
53  // Virtual destructor needed.
55  delete myEcalDigitizer_;
56  }
57 
59 
60  // myEcalDigitizer_->beginRun(ES);
61  }
62 
65  }
66 
68 
69  myEcalDigitizer_->accumulate(e, ES); // puts SimHits into Ecal digitizer
70 
71  } // end of addEcalSignals
72 
73  void DataMixingEcalDigiWorkerProd::addEcalPileups(const int bcr, const EventPrincipal *ep, unsigned int eventNr,const edm::EventSetup& ES,
74  edm::ModuleCallingContext const* mcc) {
75 
76  LogDebug("DataMixingEcalDigiWorkerProd") <<"\n===============> adding pileups from event "<<ep->id()<<" for bunchcrossing "<<bcr;
77 
81 
82  // add noise signals using incoming digis
83 
87  }
88 
90 
91  // Digitize
92 
94 
95  }
96 
97 } //edm
98 
#define LogDebug(id)
virtual void accumulate(edm::Event const &e, edm::EventSetup const &c)
T getParameter(std::string const &) const
EcalSignalGenerator< EBDigitizerTraits > EBSignalGenerator
virtual void fill(edm::ModuleCallingContext const *mcc)
void putEcal(edm::Event &e, const edm::EventSetup &ES)
EventID const & id() const
edm::EDGetTokenT< ESDigitizerTraits::DigiCollection > tok_es_
virtual void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
edm::EDGetTokenT< EEDigitizerTraits::DigiCollection > tok_ee_
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup)
edm::EDGetTokenT< EBDigitizerTraits::DigiCollection > tok_eb_
EcalSignalGenerator< ESDigitizerTraits > ESSignalGenerator
virtual void finalizeEvent(edm::Event &e, edm::EventSetup const &c)
void beginRun(const edm::EventSetup &ES)
EcalSignalGenerator< EEDigitizerTraits > EESignalGenerator
void addEcalSignals(const edm::Event &e, const edm::EventSetup &ES)
void addEcalPileups(const int bcr, const edm::EventPrincipal *, unsigned int EventId, const edm::EventSetup &ES, edm::ModuleCallingContext const *)
void initializeEvent(const edm::Event &e, const edm::EventSetup &ES)