CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
HcalDigitizer Class Reference

#include <HcalDigitizer.h>

Public Member Functions

void accumulate (edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
 
void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
 
void beginRun (const edm::EventSetup &es)
 
void endRun ()
 
void finalizeEvent (edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *)
 
 HcalDigitizer (const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
 
void initializeEvent (edm::Event const &e, edm::EventSetup const &c)
 
void setHBHENoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setHFNoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setHONoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
void setZDCNoiseSignalGenerator (HcalBaseSignalGenerator *noiseGenerator)
 
virtual ~HcalDigitizer ()
 

Private Types

typedef CaloTDigitizer
< HBHEDigitizerTraits
HBHEDigitizer
 
typedef CaloTDigitizer
< HFDigitizerTraits
HFDigitizer
 
typedef CaloTDigitizer
< HODigitizerTraits
HODigitizer
 
typedef CaloTDigitizer
< HcalUpgradeDigitizerTraits
UpgradeDigitizer
 
typedef CaloTDigitizer
< ZDCDigitizerTraits
ZDCDigitizer
 

Private Member Functions

void accumulateCaloHits (edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *)
 
void buildHOSiPMCells (const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
 
void checkGeometry (const edm::EventSetup &eventSetup)
 
void darkening (std::vector< PCaloHit > &hcalHits)
 
void fillFakeHits ()
 some hits in each subdetector, just for testing purposes More...
 
void updateGeometry (const edm::EventSetup &eventSetup)
 

Private Attributes

double deliveredLumi
 
bool hbhegeo
 
bool hfgeo
 
std::string hitsProducer_
 
bool hogeo
 
bool isHCAL
 
bool isZDC
 
HEDarkeningm_HEDarkening
 
HFRecalibrationm_HFRecalibration
 
bool relabel_
 
HcalCoderFactorytheCoderFactory
 
const CaloGeometrytheGeometry
 
HcalAmplifiertheHBHEAmplifier
 
std::vector< DetIdtheHBHEDetIds
 
HBHEDigitizertheHBHEDigitizer
 
HcalElectronicsSimtheHBHEElectronicsSim
 
HBHEHitFilter theHBHEHitFilter
 
CaloHitResponsetheHBHEResponse
 
HBHEDigitizertheHBHESiPMDigitizer
 
CaloHitResponsetheHBHESiPMResponse
 
UpgradeDigitizertheHBHEUpgradeDigitizer
 
HcalAmplifiertheHFAmplifier
 
HFDigitizertheHFDigitizer
 
HcalElectronicsSimtheHFElectronicsSim
 
HFHitFilter theHFHitFilter
 
CaloHitResponsetheHFResponse
 
UpgradeDigitizertheHFUpgradeDigitizer
 
HcalHitCorrectiontheHitCorrection
 
HcalAmplifiertheHOAmplifier
 
HODigitizertheHODigitizer
 
HcalElectronicsSimtheHOElectronicsSim
 
HOHitFilter theHOHitFilter
 
std::vector< DetIdtheHOHPDDetIds
 
CaloHitResponsetheHOResponse
 
int theHOSiPMCode
 
std::vector< DetIdtheHOSiPMDetIds
 
HODigitizertheHOSiPMDigitizer
 
HcalHitFilter theHOSiPMHitFilter
 
CaloHitResponsetheHOSiPMResponse
 
HPDIonFeedbackSimtheIonFeedback
 
CaloVNoiseSignalGeneratortheNoiseGenerator
 
CaloVNoiseHitGeneratortheNoiseHitGenerator
 
HcalSimParameterMaptheParameterMap
 
HcalHitRelabellertheRelabeller
 
HcalShapestheShapes
 
HcalTimeSlewSimtheTimeSlewSim
 
HcalCoderFactorytheUpgradeCoderFactory
 
HcalElectronicsSimtheUpgradeHBHEElectronicsSim
 
HcalElectronicsSimtheUpgradeHFElectronicsSim
 
HcalAmplifiertheZDCAmplifier
 
ZDCDigitizertheZDCDigitizer
 
HcalElectronicsSimtheZDCElectronicsSim
 
ZDCHitFilter theZDCHitFilter
 
CaloHitResponsetheZDCResponse
 
bool zdcgeo
 

Detailed Description

Definition at line 42 of file HcalDigitizer.h.

Member Typedef Documentation

Reconstruction algorithm

Definition at line 79 of file HcalDigitizer.h.

Definition at line 81 of file HcalDigitizer.h.

Definition at line 80 of file HcalDigitizer.h.

Definition at line 83 of file HcalDigitizer.h.

Definition at line 82 of file HcalDigitizer.h.

Constructor & Destructor Documentation

HcalDigitizer::HcalDigitizer ( const edm::ParameterSet ps,
edm::ConsumesCollector iC 
)
explicit

Definition at line 84 of file HcalDigitizer.cc.

References edm::ConsumesCollector::consumes(), HcalCoderFactory::DB, deliveredLumi, edm::hlt::Exception, HcalDigitizerImpl::fillSiPMCells(), alignmentValidation::fname, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hitsProducer_, CaloHitResponse::initHBHEScale(), HLT_25ns14e33_v1_cff::InputTag, m_HEDarkening, m_HFRecalibration, relabel_, CaloHitResponse::setHBHEScale(), HcalAmplifier::setHBtuningParameter(), HcalAmplifier::setHEtuningParameter(), HcalAmplifier::setHFtuningParameter(), CaloHitResponse::setHitFilter(), HcalAmplifier::setHOtuningParameter(), HcalAmplifier::setIonFeedbackSim(), CaloTDigitizer< Traits >::setNoiseHitGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), CaloHitResponse::setPECorrection(), HcalAmplifier::setTimeSlewSim(), HcalAmplifier::setUseOldHB(), HcalAmplifier::setUseOldHE(), HcalAmplifier::setUseOldHF(), HcalAmplifier::setUseOldHO(), AlCaHLTBitMon_QueryRunRegistry::string, theCoderFactory, theHBHEAmplifier, theHBHEDigitizer, theHBHEElectronicsSim, theHBHEHitFilter, theHBHEResponse, theHBHESiPMDigitizer, theHBHESiPMResponse, theHBHEUpgradeDigitizer, theHFAmplifier, theHFDigitizer, theHFElectronicsSim, theHFHitFilter, theHFResponse, theHFUpgradeDigitizer, theHOAmplifier, theHODigitizer, theHOElectronicsSim, theHOHitFilter, theHOResponse, theHOSiPMCode, theHOSiPMDigitizer, theHOSiPMHitFilter, theHOSiPMResponse, theIonFeedback, theNoiseGenerator, theNoiseHitGenerator, theParameterMap, theRelabeller, theShapes, theTimeSlewSim, theUpgradeCoderFactory, theUpgradeHBHEElectronicsSim, theUpgradeHFElectronicsSim, theZDCAmplifier, theZDCDigitizer, theZDCElectronicsSim, theZDCHitFilter, theZDCResponse, and HcalCoderFactory::UPGRADE.

84  :
85  theGeometry(0),
87  theShapes(new HcalShapes()),
88  theHBHEResponse(0),
90  theHOResponse(0),
95  theHFAmplifier(0),
96  theHOAmplifier(0),
97  theZDCAmplifier(0),
98  theIonFeedback(0),
99  theCoderFactory(0),
108  theHFHitFilter(ps.getParameter<bool>("doHFWindow")),
109  theHOHitFilter(),
111  theZDCHitFilter(),
112  theHitCorrection(0),
115  theHBHEDigitizer(0),
117  theHODigitizer(0),
119  theHFDigitizer(0),
120  theZDCDigitizer(0),
123  theRelabeller(0),
124  isZDC(true),
125  isHCAL(true),
126  zdcgeo(true),
127  hbhegeo(true),
128  hogeo(true),
129  hfgeo(true),
130  hitsProducer_(ps.getParameter<std::string>("hitsProducer")),
131  theHOSiPMCode(ps.getParameter<edm::ParameterSet>("ho").getParameter<int>("siPMCode")),
132  deliveredLumi(0.),
133  m_HEDarkening(0),
135 {
136  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "ZDCHITS"));
137  iC.consumes<std::vector<PCaloHit> >(edm::InputTag(hitsProducer_, "HcalHits"));
138 
139  bool doNoise = ps.getParameter<bool>("doNoise");
140  bool PreMix1 = ps.getParameter<bool>("HcalPreMixStage1"); // special threshold/pedestal treatment
141  bool PreMix2 = ps.getParameter<bool>("HcalPreMixStage2"); // special threshold/pedestal treatment
142  bool useOldNoiseHB = ps.getParameter<bool>("useOldHB");
143  bool useOldNoiseHE = ps.getParameter<bool>("useOldHE");
144  bool useOldNoiseHF = ps.getParameter<bool>("useOldHF");
145  bool useOldNoiseHO = ps.getParameter<bool>("useOldHO");
146  bool doEmpty = ps.getParameter<bool>("doEmpty");
147  double HBtp = ps.getParameter<double>("HBTuningParameter");
148  double HEtp = ps.getParameter<double>("HETuningParameter");
149  double HFtp = ps.getParameter<double>("HFTuningParameter");
150  double HOtp = ps.getParameter<double>("HOTuningParameter");
151  bool doHBHEUpgrade = ps.getParameter<bool>("HBHEUpgradeQIE");
152  bool doHFUpgrade = ps.getParameter<bool>("HFUpgradeQIE");
153  deliveredLumi = ps.getParameter<double>("DelivLuminosity");
154  bool agingFlagHE = ps.getParameter<bool>("HEDarkening");
155  bool agingFlagHF = ps.getParameter<bool>("HFDarkening");
156 
157 
158  if(PreMix1 && PreMix2) {
159  throw cms::Exception("Configuration")
160  << "HcalDigitizer cannot operate in PreMixing digitization and PreMixing\n"
161  "digi combination modes at the same time. Please set one mode to False\n"
162  "in the configuration file.";
163  }
164 
165  // need to make copies, because they might get different noise generators
166  theHBHEAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
167  theHFAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
168  theHOAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
169  theZDCAmplifier = new HcalAmplifier(theParameterMap, doNoise, PreMix1, PreMix2);
174  theHBHEAmplifier->setUseOldHB(useOldNoiseHB);
175  theHBHEAmplifier->setUseOldHE(useOldNoiseHE);
176  theHFAmplifier->setUseOldHF(useOldNoiseHF);
177  theHOAmplifier->setUseOldHO(useOldNoiseHO);
178 
181 
182  // std::cout << "HcalDigitizer: theUpgradeCoderFactory created" << std::endl;
183 
190 
191  // std::cout << "HcalDigitizer: theUpgradeElectronicsSim created" << std::endl;
192 
193  // a code of 1 means make all cells SiPM
194  std::vector<int> hbSiPMCells(ps.getParameter<edm::ParameterSet>("hb").getParameter<std::vector<int> >("siPMCells"));
195  //std::vector<int> hoSiPMCells(ps.getParameter<edm::ParameterSet>("ho").getParameter<std::vector<int> >("siPMCells"));
196  // 0 means none, 1 means all, and 2 means use hardcoded
197 
198  // std::cout << std::endl << " hbSiPMCells = " << hbSiPMCells[0] << std::endl;
199 
200  bool doHBHEHPD = hbSiPMCells.empty() || (hbSiPMCells[0] != 1);
201  bool doHOHPD = (theHOSiPMCode != 1);
202  bool doHBHESiPM = !hbSiPMCells.empty();
203  bool doHOSiPM = (theHOSiPMCode != 0);
204  if(doHBHEHPD) {
206  edm::LogInfo("HcalDigitizer") <<"Set scale for HB towers";
208 
211  bool changeResponse = ps.getParameter<bool>("ChangeResponse");
212  edm::FileInPath fname = ps.getParameter<edm::FileInPath>("CorrFactorFile");
213  if (changeResponse) {
214  std::string corrFileName = fname.fullPath();
215  edm::LogInfo("HcalDigitizer") << "Set scale for HB towers from " << corrFileName;
216  theHBHEResponse->setHBHEScale(corrFileName); //GMA
217  }
218  }
219  if(doHOHPD) {
223  }
224 
225  if(doHBHESiPM) {
228  if (doHBHEUpgrade) {
230 
231  // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer created" << std::endl;
232 
233  } else {
235  }
236  }
237  if(doHOSiPM) {
241  }
242 
243  // if both are present, fill the SiPM cells now
244  if(doHBHEHPD && doHBHESiPM) {
245 
246  // std::cout << "HcalDigitizer: fill the SiPM cells now" << std::endl;
247 
249  }
250 
253 
254  bool doTimeSlew = ps.getParameter<bool>("doTimeSlew");
255  //initialize: they won't be called later if flag is set
256  theTimeSlewSim = 0;
257  if(doTimeSlew) {
258  // no time slewing for HF
259  theTimeSlewSim = new HcalTimeSlewSim(theParameterMap);
260  theHBHEAmplifier->setTimeSlewSim(theTimeSlewSim);
261  theHOAmplifier->setTimeSlewSim(theTimeSlewSim);
262  theZDCAmplifier->setTimeSlewSim(theTimeSlewSim);
263  }
264 
265  if (doHFUpgrade) {
267 
268  // std::cout << "HcalDigitizer: theHFUpgradeDigitizer created" << std::endl;
269 
270  } else {
272  }
274 
275  edm::ParameterSet ps0 = ps.getParameter<edm::ParameterSet>("HcalReLabel");
276  relabel_ = ps0.getUntrackedParameter<bool>("RelabelHits");
277  if (relabel_) {
279  }
280 
281  bool doHPDNoise = ps.getParameter<bool>("doHPDNoise");
282  if(doHPDNoise) {
283  //edm::ParameterSet hpdNoisePset = ps.getParameter<edm::ParameterSet>("HPDNoiseLibrary");
287  }
288 
289  if(ps.getParameter<bool>("doIonFeedback") && theHBHEResponse) {
292  if(ps.getParameter<bool>("doThermalNoise")) {
294  }
295  }
296 
297  if(ps.getParameter<bool>("injectTestHits") ) {
305 
306  // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer setNoise"
307  // << std::endl;
308  }
310  if(theHFUpgradeDigitizer) {
312 
313  // std::cout << "HcalDigitizer: theHFUpgradeDigitizer setNoise"
314  // << std::endl;
315  }
317  }
318 
319  if(agingFlagHE) m_HEDarkening = new HEDarkening();
320  if(agingFlagHF) m_HFRecalibration = new HFRecalibration();
321 }
void setUseOldHB(bool useOld)
void setNoiseHitGenerator(CaloVNoiseHitGenerator *generator)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void setHOtuningParameter(double tp)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
HBHEHitFilter theHBHEHitFilter
HcalElectronicsSim * theHFElectronicsSim
HBHEDigitizer * theHBHEDigitizer
HOHitFilter theHOHitFilter
CaloTDigitizer< HcalUpgradeDigitizerTraits > UpgradeDigitizer
Definition: HcalDigitizer.h:83
void setUseOldHF(bool useOld)
HFDigitizer * theHFDigitizer
HFHitFilter theHFHitFilter
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
void setHFtuningParameter(double tp)
void setPECorrection(const CaloVPECorrection *peCorrection)
if you want to correct the photoelectrons
HcalTimeSlewSim * theTimeSlewSim
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:98
HcalElectronicsSim * theUpgradeHFElectronicsSim
void fillSiPMCells(std::vector< int > &siPMCells, SIPMDIGITIZER *siPMDigitizer)
HcalCoderFactory * theCoderFactory
HcalHitRelabeller * theRelabeller
HcalCoderFactory * theUpgradeCoderFactory
void setIonFeedbackSim(HPDIonFeedbackSim *feedbackSim)
Definition: HcalAmplifier.h:31
UpgradeDigitizer * theHFUpgradeDigitizer
CaloTDigitizer< HFDigitizerTraits > HFDigitizer
Definition: HcalDigitizer.h:81
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:97
void setUseOldHO(bool useOld)
CaloTDigitizer< ZDCDigitizerTraits > ZDCDigitizer
Definition: HcalDigitizer.h:82
std::string hitsProducer_
HcalElectronicsSim * theHOElectronicsSim
void setHEtuningParameter(double tp)
double deliveredLumi
void setUseOldHE(bool useOld)
void setHitFilter(const CaloVHitFilter *filter)
if you want to reject hits, for example, from a certain subdetector, set this
HcalShapes * theShapes
Definition: HcalDigitizer.h:86
Creates electronics signals from hits.
ZDCHitFilter theZDCHitFilter
HPDIonFeedbackSim * theIonFeedback
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:90
HcalHitFilter theHOSiPMHitFilter
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:91
void setHBHEScale(std::string &)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:93
HcalElectronicsSim * theZDCElectronicsSim
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
CaloTDigitizer< HODigitizerTraits > HODigitizer
Definition: HcalDigitizer.h:80
void setTimeSlewSim(HcalTimeSlewSim *timeSlewSim)
Definition: HcalAmplifier.h:38
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:99
HFRecalibration * m_HFRecalibration
HcalElectronicsSim * theHBHEElectronicsSim
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:88
HODigitizer * theHODigitizer
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:70
string fname
main script
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:92
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HEDarkening * m_HEDarkening
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:89
void setHBtuningParameter(double tp)
CaloVNoiseHitGenerator * theNoiseHitGenerator
HcalAmplifier * theZDCAmplifier
UpgradeDigitizer * theHBHEUpgradeDigitizer
CaloTDigitizer< HBHEDigitizerTraits > HBHEDigitizer
Definition: HcalDigitizer.h:79
CaloVNoiseSignalGenerator * theNoiseGenerator
HcalDigitizer::~HcalDigitizer ( )
virtual

