10 theCellCount(nCells), theSiPM(nCells,1.), theTauInv(1.0/tau),
11 theCrossTalk(0.), theTempDep(0.), theLastHitTime(-1.),
12 theRndGauss(0), theRndPoisson(0), theRndFlat(0) {
26 if (photons < 1)
return 0;
34 <<
"HcalSiPM requires the RandomNumberGeneratorService\n"
35 "which is not present in the configuration file. "
36 "You must add the service\n"
37 "in the configuration file or remove the modules that require it.";
40 CLHEP::HepRandomEngine& engine = rng->
getEngine();
57 if (mean > 1.) mean = 1.;
67 return int(npe + 0.5);
85 <<
"HcalSiPM requires the RandomNumberGeneratorService\n"
86 "which is not present in the configuration file. "
87 "You must add the service\n"
88 "in the configuration file or remove the modules that require it.";
91 CLHEP::HepRandomEngine& engine = rng->
getEngine();
101 double sum(0.),
hit(0.);
102 for (
unsigned int pe(0); pe < pes; ++pe) {
104 hit = (
theSiPM[pixel] < 0.) ? 1.0 :
118 double tot(0.),
hit(0.);
146 if((xTalk < 0) || (xTalk >= 1)) {
181 if (deltaTime <= 0.)
return 0.;
182 if (deltaTime > 10./
theTauInv)
return 1.;
184 return (result > 0.99) ? 1.0 :
result;
double cellCharge(double deltaTime) const
virtual double totalCharge() const
CLHEP::RandGaussQ * theRndGauss
std::vector< double > theSiPM
void setNCells(int nCells)
void setCrossTalk(double xtalk)
void initRandomEngine(CLHEP::HepRandomEngine &engine)
virtual CLHEP::HepRandomEngine & getEngine() const =0
Use this to get the random number engine, this is the only function most users should call...
Integral< F, X >::type integral(const F &f)
CLHEP::RandFlat * theRndFlat
CLHEP::RandPoissonQ * theRndPoisson
virtual int hitCells(unsigned int photons, unsigned int integral=0) const
unsigned int theCellCount
HcalSiPM(int nCells=1, double tau=15.)
void setTemperatureDependence(double tempDep)