2 #include <CLHEP/Random/RandGaussQ.h> 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();
102 if(showerType==0) showerType = 1;
112 for (
int i = 0;
i <
Gflash::NPar ;
i++) normalZ[
i] = CLHEP::RandGaussQ::shoot();
115 double correlationSum = 0.0;
117 for(
int j = 0 ; j <
i+1 ; j++) {
118 correlationSum += correlationVectorHcal[i*(i+1)/2+j]*normalZ[j];
124 delete [] correlationVectorHcal;
135 if(showerType == 1) {
138 double *correlationVectorEcal =
new double [Gflash::NPar*(Gflash::NPar+1)/2];
143 for(
int i = 0 ; i <
Gflash::NPar ; i++) normalZ[i] = CLHEP::RandGaussQ::shoot();
145 double correlationSum = 0.0;
147 for(
int j = 0 ; j < i+1 ; j++) {
148 correlationSum += correlationVectorEcal[i*(i+1)/2+j]*normalZ[j];
155 delete [] correlationVectorEcal;
const double pro_hadscale[8][5]
const double ZFrontCrystalEE
double fTanh(double einc, const double *par)
double longHcal[Gflash::NPar]
double lateralPar[Gflash::kNumberCalorimeter][Gflash::Nrpar]
const double pro_par[8 *NPar][5]
GflashShowino * theShowino
double longEcal[Gflash::NPar]
const double pro_rho[8 *NPar][5]
const double LengthCrystalEE
const double pro_correl_hadem[5]
const double LengthCrystalEB
Gflash3Vector & getPositionAtShower()
const double pro_emscale[2][5]
void loadParameters() override
const double RFrontCrystalEB
const double Zmin[kNumberCalorimeter]
CLHEP::Hep3Vector Gflash3Vector
const double pro_rpar[4 *Nrpar][5]
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]