Definition at line 324 of file HcalDigitizer.cc.

References theCoderFactory, theHBHEAmplifier, theHBHEDigitizer, theHBHEElectronicsSim, theHBHEResponse, theHBHESiPMDigitizer, theHBHESiPMResponse, theHBHEUpgradeDigitizer, theHFAmplifier, theHFDigitizer, theHFElectronicsSim, theHFResponse, theHFUpgradeDigitizer, theHitCorrection, theHOAmplifier, theHODigitizer, theHOElectronicsSim, theHOResponse, theHOSiPMDigitizer, theHOSiPMResponse, theNoiseGenerator, theParameterMap, theRelabeller, theUpgradeCoderFactory, theUpgradeHBHEElectronicsSim, theUpgradeHFElectronicsSim, theZDCAmplifier, theZDCDigitizer, theZDCElectronicsSim, and theZDCResponse.

324  {
327  if(theHODigitizer) delete theHODigitizer;
329  if(theHFDigitizer) delete theHFDigitizer;
330  delete theZDCDigitizer;
333  delete theParameterMap;
334  delete theHBHEResponse;
335  delete theHBHESiPMResponse;
336  delete theHOResponse;
337  delete theHOSiPMResponse;
338  delete theHFResponse;
339  delete theZDCResponse;
340  delete theHBHEElectronicsSim;
341  delete theHFElectronicsSim;
342  delete theHOElectronicsSim;
343  delete theZDCElectronicsSim;
346  delete theHBHEAmplifier;
347  delete theHFAmplifier;
348  delete theHOAmplifier;
349  delete theZDCAmplifier;
350  delete theCoderFactory;
351  delete theUpgradeCoderFactory;
352  delete theHitCorrection;
353  delete theNoiseGenerator;
354  if (theRelabeller) delete theRelabeller;
355 }
HcalElectronicsSim * theHFElectronicsSim
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:98
HcalElectronicsSim * theUpgradeHFElectronicsSim
HcalCoderFactory * theCoderFactory
HcalHitRelabeller * theRelabeller
HcalCoderFactory * theUpgradeCoderFactory
UpgradeDigitizer * theHFUpgradeDigitizer
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:97
HcalElectronicsSim * theHOElectronicsSim
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:90
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:91
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:93
HcalElectronicsSim * theZDCElectronicsSim
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:99
HcalElectronicsSim * theHBHEElectronicsSim
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:88
HODigitizer * theHODigitizer
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:92
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:89
HcalAmplifier * theZDCAmplifier
UpgradeDigitizer * theHBHEUpgradeDigitizer
CaloVNoiseSignalGenerator * theNoiseGenerator

