3 #include "CLHEP/Random/RandPoissonQ.h"
4 #include "CLHEP/Random/RandGaussQ.h"
6 #include "vdt/vdtMath.h"
8 using namespace hgc_digi;
37 for(HGCSimHitDataAccumulator::iterator it=simData.begin();
42 for(
size_t i=0;
i<it->second[0].size(); ++
i)
45 float totalIniMIPs( (it->second)[0][
i]*
keV2MIP_ );
49 uint32_t npe = std::floor(CLHEP::RandPoissonQ::shoot(engine,totalIniMIPs*
nPEperMIP_));
57 nPixel = (uint32_t)
std::max( CLHEP::RandGaussQ::shoot(engine,(
double)nPixel,
sdPixels_), 0. );
60 float totalMIPs(totalIniMIPs);
69 if(debug && (it->second)[0][
i]>0)
70 std::cout <<
"[runCaliceLikeDigitizer] xtalk=" << xtalk <<
" En=" << (it->second)[0][
i] <<
" keV -> " << totalIniMIPs <<
" raw-MIPs -> " << chargeColl[
i] <<
" digi-MIPs" << std::endl;
T getParameter(std::string const &) const
std::array< HGCSimData_t, nSamples > HGCSimHitData
HGCHEbackDigitizer(const edm::ParameterSet &ps)
std::unique_ptr< HGCFEElectronics< HGCHEDataFrame > > myFEelectronics_
void updateOutput(std::auto_ptr< DColl > &coll, const HGCHEDataFrame &rawDataFrame)
prepares the output according to the number of time samples to produce
void runCaliceLikeDigitizer(std::auto_ptr< HGCHEDigiCollection > &digiColl, hgc::HGCSimHitDataAccumulator &simData, CLHEP::HepRandomEngine *engine)
void runDigitizer(std::auto_ptr< HGCHEDigiCollection > &digiColl, hgc::HGCSimHitDataAccumulator &simData, uint32_t digitizationType, CLHEP::HepRandomEngine *engine)
std::unordered_map< uint32_t, std::array< HGCSimHitData, 2 > > HGCSimHitDataAccumulator