3 #include "CLHEP/Random/RandPoissonQ.h" 4 #include "CLHEP/Random/RandGaussQ.h" 9 #include "vdt/vdtMath.h" 38 CLHEP::HepRandomEngine* engine)
50 for(
const auto&
id : validIds ) {
52 HGCSimHitDataAccumulator::iterator it = simData.find(
id);
53 HGCCellInfo& cell = ( simData.end() == it ? zeroData : it->second );
63 const uint32_t npe = std::floor(CLHEP::RandPoissonQ::shoot(engine,totalIniMIPs*
nPEperMIP_));
74 float totalMIPs(0.
f), xtalk = 0.f;
78 if( xtalk > 0.
f && nPEperMIP_ != 0.
f)
83 chargeColl[
i] = totalMIPs;
86 std::cout <<
"[runCaliceLikeDigitizer] xtalk=" << xtalk <<
" En=" << cell.
hit_info[0][
i] <<
" keV -> " << totalIniMIPs <<
" raw-MIPs -> " << chargeColl[
i] <<
" digi-MIPs" << std::endl;
T getParameter(std::string const &) const
~HGCHEbackDigitizer() override
void updateOutput(std::unique_ptr< DColl > &coll, const HGCalDataFrame &rawDataFrame)
prepares the output according to the number of time samples to produce
void addCellMetadata(HGCCellInfo &info, const HcalGeometry *geom, const DetId &detid)
std::array< HGCSimHitData, 2 > hit_info
std::array< HGCSimData_t, nSamples > HGCSimHitData
HGCHEbackDigitizer(const edm::ParameterSet &ps)
std::unordered_map< uint32_t, HGCCellInfo > HGCSimHitDataAccumulator
std::unique_ptr< HGCFEElectronics< HGCalDataFrame > > myFEelectronics_
void runCaliceLikeDigitizer(std::unique_ptr< HGCalDigiCollection > &digiColl, hgc::HGCSimHitDataAccumulator &simData, const CaloSubdetectorGeometry *theGeom, const std::unordered_set< DetId > &validIds, CLHEP::HepRandomEngine *engine)
void runDigitizer(std::unique_ptr< HGCalDigiCollection > &digiColl, hgc::HGCSimHitDataAccumulator &simData, const CaloSubdetectorGeometry *theGeom, const std::unordered_set< DetId > &validIds, uint32_t digitizationType, CLHEP::HepRandomEngine *engine) override
to be specialized by top class