Member Function Documentation

void HcalDigitizer::accumulate ( edm::Event const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 482 of file HcalDigitizer.cc.

References accumulateCaloHits(), edm::Event::getByLabel(), hitsProducer_, isHCAL, edm::HandleBase::isValid(), and isZDC.

Referenced by HcalDigiProducer::accumulate().

482  {
483  // Step A: Get Inputs
484  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
486  e.getByLabel(zdcTag, zdcHandle);
487  isZDC = zdcHandle.isValid();
488 
489  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
491  e.getByLabel(hcalTag, hcalHandle);
492  isHCAL = hcalHandle.isValid();
493 
494  accumulateCaloHits(hcalHandle, zdcHandle, 0, engine);
495 }
std::string hitsProducer_
bool isValid() const
Definition: HandleBase.h:75
void accumulateCaloHits(edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *)
void HcalDigitizer::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 497 of file HcalDigitizer.cc.

References accumulateCaloHits(), PileUpEventPrincipal::bunchCrossing(), PileUpEventPrincipal::getByLabel(), hitsProducer_, isHCAL, edm::HandleBase::isValid(), and isZDC.

497  {
498  // Step A: Get Inputs
499  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
501  e.getByLabel(zdcTag, zdcHandle);
502  isZDC = zdcHandle.isValid();
503 
504  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
506  e.getByLabel(hcalTag, hcalHandle);
507  isHCAL = hcalHandle.isValid();
508 
509  accumulateCaloHits(hcalHandle, zdcHandle, e.bunchCrossing(), engine);
510 }
std::string hitsProducer_
bool isValid() const
Definition: HandleBase.h:75
void accumulateCaloHits(edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing, CLHEP::HepRandomEngine *)
void HcalDigitizer::accumulateCaloHits ( edm::Handle< std::vector< PCaloHit > > const &  hcalHits,
edm::Handle< std::vector< PCaloHit > > const &  zdcHits,
int  bunchCrossing,
CLHEP::HepRandomEngine *  engine 
)
private

Definition at line 435 of file HcalDigitizer.cc.

References CaloTDigitizer< Traits >::add(), darkening(), HcalHitCorrection::fillChargeSums(), hbhegeo, hfgeo, hogeo, isHCAL, isZDC, m_HEDarkening, m_HFRecalibration, HcalHitRelabeller::process(), relabel_, theHBHEDigitizer, theHBHESiPMDigitizer, theHBHEUpgradeDigitizer, theHFDigitizer, theHFUpgradeDigitizer, theHitCorrection, theHODigitizer, theHOSiPMDigitizer, theRelabeller, theZDCDigitizer, and zdcgeo.

Referenced by accumulate().

435  {
436  // Step A: pass in inputs, and accumulate digirs
437  if(isHCAL) {
438  std::vector<PCaloHit> hcalHits = *hcalHandle.product();
439  //evaluate darkening before relabeling
441  darkening(hcalHits);
442  }
443  if (relabel_) {
444  // Relabel PCaloHits
445  edm::LogInfo("HcalDigitizer") << "Calling Relabeller";
446  theRelabeller->process(hcalHits);
447  }
448  if(theHitCorrection != 0) {
449  theHitCorrection->fillChargeSums(hcalHits);
450  }
451  if(hbhegeo) {
452  if(theHBHEDigitizer) theHBHEDigitizer->add(hcalHits, bunchCrossing, engine);
453  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->add(hcalHits, bunchCrossing, engine);
455  // std::cout << "HcalDigitizer::accumulateCaloHits theHBHEUpgradeDigitizer->add" << std::endl;
456  theHBHEUpgradeDigitizer->add(hcalHits, bunchCrossing, engine);
457  }
458  }
459 
460  if(hogeo) {
461  if(theHODigitizer) theHODigitizer->add(hcalHits, bunchCrossing, engine);
462  if(theHOSiPMDigitizer) theHOSiPMDigitizer->add(hcalHits, bunchCrossing, engine);
463  }
464 
465  if(hfgeo) {
466  if(theHFDigitizer) theHFDigitizer->add(hcalHits, bunchCrossing, engine);
467  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->add(hcalHits, bunchCrossing, engine);
468  }
469  } else {
470  edm::LogInfo("HcalDigitizer") << "We don't have HCAL hit collection available ";
471  }
472 
473  if(isZDC) {
474  if(zdcgeo) {
475  theZDCDigitizer->add(*zdcHandle.product(), bunchCrossing, engine);
476  }
477  } else {
478  edm::LogInfo("HcalDigitizer") << "We don't have ZDC hit collection available ";
479  }
480 }
HBHEDigitizer * theHBHEDigitizer
void darkening(std::vector< PCaloHit > &hcalHits)
void add(const std::vector< PCaloHit > &hits, int bunchCrossing, CLHEP::HepRandomEngine *engine)
HFDigitizer * theHFDigitizer
HcalHitRelabeller * theRelabeller
UpgradeDigitizer * theHFUpgradeDigitizer
void fillChargeSums(MixCollection< PCaloHit > &hits)
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
void process(std::vector< PCaloHit > &hcalHits)
T const * product() const
Definition: Handle.h:81
HFRecalibration * m_HFRecalibration
HODigitizer * theHODigitizer
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HEDarkening * m_HEDarkening
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::beginRun ( const edm::EventSetup es)

