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...
 
void accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
 
void accumulate (edm::Handle< edm::PCaloHitContainer > const &hits, int bxCrossing, const HGCalGeometry *geom, CLHEP::HepRandomEngine *hre)
 
void accumulate_forPreMix (edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
 
void accumulate_forPreMix (PileUpEventPrincipal const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
 
void accumulate_forPreMix (edm::Handle< edm::PCaloHitContainer > const &hits, int bxCrossing, const HGCalGeometry *geom, CLHEP::HepRandomEngine *hre)
 
void accumulate_forPreMix (const PHGCSimAccumulator &simAccumulator, const bool minbiasFlag)
 
std::string digiCollection ()
 
void finalizeEvent (edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
 
 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...
 
 ~HGCDigitizer ()=default
 

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
 
void resetPUSimHitDataAccumulator ()
 
void resetSimHitDataAccumulator ()
 

Private Attributes

std::array< double, 4 > averageOccupancies_
 
const double bxTime_
 
std::vector< float > cce_
 
const std::string digiCollection_
 
const int digitizationType_
 
double ev_per_eh_pair_
 
const edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeomToken_
 
edm::ESWatcher< CaloGeometryRecordgeomWatcher_
 
const HGCalGeometrygHGCal_ = nullptr
 
const std::string hitCollection_
 
std::unordered_map< uint32_t, bool > hitOrder_monitor
 
std::unordered_map< uint32_t, std::vector< std::pair< float, float > > > hitRefs_bx0
 
const std::string hitsProducer_
 
const edm::EDGetTokenT< std::vector< PCaloHit > > hitToken_
 
const int maxSimHitsAccTime_
 
uint32_t nEvents_
 
std::unordered_map< uint32_t, std::vector< std::tuple< float, float, float > > > PhitRefs_bx0
 
const bool premixStage1_
 
const double premixStage1MaxCharge_
 
const double premixStage1MinCharge_
 
std::unique_ptr< hgc::HGCPUSimHitDataAccumulatorpusimHitAccumulator_
 
std::unique_ptr< hgc::HGCSimHitDataAccumulatorsimHitAccumulator_
 
std::unique_ptr< HGCDigitizerBasetheDigitizer_
 
const float tofDelay_
 
std::unordered_set< DetIdvalidIds_
 
const uint32_t verbosity_
 

Static Private Attributes

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

Detailed Description

Definition at line 29 of file HGCDigitizer.h.

Member Typedef Documentation

◆ HGCCaloHitTuple_t

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

Definition at line 35 of file HGCDigitizer.h.

Constructor & Destructor Documentation

◆ HGCDigitizer()

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

Definition at line 227 of file HGCDigitizer.cc.

References cce_, get, edm::ParameterSet::getParameter(), crabTemplate::pluginName, AlCaHLTBitMon_QueryRunRegistry::string, edm::swap(), groupFilesInBlocks::temp, and theDigitizer_.

230  digiCollection_(ps.getParameter<std::string>("digiCollection")),
231  digitizationType_(ps.getParameter<uint32_t>("digitizationType")),
232  premixStage1_(ps.getParameter<bool>("premixStage1")),
233  premixStage1MinCharge_(ps.getParameter<double>("premixStage1MinCharge")),
234  premixStage1MaxCharge_(ps.getParameter<double>("premixStage1MaxCharge")),
235  maxSimHitsAccTime_(ps.getParameter<uint32_t>("maxSimHitsAccTime")),
236  bxTime_(ps.getParameter<double>("bxTime")),
237  hitsProducer_(ps.getParameter<std::string>("hitsProducer")),
238  hitCollection_(ps.getParameter<std::string>("hitCollection")),
239  hitToken_(iC.consumes<std::vector<PCaloHit>>(edm::InputTag(hitsProducer_, hitCollection_))),
240  geomToken_(iC.esConsumes()),
241  verbosity_(ps.getUntrackedParameter<uint32_t>("verbosity", 0)),
242  tofDelay_(ps.getParameter<double>("tofDelay")),
243  averageOccupancies_(occupancyGuesses),
244  nEvents_(1) {
245  //configure from cfg
246 
247  const auto& myCfg_ = ps.getParameter<edm::ParameterSet>("digiCfg");
248 
249  if (myCfg_.existsAs<edm::ParameterSet>("chargeCollectionEfficiencies")) {
250  cce_.clear();
251  const auto& temp = myCfg_.getParameter<edm::ParameterSet>("chargeCollectionEfficiencies")
252  .getParameter<std::vector<double>>("values");
253  for (double cce : temp) {
254  cce_.emplace_back(cce);
255  }
256  } else {
257  std::vector<float>().swap(cce_);
258  }
259 
260  auto const& pluginName = ps.getParameter<std::string>("digitizer");
262 }
const std::string hitsProducer_
Definition: HGCDigitizer.h:101
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
uint32_t nEvents_
Definition: HGCDigitizer.h:126
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::vector< float > cce_
Definition: HGCDigitizer.h:131
std::unique_ptr< HGCDigitizerBase > theDigitizer_
Definition: HGCDigitizer.h:110
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
Definition: HGCDigitizer.h:113
std::unordered_map< uint32_t, HGCCellInfo > HGCSimHitDataAccumulator
const std::string digiCollection_
Definition: HGCDigitizer.h:84
const double premixStage1MaxCharge_
Definition: HGCDigitizer.h:95
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
T getUntrackedParameter(std::string const &, T const &) const
const double premixStage1MinCharge_
Definition: HGCDigitizer.h:93
const uint32_t verbosity_
Definition: HGCDigitizer.h:119
const int maxSimHitsAccTime_
Definition: HGCDigitizer.h:98
const bool premixStage1_
Definition: HGCDigitizer.h:90
const edm::EDGetTokenT< std::vector< PCaloHit > > hitToken_
Definition: HGCDigitizer.h:103
std::array< double, 4 > averageOccupancies_
Definition: HGCDigitizer.h:125
const float tofDelay_
Definition: HGCDigitizer.h:122
const double bxTime_
Definition: HGCDigitizer.h:99
#define get
std::unique_ptr< hgc::HGCSimHitDataAccumulator > simHitAccumulator_
Definition: HGCDigitizer.h:81
std::unique_ptr< hgc::HGCPUSimHitDataAccumulator > pusimHitAccumulator_
Definition: HGCDigitizer.h:82
const int digitizationType_
Definition: HGCDigitizer.h:87
const std::string hitCollection_
Definition: HGCDigitizer.h:102
std::unordered_map< uint32_t, HGCCellHitInfo > HGCPUSimHitDataAccumulator

◆ ~HGCDigitizer()

HGCDigitizer::~HGCDigitizer ( )
default

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 360 of file HGCDigitizer.cc.

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

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

360  {
361  //get inputs
363  if (!hits.isValid()) {
364  edm::LogError("HGCDigitizer") << " @ accumulate : can't find " << hitCollection_ << " collection of "
365  << hitsProducer_;
366  return;
367  }
368 
369  //accumulate in-time the main event
370  if (nullptr != gHGCal_) {
371  accumulate(hits, 0, gHGCal_, hre);
372  } else {
373  throw cms::Exception("BadConfiguration") << "HGCDigitizer is not producing EE, FH, or BH digis!";
374  }
375 }
const std::string hitsProducer_
Definition: HGCDigitizer.h:101
Log< level::Error, false > LogError
const HGCalGeometry * gHGCal_
Definition: HGCDigitizer.h:116
const edm::EDGetTokenT< std::vector< PCaloHit > > hitToken_
Definition: HGCDigitizer.h:103
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
handle SimHit accumulation
const std::string hitCollection_
Definition: HGCDigitizer.h:102

◆ accumulate() [2/3]

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

Definition at line 399 of file HGCDigitizer.cc.

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

401  {
402  //get inputs
405  e.getByLabel(hitTag, hits);
406 
407  if (!hits.isValid()) {
408  edm::LogError("HGCDigitizer") << " @ accumulate : can't find " << hitCollection_ << " collection of "
409  << hitsProducer_;
410  return;
411  }
412 
413  //accumulate for the simulated bunch crossing
414  if (nullptr != gHGCal_) {
415  accumulate(hits, e.bunchCrossing(), gHGCal_, hre);
416  } else {
417  throw cms::Exception("BadConfiguration") << "HGCDigitizer is not producing EE, FH, or BH digis!";
418  }
419 }
const std::string hitsProducer_
Definition: HGCDigitizer.h:101
Log< level::Error, false > LogError
const HGCalGeometry * gHGCal_
Definition: HGCDigitizer.h:116
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
handle SimHit accumulation
const std::string hitCollection_
Definition: HGCDigitizer.h:102

◆ accumulate() [3/3]

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

Definition at line 541 of file HGCDigitizer.cc.

References bxTime_, ALCARECOTkAlJpsiMuMu_cff::charge, TauDecayModes::dec, relativeConstraints::empty, mps_fire::end, f, dqmdumpme::first, relativeConstraints::geom, hitRefs_bx0, hfClusterShapes_cfi::hits, mps_fire::i, l1ctLayer2EG_cff::id, createfilelist::int, dqmiolumiharvest::j, hgceeDigitizer_cfi::keV2fC, maxBx_, orderByDetIdThenTime(), nano_mu_digi_cff::rawId, edm::second(), simHitAccumulator_, findQualityFiles::size, jetUpdater_cfi::sort, theDigitizer_, thisBx_, tofDelay_, pfDeepBoostedJetPreprocessParams_cfi::upper_bound, validIds_, trackerHitRTTI::vector, and verbosity_.

544  {
545  if (nullptr == geom)
546  return;
547 
548  //configuration to apply for the computation of time-of-flight
549  auto weightToAbyEnergy = theDigitizer_->toaModeByEnergy();
550  auto tdcForToAOnset = theDigitizer_->tdcForToAOnset();
551  auto keV2fC = theDigitizer_->keV2fC();
552 
553  //create list of tuples (pos in container, RECO DetId, time) to be sorted first
554  int nchits = (int)hits->size();
555 
556  std::vector<HGCCaloHitTuple_t> hitRefs;
557  hitRefs.reserve(nchits);
558  for (int i = 0; i < nchits; ++i) {
559  const auto& the_hit = hits->at(i);
560  DetId id = simToReco(geom, the_hit.id());
561 
562  if (verbosity_ > 0) {
563  edm::LogVerbatim("HGCDigitizer") << "HGCDigitizer::i/p " << std::hex << the_hit.id() << " o/p " << id.rawId()
564  << std::dec;
565  }
566 
567  if (0 != id.rawId()) {
568  hitRefs.emplace_back(i, id.rawId(), (float)the_hit.time());
569  }
570  }
571 
572  std::sort(hitRefs.begin(), hitRefs.end(), this->orderByDetIdThenTime);
573  //loop over sorted hits
574  nchits = hitRefs.size();
575  for (int i = 0; i < nchits; ++i) {
576  const int hitidx = std::get<0>(hitRefs[i]);
577  const uint32_t id = std::get<1>(hitRefs[i]);
578 
579  //get the data for this cell, if not available then we skip it
580 
581  if (!validIds_.count(id))
582  continue;
583  HGCSimHitDataAccumulator::iterator simHitIt = simHitAccumulator_->emplace(id, HGCCellInfo()).first;
584 
585  if (id == 0)
586  continue; // to be ignored at RECO level
587 
588  const float toa = std::get<2>(hitRefs[i]);
589  const PCaloHit& hit = hits->at(hitidx);
590  const float charge = hit.energy() * 1e6 * keV2fC;
591 
592  //hit time: [time()]=ns + delay
593  //accumulate in 15 buckets of 25ns (9 pre-samples, 1 in-time, 5 post-samples)
594  const float tof = toa + tofDelay_;
595  const int itime = std::floor(tof / bxTime_) + 9;
596 
597  //no need to add bx crossing - tof comes already corrected from the mixing module
598  //itime += bxCrossing;
599  //itime += 9;
600 
601  if (itime < 0 || itime > (int)maxBx_)
602  continue;
603 
604  //check if time index is ok and store energy
605  if (itime >= (int)simHitIt->second.hit_info[0].size())
606  continue;
607 
608  (simHitIt->second).hit_info[0][itime] += charge;
609 
610  //for time-of-arrival: save the time-sorted list of timestamps with cumulative charge just above threshold
611  //working version with pileup only for in-time hits
612  int waferThickness = getCellThickness(geom, id);
613  bool orderChanged = false;
614  if (itime == (int)thisBx_) {
615  //if start empty => just add charge and time
616  if (hitRefs_bx0[id].empty()) {
617  hitRefs_bx0[id].emplace_back(charge, tof);
618 
619  } else if (tof <= hitRefs_bx0[id].back().second) {
620  //find position to insert new entry preserving time sorting
621  std::vector<std::pair<float, float>>::iterator findPos =
623  hitRefs_bx0[id].end(),
624  std::pair<float, float>(0.f, tof),
625  [](const auto& i, const auto& j) { return i.second <= j.second; });
626 
627  std::vector<std::pair<float, float>>::iterator insertedPos = findPos;
628  if (findPos->second == tof) {
629  //just merge timestamps with exact timing
630  findPos->first += charge;
631  } else {
632  //insert new element cumulating the charge
633  insertedPos = hitRefs_bx0[id].insert(findPos,
634  (findPos == hitRefs_bx0[id].begin())
635  ? std::pair<float, float>(charge, tof)
636  : std::pair<float, float>((findPos - 1)->first + charge, tof));
637  }
638 
639  //cumulate the charge of new entry for all elements that follow in the sorted list
640  //and resize list accounting for cases when the inserted element itself crosses the threshold
641  for (std::vector<std::pair<float, float>>::iterator step = insertedPos; step != hitRefs_bx0[id].end(); ++step) {
642  if (step != insertedPos)
643  step->first += charge;
644  // resize the list stopping with the first timeStamp with cumulative charge above threshold
645  if (step->first > tdcForToAOnset[waferThickness - 1] && step->second != hitRefs_bx0[id].back().second) {
647  hitRefs_bx0[id].end(),
648  std::pair<float, float>(0.f, step->second),
649  [](const auto& i, const auto& j) { return i.second < j.second; }) -
650  hitRefs_bx0[id].begin());
651  for (auto stepEnd = step + 1; stepEnd != hitRefs_bx0[id].end(); ++stepEnd)
652  stepEnd->first += charge;
653  break;
654  }
655  }
656 
657  orderChanged = true;
658  } else {
659  //add new entry at the end of the list
660  if (hitRefs_bx0[id].back().first <= tdcForToAOnset[waferThickness - 1]) {
661  hitRefs_bx0[id].emplace_back(hitRefs_bx0[id].back().first + charge, tof);
662  }
663  }
664  }
665  float accChargeForToA = hitRefs_bx0[id].empty() ? 0.f : hitRefs_bx0[id].back().first;
666  //now compute the firing ToA through the interpolation of the consecutive time-stamps at threshold
667  if (weightToAbyEnergy)
668  (simHitIt->second).hit_info[1][itime] += charge * tof;
669  else if (accChargeForToA > tdcForToAOnset[waferThickness - 1] &&
670  ((simHitIt->second).hit_info[1][itime] == 0 || orderChanged == true)) {
671  float fireTDC = hitRefs_bx0[id].back().second;
672  if (hitRefs_bx0[id].size() > 1) {
673  float chargeBeforeThr = (hitRefs_bx0[id].end() - 2)->first;
674  float tofchargeBeforeThr = (hitRefs_bx0[id].end() - 2)->second;
675 
676  float deltaQ = accChargeForToA - chargeBeforeThr;
677  float deltaTOF = fireTDC - tofchargeBeforeThr;
678  fireTDC = (tdcForToAOnset[waferThickness - 1] - chargeBeforeThr) * deltaTOF / deltaQ + tofchargeBeforeThr;
679  }
680  (simHitIt->second).hit_info[1][itime] = fireTDC;
681  }
682  }
683  hitRefs.clear();
684 }
size
Write out results.
Log< level::Info, true > LogVerbatim
std::unique_ptr< HGCDigitizerBase > theDigitizer_
Definition: HGCDigitizer.h:110
U second(std::pair< T, U > const &p)
static const unsigned int maxBx_
Definition: HGCDigitizer.h:129
const uint32_t verbosity_
Definition: HGCDigitizer.h:119
double f[11][100]
std::unordered_set< DetId > validIds_
Definition: HGCDigitizer.h:115
static const unsigned int thisBx_
Definition: HGCDigitizer.h:130
Definition: DetId.h:17
const float tofDelay_
Definition: HGCDigitizer.h:122
std::unordered_map< uint32_t, std::vector< std::pair< float, float > > > hitRefs_bx0
Definition: HGCDigitizer.h:132
const double bxTime_
Definition: HGCDigitizer.h:99
step
Definition: StallMonitor.cc:83
std::unique_ptr< hgc::HGCSimHitDataAccumulator > simHitAccumulator_
Definition: HGCDigitizer.h:81
static bool orderByDetIdThenTime(const HGCCaloHitTuple_t &a, const HGCCaloHitTuple_t &b)
Definition: HGCDigitizer.h:36

