3 #include "CLHEP/Random/RandGaussQ.h"
4 #include "CLHEP/Random/RandPoissonQ.h"
5 #include "CLHEP/Random/RandFlat.h"
13 theCellCount(nCells), theSiPM(nCells,1.), theTauInv(1.0/tau),
14 theCrossTalk(0.), theTempDep(0.), theLastHitTime(-1.) {
25 if (photons < 1)
return 0;
30 CLHEP::RandPoissonQ randPoissonQ(*engine, photons/(1.-
theCrossTalk)-photons);
31 photons += randPoissonQ.fire();
41 if (mean > 1.) mean = 1.;
49 npe = CLHEP::RandGaussQ::shoot(engine, mean,
std::sqrt(width2 + (mean*prehit)));
51 return int(npe + 0.5);
65 CLHEP::RandPoissonQ randPoissonQ(*engine, pes/(1. -
theCrossTalk) - pes);
66 pes += randPoissonQ.fire();
70 double sum(0.),
hit(0.);
71 for (
unsigned int pe(0); pe < pes; ++pe) {
73 hit = (
theSiPM[pixel] < 0.) ? 1.0 :
87 double tot(0.),
hit(0.);
115 if((xTalk < 0) || (xTalk >= 1)) {
141 if (deltaTime <= 0.)
return 0.;
142 if (deltaTime > 10./
theTauInv)
return 1.;
144 return (result > 0.99) ? 1.0 :
result;
double cellCharge(double deltaTime) const
virtual double totalCharge() const
std::vector< double > theSiPM
void setNCells(int nCells)
void setCrossTalk(double xtalk)
Integral< F, X >::type integral(const F &f)
virtual int hitCells(CLHEP::HepRandomEngine *, unsigned int photons, unsigned int integral=0) const
unsigned int theCellCount
HcalSiPM(int nCells=1, double tau=15.)
void setTemperatureDependence(double tempDep)