Definition at line 580 of file HcalDigitizer.cc.

References HcalShapes::beginRun(), checkGeometry(), and theShapes.

Referenced by HcalDigiProducer::beginRun().

580  {
581  checkGeometry(es);
582  theShapes->beginRun(es);
583 }
void checkGeometry(const edm::EventSetup &eventSetup)
HcalShapes * theShapes
Definition: HcalDigitizer.h:86
void beginRun(edm::EventSetup const &es)
Definition: HcalShapes.cc:103
void HcalDigitizer::buildHOSiPMCells ( const std::vector< DetId > &  allCells,
const edm::EventSetup eventSetup 
)
private

Definition at line 645 of file HcalDigitizer.cc.

References assert(), edm::EventSetup::get(), HcalShapes::HAMAMATSU, AlCaHLTBitMon_ParallelJobs::p, edm::ESHandle< class >::product(), HcalHitFilter::setDetIds(), CaloTDigitizer< Traits >::setDetIds(), HcalSimParameterMap::setHOHamamatsuDetIds(), HcalSimParameterMap::setHOZecotekDetIds(), HcalCondObjectContainerBase::setTopo(), theHODigitizer, theHOHPDDetIds, theHOSiPMCode, theHOSiPMDetIds, theHOSiPMDigitizer, theHOSiPMHitFilter, theParameterMap, and HcalShapes::ZECOTEK.

Referenced by updateGeometry().

