CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
GflashAntiProtonShowerProfile Class Reference

#include <GflashAntiProtonShowerProfile.h>

Inheritance diagram for GflashAntiProtonShowerProfile:
GflashHadronShowerProfile

Public Member Functions

 GflashAntiProtonShowerProfile (edm::ParameterSet parSet)
 
void loadParameters ()
 
 ~GflashAntiProtonShowerProfile ()
 
- Public Member Functions inherited from GflashHadronShowerProfile
std::vector< GflashHit > & getGflashHitList ()
 
GflashShowinogetGflashShowino ()
 
 GflashHadronShowerProfile (edm::ParameterSet parSet)
 
void hadronicParameterization ()
 
void initialize (int showerType, double energy, double globalTime, double charge, Gflash3Vector &position, Gflash3Vector &momentum)
 
virtual ~GflashHadronShowerProfile ()
 

Additional Inherited Members

- Protected Member Functions inherited from GflashHadronShowerProfile
double depthScale (double ssp, double ssp0, double length)
 
void doCholeskyReduction (double **cc, double **vv, const int ndim)
 
double fLnE1 (double einc, const double *par)
 
double fTanh (double einc, const double *par)
 
double gammaProfile (double alpha, double beta, double depth, double lengthUnit)
 
void getFluctuationVector (double *lowTriangle, double *correlationVector)
 
int getNumberOfSpots (Gflash::CalorimeterNumber kCalor)
 
double hoProfile (double pathLength, double refDepth)
 
Gflash3Vector locateHitPosition (GflashTrajectoryPoint &point, double lateralArm)
 
double longitudinalProfile ()
 
double medianLateralArm (double depth, Gflash::CalorimeterNumber kCalor)
 
void setEnergyScale (double einc, Gflash3Vector ssp)
 
double twoGammaProfile (double *par, double depth, Gflash::CalorimeterNumber kIndex)
 
- Protected Attributes inherited from GflashHadronShowerProfile
double averageSpotEnergy [Gflash::kNumberCalorimeter]
 
double energyScale [Gflash::kNumberCalorimeter]
 
double lateralPar [Gflash::kNumberCalorimeter][Gflash::Nrpar]
 
double longEcal [Gflash::NPar]
 
double longHcal [Gflash::NPar]
 
double theBField
 
bool theGflashHcalOuter
 
std::vector< GflashHittheGflashHitList
 
GflashHistogramtheHisto
 
edm::ParameterSet theParSet
 
GflashShowinotheShowino
 

Detailed Description

Definition at line 6 of file GflashAntiProtonShowerProfile.h.

Constructor & Destructor Documentation

GflashAntiProtonShowerProfile::GflashAntiProtonShowerProfile ( edm::ParameterSet  parSet)
inline

Definition at line 12 of file GflashAntiProtonShowerProfile.h.

12  :
13  GflashHadronShowerProfile (parSet) {};
GflashHadronShowerProfile(edm::ParameterSet parSet)
GflashAntiProtonShowerProfile::~GflashAntiProtonShowerProfile ( )
inline

Definition at line 14 of file GflashAntiProtonShowerProfile.h.

14 {};

Member Function Documentation

void GflashAntiProtonShowerProfile::loadParameters ( )
virtual

Reimplemented from GflashHadronShowerProfile.

Definition at line 4 of file GflashAntiProtonShowerProfile.cc.

References abs, Gflash::correl_hadem, GflashHadronShowerProfile::depthScale(), Gflash::emcorr_pid, GflashHadronShowerProfile::energyScale, funct::exp(), GflashHadronShowerProfile::fLnE1(), GflashHadronShowerProfile::fTanh(), GflashShowino::getEnergy(), GflashHadronShowerProfile::getFluctuationVector(), GflashShowino::getPositionAtShower(), GflashShowino::getShowerType(), Gflash::hadcorr_pid, i, j, Gflash::kENCA, Gflash::kESPM, Gflash::kHB, Gflash::kHE, GflashHadronShowerProfile::lateralPar, Gflash::LengthCrystalEB, Gflash::LengthCrystalEE, GflashHadronShowerProfile::longEcal, GflashHadronShowerProfile::longHcal, max(), Gflash::mipcorr_pid, Gflash::NPar, Gflash::Nrpar, Gflash::pbar_emscale, Gflash::pbar_hadscale, Gflash::pbar_par, Gflash::pbar_rho, Gflash::pbar_rpar, position, Gflash::RFrontCrystalEB, Gflash::Rmin, mathSSE::sqrt(), GflashHadronShowerProfile::theShowino, Gflash::ZFrontCrystalEE, and Gflash::Zmin.

