4 #include "CLHEP/Random/RandGaussQ.h" 5 #include "CLHEP/Random/RandPoissonQ.h" 6 #include "CLHEP/Random/RandFlat.h" 59 constexpr
double Borel(
unsigned int i,
FLOAT lambda,
unsigned int k,
double iFact) {
65 FLOAT ldn = lambda * dn;
84 constexpr uint32_t maxCDFsize = 170;
94 for (
i = 0;
i < maxCDFsize;
i++) {
103 unsigned int borelstartn =
i;
106 for (++
i;
i < maxCDFsize; ++
i) {
122 double U = CLHEP::RandFlat::shoot(engine);
123 std::vector<double>::const_iterator
up;
126 LogDebug(
"HcalSiPM") <<
"cdf size = " << cdf.second.size() <<
", U = " <<
U <<
", in_pes = " << in_pes
127 <<
", 2ndary_pes = " << (
up - cdf.second.cbegin() + cdf.first);
130 return (
up - cdf.second.cbegin() + cdf.first);
135 double HcalSiPM::hitCells(CLHEP::HepRandomEngine* engine,
unsigned int pes,
double tempDiff,
double photonTime) {
154 double sum(0.),
hit(0.);
155 for (
unsigned int pe(0); pe < pes; ++pe) {
207 for (
int k = 1;
k <= 100;
k++)
double totalCharge() const
void setSaturationPars(const std::vector< float > &pars)
const cdfpair & BorelCDF(unsigned int k)
double hitCells(CLHEP::HepRandomEngine *, unsigned int pes, double tempDiff=0., double photonTime=0.)
void setNCells(int nCells)
void setCrossTalk(double xtalk)
TupleMultiplicity< TrackerTraits > const HitToTuple< TrackerTraits > const cms::cuda::AtomicPairCounter GPUCACellT< TrackerTraits > const *__restrict__ uint32_t const *__restrict__ nCells
std::vector< float > theSiPM
unsigned int addCrossTalkCells(CLHEP::HepRandomEngine *engine, unsigned int in_pes)
HcalSiPMnonlinearity * nonlin
unsigned int theCellCount
static constexpr float b0
HcalSiPM(int nCells=1, double tau=15.)
void setTemperatureDependence(double tempDep)
std::pair< unsigned int, std::vector< double > > cdfpair
double cellCharge(double deltaTime) const