645  {
646  // all HPD
647 
648  if(theHOSiPMCode == 0) {
649  theHODigitizer->setDetIds(allCells);
650  } else if(theHOSiPMCode == 1) {
651  theHOSiPMDigitizer->setDetIds(allCells);
652  // FIXME pick Zecotek or hamamatsu?
653  } else if(theHOSiPMCode == 2) {
654  std::vector<HcalDetId> zecotekDetIds, hamamatsuDetIds;
656  eventSetup.get<HcalMCParamsRcd>().get(p);
658  eventSetup.get<IdealGeometryRecord>().get(htopo);
659 
660  HcalMCParams mcParams(*p.product());
661  if (mcParams.topo()==0) {
662  mcParams.setTopo(htopo.product());
663  }
664 
665  for(std::vector<DetId>::const_iterator detItr = allCells.begin();
666  detItr != allCells.end(); ++detItr) {
667  int shapeType = mcParams.getValues(*detItr)->signalShape();
668  if(shapeType == HcalShapes::ZECOTEK) {
669  zecotekDetIds.emplace_back(*detItr);
670  theHOSiPMDetIds.push_back(*detItr);
671  } else if(shapeType == HcalShapes::HAMAMATSU) {
672  hamamatsuDetIds.emplace_back(*detItr);
673  theHOSiPMDetIds.push_back(*detItr);
674  } else {
675  theHOHPDDetIds.push_back(*detItr);
676  }
677  }
678 
684  // FIXME not applying a HitFilter to the HPDs, for now
685  theParameterMap->setHOZecotekDetIds(zecotekDetIds);
686  theParameterMap->setHOHamamatsuDetIds(hamamatsuDetIds);
687 
688  // make sure we don't got through this exercise again
689  theHOSiPMCode = -2;
690  }
691 }
void setDetIds(const std::vector< DetId > &detIds)
assert(m_qm.get())
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
void setHOZecotekDetIds(const std::vector< HcalDetId > &ids)
HcalHitFilter theHOSiPMHitFilter
std::vector< DetId > theHOHPDDetIds
void setHOHamamatsuDetIds(const std::vector< HcalDetId > &ids)
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
HODigitizer * theHODigitizer
std::vector< DetId > theHOSiPMDetIds
HODigitizer * theHOSiPMDigitizer
void setDetIds(const std::vector< DetId > &detIds)
void setTopo(const HcalTopology *topo)
void HcalDigitizer::checkGeometry ( const edm::EventSetup eventSetup)
private

make sure the digitizer has the correct list of all cells that exist in the geometry

Definition at line 591 of file HcalDigitizer.cc.

References geometry, edm::EventSetup::get(), theGeometry, and updateGeometry().

Referenced by beginRun().

591  {
592  // TODO find a way to avoid doing this every event
594  eventSetup.get<CaloGeometryRecord>().get(geometry);
595  // See if it's been updated
596  if(&*geometry != theGeometry)
597  {
598  theGeometry = &*geometry;
599  updateGeometry(eventSetup);
600  }
601 }
const T & get() const
Definition: EventSetup.h:55
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:70
ESHandle< TrackerGeometry > geometry
void updateGeometry(const edm::EventSetup &eventSetup)
void HcalDigitizer::darkening ( std::vector< PCaloHit > &  hcalHits)
private

Definition at line 693 of file HcalDigitizer.cc.

References HEDarkening::degradation(), deliveredLumi, HLT_25ns14e33_v1_cff::depth, relval_parameters_module::energy, HFRecalibration::getCorr(), HcalEndcap, HcalForward, cuy::ii, m_HEDarkening, m_HFRecalibration, phi, HcalTestNumbering::unpackHcalIndex(), and z.

Referenced by accumulateCaloHits().

693  {
694 
695  for (unsigned int ii=0; ii<hcalHits.size(); ++ii) {
696  uint32_t tmpId = hcalHits[ii].id();
697  int det, z, depth, ieta, phi, lay;
698  HcalTestNumbering::unpackHcalIndex(tmpId,det,z,depth,ieta,phi,lay);
699 
700  bool darkened = false;
701  float dweight = 1.;
702 
703  //HE darkening
704  if(det==int(HcalEndcap) && m_HEDarkening){
705  dweight = m_HEDarkening->degradation(deliveredLumi,ieta,lay-2);//NB:diff. layer count
706  darkened = true;
707  }
708 
709  //HF darkening - approximate: invert recalibration factor
710  else if(det==int(HcalForward) && m_HFRecalibration){
711  dweight = 1.0/m_HFRecalibration->getCorr(ieta,depth,deliveredLumi);
712  darkened = true;
713  }
714 
715  //create new hit with darkened energy
716  //if(darkened) hcalHits[ii] = PCaloHit(hcalHits[ii].energyEM()*dweight,hcalHits[ii].energyHad()*dweight,hcalHits[ii].time(),hcalHits[ii].geantTrackId(),hcalHits[ii].id());
717 
718  //reset hit energy
719  if(darkened) hcalHits[ii].setEnergy(hcalHits[ii].energy()*dweight);
720  }
721 
722 }
int ii
Definition: cuy.py:588
double deliveredLumi
double getCorr(int ieta, int idepth, double lumi)
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
HFRecalibration * m_HFRecalibration
HEDarkening * m_HEDarkening
float degradation(float intlumi, int ieta, int lay)
Definition: HEDarkening.cc:52
void HcalDigitizer::endRun ( void  )

Definition at line 586 of file HcalDigitizer.cc.

References HcalShapes::endRun(), and theShapes.

Referenced by HcalDigiProducer::endRun().

586  {
587  theShapes->endRun();
588 }
HcalShapes * theShapes
Definition: HcalDigitizer.h:86
void endRun()
Definition: HcalShapes.cc:118
void HcalDigitizer::fillFakeHits ( )
private

some hits in each subdetector, just for testing purposes

void HcalDigitizer::finalizeEvent ( edm::Event e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  engine 
)

Definition at line 512 of file HcalDigitizer.cc.

References HcalHitCorrection::clear(), hbhegeo, hfgeo, hogeo, isHCAL, isZDC, edm::Event::put(), CaloTDigitizer< Traits >::run(), theHBHEDigitizer, theHBHESiPMDigitizer, theHBHEUpgradeDigitizer, theHFDigitizer, theHFUpgradeDigitizer, theHitCorrection, theHODigitizer, theHOSiPMDigitizer, theZDCDigitizer, and zdcgeo.

Referenced by HcalDigiProducer::finalizeEvent().

