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  myEcalDigitizer_->setEBNoiseSignalGenerator( & theEBSignalGenerator );
47  myEcalDigitizer_->setEENoiseSignalGenerator( & theEESignalGenerator );
48  myEcalDigitizer_->setESNoiseSignalGenerator( & theESSignalGenerator );
49 
50  }
51 
52  // Virtual destructor needed.
54  delete myEcalDigitizer_;
55  }
56 
58  }
59 
62  }
63 
65 
66  myEcalDigitizer_->accumulate(e, ES); // puts SimHits into Ecal digitizer
67 
68  } // end of addEcalSignals
69 
70  void DataMixingEcalDigiWorkerProd::addEcalPileups(const int bcr, const EventPrincipal *ep, unsigned int eventNr,const edm::EventSetup& ES,
71  edm::ModuleCallingContext const* mcc) {
72 
73  LogDebug("DataMixingEcalDigiWorkerProd") <<"\n===============> adding pileups from event "<<ep->id()<<" for bunchcrossing "<<bcr;
74 
78 
79  // add noise signals using incoming digis
80 
84  }
85 
87 
88  // Digitize
89 
91 
92  }
93 
96  }
97 
98 
99 } //edm
100 
#define LogDebug(id)
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)
tuple lumi
Definition: fjr2json.py:35
EventID const & id() const
edm::EDGetTokenT< ESDigitizerTraits::DigiCollection > tok_es_
virtual void initializeEvent(edm::Event const &e, edm::EventSetup const &c) override
virtual void accumulate(edm::Event const &e, edm::EventSetup const &c) override
edm::EDGetTokenT< EEDigitizerTraits::DigiCollection > tok_ee_
void initializeEvent(const edm::Event *event, const edm::EventSetup *eventSetup)
edm::EDGetTokenT< EBDigitizerTraits::DigiCollection > tok_eb_
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
EcalSignalGenerator< ESDigitizerTraits > ESSignalGenerator
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
void beginRun(const edm::EventSetup &ES)
EcalSignalGenerator< EEDigitizerTraits > EESignalGenerator
void addEcalSignals(const edm::Event &e, const edm::EventSetup &ES)
virtual void finalizeEvent(edm::Event &e, edm::EventSetup const &c) override
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
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)