5 {
6  double einc = theShowino->getEnergy();
8  int showerType = theShowino->getShowerType();
9 
10  // energy scale
11  double energyMeanHcal = 0.0;
12  double energySigmaHcal = 0.0;
13 
14  if(showerType == 0 || showerType == 1 || showerType == 4 || showerType == 5) {
15 
16  double r1 = 0.0;
17  double r2 = 0.0;
18 
19  //energy dependent energyRho based on tuning with testbeam data
20  double energyRho = fTanh(einc,Gflash::correl_hadem);
21 
22  r1 = CLHEP::RandGaussQ::shoot();
23 
24  if(showerType == 0 || showerType == 1) {
26  fTanh(einc,Gflash::pbar_emscale[1])*r1);
27 
28  r2 = CLHEP::RandGaussQ::shoot();
29  energyMeanHcal = (fTanh(einc,Gflash::pbar_hadscale[0]) +
31  energySigmaHcal = (fTanh(einc,Gflash::pbar_hadscale[2]) +
34  einc*fTanh(einc,Gflash::hadcorr_pid[6]) +
35  exp(energyMeanHcal+energySigmaHcal*(energyRho*r1 + sqrt(1.0- energyRho*energyRho)*r2 )));
36  }
37  else {
39  fTanh(einc,Gflash::pbar_emscale[1])*r1);
40 
41  r2 = CLHEP::RandGaussQ::shoot();
42  energyMeanHcal = (fTanh(einc,Gflash::pbar_hadscale[0]) +
44  energySigmaHcal = (fTanh(einc,Gflash::pbar_hadscale[2]) +
46 
48  einc*fTanh(einc,Gflash::hadcorr_pid[7]) +
49  exp(energyMeanHcal+energySigmaHcal*(energyRho*r1 + sqrt(1.0- energyRho*energyRho)*r2 )));
50  }
51  }
52  else if(showerType == 2 || showerType == 6 || showerType == 3 || showerType == 7) {
53  //Hcal response for mip-like pions (mip)
54 
55  energyMeanHcal = fTanh(einc,Gflash::pbar_hadscale[4]);
56  energySigmaHcal = fTanh(einc,Gflash::pbar_hadscale[5]);
57  double gap_corr = fTanh(einc,Gflash::pbar_hadscale[6]);
58 
59  if(showerType == 2 || showerType == 3) {
61  exp(energyMeanHcal+energySigmaHcal*CLHEP::RandGaussQ::shoot()));
62 
63  if(showerType == 2) {
65  energyScale[Gflash::kHB]*(1.0- gap_corr*depthScale(position.getRho(),Gflash::Rmin[Gflash::kHB],28.)));
66  }
67  }
68  else if(showerType == 6 || showerType == 7) {
69  energyScale[Gflash::kHE] = std::max(0.0, einc*(fTanh(einc,Gflash::mipcorr_pid[7])) +
70  exp(energyMeanHcal+energySigmaHcal*CLHEP::RandGaussQ::shoot()));
71  if(showerType == 6) {
73  energyScale[Gflash::kHE]*(1.0- gap_corr*depthScale(std::fabs(position.getZ()),Gflash::Zmin[Gflash::kHE],60.)));
74  }
75  }
76  }
77 
78  // parameters for the longitudinal profiles
79 
80  double *rhoHcal = new double [2*Gflash::NPar];
81  double *correlationVectorHcal = new double [Gflash::NPar*(Gflash::NPar+1)/2];
82 
83  //@@@until we have a separate parameterization for Endcap
84  bool isEndcap = false;
85  if(showerType>3) {
86  showerType -= 4;
87  isEndcap = true;
88  }
89  //no separate parameterization before crystal
90  if(showerType==0) showerType = 1;
91 
92  //Hcal parameters are always needed regardless of showerType
93 
94  for(int i = 0 ; i < 2*Gflash::NPar ; i++ ) {
95  rhoHcal[i] = fTanh(einc,Gflash::pbar_rho[i + showerType*2*Gflash::NPar]);
96  }
97 
98  getFluctuationVector(rhoHcal,correlationVectorHcal);
99 
100  double normalZ[Gflash::NPar];
101  for (int i = 0; i < Gflash::NPar ; i++) normalZ[i] = CLHEP::RandGaussQ::shoot();
102 
103  for(int i = 0 ; i < Gflash::NPar ; i++) {
104  double correlationSum = 0.0;
105  for(int j = 0 ; j < i+1 ; j++) {
106  correlationSum += correlationVectorHcal[i*(i+1)/2+j]*normalZ[j];
107  }
108  longHcal[i] = fTanh(einc,Gflash::pbar_par[i+showerType*Gflash::NPar]) +
109  fTanh(einc,Gflash::pbar_par[i+(4+showerType)*Gflash::NPar])*correlationSum;
110  }
111 
112  delete [] rhoHcal;
113  delete [] correlationVectorHcal;
114 
115  // lateral parameters for Hcal
116 
117  for (int i = 0 ; i < Gflash::Nrpar ; i++) {
118  lateralPar[Gflash::kHB][i] = fLnE1(einc,Gflash::pbar_rpar[i+showerType*Gflash::Nrpar]);
120  }
121 
122  //Ecal parameters are needed if and only if the shower starts inside the crystal
123 
124  if(showerType == 1) {
125  //A depth dependent correction for the core term of R in Hcal is the linear in
126  //the shower start point while for the spread term is nearly constant
127 
128  if(!isEndcap) lateralPar[Gflash::kHB][0] -= 2.3562e-01*(position.getRho()-131.0);
129  else lateralPar[Gflash::kHE][0] -= 2.3562e-01*(std::abs(position.getZ())-332.0);
130 
131  double *rhoEcal = new double [2*Gflash::NPar];
132  double *correlationVectorEcal = new double [Gflash::NPar*(Gflash::NPar+1)/2];
133  for(int i = 0 ; i < 2*Gflash::NPar ; i++ ) rhoEcal[i] = fTanh(einc,Gflash::pbar_rho[i]);
134 
135  getFluctuationVector(rhoEcal,correlationVectorEcal);
136 
137  for(int i = 0 ; i < Gflash::NPar ; i++) normalZ[i] = CLHEP::RandGaussQ::shoot();
138  for(int i = 0 ; i < Gflash::NPar ; i++) {
139  double correlationSum = 0.0;
140  for(int j = 0 ; j < i+1 ; j++) {
141  correlationSum += correlationVectorEcal[i*(i+1)/2+j]*normalZ[j];
142  }
143  longEcal[i] = fTanh(einc,Gflash::pbar_par[i]) +
144  fTanh(einc,Gflash::pbar_par[i+4*Gflash::NPar])*correlationSum;
145  }
146 
147  delete [] rhoEcal;
148  delete [] correlationVectorEcal;
149 
150  }
151 }
const double ZFrontCrystalEE
double fTanh(double einc, const double *par)
int i
Definition: DBlmapReader.cc:9
double lateralPar[Gflash::kNumberCalorimeter][Gflash::Nrpar]
const double pbar_par[8 *NPar][4]
const double pbar_rho[8 *NPar][4]
const double correl_hadem[4]
double getEnergy()
Definition: GflashShowino.h:24
int getShowerType()
Definition: GflashShowino.h:23
#define abs(x)
Definition: mlp_lapack.h:159
const double emcorr_pid[10][4]
const int Nrpar
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
const double hadcorr_pid[10][4]
const double pbar_hadscale[7][4]
const double mipcorr_pid[10][4]
const T & max(const T &a, const T &b)
double fLnE1(double einc, const double *par)
T sqrt(T t)
Definition: SSEVec.h:28
const double LengthCrystalEE
int j
Definition: DBlmapReader.cc:9
const double LengthCrystalEB
Gflash3Vector & getPositionAtShower()
Definition: GflashShowino.h:27
const int NPar
const double pbar_emscale[2][4]
const double RFrontCrystalEB
const double Zmin[kNumberCalorimeter]
CLHEP::Hep3Vector Gflash3Vector
Definition: Gflash3Vector.h:6
const double pbar_rpar[4 *Nrpar][2]
void getFluctuationVector(double *lowTriangle, double *correlationVector)
double depthScale(double ssp, double ssp0, double length)
const double Rmin[kNumberCalorimeter]
double energyScale[Gflash::kNumberCalorimeter]