512  {
513 
514  // Step B: Create empty output
515  std::auto_ptr<HBHEDigiCollection> hbheResult(new HBHEDigiCollection());
516  std::auto_ptr<HODigiCollection> hoResult(new HODigiCollection());
517  std::auto_ptr<HFDigiCollection> hfResult(new HFDigiCollection());
518  std::auto_ptr<ZDCDigiCollection> zdcResult(new ZDCDigiCollection());
519  std::auto_ptr<HBHEUpgradeDigiCollection> hbheupgradeResult(new HBHEUpgradeDigiCollection());
520  std::auto_ptr<HFUpgradeDigiCollection> hfupgradeResult(new HFUpgradeDigiCollection());
521 
522  // Step C: Invoke the algorithm, getting back outputs.
523  if(isHCAL&&hbhegeo){
524  if(theHBHEDigitizer) theHBHEDigitizer->run(*hbheResult, engine);
525  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->run(*hbheResult, engine);
527  theHBHEUpgradeDigitizer->run(*hbheupgradeResult, engine);
528 
529  // std::cout << "HcalDigitizer::finalizeEvent theHBHEUpgradeDigitizer->run" << std::endl;
530  }
531  }
532  if(isHCAL&&hogeo) {
533  if(theHODigitizer) theHODigitizer->run(*hoResult, engine);
534  if(theHOSiPMDigitizer) theHOSiPMDigitizer->run(*hoResult, engine);
535  }
536  if(isHCAL&&hfgeo) {
537  if(theHFDigitizer) theHFDigitizer->run(*hfResult, engine);
538  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->run(*hfupgradeResult, engine);
539  }
540  if(isZDC&&zdcgeo) {
541  theZDCDigitizer->run(*zdcResult, engine);
542  }
543 
544  edm::LogInfo("HcalDigitizer") << "HCAL HBHE digis : " << hbheResult->size();
545  edm::LogInfo("HcalDigitizer") << "HCAL HO digis : " << hoResult->size();
546  edm::LogInfo("HcalDigitizer") << "HCAL HF digis : " << hfResult->size();
547  edm::LogInfo("HcalDigitizer") << "HCAL ZDC digis : " << zdcResult->size();
548  edm::LogInfo("HcalDigitizer") << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size();
549  edm::LogInfo("HcalDigitizer") << "HCAL HF upgrade digis : " << hfupgradeResult->size();
550 
551  /*
552  std::cout << std::endl;
553  std::cout << "HCAL HBHE digis : " << hbheResult->size() << std::endl;
554  std::cout << "HCAL HO digis : " << hoResult->size() << std::endl;
555  std::cout << "HCAL HF digis : " << hfResult->size() << std::endl;
556 
557  std::cout << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size()
558  << std::endl;
559  std::cout << "HCAL HF upgrade digis : " << hfupgradeResult->size()
560  << std::endl;
561  */
562 
563  // Step D: Put outputs into event
564  e.put(hbheResult);
565  e.put(hoResult);
566  e.put(hfResult);
567  e.put(zdcResult);
568  e.put(hbheupgradeResult,"HBHEUpgradeDigiCollection");
569  e.put(hfupgradeResult, "HFUpgradeDigiCollection");
570 
571  // std::cout << std::endl << "========> HcalDigitizer e.put "
572  // << std::endl << std::endl;
573 
574  if(theHitCorrection) {
576  }
577 }
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
edm::SortedCollection< ZDCDataFrame > ZDCDigiCollection
UpgradeDigitizer * theHFUpgradeDigitizer
edm::SortedCollection< HODataFrame > HODigiCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
ZDCDigitizer * theZDCDigitizer
edm::SortedCollection< HcalUpgradeDataFrame > HFUpgradeDigiCollection
edm::SortedCollection< HcalUpgradeDataFrame > HBHEUpgradeDigiCollection
HcalHitCorrection * theHitCorrection
void run(MixCollection< PCaloHit > &, DigiCollection &)
turns hits into digis
HODigitizer * theHODigitizer
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
edm::SortedCollection< HFDataFrame > HFDigiCollection
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)

Produces the EDM products,

Definition at line 388 of file HcalDigitizer.cc.

References HcalHitCorrection::clear(), edm::EventSetup::find(), edm::EventSetup::get(), CaloTDigitizer< Traits >::initializeHits(), edm::ESHandle< class >::product(), HcalAmplifier::setADCPeds(), HcalAmplifier::setCholesky(), HcalCoderFactory::setDbService(), HcalElectronicsSim::setDbService(), HcalAmplifier::setDbService(), HcalSimParameterMap::setDbService(), theCoderFactory, theHBHEAmplifier, theHBHEDigitizer, theHBHESiPMDigitizer, theHBHEUpgradeDigitizer, theHFAmplifier, theHFDigitizer, theHFUpgradeDigitizer, theHitCorrection, theHOAmplifier, theHODigitizer, theHOSiPMDigitizer, theParameterMap, theUpgradeCoderFactory, theUpgradeHBHEElectronicsSim, theUpgradeHFElectronicsSim, theZDCAmplifier, and theZDCDigitizer.

Referenced by HcalDigiProducer::initializeEvent().

388  {
389  // get the appropriate gains, noises, & widths for this event
390  edm::ESHandle<HcalDbService> conditions;
391  eventSetup.get<HcalDbRecord>().get(conditions);
392  theHBHEAmplifier->setDbService(conditions.product());
393  theHFAmplifier->setDbService(conditions.product());
394  theHOAmplifier->setDbService(conditions.product());
395  theZDCAmplifier->setDbService(conditions.product());
398 
399  theCoderFactory->setDbService(conditions.product());
401  theParameterMap->setDbService(conditions.product());
402 
404  if (eventSetup.find(edm::eventsetup::EventSetupRecordKey::makeKey<HcalCholeskyMatricesRcd>())) {
405  eventSetup.get<HcalCholeskyMatricesRcd>().get(refCholesky);
406  const HcalCholeskyMatrices * myCholesky = refCholesky.product();
407  theHBHEAmplifier->setCholesky(myCholesky);
408  theHFAmplifier->setCholesky(myCholesky);
409  theHOAmplifier->setCholesky(myCholesky);
410  }
411  edm::ESHandle<HcalPedestals> pedshandle;
412  eventSetup.get<HcalPedestalsRcd>().get(pedshandle);
413  const HcalPedestals * myADCPedestals = pedshandle.product();
414 
415  theHBHEAmplifier->setADCPeds(myADCPedestals);
416  theHFAmplifier->setADCPeds(myADCPedestals);
417  theHOAmplifier->setADCPeds(myADCPedestals);
418 
419  if(theHitCorrection != 0) {
421  }
422 
423  //initialize hits
432 
433 }
void setDbService(const HcalDbService *service)
the Producer will probably update this every event
void initializeHits()
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
void setADCPeds(const HcalPedestals *ADCPeds)
Definition: HcalAmplifier.h:54
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:98
HcalElectronicsSim * theUpgradeHFElectronicsSim
HcalCoderFactory * theCoderFactory
HcalCoderFactory * theUpgradeCoderFactory
void setDbService(const HcalDbService *service)
UpgradeDigitizer * theHFUpgradeDigitizer
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:97
ZDCDigitizer * theZDCDigitizer
HcalHitCorrection * theHitCorrection
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:99
void setDbService(const HcalDbService *service)
T const * product() const
Definition: ESHandle.h:86
HODigitizer * theHODigitizer
void setCholesky(const HcalCholeskyMatrices *Cholesky)
Definition: HcalAmplifier.h:53
HODigitizer * theHOSiPMDigitizer
HBHEDigitizer * theHBHESiPMDigitizer
HcalAmplifier * theZDCAmplifier
void setDbService(const HcalDbService *service)
UpgradeDigitizer * theHBHEUpgradeDigitizer
void HcalDigitizer::setHBHENoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 358 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theHBHEAmplifier, theHBHEDigitizer, theHBHEElectronicsSim, and theParameterMap.

