CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
HGCDigitizer Class Reference

#include <HGCDigitizer.h>

Public Types

typedef std::tuple< int, uint32_t, float > HGCCaloHitTuple_t
 

Public Member Functions

void accumulate (edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
 handle SimHit accumulation More...
 
template<typename GEOM >
void accumulate (edm::Handle< edm::PCaloHitContainer > const &hits, int bxCrossing, const GEOM *geom, CLHEP::HepRandomEngine *hre)
 
void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
 
void accumulate_forPreMix (const PHGCSimAccumulator &simAccumulator, const bool minbiasFlag)
 
void accumulate_forPreMix (edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
 
template<typename GEOM >
void accumulate_forPreMix (edm::Handle< edm::PCaloHitContainer > const &hits, int bxCrossing, const GEOM *geom, CLHEP::HepRandomEngine *hre)
 
void accumulate_forPreMix (PileUpEventPrincipal const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
 
void beginRun (const edm::EventSetup &es)
 actions at the start/end of run More...
 
std::string digiCollection ()
 
void endRun ()
 
void finalizeEvent (edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
 
int geometryType ()
 
 HGCDigitizer (const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
 
void initializeEvent (edm::Event const &e, edm::EventSetup const &c)
 actions at the start/end of event More...
 
bool producesEEDigis ()
 
bool producesHEbackDigis ()
 
bool producesHEfrontDigis ()
 
bool producesHFNoseDigis ()
 
 ~HGCDigitizer ()
 

Static Public Member Functions

static bool orderByDetIdThenTime (const HGCCaloHitTuple_t &a, const HGCCaloHitTuple_t &b)
 

Private Member Functions

void checkPosition (const HGCalDigiCollection *digis) const
 
uint32_t getType () const
 
bool getWeight (std::array< float, 3 > &tdcForToAOnset, float &keV2fC) const
 
void resetPUSimHitDataAccumulator ()
 
void resetSimHitDataAccumulator ()
 

Private Attributes

std::array< double, 4 > averageOccupancies_
 
double bxTime_
 
std::vector< float > cce_
 
std::string digiCollection_
 
int digitizationType_
 
double ev_per_eh_pair_
 
int geometryType_
 
const HcalGeometrygHcal_
 
const HGCalGeometrygHGCal_
 
std::string hitCollection_
 
std::unordered_map< uint32_t, bool > hitOrder_monitor
 
std::unordered_map< uint32_t, std::vector< std::pair< float, float > > > hitRefs_bx0
 
int maxSimHitsAccTime_
 
DetId::Detector myDet_
 
ForwardSubdetector mySubDet_
 
uint32_t nEvents_
 
bool premixStage1_
 
double premixStage1MaxCharge_
 
double premixStage1MinCharge_
 
std::unique_ptr< hgc::HGCPUSimHitDataAccumulatorpusimHitAccumulator_
 
float refSpeed_
 
std::unique_ptr< hgc::HGCSimHitDataAccumulatorsimHitAccumulator_
 
std::unique_ptr< HFNoseDigitizertheHFNoseDigitizer_
 
std::unique_ptr< HGCEEDigitizertheHGCEEDigitizer_
 
std::unique_ptr< HGCHEbackDigitizertheHGCHEbackDigitizer_
 
std::unique_ptr< HGCHEfrontDigitizertheHGCHEfrontDigitizer_
 
float tofDelay_
 
std::unordered_set< DetIdvalidIds_
 
uint32_t verbosity_
 

Static Private Attributes

static const unsigned int maxBx_ = 14
 
static const unsigned int thisBx_ = 9
 

Detailed Description

Definition at line 30 of file HGCDigitizer.h.

Member Typedef Documentation

◆ HGCCaloHitTuple_t

typedef std::tuple<int, uint32_t, float> HGCDigitizer::HGCCaloHitTuple_t

Definition at line 36 of file HGCDigitizer.h.

Constructor & Destructor Documentation

◆ HGCDigitizer()

HGCDigitizer::HGCDigitizer ( const edm::ParameterSet ps,
edm::ConsumesCollector iC 
)

Definition at line 263 of file HGCDigitizer.cc.

268  refSpeed_(0.1 * CLHEP::c_light), //[CLHEP::c_light]=mm/ns convert to cm/ns
269  averageOccupancies_(occupancyGuesses),
270  nEvents_(1) {
271  //configure from cfg
272 
273  hitCollection_ = ps.getParameter<std::string>("hitCollection");
274  digiCollection_ = ps.getParameter<std::string>("digiCollection");
275  maxSimHitsAccTime_ = ps.getParameter<uint32_t>("maxSimHitsAccTime");
276  bxTime_ = ps.getParameter<double>("bxTime");
277  geometryType_ = ps.getParameter<uint32_t>("geometryType");
278  digitizationType_ = ps.getParameter<uint32_t>("digitizationType");
279  verbosity_ = ps.getUntrackedParameter<uint32_t>("verbosity", 0);
280  tofDelay_ = ps.getParameter<double>("tofDelay");
281  premixStage1_ = ps.getParameter<bool>("premixStage1");
282  premixStage1MinCharge_ = ps.getParameter<double>("premixStage1MinCharge");
283  premixStage1MaxCharge_ = ps.getParameter<double>("premixStage1MaxCharge");
284  std::unordered_set<DetId>().swap(validIds_);
285  iC.consumes<std::vector<PCaloHit>>(edm::InputTag("g4SimHits", hitCollection_));
286  const auto& myCfg_ = ps.getParameter<edm::ParameterSet>("digiCfg");
287 
288  if (myCfg_.existsAs<edm::ParameterSet>("chargeCollectionEfficiencies")) {
289  cce_.clear();
290  const auto& temp = myCfg_.getParameter<edm::ParameterSet>("chargeCollectionEfficiencies")
291  .getParameter<std::vector<double>>("values");
292  for (double cce : temp) {
293  cce_.emplace_back(cce);
294  }
295  } else {
296  std::vector<float>().swap(cce_);
297  }
298 
299  if (hitCollection_.find("HitsEE") != std::string::npos) {
300  if (geometryType_ == 0) {
302  } else {
304  }
305  theHGCEEDigitizer_ = std::make_unique<HGCEEDigitizer>(ps);
306  }
307  if (hitCollection_.find("HitsHEfront") != std::string::npos) {
308  if (geometryType_ == 0) {
310  } else {
312  }
313  theHGCHEfrontDigitizer_ = std::make_unique<HGCHEfrontDigitizer>(ps);
314  }
315  if (hitCollection_.find("HcalHits") != std::string::npos and geometryType_ == 0) {
317  theHGCHEbackDigitizer_ = std::make_unique<HGCHEbackDigitizer>(ps);
318  }
319  if (hitCollection_.find("HitsHEback") != std::string::npos and geometryType_ == 1) {
321  theHGCHEbackDigitizer_ = std::make_unique<HGCHEbackDigitizer>(ps);
322  }
323  if (hitCollection_.find("HFNoseHits") != std::string::npos) {
326  theHFNoseDigitizer_ = std::make_unique<HFNoseDigitizer>(ps);
327  }
328 }

References bxTime_, cce_, edm::ConsumesCollector::consumes(), digiCollection_, digitizationType_, DetId::Forward, geometryType_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HFNose, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCEE, HGCHEB, HGCHEF, hitCollection_, HLT_2018_cff::InputTag, maxSimHitsAccTime_, myDet_, mySubDet_, premixStage1_, premixStage1MaxCharge_, premixStage1MinCharge_, AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, theHFNoseDigitizer_, theHGCEEDigitizer_, theHGCHEbackDigitizer_, theHGCHEfrontDigitizer_, tofDelay_, validIds_, and verbosity_.

◆ ~HGCDigitizer()

HGCDigitizer::~HGCDigitizer ( )
inline

Definition at line 33 of file HGCDigitizer.h.

33 {}

Member Function Documentation

◆ accumulate() [1/3]

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

handle SimHit accumulation

Definition at line 438 of file HGCDigitizer.cc.

438  {
439  //get inputs
441  e.getByLabel(edm::InputTag("g4SimHits", hitCollection_), hits);
442  if (!hits.isValid()) {
443  edm::LogError("HGCDigitizer") << " @ accumulate : can't find " << hitCollection_ << " collection of g4SimHits";
444  return;
445  }
446 
447  //accumulate in-time the main event
448  if (nullptr != gHGCal_) {
449  accumulate(hits, 0, gHGCal_, hre);
450  } else if (nullptr != gHcal_) {
451  accumulate(hits, 0, gHcal_, hre);
452  } else {
453  throw cms::Exception("BadConfiguration") << "HGCDigitizer is not producing EE, FH, or BH digis!";
454  }
455 }

References MillePedeFileConverter_cfg::e, Exception, gHcal_, gHGCal_, hitCollection_, and hfClusterShapes_cfi::hits.

Referenced by HGCDigiProducer::accumulate(), and accumulate().

◆ accumulate() [2/3]

template<typename GEOM >
void HGCDigitizer::accumulate ( edm::Handle< edm::PCaloHitContainer > const &  hits,
int  bxCrossing,
const GEOM *  geom,
CLHEP::HepRandomEngine *  hre 
)

Definition at line 563 of file HGCDigitizer.cc.

566  {
567  if (nullptr == geom)
568  return;
569 
570  //configuration to apply for the computation of time-of-flight
571  std::array<float, 3> tdcForToAOnset{{0.f, 0.f, 0.f}};
572  float keV2fC(0.f);
573  bool weightToAbyEnergy = getWeight(tdcForToAOnset, keV2fC);
574 
575  //create list of tuples (pos in container, RECO DetId, time) to be sorted first
576  int nchits = (int)hits->size();
577 
578  std::vector<HGCCaloHitTuple_t> hitRefs;
579  hitRefs.reserve(nchits);
580  for (int i = 0; i < nchits; ++i) {
581  const auto& the_hit = hits->at(i);
582  DetId id = simToReco(geom, the_hit.id());
583 
584  if (verbosity_ > 0) {
585  if (producesEEDigis())
586  edm::LogVerbatim("HGCDigitizer") << "HGCDigitizer::i/p " << std::hex << the_hit.id() << " o/p " << id.rawId()
587  << std::dec;
588  else
589  edm::LogVerbatim("HGCDigitizer") << "HGCDigitizer::i/p " << std::hex << the_hit.id() << " o/p " << id.rawId()
590  << std::dec;
591  }
592 
593  if (0 != id.rawId()) {
594  hitRefs.emplace_back(i, id.rawId(), (float)the_hit.time());
595  }
596  }
597 
598  std::sort(hitRefs.begin(), hitRefs.end(), this->orderByDetIdThenTime);
599  //loop over sorted hits
600  nchits = hitRefs.size();
601  for (int i = 0; i < nchits; ++i) {
602  const int hitidx = std::get<0>(hitRefs[i]);
603  const uint32_t id = std::get<1>(hitRefs[i]);
604 
605  //get the data for this cell, if not available then we skip it
606 
607  if (!validIds_.count(id))
608  continue;
609  HGCSimHitDataAccumulator::iterator simHitIt = simHitAccumulator_->emplace(id, HGCCellInfo()).first;
610 
611  if (id == 0)
612  continue; // to be ignored at RECO level
613 
614  const float toa = std::get<2>(hitRefs[i]);
615  const PCaloHit& hit = hits->at(hitidx);
616  const float charge = hit.energy() * 1e6 * keV2fC;
617 
618  //distance to the center of the detector
619  const float dist2center(getPositionDistance(geom, id));
620 
621  //hit time: [time()]=ns [centerDist]=cm [refSpeed_]=cm/ns + delay by 1ns
622  //accumulate in 15 buckets of 25ns (9 pre-samples, 1 in-time, 5 post-samples)
623  const float tof = toa - dist2center / refSpeed_ + tofDelay_;
624  const int itime = std::floor(tof / bxTime_) + 9;
625 
626  //no need to add bx crossing - tof comes already corrected from the mixing module
627  //itime += bxCrossing;
628  //itime += 9;
629 
630  if (itime < 0 || itime > (int)maxBx_)
631  continue;
632 
633  //check if time index is ok and store energy
634  if (itime >= (int)simHitIt->second.hit_info[0].size())
635  continue;
636 
637  (simHitIt->second).hit_info[0][itime] += charge;
638 
639  //for time-of-arrival: save the time-sorted list of timestamps with cumulative charge just above threshold
640  //working version with pileup only for in-time hits
641  int waferThickness = getCellThickness(geom, id);
642  bool orderChanged = false;
643  if (itime == (int)thisBx_) {
644  //if start empty => just add charge and time
645  if (hitRefs_bx0[id].empty()) {
646  hitRefs_bx0[id].emplace_back(charge, tof);
647 
648  } else if (tof <= hitRefs_bx0[id].back().second) {
649  //find position to insert new entry preserving time sorting
650  std::vector<std::pair<float, float>>::iterator findPos =
652  hitRefs_bx0[id].end(),
653  std::pair<float, float>(0.f, tof),
654  [](const auto& i, const auto& j) { return i.second <= j.second; });
655 
656  std::vector<std::pair<float, float>>::iterator insertedPos = findPos;
657  if (findPos->second == tof) {
658  //just merge timestamps with exact timing
659  findPos->first += charge;
660  } else {
661  //insert new element cumulating the charge
662  insertedPos = hitRefs_bx0[id].insert(findPos,
663  (findPos == hitRefs_bx0[id].begin())
664  ? std::pair<float, float>(charge, tof)
665  : std::pair<float, float>((findPos - 1)->first + charge, tof));
666  }
667 
668  //cumulate the charge of new entry for all elements that follow in the sorted list
669  //and resize list accounting for cases when the inserted element itself crosses the threshold
670  for (std::vector<std::pair<float, float>>::iterator step = insertedPos; step != hitRefs_bx0[id].end(); ++step) {
671  if (step != insertedPos)
672  step->first += charge;
673  // resize the list stopping with the first timeStamp with cumulative charge above threshold
674  if (step->first > tdcForToAOnset[waferThickness - 1] && step->second != hitRefs_bx0[id].back().second) {
676  hitRefs_bx0[id].end(),
677  std::pair<float, float>(0.f, step->second),
678  [](const auto& i, const auto& j) { return i.second < j.second; }) -
679  hitRefs_bx0[id].begin());
680  for (auto stepEnd = step + 1; stepEnd != hitRefs_bx0[id].end(); ++stepEnd)
681  stepEnd->first += charge;
682  break;
683  }
684  }
685 
686  orderChanged = true;
687  } else {
688  //add new entry at the end of the list
689  if (hitRefs_bx0[id].back().first <= tdcForToAOnset[waferThickness - 1]) {
690  hitRefs_bx0[id].emplace_back(hitRefs_bx0[id].back().first + charge, tof);
691  }
692  }
693  }
694  float accChargeForToA = hitRefs_bx0[id].empty() ? 0.f : hitRefs_bx0[id].back().first;
695  //now compute the firing ToA through the interpolation of the consecutive time-stamps at threshold
696  if (weightToAbyEnergy)
697  (simHitIt->second).hit_info[1][itime] += charge * tof;
698  else if (accChargeForToA > tdcForToAOnset[waferThickness - 1] &&
699  ((simHitIt->second).hit_info[1][itime] == 0 || orderChanged == true)) {
700  float fireTDC = hitRefs_bx0[id].back().second;
701  if (hitRefs_bx0[id].size() > 1) {
702  float chargeBeforeThr = (hitRefs_bx0[id].end() - 2)->first;
703  float tofchargeBeforeThr = (hitRefs_bx0[id].end() - 2)->second;
704 
705  float deltaQ = accChargeForToA - chargeBeforeThr;
706  float deltaTOF = fireTDC - tofchargeBeforeThr;
707  fireTDC = (tdcForToAOnset[waferThickness - 1] - chargeBeforeThr) * deltaTOF / deltaQ + tofchargeBeforeThr;
708  }
709  (simHitIt->second).hit_info[1][itime] = fireTDC;
710  }
711  }
712  hitRefs.clear();
713 }

References begin, bxTime_, ALCARECOTkAlJpsiMuMu_cff::charge, TauDecayModes::dec, relativeConstraints::empty, end, f, dqmdumpme::first, relativeConstraints::geom, getWeight(), hitRefs_bx0, hfClusterShapes_cfi::hits, mps_fire::i, triggerObjects_cff::id, createfilelist::int, dqmiolumiharvest::j, hgcalTriggerNtuples_cfi::keV2fC, maxBx_, orderByDetIdThenTime(), producesEEDigis(), refSpeed_, edm::second(), simHitAccumulator_, findQualityFiles::size, thisBx_, tofDelay_, cuda_std::upper_bound(), validIds_, and verbosity_.

◆ accumulate() [3/3]

void HGCDigitizer::accumulate ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  hre 
)

Definition at line 479 of file HGCDigitizer.cc.

481  {
482  //get inputs
484  e.getByLabel(edm::InputTag("g4SimHits", hitCollection_), hits);
485 
486  if (!hits.isValid()) {
487  edm::LogError("HGCDigitizer") << " @ accumulate : can't find " << hitCollection_ << " collection of g4SimHits";
488  return;
489  }
490 
491  //accumulate for the simulated bunch crossing
492  if (nullptr != gHGCal_) {
493  accumulate(hits, e.bunchCrossing(), gHGCal_, hre);
494  } else if (nullptr != gHcal_) {
495  accumulate(hits, e.bunchCrossing(), gHcal_, hre);
496  } else {
497  throw cms::Exception("BadConfiguration") << "HGCDigitizer is not producing EE, FH, or BH digis!";
498  }
499 }

References accumulate(), MillePedeFileConverter_cfg::e, Exception, gHcal_, gHGCal_, hitCollection_, and hfClusterShapes_cfi::hits.

◆ accumulate_forPreMix() [1/4]

void HGCDigitizer::accumulate_forPreMix ( const PHGCSimAccumulator simAccumulator,
const bool  minbiasFlag 
)

Definition at line 714 of file HGCDigitizer.cc.

714  {
715  //configuration to apply for the computation of time-of-flight
716  std::array<float, 3> tdcForToAOnset{{0.f, 0.f, 0.f}};
717  float keV2fC(0.f);
718  bool weightToAbyEnergy = getWeight(tdcForToAOnset, keV2fC);
719 
720  if (nullptr != gHGCal_) {
721  loadSimHitAccumulator_forPreMix(*simHitAccumulator_,
723  gHGCal_,
724  hitRefs_bx0,
725  simAccumulator,
728  !weightToAbyEnergy,
729  tdcForToAOnset,
730  minbiasFlag,
732  thisBx_);
733  } else if (nullptr != gHcal_) {
734  loadSimHitAccumulator_forPreMix(*simHitAccumulator_,
736  gHcal_,
737  hitRefs_bx0,
738  simAccumulator,
741  !weightToAbyEnergy,
742  tdcForToAOnset,
743  minbiasFlag,
745  thisBx_);
746  }
747 }

References f, getWeight(), gHcal_, gHGCal_, hitOrder_monitor, hitRefs_bx0, hgcalTriggerNtuples_cfi::keV2fC, premixStage1MaxCharge_, premixStage1MinCharge_, pusimHitAccumulator_, simHitAccumulator_, and thisBx_.

◆ accumulate_forPreMix() [2/4]

void HGCDigitizer::accumulate_forPreMix ( edm::Event const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  hre 
)

Definition at line 415 of file HGCDigitizer.cc.

417  {
418  //get inputs
420  e.getByLabel(edm::InputTag("g4SimHits", hitCollection_), hits);
421  if (!hits.isValid()) {
422  edm::LogError("HGCDigitizer") << " @ accumulate_minbias : can't find " << hitCollection_
423  << " collection of g4SimHits";
424  return;
425  }
426 
427  //accumulate in-time the main event
428  if (nullptr != gHGCal_) {
430  } else if (nullptr != gHcal_) {
431  accumulate_forPreMix(hits, 0, gHcal_, hre);
432  } else {
433  throw cms::Exception("BadConfiguration") << "HGCDigitizer is not producing EE, FH, or BH digis!";
434  }
435 }

References MillePedeFileConverter_cfg::e, Exception, gHcal_, gHGCal_, hitCollection_, and hfClusterShapes_cfi::hits.

Referenced by HGCDigiProducer::accumulate(), accumulate_forPreMix(), PreMixingHGCalWorker::addPileups(), and PreMixingHGCalWorker::addSignals().

◆ accumulate_forPreMix() [3/4]

template<typename GEOM >
void HGCDigitizer::accumulate_forPreMix ( edm::Handle< edm::PCaloHitContainer > const &  hits,
int  bxCrossing,
const GEOM *  geom,
CLHEP::HepRandomEngine *  hre 
)

Definition at line 503 of file HGCDigitizer.cc.

506  {
507  if (nullptr == geom)
508  return;
509 
510  float keV2fC(0.f);
511 
512  int nchits = (int)hits->size();
513 
514  std::vector<HGCCaloHitTuple_t> hitRefs;
515  hitRefs.reserve(nchits);
516  for (int i = 0; i < nchits; ++i) {
517  const auto& the_hit = hits->at(i);
518  DetId id = simToReco(geom, the_hit.id());
519  // to be written the verbosity block
520  if (id.rawId() != 0) {
521  hitRefs.emplace_back(i, id.rawId(), (float)the_hit.time());
522  }
523  }
524  std::sort(hitRefs.begin(), hitRefs.end(), this->orderByDetIdThenTime);
525 
526  nchits = hitRefs.size();
527  for (int i = 0; i < nchits; ++i) {
528  const int hitidx = std::get<0>(hitRefs[i]);
529  const uint32_t id = std::get<1>(hitRefs[i]);
530  if (!validIds_.count(id))
531  continue;
532 
533  HGCPUSimHitDataAccumulator::iterator simHitIt = pusimHitAccumulator_->emplace(id, HGCCellHitInfo()).first;
534  if (id == 0)
535  continue;
536 
537  const float toa = std::get<2>(hitRefs[i]);
538  const PCaloHit& hit = hits->at(hitidx);
539  const float charge = hit.energy() * 1e6 * keV2fC; // * getCCE(geom, id, cce_);
540 
541  const float dist2center(getPositionDistance(geom, id));
542  const float tof = toa - dist2center / refSpeed_ + tofDelay_;
543  const int itime = std::floor(tof / bxTime_) + 9;
544 
545  if (itime < 0 || itime > (int)maxBx_)
546  continue;
547 
548  if (itime >= (int)simHitIt->second.PUhit_info[0].size())
549  continue;
550  (simHitIt->second).PUhit_info[1][itime].push_back(tof);
551  (simHitIt->second).PUhit_info[0][itime].push_back(charge);
552  }
553  if (nchits == 0) {
554  HGCPUSimHitDataAccumulator::iterator simHitIt = pusimHitAccumulator_->emplace(0, HGCCellHitInfo()).first;
555  (simHitIt->second).PUhit_info[1][9].push_back(0.0);
556  (simHitIt->second).PUhit_info[0][9].push_back(0.0);
557  }
558  hitRefs.clear();
559 }

References bxTime_, ALCARECOTkAlJpsiMuMu_cff::charge, f, relativeConstraints::geom, hfClusterShapes_cfi::hits, mps_fire::i, createfilelist::int, hgcalTriggerNtuples_cfi::keV2fC, maxBx_, orderByDetIdThenTime(), pusimHitAccumulator_, refSpeed_, tofDelay_, and validIds_.

◆ accumulate_forPreMix() [4/4]

void HGCDigitizer::accumulate_forPreMix ( PileUpEventPrincipal const &  e,
edm::EventSetup const &  c,
CLHEP::HepRandomEngine *  hre 
)

Definition at line 458 of file HGCDigitizer.cc.

460  {
462  e.getByLabel(edm::InputTag("g4SimHits", hitCollection_), hits);
463 
464  if (!hits.isValid()) {
465  edm::LogError("HGCDigitizer") << " @ accumulate : can't find " << hitCollection_ << " collection of g4SimHits";
466  return;
467  }
468 
469  if (nullptr != gHGCal_) {
470  accumulate_forPreMix(hits, e.bunchCrossing(), gHGCal_, hre);
471  } else if (nullptr != gHcal_) {
472  accumulate_forPreMix(hits, e.bunchCrossing(), gHcal_, hre);
473  } else {
474  throw cms::Exception("BadConfiguration") << "HGCDigitizer is not producing EE, FH, or BH digis!";
475  }
476 }

References accumulate_forPreMix(), MillePedeFileConverter_cfg::e, Exception, gHcal_, gHGCal_, hitCollection_, and hfClusterShapes_cfi::hits.

◆ beginRun()

void HGCDigitizer::beginRun ( const edm::EventSetup es)

actions at the start/end of run

Definition at line 750 of file HGCDigitizer.cc.

750  {
751  //get geometry
754 
755  gHGCal_ = nullptr;
756  gHcal_ = nullptr;
757 
758  if (producesEEDigis())
759  gHGCal_ = dynamic_cast<const HGCalGeometry*>(geom->getSubdetectorGeometry(myDet_, mySubDet_));
760  if (producesHEfrontDigis())
761  gHGCal_ = dynamic_cast<const HGCalGeometry*>(geom->getSubdetectorGeometry(myDet_, mySubDet_));
762  if (producesHFNoseDigis())
763  gHGCal_ = dynamic_cast<const HGCalGeometry*>(geom->getSubdetectorGeometry(myDet_, mySubDet_));
764 
765  if (producesHEbackDigis()) {
766  if (geometryType_ == 0) {
767  gHcal_ = dynamic_cast<const HcalGeometry*>(geom->getSubdetectorGeometry(DetId::Hcal, HcalEndcap));
768  } else {
769  gHGCal_ = dynamic_cast<const HGCalGeometry*>(geom->getSubdetectorGeometry(myDet_, mySubDet_));
770  }
771  }
772 
773  int nadded(0);
774  //valid ID lists
775  if (nullptr != gHGCal_) {
776  getValidDetIds(gHGCal_, validIds_);
777  } else if (nullptr != gHcal_) {
778  getValidDetIds(gHcal_, validIds_);
779  } else {
780  throw cms::Exception("BadConfiguration") << "HGCDigitizer is not producing EE, FH, or BH digis!";
781  }
782 
783  if (verbosity_ > 0)
784  edm::LogInfo("HGCDigitizer") << "Added " << nadded << ":" << validIds_.size() << " detIds without "
785  << hitCollection_ << " in first event processed" << std::endl;
786 }

References Exception, relativeConstraints::geom, geometryType_, edm::EventSetup::get(), get, gHcal_, gHGCal_, DetId::Hcal, HcalEndcap, hitCollection_, myDet_, mySubDet_, producesEEDigis(), producesHEbackDigis(), producesHEfrontDigis(), producesHFNoseDigis(), validIds_, and verbosity_.

Referenced by PreMixingHGCalWorker::beginRun(), and HGCDigiProducer::beginRun().

◆ checkPosition()

void HGCDigitizer::checkPosition ( const HGCalDigiCollection digis) const
private

Definition at line 895 of file HGCDigitizer.cc.

895  {
896  const double tol(0.5);
897  if (geometryType_ != 0 && nullptr != gHGCal_) {
898  for (const auto& digi : *(digis)) {
899  const DetId& id = digi.id();
900  const GlobalPoint& global = gHGCal_->getPosition(id);
901  double r = global.perp();
902  double z = std::abs(global.z());
903  std::pair<double, double> zrange = gHGCal_->topology().dddConstants().rangeZ(true);
904  std::pair<double, double> rrange = gHGCal_->topology().dddConstants().rangeR(z, true);
905  bool ok = ((r >= rrange.first) && (r <= rrange.second) && (z >= zrange.first) && (z <= zrange.second));
906  std::string ck = (((r < rrange.first - tol) || (r > rrange.second + tol) || (z < zrange.first - tol) ||
907  (z > zrange.second + tol))
908  ? "***** ERROR *****"
909  : "");
910  bool val = gHGCal_->topology().valid(id);
911  if ((!ok) || (!val)) {
912  if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) {
913  edm::LogVerbatim("HGCDigitizer") << "Check " << HGCSiliconDetId(id) << " " << global << " R " << r << ":"
914  << rrange.first << ":" << rrange.second << " Z " << z << ":" << zrange.first
915  << ":" << zrange.second << " Flag " << ok << ":" << val << " " << ck;
916  } else if (id.det() == DetId::HGCalHSc) {
917  edm::LogVerbatim("HGCDigitizer") << "Check " << HGCScintillatorDetId(id) << " " << global << " R " << r << ":"
918  << rrange.first << ":" << rrange.second << " Z " << z << ":" << zrange.first
919  << ":" << zrange.second << " Flag " << ok << ":" << val << " " << ck;
920  } else if ((id.det() == DetId::Forward) && (id.subdetId() == static_cast<int>(HFNose))) {
921  edm::LogVerbatim("HGCDigitizer") << "Check " << HFNoseDetId(id) << " " << global << " R " << r << ":"
922  << rrange.first << ":" << rrange.second << " Z " << z << ":" << zrange.first
923  << ":" << zrange.second << " Flag " << ok << ":" << val << " " << ck;
924  } else {
925  edm::LogVerbatim("HGCDigitizer")
926  << "Check " << std::hex << id.rawId() << std::dec << " " << id.det() << ":" << id.subdetId() << " "
927  << global << " R " << r << ":" << rrange.first << ":" << rrange.second << " Z " << z << ":"
928  << zrange.first << ":" << zrange.second << " Flag " << ok << ":" << val << " " << ck;
929  }
930  }
931  }
932  }
933 }

