10 double energyMeanHcal = 0.0;
11 double energySigmaHcal = 0.0;
16 if (showerType == 0 || showerType == 1 || showerType == 4 || showerType == 5) {
20 if (showerType == 0 || showerType == 1) {
22 r1 = CLHEP::RandGaussQ::shoot();
35 r2 = CLHEP::RandGaussQ::shoot();
37 exp(energyMeanHcal + energySigmaHcal * (energyRho * r1 +
sqrt(1.0 - energyRho * energyRho) * r2));
41 r1 = CLHEP::RandGaussQ::shoot();
53 r2 = CLHEP::RandGaussQ::shoot();
55 exp(energyMeanHcal + energySigmaHcal * (energyRho * r1 +
sqrt(1.0 - energyRho * energyRho) * r2));
58 }
else if (showerType == 2 || showerType == 3 || showerType == 6 || showerType == 7) {
66 if (showerType == 2 || showerType == 3) {
70 r1 = CLHEP::RandGaussQ::shoot();
74 if (showerType == 2) {
78 }
else if (showerType == 6 || showerType == 7) {
82 r1 = CLHEP::RandGaussQ::shoot();
87 if (showerType == 6) {
104 if (showerType > 3) {
120 normalZ[
i] = CLHEP::RandGaussQ::shoot();
123 double correlationSum = 0.0;
125 for (
int j = 0; j <
i + 1; j++) {
126 correlationSum += correlationVectorHcal[i * (i + 1) / 2 + j] * normalZ[j];
132 delete[] correlationVectorHcal;
144 if (showerType == 1) {
146 double *correlationVectorEcal =
new double[Gflash::NPar * (Gflash::NPar + 1) / 2];
153 normalZ[i] = CLHEP::RandGaussQ::shoot();
155 double correlationSum = 0.0;
157 for (
int j = 0; j < i + 1; j++) {
158 correlationSum += correlationVectorEcal[i * (i + 1) / 2 + j] * normalZ[j];
165 delete[] correlationVectorEcal;
const double ZFrontCrystalEE
double fTanh(double einc, const double *par)
double longHcal[Gflash::NPar]
const double kplus_hadscale[8][5]
double lateralPar[Gflash::kNumberCalorimeter][Gflash::Nrpar]
GflashShowino * theShowino
const double kplus_correl_hadem[5]
const double kplus_rho[8 *NPar][5]
double longEcal[Gflash::NPar]
const double LengthCrystalEE
const double LengthCrystalEB
Gflash3Vector & getPositionAtShower()
const double kplus_rpar[4 *Nrpar][5]
const double RFrontCrystalEB
const double Zmin[kNumberCalorimeter]
CLHEP::Hep3Vector Gflash3Vector
const double kplus_emscale[2][5]
const double kplus_par[8 *NPar][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]