Referenced by HcalDigiProducer::setHBHENoiseSignalGenerator().

358  {
359  noiseGenerator->setParameterMap(theParameterMap);
360  noiseGenerator->setElectronicsSim(theHBHEElectronicsSim);
362  theHBHEAmplifier->setNoiseSignalGenerator(noiseGenerator);
363 }
void setParameterMap(HcalSimParameterMap *map)
HBHEDigitizer * theHBHEDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:97
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:35
HcalElectronicsSim * theHBHEElectronicsSim
void HcalDigitizer::setHFNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 365 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theHFAmplifier, theHFDigitizer, theHFElectronicsSim, theHFUpgradeDigitizer, and theParameterMap.

Referenced by HcalDigiProducer::setHFNoiseSignalGenerator().

365  {
366  noiseGenerator->setParameterMap(theParameterMap);
367  noiseGenerator->setElectronicsSim(theHFElectronicsSim);
370  theHFAmplifier->setNoiseSignalGenerator(noiseGenerator);
371 }
void setParameterMap(HcalSimParameterMap *map)
HcalElectronicsSim * theHFElectronicsSim
HFDigitizer * theHFDigitizer
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:98
UpgradeDigitizer * theHFUpgradeDigitizer
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:35
void HcalDigitizer::setHONoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 373 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theHOAmplifier, theHODigitizer, theHOElectronicsSim, theHOSiPMDigitizer, and theParameterMap.

Referenced by HcalDigiProducer::setHONoiseSignalGenerator().

373  {
374  noiseGenerator->setParameterMap(theParameterMap);
375  noiseGenerator->setElectronicsSim(theHOElectronicsSim);
378  theHOAmplifier->setNoiseSignalGenerator(noiseGenerator);
379 }
void setParameterMap(HcalSimParameterMap *map)
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
HcalElectronicsSim * theHOElectronicsSim
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:35
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:99
HODigitizer * theHODigitizer
HODigitizer * theHOSiPMDigitizer
void HcalDigitizer::setZDCNoiseSignalGenerator ( HcalBaseSignalGenerator noiseGenerator)

Definition at line 381 of file HcalDigitizer.cc.

References HcalBaseSignalGenerator::setElectronicsSim(), HcalAmplifier::setNoiseSignalGenerator(), CaloTDigitizer< Traits >::setNoiseSignalGenerator(), HcalBaseSignalGenerator::setParameterMap(), theParameterMap, theZDCAmplifier, theZDCDigitizer, and theZDCElectronicsSim.

Referenced by HcalDigiProducer::setZDCNoiseSignalGenerator().

381  {
382  noiseGenerator->setParameterMap(theParameterMap);
383  noiseGenerator->setElectronicsSim(theZDCElectronicsSim);
384  theZDCDigitizer->setNoiseSignalGenerator(noiseGenerator);
385  theZDCAmplifier->setNoiseSignalGenerator(noiseGenerator);
386 }
void setParameterMap(HcalSimParameterMap *map)
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:85
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
ZDCDigitizer * theZDCDigitizer
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:35
HcalElectronicsSim * theZDCElectronicsSim
HcalAmplifier * theZDCAmplifier
void HcalDigitizer::updateGeometry ( const edm::EventSetup eventSetup)
private

Definition at line 604 of file HcalDigitizer.cc.

References buildHOSiPMCells(), DetId::Calo, HcalDigitizerImpl::fillCells(), CaloGeometry::getValidDetIds(), hbhegeo, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, hfgeo, hogeo, CaloTDigitizer< Traits >::setDetIds(), HcalHitRelabeller::setGeometry(), CaloHitResponse::setGeometry(), HcalZDCDetId::SubdetectorId, theGeometry, theHBHEDetIds, theHBHEDigitizer, theHBHEResponse, theHBHESiPMDigitizer, theHBHESiPMResponse, theHBHEUpgradeDigitizer, theHFDigitizer, theHFResponse, theHFUpgradeDigitizer, theHOResponse, theHOSiPMResponse, theRelabeller, theZDCDigitizer, theZDCResponse, and zdcgeo.

Referenced by checkGeometry().

604  {
612 
613  const std::vector<DetId>& hbCells = theGeometry->getValidDetIds(DetId::Hcal, HcalBarrel);
614  const std::vector<DetId>& heCells = theGeometry->getValidDetIds(DetId::Hcal, HcalEndcap);
615  const std::vector<DetId>& hoCells = theGeometry->getValidDetIds(DetId::Hcal, HcalOuter);
616  const std::vector<DetId>& hfCells = theGeometry->getValidDetIds(DetId::Hcal, HcalForward);
617  const std::vector<DetId>& zdcCells = theGeometry->getValidDetIds(DetId::Calo, HcalZDCDetId::SubdetectorId);
618  //const std::vector<DetId>& hcalTrigCells = geometry->getValidDetIds(DetId::Hcal, HcalTriggerTower);
619  //const std::vector<DetId>& hcalCalib = geometry->getValidDetIds(DetId::Calo, HcalCastorDetId::SubdetectorId);
620  //std::cout<<"HcalDigitizer::CheckGeometry number of cells: "<<zdcCells.size()<<std::endl;
621  if(zdcCells.empty()) zdcgeo = false;
622  if(hbCells.empty() && heCells.empty()) hbhegeo = false;
623  if(hoCells.empty()) hogeo = false;
624  if(hfCells.empty()) hfgeo = false;
625  // combine HB & HE
626 
627  theHBHEDetIds = hbCells;
628  theHBHEDetIds.insert(theHBHEDetIds.end(), heCells.begin(), heCells.end());
629 
631  //HcalDigitizerImpl::fillCells(hoCells, theHODigitizer, theHOSiPMDigitizer);
632  buildHOSiPMCells(hoCells, eventSetup);
635  theZDCDigitizer->setDetIds(zdcCells);
638 
639  // std::cout << " HcalDigitizer::updateGeometry theHBHEUpgradeDigitizer->setDetIds(theHBHEDetIds)"<< std::endl;
640  }
641 
642 }
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
HBHEDigitizer * theHBHEDigitizer
HFDigitizer * theHFDigitizer
void setGeometry(const CaloGeometry *&theGeometry)
HcalHitRelabeller * theRelabeller
UpgradeDigitizer * theHFUpgradeDigitizer
std::vector< DetId > theHBHEDetIds
void buildHOSiPMCells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:90
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:91
ZDCDigitizer * theZDCDigitizer
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:93
static const int SubdetectorId
Definition: HcalZDCDetId.h:20
void fillCells(std::vector< DetId > &allCells, HPDDIGITIZER *hpdDigitizer, SIPMDIGITIZER *siPMDigitizer)
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:88
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:70
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:90
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:92
HBHEDigitizer * theHBHESiPMDigitizer
void setDetIds(const std::vector< DetId > &detIds)
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:89
UpgradeDigitizer * theHBHEUpgradeDigitizer

