31 theHcalHitMaker(myHcalHitMaker),
81 for(
int itheta = 0; itheta <
nthetaStep; itheta++) {
87 for(
int j=0;
j<maxLoops;
j++) {
89 if(
setHit(es, theta) )
break;
101 float rshower =
getR();
116 else LogWarning(
"FastCalorimetry") <<
" setHit in HCAL failed d="<<d
129 unsigned int i = 1;
while(
rpdf[i]<p && i<
R_range-1) { i++; }
133 r=(float(i) + (p - rpdf[i-1])/dr)/
lambdaHD;
142 float amean, asig, lambda1, lambda1sig,lam21,lam21sig;
158 if(L1 < 0.02) L1 = 0.02;
162 pdf.erase(pdf.begin(),pdf.end());
168 float p = a*
exp(L1*theta) +
exp(L2*theta);
175 float fn = ntot*pdf[it]/sum;
184 float en = esum/
EsCut;
int n = int(en);
187 for(
int ie=0; ie<=
n; ie++) {
206 float _EgridTable[
NEnergyScan] = { 10, 20, 30, 50, 100, 300, 500 };
207 float _Theta1amp[
NEnergyScan] = { 1.57, 2.05, 2.27, 2.52, 2.66, 2.76, 2.76};
208 float _Theta1ampSig[
NEnergyScan]={2.40, 1.50, 1.25, 1.0, 0.8, 0.52, 0.52};
211 0.086, 0.092, 0.88, 0.80, 0.0713, 0.0536, 0.0536 };
213 0.038, 0.037, 0.027,0.03, 0.023, 0.018, 0.018 };
215 float _ThetaLam21[
NEnergyScan] = { 2.8, 2.44, 2.6, 2.77, 3.16, 3.56, 3.56 };
216 float _ThetaLam21Sig[
NEnergyScan]={ 1.8, 0.97, 0.87, 0.77, 0.7, 0.49, 0.49 };
228 #define lambdafit 15.05
229 float R_alfa = -0.0993 + 0.1114*
log(
e);
230 float R_p = 0.589191 + 0.0463392 *
log(
e);
231 float R_beta_lam=(0.54134 -0.00011148*
e)/4.0*
lambdafit;
239 float r =
pow(x,R_alfa)*
240 (R_p*
exp(-R_beta_lam*x) + (1-R_p)*
exp(-LamOverX0*R_beta_lam*x));
void setSpotEnergy(double e)
Set the spot energy.
bool addHit(double r, double phi, unsigned layer=0)
void setSpotEnergy(double e)
double flatShoot(double xmin=0.0, double xmax=1.0) const
float ThetaLam21[NEnergyScan]
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
HcalHitMaker * theHcalHitMaker
float Theta1amp[NEnergyScan]
float Theta1Lambda[NEnergyScan]
double interactionLength() const
Interaction length in cm.
float Theta1ampSig[NEnergyScan]
float Theta1LambdaSig[NEnergyScan]
std::vector< int > thetaSpots
void thetaFunction(int nthetaStep)
Cos< T >::type cos(const T &t)
float EgridTable[NEnergyScan]
bool setHit(float espot, float theta)
HDShowerParametrization * theParam
double radLenIncm() const
Radiation length in cm.
HDRShower(const RandomEngineAndDistribution *engine, HDShowerParametrization *myParam, EcalHitMaker *myGrid, HcalHitMaker *myHcalHitMaker, int onECAL, double epart)
float ThetaLam21Sig[NEnergyScan]
std::vector< float > elastspot
bool getPads(double depth, bool inCm=false)
const HCALProperties * hcalProperties() const
const ECALProperties * ecalProperties() const
double gaussShoot(double mean=0.0, double sigma=1.0) const
const RandomEngineAndDistribution * random
double ecalTotalL0() const
in the ECAL
bool addHit(double r, double phi, unsigned layer=0)
add the hit in the HCAL in local coordinates
Power< A, B >::type pow(const A &a, const B &b)
bool setDepth(double, bool inCm=false)
set the depth in X0 or Lambda0 units depending on showerType
double ecalHcalGapTotalL0() const
ECAL-HCAL transition.
double interactionLength() const
Interaction length in cm: 18.5 for Standard ECAL.
double hcalTotalL0() const
in the HCAL