11 double energyMeanHcal = 0.0;
12 double energySigmaHcal = 0.0;
14 if(showerType == 0 || showerType == 1 || showerType == 4 || showerType == 5) {
22 r1 = CLHEP::RandGaussQ::shoot();
24 if(showerType == 0 || showerType == 1) {
33 r2 = CLHEP::RandGaussQ::shoot();
36 exp(energyMeanHcal+energySigmaHcal*(energyRho*r1 +
sqrt(1.0- energyRho*energyRho)*r2 ))-0.05*einc);
47 r2 = CLHEP::RandGaussQ::shoot();
50 exp(energyMeanHcal+energySigmaHcal*(energyRho*r1 +
sqrt(1.0- energyRho*energyRho)*r2 ))-0.05*einc);
53 else if(showerType == 2 || showerType == 6 || showerType == 3 || showerType == 7) {
60 if(showerType == 2 || showerType == 3) {
62 exp(energyMeanHcal+energySigmaHcal*CLHEP::RandGaussQ::shoot())-2.0);
68 else if(showerType == 6 || showerType == 7 ) {
70 exp(energyMeanHcal+energySigmaHcal*CLHEP::RandGaussQ::shoot())-2.0);
84 bool isEndcap =
false;
90 if(showerType==0) showerType = 1;
100 for (
int i = 0;
i <
Gflash::NPar ;
i++) normalZ[
i] = CLHEP::RandGaussQ::shoot();
103 double correlationSum = 0.0;
104 for(
int j = 0 ;
j <
i+1 ;
j++) {
105 correlationSum += correlationVectorHcal[i*(i+1)/2+
j]*normalZ[
j];
112 delete [] correlationVectorHcal;
126 if(showerType == 1) {
134 double *correlationVectorEcal =
new double [Gflash::NPar*(Gflash::NPar+1)/2];
139 for (
int i = 0; i <
Gflash::NPar ; i++) normalZ[i] = CLHEP::RandGaussQ::shoot();
141 double correlationSum = 0.0;
142 for(
int j = 0 ;
j < i+1 ;
j++) {
143 correlationSum += correlationVectorEcal[i*(i+1)/2+
j]*normalZ[
j];
150 delete [] correlationVectorEcal;
const double ZFrontCrystalEE
double fTanh(double einc, const double *par)
double longHcal[Gflash::NPar]
double lateralPar[Gflash::kNumberCalorimeter][Gflash::Nrpar]
GflashShowino * theShowino
const double correl_hadem[4]
const double emcorr_pid[10][4]
Exp< T >::type exp(const T &t)
const double emscale[4][4]
static int position[TOTALCHAMBERS][3]
const double hadcorr_pid[10][4]
const double rpar[4 *Nrpar][2]
const double mipcorr_pid[10][4]
double longEcal[Gflash::NPar]
const T & max(const T &a, const T &b)
double fLnE1(double einc, const double *par)
const double hadscale[7][4]
const double LengthCrystalEE
const double LengthCrystalEB
Gflash3Vector & getPositionAtShower()
const double RFrontCrystalEB
const double Zmin[kNumberCalorimeter]
const double rho[8 *NPar][4]
CLHEP::Hep3Vector Gflash3Vector
void getFluctuationVector(double *lowTriangle, double *correlationVector)
double depthScale(double ssp, double ssp0, double length)
const double Rmin[kNumberCalorimeter]
const double par[8 *NPar][4]
double energyScale[Gflash::kNumberCalorimeter]