Member Data Documentation

double HcalDigitizer::deliveredLumi
private

Definition at line 147 of file HcalDigitizer.h.

Referenced by darkening(), and HcalDigitizer().

bool HcalDigitizer::hbhegeo
private

Definition at line 140 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().

bool HcalDigitizer::hfgeo
private

Definition at line 140 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().

std::string HcalDigitizer::hitsProducer_
private

Definition at line 143 of file HcalDigitizer.h.

Referenced by accumulate(), and HcalDigitizer().

bool HcalDigitizer::hogeo
private

Definition at line 140 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().

bool HcalDigitizer::isHCAL
private

Definition at line 140 of file HcalDigitizer.h.

Referenced by accumulate(), accumulateCaloHits(), and finalizeEvent().

bool HcalDigitizer::isZDC
private

Definition at line 140 of file HcalDigitizer.h.

Referenced by accumulate(), accumulateCaloHits(), and finalizeEvent().

HEDarkening* HcalDigitizer::m_HEDarkening
private

Definition at line 148 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), darkening(), and HcalDigitizer().

HFRecalibration* HcalDigitizer::m_HFRecalibration
private

Definition at line 149 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), darkening(), and HcalDigitizer().

bool HcalDigitizer::relabel_
private

Definition at line 141 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), and HcalDigitizer().

HcalCoderFactory* HcalDigitizer::theCoderFactory
private

Definition at line 103 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().

const CaloGeometry* HcalDigitizer::theGeometry
private

Definition at line 70 of file HcalDigitizer.h.

Referenced by checkGeometry(), and updateGeometry().

HcalAmplifier* HcalDigitizer::theHBHEAmplifier
private
std::vector<DetId> HcalDigitizer::theHBHEDetIds
private

Definition at line 136 of file HcalDigitizer.h.

Referenced by updateGeometry().

HBHEDigitizer* HcalDigitizer::theHBHEDigitizer
private
HcalElectronicsSim* HcalDigitizer::theHBHEElectronicsSim
private

Definition at line 106 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), setHBHENoiseSignalGenerator(), and ~HcalDigitizer().

HBHEHitFilter HcalDigitizer::theHBHEHitFilter
private

Definition at line 113 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHBHEResponse
private

Definition at line 88 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

HBHEDigitizer* HcalDigitizer::theHBHESiPMDigitizer
private
CaloHitResponse* HcalDigitizer::theHBHESiPMResponse
private

Definition at line 89 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

UpgradeDigitizer* HcalDigitizer::theHBHEUpgradeDigitizer
private
HcalAmplifier* HcalDigitizer::theHFAmplifier
private
HFDigitizer* HcalDigitizer::theHFDigitizer
private
HcalElectronicsSim* HcalDigitizer::theHFElectronicsSim
private

Definition at line 107 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), setHFNoiseSignalGenerator(), and ~HcalDigitizer().

HFHitFilter HcalDigitizer::theHFHitFilter
private

Definition at line 114 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHFResponse
private

Definition at line 92 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

UpgradeDigitizer* HcalDigitizer::theHFUpgradeDigitizer
private
HcalHitCorrection* HcalDigitizer::theHitCorrection
private
HcalAmplifier* HcalDigitizer::theHOAmplifier
private
HODigitizer* HcalDigitizer::theHODigitizer
private
HcalElectronicsSim* HcalDigitizer::theHOElectronicsSim
private

Definition at line 108 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), setHONoiseSignalGenerator(), and ~HcalDigitizer().

HOHitFilter HcalDigitizer::theHOHitFilter
private

Definition at line 115 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

std::vector<DetId> HcalDigitizer::theHOHPDDetIds
private

Definition at line 137 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

CaloHitResponse* HcalDigitizer::theHOResponse
private

Definition at line 90 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

int HcalDigitizer::theHOSiPMCode
private

Definition at line 145 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

std::vector<DetId> HcalDigitizer::theHOSiPMDetIds
private

Definition at line 138 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells().

HODigitizer* HcalDigitizer::theHOSiPMDigitizer
private
HcalHitFilter HcalDigitizer::theHOSiPMHitFilter
private

Definition at line 116 of file HcalDigitizer.h.

Referenced by buildHOSiPMCells(), and HcalDigitizer().

CaloHitResponse* HcalDigitizer::theHOSiPMResponse
private

Definition at line 91 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

HPDIonFeedbackSim* HcalDigitizer::theIonFeedback
private

Definition at line 102 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloVNoiseSignalGenerator* HcalDigitizer::theNoiseGenerator
private

Definition at line 121 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), and ~HcalDigitizer().

CaloVNoiseHitGenerator* HcalDigitizer::theNoiseHitGenerator
private

Definition at line 122 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

HcalSimParameterMap* HcalDigitizer::theParameterMap
private
HcalHitRelabeller* HcalDigitizer::theRelabeller
private

Definition at line 132 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

HcalShapes* HcalDigitizer::theShapes
private

Definition at line 86 of file HcalDigitizer.h.

Referenced by beginRun(), endRun(), and HcalDigitizer().

HcalTimeSlewSim* HcalDigitizer::theTimeSlewSim
private

Definition at line 120 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

HcalCoderFactory* HcalDigitizer::theUpgradeCoderFactory
private

Definition at line 104 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().

HcalElectronicsSim* HcalDigitizer::theUpgradeHBHEElectronicsSim
private

Definition at line 110 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().

HcalElectronicsSim* HcalDigitizer::theUpgradeHFElectronicsSim
private

Definition at line 111 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), initializeEvent(), and ~HcalDigitizer().

HcalAmplifier* HcalDigitizer::theZDCAmplifier
private
ZDCDigitizer* HcalDigitizer::theZDCDigitizer
private
HcalElectronicsSim* HcalDigitizer::theZDCElectronicsSim
private

Definition at line 109 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), setZDCNoiseSignalGenerator(), and ~HcalDigitizer().

ZDCHitFilter HcalDigitizer::theZDCHitFilter
private

Definition at line 117 of file HcalDigitizer.h.

Referenced by HcalDigitizer().

CaloHitResponse* HcalDigitizer::theZDCResponse
private

Definition at line 93 of file HcalDigitizer.h.

Referenced by HcalDigitizer(), updateGeometry(), and ~HcalDigitizer().

bool HcalDigitizer::zdcgeo
private

Definition at line 140 of file HcalDigitizer.h.

Referenced by accumulateCaloHits(), finalizeEvent(), and updateGeometry().