References funct::abs(), HGCalTopology::dddConstants(), TauDecayModes::dec, DetId::Forward, geometryType_, HGCalGeometry::getPosition(), gHGCal_, HFNose, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, convertSQLiteXML::ok, PV3DBase< T, PVType, FrameType >::perp(), alignCSCRings::r, HGCalDDDConstants::rangeR(), HGCalDDDConstants::rangeZ(), AlCaHLTBitMon_QueryRunRegistry::string, HGCalGeometry::topology(), heppy_batch::val, HGCalTopology::valid(), z, PV3DBase< T, PVType, FrameType >::z(), and TkClusParameters_cff::zrange.

Referenced by finalizeEvent().

◆ digiCollection()

std::string HGCDigitizer::digiCollection ( )
inline

◆ endRun()

void HGCDigitizer::endRun ( )

Definition at line 789 of file HGCDigitizer.cc.

789 { std::unordered_set<DetId>().swap(validIds_); }

References validIds_.

Referenced by PreMixingHGCalWorker::endRun(), and HGCDigiProducer::endRun().

◆ finalizeEvent()

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

Definition at line 339 of file HGCDigitizer.cc.

339  {
340  hitRefs_bx0.clear();
341  hitOrder_monitor.clear();
342  const CaloSubdetectorGeometry* theGeom = (nullptr == gHGCal_ ? static_cast<const CaloSubdetectorGeometry*>(gHcal_)
343  : static_cast<const CaloSubdetectorGeometry*>(gHGCal_));
344 
345  ++nEvents_;
346 
347  unsigned idx = getType();
348  // release memory for unfilled parts of hash table
349  if (validIds_.size() * averageOccupancies_[idx] > simHitAccumulator_->size()) {
350  simHitAccumulator_->reserve(simHitAccumulator_->size());
351  pusimHitAccumulator_->reserve(simHitAccumulator_->size());
352  }
353  //update occupancy guess
354  const double thisOcc = simHitAccumulator_->size() / ((double)validIds_.size());
356 
357  if (premixStage1_) {
358  auto simRecord = std::make_unique<PHGCSimAccumulator>();
359 
360  if (!pusimHitAccumulator_->empty()) {
361  saveSimHitAccumulator_forPreMix(
363  }
364 
365  e.put(std::move(simRecord), digiCollection());
366 
367  } else {
368  if (producesEEDigis()) {
369  auto digiResult = std::make_unique<HGCalDigiCollection>();
370 
371  theHGCEEDigitizer_->run(digiResult, *simHitAccumulator_, theGeom, validIds_, digitizationType_, hre);
372 
373  edm::LogVerbatim("HGCDigitizer") << "HGCDigitizer:: finalize event - produced " << digiResult->size()
374  << " EE hits";
375 #ifdef EDM_ML_DEBUG
376  checkPosition(&(*digiResult));
377 #endif
378  e.put(std::move(digiResult), digiCollection());
379  }
380  if (producesHEfrontDigis()) {
381  auto digiResult = std::make_unique<HGCalDigiCollection>();
382  theHGCHEfrontDigitizer_->run(digiResult, *simHitAccumulator_, theGeom, validIds_, digitizationType_, hre);
383  edm::LogVerbatim("HGCDigitizer") << "HGCDigitizer:: finalize event - produced " << digiResult->size()
384  << " HE silicon hits";
385 #ifdef EDM_ML_DEBUG
386  checkPosition(&(*digiResult));
387 #endif
388  e.put(std::move(digiResult), digiCollection());
389  }
390  if (producesHEbackDigis()) {
391  auto digiResult = std::make_unique<HGCalDigiCollection>();
392  theHGCHEbackDigitizer_->run(digiResult, *simHitAccumulator_, theGeom, validIds_, digitizationType_, hre);
393  edm::LogVerbatim("HGCDigitizer") << "HGCDigitizer:: finalize event - produced " << digiResult->size()
394  << " HE Scintillator hits";
395 #ifdef EDM_ML_DEBUG
396  checkPosition(&(*digiResult));
397 #endif
398  e.put(std::move(digiResult), digiCollection());
399  }
400  if (producesHFNoseDigis()) {
401  auto digiResult = std::make_unique<HGCalDigiCollection>();
402  theHFNoseDigitizer_->run(digiResult, *simHitAccumulator_, theGeom, validIds_, digitizationType_, hre);
403  edm::LogVerbatim("HGCDigitizer") << "HGCDigitizer:: finalize event - produced " << digiResult->size()
404  << " HFNose hits";
405 #ifdef EDM_ML_DEBUG
406  checkPosition(&(*digiResult));
407 #endif
408  e.put(std::move(digiResult), digiCollection());
409  }
410  }
411 
414 }

References averageOccupancies_, checkPosition(), digiCollection(), digitizationType_, MillePedeFileConverter_cfg::e, getType(), gHcal_, gHGCal_, hitOrder_monitor, hitRefs_bx0, training_settings::idx, eostools::move(), nEvents_, premixStage1_, premixStage1MaxCharge_, premixStage1MinCharge_, producesEEDigis(), producesHEbackDigis(), producesHEfrontDigis(), producesHFNoseDigis(), pusimHitAccumulator_, simHitAccumulator_, theHFNoseDigitizer_, theHGCEEDigitizer_, theHGCHEbackDigitizer_, theHGCHEfrontDigitizer_, and validIds_.

Referenced by HGCDigiProducer::finalizeEvent(), and PreMixingHGCalWorker::put().

◆ geometryType()

int HGCDigitizer::geometryType ( )
inline

Definition at line 86 of file HGCDigitizer.h.

86 { return geometryType_; }

References geometryType_.

◆ getType()

uint32_t HGCDigitizer::getType ( void  ) const
private

Definition at line 799 of file HGCDigitizer.cc.

799  {
801  if (geometryType_ == 0) {
802  switch (mySubDet_) {
804  idx = 0;
805  break;
807  idx = 1;
808  break;
810  idx = 2;
811  break;
813  idx = 3;
814  break;
815  default:
816  break;
817  }
818  } else {
819  switch (myDet_) {
820  case DetId::HGCalEE:
821  idx = 0;
822  break;
823  case DetId::HGCalHSi:
824  idx = 1;
825  break;
826  case DetId::HGCalHSc:
827  idx = 2;
828  break;
829  case DetId::Forward:
830  idx = 3;
831  break;
832  default:
833  break;
834  }
835  }
836  return idx;
837 }

References DetId::Forward, geometryType_, HFNose, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCEE, HGCHEB, HGCHEF, training_settings::idx, SiStripPI::max, myDet_, and mySubDet_.

Referenced by finalizeEvent(), and initializeEvent().

◆ getWeight()

bool HGCDigitizer::getWeight ( std::array< float, 3 > &  tdcForToAOnset,
float &  keV2fC 
) const
private

Definition at line 839 of file HGCDigitizer.cc.

839  {
840  bool weightToAbyEnergy(false);
841  if (geometryType_ == 0) {
842  switch (mySubDet_) {
844  weightToAbyEnergy = theHGCEEDigitizer_->toaModeByEnergy();
845  tdcForToAOnset = theHGCEEDigitizer_->tdcForToAOnset();
846  keV2fC = theHGCEEDigitizer_->keV2fC();
847  break;
849  weightToAbyEnergy = theHGCHEfrontDigitizer_->toaModeByEnergy();
850  tdcForToAOnset = theHGCHEfrontDigitizer_->tdcForToAOnset();
851  keV2fC = theHGCHEfrontDigitizer_->keV2fC();
852  break;
854  weightToAbyEnergy = theHGCHEbackDigitizer_->toaModeByEnergy();
855  tdcForToAOnset = theHGCHEbackDigitizer_->tdcForToAOnset();
856  keV2fC = theHGCHEbackDigitizer_->keV2fC();
857  break;
859  weightToAbyEnergy = theHFNoseDigitizer_->toaModeByEnergy();
860  tdcForToAOnset = theHFNoseDigitizer_->tdcForToAOnset();
861  keV2fC = theHFNoseDigitizer_->keV2fC();
862  break;
863  default:
864  break;
865  }
866  } else {
867  switch (myDet_) {
868  case DetId::HGCalEE:
869  weightToAbyEnergy = theHGCEEDigitizer_->toaModeByEnergy();
870  tdcForToAOnset = theHGCEEDigitizer_->tdcForToAOnset();
871  keV2fC = theHGCEEDigitizer_->keV2fC();
872  break;
873  case DetId::HGCalHSi:
874  weightToAbyEnergy = theHGCHEfrontDigitizer_->toaModeByEnergy();
875  tdcForToAOnset = theHGCHEfrontDigitizer_->tdcForToAOnset();
876  keV2fC = theHGCHEfrontDigitizer_->keV2fC();
877  break;
878  case DetId::HGCalHSc:
879  weightToAbyEnergy = theHGCHEbackDigitizer_->toaModeByEnergy();
880  tdcForToAOnset = theHGCHEbackDigitizer_->tdcForToAOnset();
881  keV2fC = theHGCHEbackDigitizer_->keV2fC();
882  break;
883  case DetId::Forward:
884  weightToAbyEnergy = theHFNoseDigitizer_->toaModeByEnergy();
885  tdcForToAOnset = theHFNoseDigitizer_->tdcForToAOnset();
886  keV2fC = theHFNoseDigitizer_->keV2fC();
887  break;
888  default:
889  break;
890  }
891  }
892  return weightToAbyEnergy;
893 }

References DetId::Forward, geometryType_, HFNose, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, HGCEE, HGCHEB, HGCHEF, hgcalTriggerNtuples_cfi::keV2fC, myDet_, mySubDet_, theHFNoseDigitizer_, theHGCEEDigitizer_, theHGCHEbackDigitizer_, and theHGCHEfrontDigitizer_.

Referenced by accumulate(), and accumulate_forPreMix().

◆ initializeEvent()

void HGCDigitizer::initializeEvent ( edm::Event const &  e,
edm::EventSetup const &  c 
)

actions at the start/end of event

Definition at line 331 of file HGCDigitizer.cc.

331  {
332  // reserve memory for a full detector
333  unsigned idx = getType();
336 }

References averageOccupancies_, getType(), training_settings::idx, pusimHitAccumulator_, simHitAccumulator_, and validIds_.

Referenced by HGCDigiProducer::initializeEvent().

◆ orderByDetIdThenTime()

static bool HGCDigitizer::orderByDetIdThenTime ( const HGCCaloHitTuple_t a,
const HGCCaloHitTuple_t b 
)
inlinestatic

Definition at line 37 of file HGCDigitizer.h.

37  {
38  unsigned int detId_a(std::get<1>(a)), detId_b(std::get<1>(b));
39 
40  if (detId_a < detId_b)
41  return true;
42  if (detId_a > detId_b)
43  return false;
44 
45  double time_a(std::get<2>(a)), time_b(std::get<2>(b));
46  if (time_a < time_b)
47  return true;
48 
49  return false;
50  }

References a, and b.

Referenced by accumulate(), and accumulate_forPreMix().

◆ producesEEDigis()

bool HGCDigitizer::producesEEDigis ( )
inline

Definition at line 81 of file HGCDigitizer.h.

References DetId::HGCalEE, HGCEE, myDet_, and mySubDet_.

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

◆ producesHEbackDigis()

bool HGCDigitizer::producesHEbackDigis ( )
inline

Definition at line 83 of file HGCDigitizer.h.

References DetId::HGCalHSc, HGCHEB, myDet_, and mySubDet_.

Referenced by beginRun(), and finalizeEvent().

◆ producesHEfrontDigis()

bool HGCDigitizer::producesHEfrontDigis ( )
inline

Definition at line 82 of file HGCDigitizer.h.

References DetId::HGCalHSi, HGCHEF, myDet_, and mySubDet_.

Referenced by beginRun(), and finalizeEvent().

◆ producesHFNoseDigis()

bool HGCDigitizer::producesHFNoseDigis ( )
inline

Definition at line 84 of file HGCDigitizer.h.

References DetId::Forward, HFNose, myDet_, and mySubDet_.

Referenced by beginRun(), and finalizeEvent().

◆ resetPUSimHitDataAccumulator()

void HGCDigitizer::resetPUSimHitDataAccumulator ( )
private

◆ resetSimHitDataAccumulator()

void HGCDigitizer::resetSimHitDataAccumulator ( )
private

Definition at line 792 of file HGCDigitizer.cc.

792  {
793  for (HGCSimHitDataAccumulator::iterator it = simHitAccumulator_->begin(); it != simHitAccumulator_->end(); it++) {
794  it->second.hit_info[0].fill(0.);
795  it->second.hit_info[1].fill(0.);
796  }
797 }

References simHitAccumulator_.

Member Data Documentation

◆ averageOccupancies_

std::array<double, 4> HGCDigitizer::averageOccupancies_
private

Definition at line 148 of file HGCDigitizer.h.

Referenced by finalizeEvent(), and initializeEvent().

◆ bxTime_

double HGCDigitizer::bxTime_
private

Definition at line 115 of file HGCDigitizer.h.

Referenced by accumulate(), accumulate_forPreMix(), and HGCDigitizer().

◆ cce_

std::vector<float> HGCDigitizer::cce_
private

Definition at line 154 of file HGCDigitizer.h.

Referenced by HGCDigitizer().

◆ digiCollection_

std::string HGCDigitizer::digiCollection_
private

Definition at line 97 of file HGCDigitizer.h.

Referenced by digiCollection(), and HGCDigitizer().

◆ digitizationType_

int HGCDigitizer::digitizationType_
private

Definition at line 103 of file HGCDigitizer.h.

Referenced by finalizeEvent(), and HGCDigitizer().

◆ ev_per_eh_pair_

double HGCDigitizer::ev_per_eh_pair_
private

Definition at line 115 of file HGCDigitizer.h.

◆ geometryType_

int HGCDigitizer::geometryType_
private

Definition at line 100 of file HGCDigitizer.h.

Referenced by beginRun(), checkPosition(), geometryType(), getType(), getWeight(), and HGCDigitizer().

◆ gHcal_

const HcalGeometry* HGCDigitizer::gHcal_
private

Definition at line 132 of file HGCDigitizer.h.

Referenced by accumulate(), accumulate_forPreMix(), beginRun(), and finalizeEvent().

◆ gHGCal_

const HGCalGeometry* HGCDigitizer::gHGCal_
private

◆ hitCollection_

std::string HGCDigitizer::hitCollection_
private

Definition at line 97 of file HGCDigitizer.h.

Referenced by accumulate(), accumulate_forPreMix(), beginRun(), and HGCDigitizer().

◆ hitOrder_monitor

std::unordered_map<uint32_t, bool> HGCDigitizer::hitOrder_monitor
private

Definition at line 156 of file HGCDigitizer.h.

Referenced by accumulate_forPreMix(), and finalizeEvent().

◆ hitRefs_bx0

std::unordered_map<uint32_t, std::vector<std::pair<float, float> > > HGCDigitizer::hitRefs_bx0
private

Definition at line 155 of file HGCDigitizer.h.

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

◆ maxBx_

const unsigned int HGCDigitizer::maxBx_ = 14
staticprivate

Definition at line 152 of file HGCDigitizer.h.

Referenced by accumulate(), and accumulate_forPreMix().

◆ maxSimHitsAccTime_

int HGCDigitizer::maxSimHitsAccTime_
private

Definition at line 114 of file HGCDigitizer.h.

Referenced by HGCDigitizer().

◆ myDet_

DetId::Detector HGCDigitizer::myDet_
private

◆ mySubDet_

ForwardSubdetector HGCDigitizer::mySubDet_
private

◆ nEvents_

uint32_t HGCDigitizer::nEvents_
private

Definition at line 149 of file HGCDigitizer.h.

Referenced by finalizeEvent().

◆ premixStage1_

bool HGCDigitizer::premixStage1_
private

Definition at line 106 of file HGCDigitizer.h.

Referenced by finalizeEvent(), and HGCDigitizer().

◆ premixStage1MaxCharge_

double HGCDigitizer::premixStage1MaxCharge_
private

Definition at line 111 of file HGCDigitizer.h.

Referenced by accumulate_forPreMix(), finalizeEvent(), and HGCDigitizer().

◆ premixStage1MinCharge_

double HGCDigitizer::premixStage1MinCharge_
private

Definition at line 109 of file HGCDigitizer.h.

Referenced by accumulate_forPreMix(), finalizeEvent(), and HGCDigitizer().

◆ pusimHitAccumulator_

std::unique_ptr<hgc::HGCPUSimHitDataAccumulator> HGCDigitizer::pusimHitAccumulator_
private

Definition at line 117 of file HGCDigitizer.h.

Referenced by accumulate_forPreMix(), finalizeEvent(), and initializeEvent().

◆ refSpeed_

float HGCDigitizer::refSpeed_
private

Definition at line 142 of file HGCDigitizer.h.

Referenced by accumulate(), and accumulate_forPreMix().

◆ simHitAccumulator_

std::unique_ptr<hgc::HGCSimHitDataAccumulator> HGCDigitizer::simHitAccumulator_
private

◆ theHFNoseDigitizer_

std::unique_ptr<HFNoseDigitizer> HGCDigitizer::theHFNoseDigitizer_
private

Definition at line 127 of file HGCDigitizer.h.

Referenced by finalizeEvent(), getWeight(), and HGCDigitizer().

◆ theHGCEEDigitizer_

std::unique_ptr<HGCEEDigitizer> HGCDigitizer::theHGCEEDigitizer_
private

Definition at line 124 of file HGCDigitizer.h.

Referenced by finalizeEvent(), getWeight(), and HGCDigitizer().

◆ theHGCHEbackDigitizer_

std::unique_ptr<HGCHEbackDigitizer> HGCDigitizer::theHGCHEbackDigitizer_
private

Definition at line 125 of file HGCDigitizer.h.

Referenced by finalizeEvent(), getWeight(), and HGCDigitizer().

◆ theHGCHEfrontDigitizer_

std::unique_ptr<HGCHEfrontDigitizer> HGCDigitizer::theHGCHEfrontDigitizer_
private

Definition at line 126 of file HGCDigitizer.h.

Referenced by finalizeEvent(), getWeight(), and HGCDigitizer().

◆ thisBx_

const unsigned int HGCDigitizer::thisBx_ = 9
staticprivate

Definition at line 153 of file HGCDigitizer.h.

Referenced by accumulate(), and accumulate_forPreMix().

◆ tofDelay_

float HGCDigitizer::tofDelay_
private

Definition at line 145 of file HGCDigitizer.h.

Referenced by accumulate(), accumulate_forPreMix(), and HGCDigitizer().

◆ validIds_

std::unordered_set<DetId> HGCDigitizer::validIds_
private

◆ verbosity_

uint32_t HGCDigitizer::verbosity_
private

Definition at line 139 of file HGCDigitizer.h.

Referenced by accumulate(), beginRun(), and HGCDigitizer().

HGCDigitizer::thisBx_
static const unsigned int thisBx_
Definition: HGCDigitizer.h:153
HGCDigitizer::producesHFNoseDigis
bool producesHFNoseDigis()
Definition: HGCDigitizer.h:84
mps_fire.i
i
Definition: mps_fire.py:355
HGCDigitizer::producesHEfrontDigis
bool producesHEfrontDigis()
Definition: HGCDigitizer.h:82
hgc_digi::HGCCellHitInfo
Definition: HGCDigitizerTypes.h:25
HGCalTopology::dddConstants
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:98
TkClusParameters_cff.zrange
zrange
Definition: TkClusParameters_cff.py:7
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
HGCalDDDConstants::rangeZ
std::pair< double, double > rangeZ(bool reco) const
Definition: HGCalDDDConstants.cc:979
ForwardEmpty
Definition: ForwardSubdetector.h:5
HGCDigitizer::premixStage1MinCharge_
double premixStage1MinCharge_
Definition: HGCDigitizer.h:109
HGCDigitizer::simHitAccumulator_
std::unique_ptr< hgc::HGCSimHitDataAccumulator > simHitAccumulator_
Definition: HGCDigitizer.h:116
HGCDigitizer::digiCollection
std::string digiCollection()
Definition: HGCDigitizer.h:85
HGCDigitizer::gHGCal_
const HGCalGeometry * gHGCal_
Definition: HGCDigitizer.h:131
step
step
Definition: StallMonitor.cc:94
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
HGCDigitizer::theHGCHEbackDigitizer_
std::unique_ptr< HGCHEbackDigitizer > theHGCHEbackDigitizer_
Definition: HGCDigitizer.h:125
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
DetId::Hcal
Definition: DetId.h:28
edm::LogInfo
Definition: MessageLogger.h:254
HGCDigitizer::nEvents_
uint32_t nEvents_
Definition: HGCDigitizer.h:149
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
HGCDigitizer::maxBx_
static const unsigned int maxBx_
Definition: HGCDigitizer.h:152
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
HGCDigitizer::refSpeed_
float refSpeed_
Definition: HGCDigitizer.h:142
HGCDigitizer::producesHEbackDigis
bool producesHEbackDigis()
Definition: HGCDigitizer.h:83
HGCDigitizer::premixStage1_
bool premixStage1_
Definition: HGCDigitizer.h:106
watchdog.const
const
Definition: watchdog.py:83
HFNoseDetId
Definition: HFNoseDetId.h:22
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
edm::Handle
Definition: AssociativeIterator.h:50
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
training_settings.idx
idx
Definition: training_settings.py:16
dqmdumpme.first
first
Definition: dqmdumpme.py:55
HGCSiliconDetId
Definition: HGCSiliconDetId.h:22
end
#define end
Definition: vmac.h:39
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DetId
Definition: DetId.h:17
DetId::HGCalHSi
Definition: DetId.h:33
DetId::HGCalEE
Definition: DetId.h:32
HGCDigitizer::accumulate_forPreMix
void accumulate_forPreMix(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
Definition: HGCDigitizer.cc:415
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
cuda_std::upper_bound
__host__ constexpr __device__ RandomIt upper_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
Definition: cudastdAlgorithm.h:45
HFNose
Definition: ForwardSubdetector.h:11
DDAxes::z
edm::ESHandle< CaloGeometry >
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
HGCDigitizer::pusimHitAccumulator_
std::unique_ptr< hgc::HGCPUSimHitDataAccumulator > pusimHitAccumulator_
Definition: HGCDigitizer.h:117
HGCDigitizer::orderByDetIdThenTime
static bool orderByDetIdThenTime(const HGCCaloHitTuple_t &a, const HGCCaloHitTuple_t &b)
Definition: HGCDigitizer.h:37
HGCDigitizer::gHcal_
const HcalGeometry * gHcal_
Definition: HGCDigitizer.h:132
Point3DBase< float, GlobalTag >
b
double b
Definition: hdecay.h:118
HGCalGeometry::topology
const HGCalTopology & topology() const
Definition: HGCalGeometry.h:112
HGCalDDDConstants::rangeR
std::pair< double, double > rangeR(double z, bool reco) const
Definition: HGCalDDDConstants.cc:934
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
hgc_digi::HGCCellInfo
Definition: HGCDigitizerTypes.h:31
HGCEE
Definition: ForwardSubdetector.h:8
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
HGCDigitizer::hitCollection_
std::string hitCollection_
Definition: HGCDigitizer.h:97
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
a
double a
Definition: hdecay.h:119
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
HGCDigitizer::theHGCEEDigitizer_
std::unique_ptr< HGCEEDigitizer > theHGCEEDigitizer_
Definition: HGCDigitizer.h:124
HGCDigitizer::accumulate
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
handle SimHit accumulation
Definition: HGCDigitizer.cc:438
HGCDigitizer::maxSimHitsAccTime_
int maxSimHitsAccTime_
Definition: HGCDigitizer.h:114
HGCDigitizer::theHGCHEfrontDigitizer_
std::unique_ptr< HGCHEfrontDigitizer > theHGCHEfrontDigitizer_
Definition: HGCDigitizer.h:126
HGCDigitizer::hitRefs_bx0
std::unordered_map< uint32_t, std::vector< std::pair< float, float > > > hitRefs_bx0
Definition: HGCDigitizer.h:155
createfilelist.int
int
Definition: createfilelist.py:10
edm::LogVerbatim
Definition: MessageLogger.h:297
HGCalGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Definition: HGCalGeometry.cc:192
HGCDigitizer::digitizationType_
int digitizationType_
Definition: HGCDigitizer.h:103
PCaloHit
Definition: PCaloHit.h:8
get
#define get
hgc_digi::HGCSimHitDataAccumulator
std::unordered_map< uint32_t, HGCCellInfo > HGCSimHitDataAccumulator
Definition: HGCDigitizerTypes.h:38
HGCDigitizer::validIds_
std::unordered_set< DetId > validIds_
Definition: HGCDigitizer.h:130
HGCDigitizer::bxTime_
double bxTime_
Definition: HGCDigitizer.h:115
alignCSCRings.r
r
Definition: alignCSCRings.py:93
HGCDigitizer::tofDelay_
float tofDelay_
Definition: HGCDigitizer.h:145
HGCDigitizer::premixStage1MaxCharge_
double premixStage1MaxCharge_
Definition: HGCDigitizer.h:111
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HGCDigitizer::myDet_
DetId::Detector myDet_
Definition: HGCDigitizer.h:135
heppy_batch.val
val
Definition: heppy_batch.py:351
eostools.move
def move(src, dest)
Definition: eostools.py:511
HGCDigitizer::verbosity_
uint32_t verbosity_
Definition: HGCDigitizer.h:139
HGCDigitizer::digiCollection_
std::string digiCollection_
Definition: HGCDigitizer.h:97
HcalEndcap
Definition: HcalAssistant.h:34
hgc_digi::HGCPUSimHitDataAccumulator
std::unordered_map< uint32_t, HGCCellHitInfo > HGCPUSimHitDataAccumulator
Definition: HGCDigitizerTypes.h:39
HGCScintillatorDetId
Definition: HGCScintillatorDetId.h:21
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
DetId::HGCalHSc
Definition: DetId.h:34
HGCDigitizer::getWeight
bool getWeight(std::array< float, 3 > &tdcForToAOnset, float &keV2fC) const
Definition: HGCDigitizer.cc:839
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
Exception
Definition: hltDiff.cc:246
HGCDigitizer::theHFNoseDigitizer_
std::unique_ptr< HFNoseDigitizer > theHFNoseDigitizer_
Definition: HGCDigitizer.h:127
HGCDigitizer::checkPosition
void checkPosition(const HGCalDigiCollection *digis) const
Definition: HGCDigitizer.cc:895
CaloSubdetectorGeometry
Definition: CaloSubdetectorGeometry.h:22
HGCDigitizer::producesEEDigis
bool producesEEDigis()
Definition: HGCDigitizer.h:81
HGCDigitizer::cce_
std::vector< float > cce_
Definition: HGCDigitizer.h:154
HGCalTopology::valid
bool valid(const DetId &id) const override
Is this a valid cell id.
Definition: HGCalTopology.cc:464
HGCDigitizer::mySubDet_
ForwardSubdetector mySubDet_
Definition: HGCDigitizer.h:136
HGCHEF
Definition: ForwardSubdetector.h:9
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
DetId::Forward
Definition: DetId.h:30
HGCDigitizer::getType
uint32_t getType() const
Definition: HGCDigitizer.cc:799
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
edm::InputTag
Definition: InputTag.h:15
begin
#define begin
Definition: vmac.h:32
hit
Definition: SiStripHitEffFromCalibTree.cc:88
HGCDigitizer::hitOrder_monitor
std::unordered_map< uint32_t, bool > hitOrder_monitor
Definition: HGCDigitizer.h:156
hgcalTriggerNtuples_cfi.keV2fC
keV2fC
Definition: hgcalTriggerNtuples_cfi.py:11
HGCHEB
Definition: ForwardSubdetector.h:10
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
HGCDigitizer::averageOccupancies_
std::array< double, 4 > averageOccupancies_
Definition: HGCDigitizer.h:148
HGCDigitizer::geometryType_
int geometryType_
Definition: HGCDigitizer.h:100