#include <HadHcalEtaResponseEc.h>
Inheritance diagram for FastShower::HadHcalEtaResponseEc:
Private Methods | |
virtual double | value (const ParticleParameters &) const |
virtual IFnOfParticleParameters * | clone () const |
UML: IDistributionClass.unm
Definition at line 25 of file HadHcalEtaResponseEc.h.
|
Implements FastShower::IFnOfParticleParameters. Definition at line 11 of file HadHcalEtaResponseEc.cxx. References FastShower::ParticleParameters::eta().
00011 { 00012 00013 // response symmetric about eta=0.0 00014 double aEta = fabs(pp.eta()); 00015 00016 // spline knots 00017 double x[14]={0.05, 0.15, 0.35, 0.55, 0.75, 0.95, 1.25, 00018 1.45, 1.75, 2.05, 2.25, 2.65, 2.95, 3.15 }; 00019 00020 // 2nd index is flag: (0)->e.m.+had. & (1)->e.m. 00021 double a[2][14] = {{.000, .839, .837, .860, .847, .846, .793, 00022 .853, .815, .839, .839, .857, .823, .775}, 00023 {.000, .341, .337, .390, .442, .444, .515, 00024 .543, .440, .489, .431, .433, .368, .412}}; 00025 double b[2][14] = {{.000,-.0508, .0520, .0288,-.0113,-.184,-.0645, 00026 .00211,-.140, .0839, .0523, .0354,-.0434,-.545}, 00027 {.000,-.0950, .0604, .359, .0759, .151, .413, 00028 -.413,-.258, .0672,-.105,-.0408, .0417,-.0468}}; 00029 double c[2][14] = {{.000, .000, 1.03,-1.14, .944,-1.81, 2.40, 00030 -2.18, 1.47,-.722, .616,-.700, .503,-2.18}, 00031 {.000, .000, 1.55,-.0633,-1.35, 1.73, -.420, 00032 -2.33, 3.11,-2.03, 1.45,-1.13, 1.34,-1.63}}; 00033 double d[2][14] = {{.000, 3.43,-3.62, 3.48,-4.59, 7.02,-5.09, 00034 6.08,-2.43, 1.49,-2.19, 1.00,-2.98, 3.63}, 00035 {.000, 5.18,-2.70,-2.15, 5.13,-3.58,-2.13, 00036 9.07,-5.71, 3.87,-4.31, 2.06,-3.30, 2.72}}; 00037 00038 00039 // iEta according to the abscissa of the spline function 00040 int iEta = (int)(aEta*10) + 1; 00041 double xval = (double)(iEta)*0.1 - 0.05; 00042 00043 // default indices 00044 int i = 10; 00045 int j = 11; 00046 00047 if (iEta>25) { 00048 // e.m.+had. response saturates at |eta|=2.5 00049 aEta=2.5; 00050 } else { 00051 // everything ends-up here if not saturated 00052 i=-1; 00053 do {i+=1;} 00054 while (i<13 && xval>x[i+1]); 00055 } 00056 00057 // response at |eta| 00058 // e.m.+had. response at |eta| 00059 double emPLUShad = a[0][j] + b[0][j] * (aEta-x[i]) 00060 + c[0][j] * std::pow(aEta-x[i],2) 00061 + d[0][j] * std::pow(aEta-x[i],3); 00062 // e.m. response at |eta| 00063 double em = a[1][j] + b[1][j] * (aEta-x[i]) 00064 + c[1][j] * std::pow(aEta-x[i],2) 00065 + d[1][j] * std::pow(aEta-x[i],3); 00066 // had. response at |eta| 00067 double result = emPLUShad - em; 00068 00069 // normalisation 00070 // e.m. normalisation at |eta|=2.0 00071 double emNorm = a[1][13] + b[1][13] * (2.0-x[8]) 00072 + c[1][13] * std::pow(2.0-x[8],2) 00073 + d[1][13] * std::pow(2.0-x[8],3); 00074 00075 // e.m.+had. normalisation at |eta|=2.0 00076 double emhadNorm = a[0][j] + b[0][j] * (2.0-x[8]) 00077 + c[0][j] * std::pow(2.0-x[8],2) 00078 + d[0][j] * std::pow(2.0-x[8],3); 00079 // had. normalisation at |eta|=2.0 00080 double hadNorm = emhadNorm - emNorm; 00081 00082 00083 // relative response factors wrt had. response at |eta|=2.0 00084 return result/hadNorm; 00085 } |
|
Implements FastShower::IFnOfParticleParameters. Definition at line 87 of file HadHcalEtaResponseEc.cxx.
00087 { 00088 return new HadHcalEtaResponseEc(*this); 00089 } |