CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDigitizer.cc
Go to the documentation of this file.
36 #include <boost/foreach.hpp>
38 
39 namespace HcalDigitizerImpl {
40 
41  template<typename SIPMDIGITIZER>
42  void fillSiPMCells(std::vector<int> & siPMCells, SIPMDIGITIZER * siPMDigitizer)
43  {
44  std::vector<DetId> siPMDetIds;
45  siPMDetIds.reserve(siPMCells.size());
46  for(std::vector<int>::const_iterator idItr = siPMCells.begin();
47  idItr != siPMCells.end(); ++idItr)
48  {
49  siPMDetIds.emplace_back(*idItr);
50  }
51  siPMDigitizer->setDetIds(siPMDetIds);
52  }
53 
54  // if both exist, assume the SiPM one has cells filled, and
55  // assign the rest to the HPD
56  template<typename HPDDIGITIZER, typename SIPMDIGITIZER>
57  void fillCells(std::vector<DetId>& allCells,
58  HPDDIGITIZER * hpdDigitizer,
59  SIPMDIGITIZER * siPMDigitizer)
60  {
61  // if both digitizers exist, split up the cells
62  if(siPMDigitizer && hpdDigitizer)
63  {
64  std::vector<DetId> siPMDetIds = siPMDigitizer->detIds();
65  std::sort(siPMDetIds.begin(), siPMDetIds.end());
66  std::vector<DetId> sortedCells = allCells;
67  std::sort(sortedCells.begin(), sortedCells.end());
68  std::vector<DetId> hpdCells;
69  std::set_difference(sortedCells.begin(), sortedCells.end(),
70  siPMDetIds.begin(), siPMDetIds.end(),
71  std::back_inserter(hpdCells) );
72  hpdDigitizer->setDetIds(hpdCells);
73  }
74  else
75  {
76  if(siPMDigitizer) siPMDigitizer->setDetIds(allCells);
77  if(hpdDigitizer) hpdDigitizer->setDetIds(allCells);
78  }
79  }
80 } // namespace HcaiDigitizerImpl
81 
82 
84  theGeometry(0),
85  theParameterMap(new HcalSimParameterMap(ps)),
86  theShapes(new HcalShapes()),
87  theHBHEResponse(0),
88  theHBHESiPMResponse(0),
89  theHOResponse(0),
90  theHOSiPMResponse(0),
91  theHFResponse(new CaloHitResponse(theParameterMap, theShapes)),
92  theZDCResponse(new CaloHitResponse(theParameterMap, theShapes)),
93  theHBHEAmplifier(0),
94  theHFAmplifier(0),
95  theHOAmplifier(0),
96  theZDCAmplifier(0),
97  theIonFeedback(0),
98  theCoderFactory(0),
99  theUpgradeCoderFactory(0),
100  theHBHEElectronicsSim(0),
101  theHFElectronicsSim(0),
102  theHOElectronicsSim(0),
103  theZDCElectronicsSim(0),
104  theUpgradeHBHEElectronicsSim(0),
105  theUpgradeHFElectronicsSim(0),
106  theHBHEHitFilter(),
107  theHFHitFilter(ps.getParameter<bool>("doHFWindow")),
108  theHOHitFilter(),
109  theHOSiPMHitFilter(HcalOuter),
110  theZDCHitFilter(),
111  theHitCorrection(0),
112  theNoiseGenerator(0),
113  theNoiseHitGenerator(0),
114  theHBHEDigitizer(0),
115  theHBHESiPMDigitizer(0),
116  theHODigitizer(0),
117  theHOSiPMDigitizer(0),
118  theHFDigitizer(0),
119  theZDCDigitizer(0),
120  theHBHEUpgradeDigitizer(0),
121  theHFUpgradeDigitizer(0),
122  theRelabeller(0),
123  isZDC(true),
124  isHCAL(true),
125  zdcgeo(true),
126  hbhegeo(true),
127  hogeo(true),
128  hfgeo(true),
129  theHOSiPMCode(ps.getParameter<edm::ParameterSet>("ho").getParameter<int>("siPMCode"))
130 {
131  bool doNoise = ps.getParameter<bool>("doNoise");
132  bool useOldNoiseHB = ps.getParameter<bool>("useOldHB");
133  bool useOldNoiseHE = ps.getParameter<bool>("useOldHE");
134  bool useOldNoiseHF = ps.getParameter<bool>("useOldHF");
135  bool useOldNoiseHO = ps.getParameter<bool>("useOldHO");
136  bool doEmpty = ps.getParameter<bool>("doEmpty");
137  double HBtp = ps.getParameter<double>("HBTuningParameter");
138  double HEtp = ps.getParameter<double>("HETuningParameter");
139  double HFtp = ps.getParameter<double>("HFTuningParameter");
140  double HOtp = ps.getParameter<double>("HOTuningParameter");
141  bool doHBHEUpgrade = ps.getParameter<bool>("HBHEUpgradeQIE");
142  bool doHFUpgrade = ps.getParameter<bool>("HFUpgradeQIE");
143 
144  // need to make copies, because they might get different noise generators
149  theHBHEAmplifier->setHBtuningParameter(HBtp);
150  theHBHEAmplifier->setHEtuningParameter(HEtp);
153  theHBHEAmplifier->setUseOldHB(useOldNoiseHB);
154  theHBHEAmplifier->setUseOldHE(useOldNoiseHE);
155  theHFAmplifier->setUseOldHF(useOldNoiseHF);
156  theHOAmplifier->setUseOldHO(useOldNoiseHO);
157 
160 
161  // std::cout << "HcalDigitizer: theUpgradeCoderFactory created" << std::endl;
162 
169 
170  // std::cout << "HcalDigitizer: theUpgradeElectronicsSim created" << std::endl;
171 
172  // a code of 1 means make all cells SiPM
173  std::vector<int> hbSiPMCells(ps.getParameter<edm::ParameterSet>("hb").getParameter<std::vector<int> >("siPMCells"));
174  //std::vector<int> hoSiPMCells(ps.getParameter<edm::ParameterSet>("ho").getParameter<std::vector<int> >("siPMCells"));
175  // 0 means none, 1 means all, and 2 means use hardcoded
176 
177  // std::cout << std::endl << " hbSiPMCells = " << hbSiPMCells[0] << std::endl;
178 
179  bool doHBHEHPD = hbSiPMCells.empty() || (hbSiPMCells[0] != 1);
180  bool doHOHPD = (theHOSiPMCode != 1);
181  bool doHBHESiPM = !hbSiPMCells.empty();
182  bool doHOSiPM = (theHOSiPMCode != 0);
183  if(doHBHEHPD) {
185  edm::LogInfo("HcalDigitizer") <<"Set scale for HB towers";
187 
190  bool changeResponse = ps.getParameter<bool>("ChangeResponse");
191  edm::FileInPath fname = ps.getParameter<edm::FileInPath>("CorrFactorFile");
192  if (changeResponse) {
193  std::string corrFileName = fname.fullPath();
194  edm::LogInfo("HcalDigitizer") << "Set scale for HB towers from " << corrFileName;
195  theHBHEResponse->setHBHEScale(corrFileName); //GMA
196  }
197  }
198  if(doHOHPD) {
202  }
203 
204  if(doHBHESiPM) {
207  if (doHBHEUpgrade) {
209 
210  // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer created" << std::endl;
211 
212  } else {
214  }
215  }
216  if(doHOSiPM) {
220  }
221 
222  // if both are present, fill the SiPM cells now
223  if(doHBHEHPD && doHBHESiPM) {
224 
225  // std::cout << "HcalDigitizer: fill the SiPM cells now" << std::endl;
226 
228  }
229 
232 
233  bool doTimeSlew = ps.getParameter<bool>("doTimeSlew");
234  if(doTimeSlew) {
235  // no time slewing for HF
237  theHBHEAmplifier->setTimeSlewSim(theTimeSlewSim);
240  }
241 
242  if (doHFUpgrade) {
244 
245  // std::cout << "HcalDigitizer: theHFUpgradeDigitizer created" << std::endl;
246 
247  } else {
249  }
251 
252  edm::ParameterSet ps0 = ps.getParameter<edm::ParameterSet>("HcalReLabel");
253  relabel_ = ps0.getUntrackedParameter<bool>("RelabelHits");
254  if (relabel_) {
256  }
257 
258  bool doHPDNoise = ps.getParameter<bool>("doHPDNoise");
259  if(doHPDNoise) {
260  //edm::ParameterSet hpdNoisePset = ps.getParameter<edm::ParameterSet>("HPDNoiseLibrary");
264  }
265 
266  if(ps.getParameter<bool>("doIonFeedback") && theHBHEResponse) {
269  if(ps.getParameter<bool>("doThermalNoise")) {
270  theHBHEAmplifier->setIonFeedbackSim(theIonFeedback);
271  }
272  }
273 
274  if(ps.getParameter<bool>("injectTestHits") ) {
282 
283  // std::cout << "HcalDigitizer: theHBHEUpgradeDigitizer setNoise"
284  // << std::endl;
285  }
287  if(theHFUpgradeDigitizer) {
289 
290  // std::cout << "HcalDigitizer: theHFUpgradeDigitizer setNoise"
291  // << std::endl;
292  }
294  }
295 
297  if ( ! rng.isAvailable()) {
298  throw cms::Exception("Configuration")
299  << "HcalDigitizer requires the RandomNumberGeneratorService\n"
300  "which is not present in the configuration file. You must add the service\n"
301  "in the configuration file or remove the modules that require it.";
302  }
303 
304  CLHEP::HepRandomEngine& engine = rng->getEngine();
315 
317 
318  hitsProducer_ = ps.getParameter<std::string>("hitsProducer");
319 }
320 
321 
325  if(theHODigitizer) delete theHODigitizer;
327  if(theHFDigitizer) delete theHFDigitizer;
328  delete theZDCDigitizer;
331  delete theParameterMap;
332  delete theHBHEResponse;
333  delete theHBHESiPMResponse;
334  delete theHOResponse;
335  delete theHOSiPMResponse;
336  delete theHFResponse;
337  delete theZDCResponse;
338  delete theHBHEElectronicsSim;
339  delete theHFElectronicsSim;
340  delete theHOElectronicsSim;
341  delete theZDCElectronicsSim;
344  delete theHBHEAmplifier;
345  delete theHFAmplifier;
346  delete theHOAmplifier;
347  delete theZDCAmplifier;
348  delete theCoderFactory;
349  delete theUpgradeCoderFactory;
350  delete theHitCorrection;
351  delete theNoiseGenerator;
352  if (theRelabeller) delete theRelabeller;
353 }
354 
355 
357  noiseGenerator->setParameterMap(theParameterMap);
358  noiseGenerator->setElectronicsSim(theHBHEElectronicsSim);
360  theHBHEAmplifier->setNoiseSignalGenerator(noiseGenerator);
361 }
362 
364  noiseGenerator->setParameterMap(theParameterMap);
365  noiseGenerator->setElectronicsSim(theHFElectronicsSim);
368  theHFAmplifier->setNoiseSignalGenerator(noiseGenerator);
369 }
370 
372  noiseGenerator->setParameterMap(theParameterMap);
373  noiseGenerator->setElectronicsSim(theHOElectronicsSim);
374  theHODigitizer->setNoiseSignalGenerator(noiseGenerator);
375  theHOAmplifier->setNoiseSignalGenerator(noiseGenerator);
376 }
377 
379  noiseGenerator->setParameterMap(theParameterMap);
380  noiseGenerator->setElectronicsSim(theZDCElectronicsSim);
381  theZDCDigitizer->setNoiseSignalGenerator(noiseGenerator);
382  theZDCAmplifier->setNoiseSignalGenerator(noiseGenerator);
383 }
384 
386  // get the appropriate gains, noises, & widths for this event
387  edm::ESHandle<HcalDbService> conditions;
388  eventSetup.get<HcalDbRecord>().get(conditions);
389  theHBHEAmplifier->setDbService(conditions.product());
390  theHFAmplifier->setDbService(conditions.product());
391  theHOAmplifier->setDbService(conditions.product());
392  theZDCAmplifier->setDbService(conditions.product());
395 
396  theCoderFactory->setDbService(conditions.product());
398  theParameterMap->setDbService(conditions.product());
399 
401  eventSetup.get<HcalCholeskyMatricesRcd>().get(refCholesky);
402  const HcalCholeskyMatrices * myCholesky = refCholesky.product();
403 
404  edm::ESHandle<HcalPedestals> pedshandle;
405  eventSetup.get<HcalPedestalsRcd>().get(pedshandle);
406  const HcalPedestals * myADCPedestals = pedshandle.product();
407 
408  theHBHEAmplifier->setCholesky(myCholesky);
409  theHFAmplifier->setCholesky(myCholesky);
410  theHOAmplifier->setCholesky(myCholesky);
411 
412  theHBHEAmplifier->setADCPeds(myADCPedestals);
413  theHFAmplifier->setADCPeds(myADCPedestals);
414  theHOAmplifier->setADCPeds(myADCPedestals);
415 
416  if(theHitCorrection != 0) {
418  }
419 
420  //initialize hits
429 
430 }
431 
432 void HcalDigitizer::accumulateCaloHits(edm::Handle<std::vector<PCaloHit> > const& hcalHandle, edm::Handle<std::vector<PCaloHit> > const& zdcHandle, int bunchCrossing) {
433  // Step A: pass in inputs, and accumulate digirs
434  if(isHCAL) {
435  std::vector<PCaloHit> hcalHits = *hcalHandle.product();
436  if (relabel_) {
437  // Relabel PCaloHits
438  edm::LogInfo("HcalDigitizer") << "Calling Relabller";
439  theRelabeller->process(hcalHits);
440  }
441  if(theHitCorrection != 0) {
442  theHitCorrection->fillChargeSums(hcalHits);
443  }
444  if(hbhegeo) {
445  if(theHBHEDigitizer) theHBHEDigitizer->add(hcalHits, bunchCrossing);
446  if(theHBHESiPMDigitizer) theHBHESiPMDigitizer->add(hcalHits, bunchCrossing);
448  // std::cout << "HcalDigitizer::accumulateCaloHits theHBHEUpgradeDigitizer->add" << std::endl;
449  theHBHEUpgradeDigitizer->add(hcalHits, bunchCrossing);
450  }
451  }
452 
453  if(hogeo) {
454  if(theHODigitizer) theHODigitizer->add(hcalHits, bunchCrossing);
455  if(theHOSiPMDigitizer) theHOSiPMDigitizer->add(hcalHits, bunchCrossing);
456  }
457 
458  if(hfgeo) {
459  if(theHFDigitizer) theHFDigitizer->add(hcalHits, bunchCrossing);
460  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->add(hcalHits, bunchCrossing);
461  }
462  } else {
463  edm::LogInfo("HcalDigitizer") << "We don't have HCAL hit collection available ";
464  }
465 
466  if(isZDC) {
467  if(zdcgeo) {
468  theZDCDigitizer->add(*zdcHandle.product(), bunchCrossing);
469  }
470  } else {
471  edm::LogInfo("HcalDigitizer") << "We don't have ZDC hit collection available ";
472  }
473 }
474 
475 void HcalDigitizer::accumulate(edm::Event const& e, edm::EventSetup const& eventSetup) {
476  // Step A: Get Inputs
477  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
479  e.getByLabel(zdcTag, zdcHandle);
480  isZDC = zdcHandle.isValid();
481 
482  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
484  e.getByLabel(hcalTag, hcalHandle);
485  isHCAL = hcalHandle.isValid();
486 
487  accumulateCaloHits(hcalHandle, zdcHandle, 0);
488 }
489 
491  // Step A: Get Inputs
492  edm::InputTag zdcTag(hitsProducer_, "ZDCHITS");
494  e.getByLabel(zdcTag, zdcHandle);
495  isZDC = zdcHandle.isValid();
496 
497  edm::InputTag hcalTag(hitsProducer_, "HcalHits");
499  e.getByLabel(hcalTag, hcalHandle);
500  isHCAL = hcalHandle.isValid();
501 
502  accumulateCaloHits(hcalHandle, zdcHandle, e.bunchCrossing());
503 }
504 
506 
507  // Step B: Create empty output
508  std::auto_ptr<HBHEDigiCollection> hbheResult(new HBHEDigiCollection());
509  std::auto_ptr<HODigiCollection> hoResult(new HODigiCollection());
510  std::auto_ptr<HFDigiCollection> hfResult(new HFDigiCollection());
511  std::auto_ptr<ZDCDigiCollection> zdcResult(new ZDCDigiCollection());
512  std::auto_ptr<HBHEUpgradeDigiCollection> hbheupgradeResult(new HBHEUpgradeDigiCollection());
513  std::auto_ptr<HFUpgradeDigiCollection> hfupgradeResult(new HFUpgradeDigiCollection());
514 
515  // Step C: Invoke the algorithm, getting back outputs.
516  if(isHCAL&&hbhegeo){
517  if(theHBHEDigitizer) theHBHEDigitizer->run(*hbheResult);
520  theHBHEUpgradeDigitizer->run(*hbheupgradeResult);
521 
522  // std::cout << "HcalDigitizer::finalizeEvent theHBHEUpgradeDigitizer->run" << std::endl;
523  }
524  }
525  if(isHCAL&&hogeo) {
526  if(theHODigitizer) theHODigitizer->run(*hoResult);
527  if(theHOSiPMDigitizer) theHOSiPMDigitizer->run(*hoResult);
528  }
529  if(isHCAL&&hfgeo) {
530  if(theHFDigitizer) theHFDigitizer->run(*hfResult);
531  if(theHFUpgradeDigitizer) theHFUpgradeDigitizer->run(*hfupgradeResult);
532  }
533  if(isZDC&&zdcgeo) {
534  theZDCDigitizer->run(*zdcResult);
535  }
536 
537  edm::LogInfo("HcalDigitizer") << "HCAL HBHE digis : " << hbheResult->size();
538  edm::LogInfo("HcalDigitizer") << "HCAL HO digis : " << hoResult->size();
539  edm::LogInfo("HcalDigitizer") << "HCAL HF digis : " << hfResult->size();
540  edm::LogInfo("HcalDigitizer") << "HCAL ZDC digis : " << zdcResult->size();
541  edm::LogInfo("HcalDigitizer") << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size();
542  edm::LogInfo("HcalDigitizer") << "HCAL HF upgrade digis : " << hfupgradeResult->size();
543 
544  /*
545  std::cout << std::endl;
546  std::cout << "HCAL HBHE digis : " << hbheResult->size() << std::endl;
547  std::cout << "HCAL HO digis : " << hoResult->size() << std::endl;
548  std::cout << "HCAL HF digis : " << hfResult->size() << std::endl;
549 
550  std::cout << "HCAL HBHE upgrade digis : " << hbheupgradeResult->size()
551  << std::endl;
552  std::cout << "HCAL HF upgrade digis : " << hfupgradeResult->size()
553  << std::endl;
554  */
555 
556  // Step D: Put outputs into event
557  e.put(hbheResult);
558  e.put(hoResult);
559  e.put(hfResult);
560  e.put(zdcResult);
561  e.put(hbheupgradeResult,"HBHEUpgradeDigiCollection");
562  e.put(hfupgradeResult, "HFUpgradeDigiCollection");
563 
564  // std::cout << std::endl << "========> HcalDigitizer e.put "
565  // << std::endl << std::endl;
566 
567  if(theHitCorrection) {
569  }
570 }
571 
572 
574  checkGeometry(es);
575  theShapes->beginRun(es);
576 }
577 
578 
580  theShapes->endRun();
581 }
582 
583 
585  // TODO find a way to avoid doing this every event
587  eventSetup.get<CaloGeometryRecord>().get(geometry);
588  // See if it's been updated
589  if(&*geometry != theGeometry)
590  {
591  theGeometry = &*geometry;
592  updateGeometry(eventSetup);
593  }
594 }
595 
596 
605 
606  const std::vector<DetId>& hbCells = theGeometry->getValidDetIds(DetId::Hcal, HcalBarrel);
607  const std::vector<DetId>& heCells = theGeometry->getValidDetIds(DetId::Hcal, HcalEndcap);
608  const std::vector<DetId>& hoCells = theGeometry->getValidDetIds(DetId::Hcal, HcalOuter);
609  const std::vector<DetId>& hfCells = theGeometry->getValidDetIds(DetId::Hcal, HcalForward);
610  const std::vector<DetId>& zdcCells = theGeometry->getValidDetIds(DetId::Calo, HcalZDCDetId::SubdetectorId);
611  //const std::vector<DetId>& hcalTrigCells = geometry->getValidDetIds(DetId::Hcal, HcalTriggerTower);
612  //const std::vector<DetId>& hcalCalib = geometry->getValidDetIds(DetId::Calo, HcalCastorDetId::SubdetectorId);
613  //std::cout<<"HcalDigitizer::CheckGeometry number of cells: "<<zdcCells.size()<<std::endl;
614  if(zdcCells.empty()) zdcgeo = false;
615  if(hbCells.empty() && heCells.empty()) hbhegeo = false;
616  if(hoCells.empty()) hogeo = false;
617  if(hfCells.empty()) hfgeo = false;
618  // combine HB & HE
619 
620  theHBHEDetIds = hbCells;
621  theHBHEDetIds.insert(theHBHEDetIds.end(), heCells.begin(), heCells.end());
622 
624  //HcalDigitizerImpl::fillCells(hoCells, theHODigitizer, theHOSiPMDigitizer);
625  buildHOSiPMCells(hoCells, eventSetup);
628  theZDCDigitizer->setDetIds(zdcCells);
631 
632  // std::cout << " HcalDigitizer::updateGeometry theHBHEUpgradeDigitizer->setDetIds(theHBHEDetIds)"<< std::endl;
633  }
634 
635 }
636 
637 
638 void HcalDigitizer::buildHOSiPMCells(const std::vector<DetId>& allCells, const edm::EventSetup & eventSetup) {
639  // all HPD
640  if(theHOSiPMCode == 0) {
641  theHODigitizer->setDetIds(allCells);
642  } else if(theHOSiPMCode == 1) {
643  theHOSiPMDigitizer->setDetIds(allCells);
644  // FIXME pick Zecotek or hamamatsu?
645  } else if(theHOSiPMCode == 2) {
646  std::vector<HcalDetId> zecotekDetIds, hamamatsuDetIds;
648  eventSetup.get<HcalMCParamsRcd>().get(p);
650  eventSetup.get<IdealGeometryRecord>().get(htopo);
651 
652  HcalMCParams mcParams(*p.product());
653  if (mcParams.topo()==0) {
654  mcParams.setTopo(htopo.product());
655  }
656 
657  for(std::vector<DetId>::const_iterator detItr = allCells.begin();
658  detItr != allCells.end(); ++detItr) {
659  int shapeType = mcParams.getValues(*detItr)->signalShape();
660  if(shapeType == HcalShapes::ZECOTEK) {
661  zecotekDetIds.emplace_back(*detItr);
662  theHOSiPMDetIds.push_back(*detItr);
663  } else if(shapeType == HcalShapes::HAMAMATSU) {
664  hamamatsuDetIds.emplace_back(*detItr);
665  theHOSiPMDetIds.push_back(*detItr);
666  } else {
667  theHOHPDDetIds.push_back(*detItr);
668  }
669  }
670 
671  assert(theHODigitizer);
672  assert(theHOSiPMDigitizer);
676  // FIXME not applying a HitFilter to the HPDs, for now
677  theParameterMap->setHOZecotekDetIds(zecotekDetIds);
678  theParameterMap->setHOHamamatsuDetIds(hamamatsuDetIds);
679 
680  // make sure we don't got through this exercise again
681  theHOSiPMCode = -2;
682  }
683 }
684 
685 
686 
687 
void setNoiseHitGenerator(CaloVNoiseHitGenerator *generator)
void setHOtuningParameter(double tp)
T getParameter(std::string const &) const
void setGeometry(const CaloGeometry *geometry)
geometry needed for time-of-flight
void setDbService(const HcalDbService *service)
the Producer will probably update this every event
T getUntrackedParameter(std::string const &, T const &) const
HBHEHitFilter theHBHEHitFilter
void setParameterMap(HcalSimParameterMap *map)
void initializeHits()
void setDetIds(const std::vector< DetId > &detIds)
virtual ~HcalDigitizer()
HcalElectronicsSim * theHFElectronicsSim
Definition: HcalDigitizer.h:94
HBHEDigitizer * theHBHEDigitizer
HOHitFilter theHOHitFilter
CaloTDigitizer< HcalUpgradeDigitizerTraits > UpgradeDigitizer
Definition: HcalDigitizer.h:70
void setRandomEngine(CLHEP::HepRandomEngine &engine)
void add(const std::vector< PCaloHit > &hits, int bunchCrossing)
void setUseOldHF(bool useOld)
void setTopo(const HcalTopology *topo) const
HFDigitizer * theHFDigitizer
HFHitFilter theHFHitFilter
void checkGeometry(const edm::EventSetup &eventSetup)
HcalSimParameterMap * theParameterMap
Definition: HcalDigitizer.h:72
void setHFtuningParameter(double tp)
void setTimeSlewSim(const HcalTimeSlewSim *timeSlewSim)
Definition: HcalAmplifier.h:36
void setPECorrection(const CaloVPECorrection *peCorrection)
if you want to correct the photoelectrons
HcalTimeSlewSim * theTimeSlewSim
void setADCPeds(const HcalPedestals *ADCPeds)
Definition: HcalAmplifier.h:52
void setGeometry(const CaloGeometry *&theGeometry)
HcalAmplifier * theHFAmplifier
Definition: HcalDigitizer.h:85
HcalDigitizer(const edm::ParameterSet &ps)
HcalElectronicsSim * theUpgradeHFElectronicsSim
Definition: HcalDigitizer.h:98
void fillSiPMCells(std::vector< int > &siPMCells, SIPMDIGITIZER *siPMDigitizer)
HcalCoderFactory * theCoderFactory
Definition: HcalDigitizer.h:90
HcalHitRelabeller * theRelabeller
edm::SortedCollection< ZDCDataFrame > ZDCDigiCollection
HcalCoderFactory * theUpgradeCoderFactory
Definition: HcalDigitizer.h:91
void initializeEvent(edm::Event const &e, edm::EventSetup const &c)
void setDbService(const HcalDbService *service)
UpgradeDigitizer * theHFUpgradeDigitizer
CaloTDigitizer< HFDigitizerTraits > HFDigitizer
Definition: HcalDigitizer.h:68
void setHOZecotekDetIds(const std::vector< HcalDetId > &ids)
HcalAmplifier * theHBHEAmplifier
Definition: HcalDigitizer.h:84
void setUseOldHO(bool useOld)
edm::SortedCollection< HODataFrame > HODigiCollection
CaloTDigitizer< ZDCDigitizerTraits > ZDCDigitizer
Definition: HcalDigitizer.h:69
std::string hitsProducer_
HcalElectronicsSim * theHOElectronicsSim
Definition: HcalDigitizer.h:95
void setElectronicsSim(HcalElectronicsSim *electronicsSim)
void setHitFilter(const CaloVHitFilter *filter)
if you want to reject hits, for example, from a certain subdetector, set this
HcalShapes * theShapes
Definition: HcalDigitizer.h:73
Creates electronics signals from hits.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:94
void setRandomEngine(CLHEP::HepRandomEngine &engine)
need a shaper in order to set thermal noise
void setHFNoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
void setRandomEngine(CLHEP::HepRandomEngine &engine)
std::vector< DetId > theHBHEDetIds
void buildHOSiPMCells(const std::vector< DetId > &allCells, const edm::EventSetup &eventSetup)
ZDCHitFilter theZDCHitFilter
HPDIonFeedbackSim * theIonFeedback
Definition: HcalDigitizer.h:89
void fillChargeSums(MixCollection< PCaloHit > &hits)
bool isAvailable() const
Definition: Service.h:47
CaloHitResponse * theHOResponse
Definition: HcalDigitizer.h:77
HcalHitFilter theHOSiPMHitFilter
CaloHitResponse * theHOSiPMResponse
Definition: HcalDigitizer.h:78
void setHBHEScale(std::string &)
void setNoiseSignalGenerator(CaloVNoiseSignalGenerator *generator)
ZDCDigitizer * theZDCDigitizer
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
edm::SortedCollection< HcalUpgradeDataFrame > HFUpgradeDigiCollection
std::vector< DetId > theHOHPDDetIds
bool isValid() const
Definition: HandleBase.h:76
edm::SortedCollection< HcalUpgradeDataFrame > HBHEUpgradeDigiCollection
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
HcalHitCorrection * theHitCorrection
CaloHitResponse * theZDCResponse
Definition: HcalDigitizer.h:80
void endRun()
Definition: HcalShapes.cc:118
void setNoiseSignalGenerator(const CaloVNoiseSignalGenerator *noiseSignalGenerator)
Definition: HcalAmplifier.h:33
void accumulateCaloHits(edm::Handle< std::vector< PCaloHit > > const &hcalHits, edm::Handle< std::vector< PCaloHit > > const &zdcHits, int bunchCrossing)
HcalElectronicsSim * theZDCElectronicsSim
Definition: HcalDigitizer.h:96
HcalElectronicsSim * theUpgradeHBHEElectronicsSim
Definition: HcalDigitizer.h:97
void run(MixCollection< PCaloHit > &, DigiCollection &)
turns hits into digis
static const int SubdetectorId
Definition: HcalZDCDetId.h:22
void beginRun(const edm::EventSetup &es)
void process(std::vector< PCaloHit > &hcalHits)
CaloTDigitizer< HODigitizerTraits > HODigitizer
Definition: HcalDigitizer.h:67
void accumulate(edm::Event const &e, edm::EventSetup const &c)
void setHOHamamatsuDetIds(const std::vector< HcalDetId > &ids)
HcalAmplifier * theHOAmplifier
Definition: HcalDigitizer.h:86
void setDbService(const HcalDbService *service)
const T & get() const
Definition: EventSetup.h:55
HcalElectronicsSim * theHBHEElectronicsSim
Definition: HcalDigitizer.h:93
T const * product() const
Definition: ESHandle.h:62
void fillCells(std::vector< DetId > &allCells, HPDDIGITIZER *hpdDigitizer, SIPMDIGITIZER *siPMDigitizer)
CaloHitResponse * theHBHEResponse
Definition: HcalDigitizer.h:75
HODigitizer * theHODigitizer
std::vector< DetId > theHOSiPMDetIds
const CaloGeometry * theGeometry
Definition: HcalDigitizer.h:60
std::vector< DetId > getValidDetIds() const
Get the list of all valid detector ids.
Definition: CaloGeometry.cc:90
void setCholesky(const HcalCholeskyMatrices *Cholesky)
Definition: HcalAmplifier.h:51
string fname
main script
ESHandle< TrackerGeometry > geometry
CaloHitResponse * theHFResponse
Definition: HcalDigitizer.h:79
HODigitizer * theHOSiPMDigitizer
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
void setZDCNoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
HBHEDigitizer * theHBHESiPMDigitizer
edm::SortedCollection< HFDataFrame > HFDigiCollection
void setDetIds(const std::vector< DetId > &detIds)
void beginRun(edm::EventSetup const &es)
Definition: HcalShapes.cc:103
CaloHitResponse * theHBHESiPMResponse
Definition: HcalDigitizer.h:76
void setRandomEngine(CLHEP::HepRandomEngine &engine)
void updateGeometry(const edm::EventSetup &eventSetup)
void setHBHENoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
CaloVNoiseHitGenerator * theNoiseHitGenerator
HcalAmplifier * theZDCAmplifier
Definition: HcalDigitizer.h:87
void setDbService(const HcalDbService *service)
edm::SortedCollection< HBHEDataFrame > HBHEDigiCollection
void finalizeEvent(edm::Event &e, edm::EventSetup const &c)
UpgradeDigitizer * theHBHEUpgradeDigitizer
void setHONoiseSignalGenerator(HcalBaseSignalGenerator *noiseGenerator)
CaloTDigitizer< HBHEDigitizerTraits > HBHEDigitizer
Definition: HcalDigitizer.h:66
CaloVNoiseSignalGenerator * theNoiseGenerator