◆ accumulate_forPreMix() [1/4]

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

Definition at line 339 of file HGCDigitizer.cc.

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

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

341  {
342  //get inputs
343 
345  if (!hits.isValid()) {
346  edm::LogError("HGCDigitizer") << " @ accumulate_minbias : can't find " << hitCollection_ << " collection of "
347  << hitsProducer_;
348  return;
349  }
350 
351  //accumulate in-time the main event
352  if (nullptr != gHGCal_) {
354  } else {
355  throw cms::Exception("BadConfiguration") << "HGCDigitizer is not producing EE, FH, or BH digis!";
356  }
357 }
const std::string hitsProducer_
Definition: HGCDigitizer.h:101
Log< level::Error, false > LogError
const HGCalGeometry * gHGCal_
Definition: HGCDigitizer.h:116
const edm::EDGetTokenT< std::vector< PCaloHit > > hitToken_
Definition: HGCDigitizer.h:103
void accumulate_forPreMix(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
const std::string hitCollection_
Definition: HGCDigitizer.h:102

◆ accumulate_forPreMix() [2/4]

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

Definition at line 378 of file HGCDigitizer.cc.

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

380  {
383  e.getByLabel(hitTag, hits);
384 
385  if (!hits.isValid()) {
386  edm::LogError("HGCDigitizer") << " @ accumulate : can't find " << hitCollection_ << " collection of "
387  << hitsProducer_;
388  return;
389  }
390 
391  if (nullptr != gHGCal_) {
392  accumulate_forPreMix(hits, e.bunchCrossing(), gHGCal_, hre);
393  } else {
394  throw cms::Exception("BadConfiguration") << "HGCDigitizer is not producing EE, FH, or BH digis!";
395  }
396 }
const std::string hitsProducer_
Definition: HGCDigitizer.h:101
Log< level::Error, false > LogError
const HGCalGeometry * gHGCal_
Definition: HGCDigitizer.h:116
void accumulate_forPreMix(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
const std::string hitCollection_
Definition: HGCDigitizer.h:102

◆ accumulate_forPreMix() [3/4]

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

Definition at line 422 of file HGCDigitizer.cc.

References bxTime_, ALCARECOTkAlJpsiMuMu_cff::charge, relativeConstraints::empty, mps_fire::end, f, relativeConstraints::geom, hgceeDigitizer_cfi::hitCollection, hfClusterShapes_cfi::hits, mps_fire::i, l1ctLayer2EG_cff::id, createfilelist::int, dqmiolumiharvest::j, hgceeDigitizer_cfi::keV2fC, maxBx_, orderByDetIdThenTime(), PhitRefs_bx0, push_back(), pusimHitAccumulator_, nano_mu_digi_cff::rawId, jetUpdater_cfi::sort, theDigitizer_, thisBx_, tofDelay_, pfDeepBoostedJetPreprocessParams_cfi::upper_bound, and validIds_.

425  {
426  if (nullptr == geom)
427  return;
428 
429  auto keV2fC = theDigitizer_->keV2fC();
430  auto tdcForToAOnset = theDigitizer_->tdcForToAOnset();
431 
432  int nchits = (int)hits->size();
433  std::vector<HGCCaloHitTuple_t> hitRefs;
434  hitRefs.reserve(nchits);
435  for (int i = 0; i < nchits; ++i) {
436  const auto& the_hit = hits->at(i);
437  DetId id = simToReco(geom, the_hit.id());
438  // to be written the verbosity block
439  if (id.rawId() != 0) {
440  hitRefs.emplace_back(i, id.rawId(), (float)the_hit.time());
441  }
442  }
443  std::sort(hitRefs.begin(), hitRefs.end(), this->orderByDetIdThenTime);
444 
445  nchits = hitRefs.size();
446  for (int i = 0; i < nchits; ++i) {
447  const int hitidx = std::get<0>(hitRefs[i]);
448  const uint32_t id = std::get<1>(hitRefs[i]);
449  if (!validIds_.count(id))
450  continue;
451 
452  if (id == 0)
453  continue;
454 
455  const float toa = std::get<2>(hitRefs[i]);
456  const PCaloHit& hit = hits->at(hitidx);
457  const float charge = hit.energy() * 1e6 * keV2fC; // * getCCE(geom, id, cce_);
458 
459  const float tof = toa + tofDelay_;
460  const int itime = std::floor(tof / bxTime_) + 9;
461 
462  if (itime < 0 || itime > (int)maxBx_)
463  continue;
464 
465  if (itime >= (int)(maxBx_ + 1))
466  continue;
467 
468  int waferThickness = getCellThickness(geom, id);
469  if (itime == (int)thisBx_) {
470  if (PhitRefs_bx0[id].empty()) {
471  PhitRefs_bx0[id].emplace_back(charge, charge, tof);
472  } else if (tof > std::get<2>(PhitRefs_bx0[id].back())) {
473  PhitRefs_bx0[id].emplace_back(charge, charge + std::get<1>(PhitRefs_bx0[id].back()), tof);
474  } else if (tof == std::get<2>(PhitRefs_bx0[id].back())) {
475  std::get<0>(PhitRefs_bx0[id].back()) += charge;
476  std::get<1>(PhitRefs_bx0[id].back()) += charge;
477  } else {
478  //find position to insert new entry preserving time sorting
479  auto findPos = std::upper_bound(PhitRefs_bx0[id].begin(),
480  PhitRefs_bx0[id].end(),
481  hit_timeStamp(charge, 0.f, tof),
482  [](const auto& i, const auto& j) { return std::get<2>(i) <= std::get<2>(j); });
483 
484  auto insertedPos = findPos;
485 
486  if (tof == std::get<2>(*(findPos - 1))) {
487  std::get<0>(*(findPos - 1)) += charge;
488  std::get<1>(*(findPos - 1)) += charge;
489 
490  } else {
491  insertedPos = PhitRefs_bx0[id].insert(findPos,
492  (findPos == PhitRefs_bx0[id].begin())
493  ? hit_timeStamp(charge, charge, tof)
494  : hit_timeStamp(charge, charge + std::get<1>(*(findPos - 1)), tof));
495  }
496  //cumulate the charge of new entry for all elements that follow in the sorted list
497  //and resize list accounting for cases when the inserted element itself crosses the threshold
498 
499  for (auto step = insertedPos; step != PhitRefs_bx0[id].end(); ++step) {
500  if (step != insertedPos)
501  std::get<1>(*(step)) += charge;
502 
503  // resize the list stopping with the first timeStamp with cumulative charge above threshold
504  if (std::get<1>(*step) > tdcForToAOnset[waferThickness - 1] &&
505  std::get<2>(*step) != std::get<2>(PhitRefs_bx0[id].back())) {
506  PhitRefs_bx0[id].resize(
508  PhitRefs_bx0[id].end(),
509  hit_timeStamp(charge, 0.f, std::get<2>(*step)),
510  [](const auto& i, const auto& j) { return std::get<2>(i) < std::get<2>(j); }) -
511  PhitRefs_bx0[id].begin());
512  for (auto stepEnd = step + 1; stepEnd != PhitRefs_bx0[id].end(); ++stepEnd)
513  std::get<1>(*stepEnd) += charge;
514  break;
515  }
516  }
517  }
518  }
519  }
520 
521  for (const auto& hitCollection : PhitRefs_bx0) {
522  const uint32_t detectorId = hitCollection.first;
523  auto simHitIt = pusimHitAccumulator_->emplace(detectorId, HGCCellHitInfo()).first;
524 
525  for (const auto& hit_timestamp : PhitRefs_bx0[detectorId]) {
526  (simHitIt->second).PUhit_info[1][thisBx_].push_back(std::get<2>(hit_timestamp));
527  (simHitIt->second).PUhit_info[0][thisBx_].push_back(std::get<0>(hit_timestamp));
528  }
529  }
530 
531  if (nchits == 0) {
532  HGCPUSimHitDataAccumulator::iterator simHitIt = pusimHitAccumulator_->emplace(0, HGCCellHitInfo()).first;
533  (simHitIt->second).PUhit_info[1][9].push_back(0.0);
534  (simHitIt->second).PUhit_info[0][9].push_back(0.0);
535  }
536  hitRefs.clear();
537  PhitRefs_bx0.clear();
538 }
std::unique_ptr< HGCDigitizerBase > theDigitizer_
Definition: HGCDigitizer.h:110
static const unsigned int maxBx_
Definition: HGCDigitizer.h:129
std::unordered_map< uint32_t, std::vector< std::tuple< float, float, float > > > PhitRefs_bx0
Definition: HGCDigitizer.h:133
double f[11][100]
std::unordered_set< DetId > validIds_
Definition: HGCDigitizer.h:115
static const unsigned int thisBx_
Definition: HGCDigitizer.h:130
Definition: DetId.h:17
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
const float tofDelay_
Definition: HGCDigitizer.h:122
const double bxTime_
Definition: HGCDigitizer.h:99
std::tuple< float, float, float > hit_timeStamp
Definition: HGCDigitizer.cc:27
step
Definition: StallMonitor.cc:83
static bool orderByDetIdThenTime(const HGCCaloHitTuple_t &a, const HGCCaloHitTuple_t &b)
Definition: HGCDigitizer.h:36
std::unique_ptr< hgc::HGCPUSimHitDataAccumulator > pusimHitAccumulator_
Definition: HGCDigitizer.h:82

◆ accumulate_forPreMix() [4/4]

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

Definition at line 685 of file HGCDigitizer.cc.

References gHGCal_, hitOrder_monitor, hitRefs_bx0, premixStage1MaxCharge_, premixStage1MinCharge_, pusimHitAccumulator_, simHitAccumulator_, theDigitizer_, and thisBx_.

685  {
686  //configuration to apply for the computation of time-of-flight
687  auto weightToAbyEnergy = theDigitizer_->toaModeByEnergy();
688  auto tdcForToAOnset = theDigitizer_->tdcForToAOnset();
689 
690  if (nullptr != gHGCal_) {
691  loadSimHitAccumulator_forPreMix(*simHitAccumulator_,
693  gHGCal_,
694  hitRefs_bx0,
695  simAccumulator,
698  !weightToAbyEnergy,
699  tdcForToAOnset,
700  minbiasFlag,
702  thisBx_);
703  }
704 }
std::unique_ptr< HGCDigitizerBase > theDigitizer_
Definition: HGCDigitizer.h:110
const double premixStage1MaxCharge_
Definition: HGCDigitizer.h:95
const HGCalGeometry * gHGCal_
Definition: HGCDigitizer.h:116
const double premixStage1MinCharge_
Definition: HGCDigitizer.h:93
std::unordered_map< uint32_t, bool > hitOrder_monitor
Definition: HGCDigitizer.h:134
static const unsigned int thisBx_
Definition: HGCDigitizer.h:130
std::unordered_map< uint32_t, std::vector< std::pair< float, float > > > hitRefs_bx0
Definition: HGCDigitizer.h:132
std::unique_ptr< hgc::HGCSimHitDataAccumulator > simHitAccumulator_
Definition: HGCDigitizer.h:81
std::unique_ptr< hgc::HGCPUSimHitDataAccumulator > pusimHitAccumulator_
Definition: HGCDigitizer.h:82

◆ checkPosition()

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

Definition at line 735 of file HGCDigitizer.cc.

References funct::abs(), HGCalTopology::dddConstants(), TauDecayModes::dec, DetId::Forward, 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().

735  {
736  const double tol(0.5);
737  if (nullptr != gHGCal_) {
738  for (const auto& digi : *(digis)) {
739  const DetId& id = digi.id();
740  const GlobalPoint& global = gHGCal_->getPosition(id);
741  double r = global.perp();
742  double z = std::abs(global.z());
743  std::pair<double, double> zrange = gHGCal_->topology().dddConstants().rangeZ(true);
744  std::pair<double, double> rrange = gHGCal_->topology().dddConstants().rangeR(z, true);
745  bool ok = ((r >= rrange.first) && (r <= rrange.second) && (z >= zrange.first) && (z <= zrange.second));
746  std::string ck = (((r < rrange.first - tol) || (r > rrange.second + tol) || (z < zrange.first - tol) ||
747  (z > zrange.second + tol))
748  ? "***** ERROR *****"
749  : "");
750  bool val = gHGCal_->topology().valid(id);
751  if ((!ok) || (!val)) {
752  if (id.det() == DetId::HGCalEE || id.det() == DetId::HGCalHSi) {
753  edm::LogVerbatim("HGCDigitizer") << "Check " << HGCSiliconDetId(id) << " " << global << " R " << r << ":"
754  << rrange.first << ":" << rrange.second << " Z " << z << ":" << zrange.first
755  << ":" << zrange.second << " Flag " << ok << ":" << val << " " << ck;
756  } else if (id.det() == DetId::HGCalHSc) {
757  edm::LogVerbatim("HGCDigitizer") << "Check " << HGCScintillatorDetId(id) << " " << global << " R " << r << ":"
758  << rrange.first << ":" << rrange.second << " Z " << z << ":" << zrange.first
759  << ":" << zrange.second << " Flag " << ok << ":" << val << " " << ck;
760  } else if ((id.det() == DetId::Forward) && (id.subdetId() == static_cast<int>(HFNose))) {
761  edm::LogVerbatim("HGCDigitizer") << "Check " << HFNoseDetId(id) << " " << global << " R " << r << ":"
762  << rrange.first << ":" << rrange.second << " Z " << z << ":" << zrange.first
763  << ":" << zrange.second << " Flag " << ok << ":" << val << " " << ck;
764  } else {
765  edm::LogVerbatim("HGCDigitizer")
766  << "Check " << std::hex << id.rawId() << std::dec << " " << id.det() << ":" << id.subdetId() << " "
767  << global << " R " << r << ":" << rrange.first << ":" << rrange.second << " Z " << z << ":"
768  << zrange.first << ":" << zrange.second << " Flag " << ok << ":" << val << " " << ck;
769  }
770  }
771  }
772  }
773 }
Log< level::Info, true > LogVerbatim
std::pair< double, double > rangeZ(bool reco) const
T perp() const
Definition: PV3DBase.h:69
T z() const
Definition: PV3DBase.h:61
bool valid(const DetId &id) const override
Is this a valid cell id.
const HGCalGeometry * gHGCal_
Definition: HGCDigitizer.h:116
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const HGCalTopology & topology() const
std::pair< double, double > rangeR(double z, bool reco) const
Definition: DetId.h:17
GlobalPoint getPosition(const DetId &id, bool debug=false) const
const HGCalDDDConstants & dddConstants() const
Definition: HGCalTopology.h:98

◆ digiCollection()

std::string HGCDigitizer::digiCollection ( )
inline

Definition at line 76 of file HGCDigitizer.h.

References digiCollection_.

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

76 { return digiCollection_; }
const std::string digiCollection_
Definition: HGCDigitizer.h:84

◆ finalizeEvent()

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

Definition at line 295 of file HGCDigitizer.cc.

References averageOccupancies_, checkPosition(), digiCollection(), digitizationType_, MillePedeFileConverter_cfg::e, getType(), gHGCal_, hitOrder_monitor, hitRefs_bx0, heavyIonCSV_trainingSettings::idx, eostools::move(), nEvents_, PhitRefs_bx0, premixStage1_, premixStage1MaxCharge_, premixStage1MinCharge_, pusimHitAccumulator_, simHitAccumulator_, theDigitizer_, and validIds_.

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

295  {
296  hitRefs_bx0.clear();
297  PhitRefs_bx0.clear();
298  hitOrder_monitor.clear();
299 
300  const CaloSubdetectorGeometry* theGeom = static_cast<const CaloSubdetectorGeometry*>(gHGCal_);
301 
302  ++nEvents_;
303 
304  unsigned idx = getType();
305  // release memory for unfilled parts of hash table
306  if (validIds_.size() * averageOccupancies_[idx] > simHitAccumulator_->size()) {
307  simHitAccumulator_->reserve(simHitAccumulator_->size());
308  pusimHitAccumulator_->reserve(simHitAccumulator_->size());
309  }
310  //update occupancy guess
311  const double thisOcc = simHitAccumulator_->size() / ((double)validIds_.size());
313 
314  if (premixStage1_) {
315  auto simRecord = std::make_unique<PHGCSimAccumulator>();
316 
317  if (!pusimHitAccumulator_->empty()) {
318  saveSimHitAccumulator_forPreMix(
320  }
321 
322  e.put(std::move(simRecord), digiCollection());
323 
324  } else {
325  auto digiResult = std::make_unique<HGCalDigiCollection>();
326  theDigitizer_->run(digiResult, *simHitAccumulator_, theGeom, validIds_, digitizationType_, hre);
327  edm::LogVerbatim("HGCDigitizer") << "HGCDigitizer:: finalize event - produced " << digiResult->size()
328  << " hits in det/subdet " << theDigitizer_->det() << "/"
329  << theDigitizer_->subdet();
330 #ifdef EDM_ML_DEBUG
331  checkPosition(&(*digiResult));
332 #endif
333  e.put(std::move(digiResult), digiCollection());
334  }
335 
338 }
Log< level::Info, true > LogVerbatim
uint32_t nEvents_
Definition: HGCDigitizer.h:126
void checkPosition(const HGCalDigiCollection *digis) const
std::unique_ptr< HGCDigitizerBase > theDigitizer_
Definition: HGCDigitizer.h:110
std::unordered_map< uint32_t, HGCCellInfo > HGCSimHitDataAccumulator
const double premixStage1MaxCharge_
Definition: HGCDigitizer.h:95
const HGCalGeometry * gHGCal_
Definition: HGCDigitizer.h:116
uint32_t getType() const
const double premixStage1MinCharge_
Definition: HGCDigitizer.h:93
std::unordered_map< uint32_t, std::vector< std::tuple< float, float, float > > > PhitRefs_bx0
Definition: HGCDigitizer.h:133
std::unordered_map< uint32_t, bool > hitOrder_monitor
Definition: HGCDigitizer.h:134
std::unordered_set< DetId > validIds_
Definition: HGCDigitizer.h:115
const bool premixStage1_
Definition: HGCDigitizer.h:90
std::array< double, 4 > averageOccupancies_
Definition: HGCDigitizer.h:125
std::unordered_map< uint32_t, std::vector< std::pair< float, float > > > hitRefs_bx0
Definition: HGCDigitizer.h:132
std::unique_ptr< hgc::HGCSimHitDataAccumulator > simHitAccumulator_
Definition: HGCDigitizer.h:81
std::unique_ptr< hgc::HGCPUSimHitDataAccumulator > pusimHitAccumulator_
Definition: HGCDigitizer.h:82
std::string digiCollection()
Definition: HGCDigitizer.h:76
def move(src, dest)
Definition: eostools.py:511
const int digitizationType_
Definition: HGCDigitizer.h:87
std::unordered_map< uint32_t, HGCCellHitInfo > HGCPUSimHitDataAccumulator

◆ getType()

uint32_t HGCDigitizer::getType ( void  ) const
private

Definition at line 714 of file HGCDigitizer.cc.

References DetId::Forward, DetId::HGCalEE, DetId::HGCalHSc, DetId::HGCalHSi, heavyIonCSV_trainingSettings::idx, SiStripPI::max, and theDigitizer_.

Referenced by finalizeEvent(), and initializeEvent().

714  {
716  switch (theDigitizer_->det()) {
717  case DetId::HGCalEE:
718  idx = 0;
719  break;
720  case DetId::HGCalHSi:
721  idx = 1;
722  break;
723  case DetId::HGCalHSc:
724  idx = 2;
725  break;
726  case DetId::Forward:
727  idx = 3;
728  break;
729  default:
730  break;
731  }
732  return idx;
733 }
std::unique_ptr< HGCDigitizerBase > theDigitizer_
Definition: HGCDigitizer.h:110

◆ initializeEvent()

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

actions at the start/end of event

Definition at line 265 of file HGCDigitizer.cc.

References averageOccupancies_, edm::ESWatcher< T >::check(), Exception, relativeConstraints::geom, geomToken_, geomWatcher_, edm::EventSetup::getData(), getType(), gHGCal_, hitCollection_, heavyIonCSV_trainingSettings::idx, pusimHitAccumulator_, simHitAccumulator_, edm::swap(), theDigitizer_, validIds_, and verbosity_.

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

265  {
266  if (geomWatcher_.check(es)) {
267  std::unordered_set<DetId>().swap(validIds_);
268 
269  //get geometry
270  CaloGeometry const& geom = es.getData(geomToken_);
271 
272  gHGCal_ =
273  dynamic_cast<const HGCalGeometry*>(geom.getSubdetectorGeometry(theDigitizer_->det(), theDigitizer_->subdet()));
274 
275  int nadded(0);
276  //valid ID lists
277  if (nullptr != gHGCal_) {
278  getValidDetIds(gHGCal_, validIds_);
279  } else {
280  throw cms::Exception("BadConfiguration") << "HGCDigitizer is not producing EE, FH, or BH digis!";
281  }
282 
283  if (verbosity_ > 0)
284  edm::LogInfo("HGCDigitizer") << "Added " << nadded << ":" << validIds_.size() << " detIds without "
285  << hitCollection_ << " in first event processed" << std::endl;
286  }
287 
288  // reserve memory for a full detector
289  unsigned idx = getType();
292 }
std::unique_ptr< HGCDigitizerBase > theDigitizer_
Definition: HGCDigitizer.h:110
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geomToken_
Definition: HGCDigitizer.h:113
const HGCalGeometry * gHGCal_
Definition: HGCDigitizer.h:116
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
uint32_t getType() const
edm::ESWatcher< CaloGeometryRecord > geomWatcher_
Definition: HGCDigitizer.h:114
const uint32_t verbosity_
Definition: HGCDigitizer.h:119
std::unordered_set< DetId > validIds_
Definition: HGCDigitizer.h:115
Log< level::Info, false > LogInfo
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
std::array< double, 4 > averageOccupancies_
Definition: HGCDigitizer.h:125
std::unique_ptr< hgc::HGCSimHitDataAccumulator > simHitAccumulator_
Definition: HGCDigitizer.h:81
std::unique_ptr< hgc::HGCPUSimHitDataAccumulator > pusimHitAccumulator_
Definition: HGCDigitizer.h:82
const std::string hitCollection_
Definition: HGCDigitizer.h:102

◆ orderByDetIdThenTime()

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

Definition at line 36 of file HGCDigitizer.h.

References a, and b.

Referenced by accumulate(), and accumulate_forPreMix().

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

◆ resetPUSimHitDataAccumulator()

void HGCDigitizer::resetPUSimHitDataAccumulator ( )
private

◆ resetSimHitDataAccumulator()

void HGCDigitizer::resetSimHitDataAccumulator ( )
private

Definition at line 707 of file HGCDigitizer.cc.

References simHitAccumulator_.

707  {
708  for (HGCSimHitDataAccumulator::iterator it = simHitAccumulator_->begin(); it != simHitAccumulator_->end(); it++) {
709  it->second.hit_info[0].fill(0.);
710  it->second.hit_info[1].fill(0.);
711  }
712 }
std::unique_ptr< hgc::HGCSimHitDataAccumulator > simHitAccumulator_
Definition: HGCDigitizer.h:81

Member Data Documentation

◆ averageOccupancies_

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

Definition at line 125 of file HGCDigitizer.h.

Referenced by finalizeEvent(), and initializeEvent().

◆ bxTime_

const double HGCDigitizer::bxTime_
private

Definition at line 99 of file HGCDigitizer.h.

Referenced by accumulate(), and accumulate_forPreMix().

◆ cce_

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

Definition at line 131 of file HGCDigitizer.h.

Referenced by HGCDigitizer().

◆ digiCollection_

const std::string HGCDigitizer::digiCollection_
private

Definition at line 84 of file HGCDigitizer.h.

Referenced by digiCollection().

◆ digitizationType_

const int HGCDigitizer::digitizationType_
private

Definition at line 87 of file HGCDigitizer.h.

Referenced by finalizeEvent().

◆ ev_per_eh_pair_

double HGCDigitizer::ev_per_eh_pair_
private

Definition at line 100 of file HGCDigitizer.h.

◆ geomToken_

const edm::ESGetToken<CaloGeometry, CaloGeometryRecord> HGCDigitizer::geomToken_
private

Definition at line 113 of file HGCDigitizer.h.

Referenced by initializeEvent().

◆ geomWatcher_

edm::ESWatcher<CaloGeometryRecord> HGCDigitizer::geomWatcher_
private

Definition at line 114 of file HGCDigitizer.h.

Referenced by initializeEvent().

◆ gHGCal_

const HGCalGeometry* HGCDigitizer::gHGCal_ = nullptr
private

◆ hitCollection_

const std::string HGCDigitizer::hitCollection_
private

Definition at line 102 of file HGCDigitizer.h.

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

◆ hitOrder_monitor

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

Definition at line 134 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 132 of file HGCDigitizer.h.

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

◆ hitsProducer_

const std::string HGCDigitizer::hitsProducer_
private

Definition at line 101 of file HGCDigitizer.h.

Referenced by accumulate(), and accumulate_forPreMix().

◆ hitToken_

const edm::EDGetTokenT<std::vector<PCaloHit> > HGCDigitizer::hitToken_
private

Definition at line 103 of file HGCDigitizer.h.

Referenced by accumulate(), and accumulate_forPreMix().

◆ maxBx_

const unsigned int HGCDigitizer::maxBx_ = 14
staticprivate

Definition at line 129 of file HGCDigitizer.h.

Referenced by accumulate(), and accumulate_forPreMix().

◆ maxSimHitsAccTime_

const int HGCDigitizer::maxSimHitsAccTime_
private

Definition at line 98 of file HGCDigitizer.h.

◆ nEvents_

uint32_t HGCDigitizer::nEvents_
private

Definition at line 126 of file HGCDigitizer.h.

Referenced by finalizeEvent().

◆ PhitRefs_bx0

std::unordered_map<uint32_t, std::vector<std::tuple<float, float, float> > > HGCDigitizer::PhitRefs_bx0
private

Definition at line 133 of file HGCDigitizer.h.

Referenced by accumulate_forPreMix(), and finalizeEvent().

◆ premixStage1_

const bool HGCDigitizer::premixStage1_
private

Definition at line 90 of file HGCDigitizer.h.

Referenced by finalizeEvent().

◆ premixStage1MaxCharge_

const double HGCDigitizer::premixStage1MaxCharge_
private

Definition at line 95 of file HGCDigitizer.h.

Referenced by accumulate_forPreMix(), and finalizeEvent().

◆ premixStage1MinCharge_

const double HGCDigitizer::premixStage1MinCharge_
private

Definition at line 93 of file HGCDigitizer.h.

Referenced by accumulate_forPreMix(), and finalizeEvent().

◆ pusimHitAccumulator_

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

Definition at line 82 of file HGCDigitizer.h.

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

◆ simHitAccumulator_

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

◆ theDigitizer_

std::unique_ptr<HGCDigitizerBase> HGCDigitizer::theDigitizer_
private

◆ thisBx_

const unsigned int HGCDigitizer::thisBx_ = 9
staticprivate

Definition at line 130 of file HGCDigitizer.h.

Referenced by accumulate(), and accumulate_forPreMix().

◆ tofDelay_

const float HGCDigitizer::tofDelay_
private

Definition at line 122 of file HGCDigitizer.h.

Referenced by accumulate(), and accumulate_forPreMix().

◆ validIds_

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

Definition at line 115 of file HGCDigitizer.h.

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

◆ verbosity_

const uint32_t HGCDigitizer::verbosity_
private

Definition at line 119 of file HGCDigitizer.h.

Referenced by accumulate(), and initializeEvent().