11 double energyMeanHcal = 0.0;
12 double energySigmaHcal = 0.0;
17 if(showerType == 0 || showerType == 1 || showerType == 4 || showerType == 5) {
22 if(showerType == 0 || showerType == 1) {
24 r1 = CLHEP::RandGaussQ::shoot();
34 r2 = CLHEP::RandGaussQ::shoot();
40 r1 = CLHEP::RandGaussQ::shoot();
48 r2 = CLHEP::RandGaussQ::shoot();
53 else if(showerType == 2 || showerType == 3 || showerType == 6 || showerType == 7) {
61 if(showerType == 2 || showerType == 3) {
65 r1 = CLHEP::RandGaussQ::shoot();
74 else if(showerType == 6 || showerType == 7 ) {
78 r1 = CLHEP::RandGaussQ::shoot();
103 if(showerType==0) showerType = 1;
113 for (
int i = 0;
i <
Gflash::NPar ;
i++) normalZ[
i] = CLHEP::RandGaussQ::shoot();
116 double correlationSum = 0.0;
118 for(
int j = 0 ; j <
i+1 ; j++) {
119 correlationSum += correlationVectorHcal[i*(i+1)/2+j]*normalZ[j];
125 delete [] correlationVectorHcal;
136 if(showerType == 1) {
139 double *correlationVectorEcal =
new double [Gflash::NPar*(Gflash::NPar+1)/2];
144 for(
int i = 0 ; i <
Gflash::NPar ; i++) normalZ[i] = CLHEP::RandGaussQ::shoot();
146 double correlationSum = 0.0;
148 for(
int j = 0 ; j < i+1 ; j++) {
149 correlationSum += correlationVectorEcal[i*(i+1)/2+j]*normalZ[j];
156 delete [] correlationVectorEcal;
const double ZFrontCrystalEE
double fTanh(double einc, const double *par)
double longHcal[Gflash::NPar]
const double kminus_rho[8 *NPar][5]
double lateralPar[Gflash::kNumberCalorimeter][Gflash::Nrpar]
const double kminus_rpar[4 *Nrpar][5]
GflashShowino * theShowino
double longEcal[Gflash::NPar]
const double kminus_hadscale[8][5]
const double kminus_par[8 *NPar][5]
const double LengthCrystalEE
const double kminus_emscale[2][5]
const double LengthCrystalEB
Gflash3Vector & getPositionAtShower()
const double kminus_correl_hadem[5]
const double RFrontCrystalEB
const double Zmin[kNumberCalorimeter]
CLHEP::Hep3Vector Gflash3Vector
static int position[264][3]
void getFluctuationVector(double *lowTriangle, double *correlationVector)
double depthScale(double ssp, double ssp0, double length)
const double Rmin[kNumberCalorimeter]
double energyScale[Gflash::kNumberCalorimeter]