CMS 3D CMS Logo

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

#include <HCALResponse.h>

Public Member Functions

double getHCALEnergyResolution (double e, int hit)
 
double getHCALEnergyResponse (double e, int hit)
 
double getHFEnergyResolution (double EGen)
 
 HCALResponse (const edm::ParameterSet &pset, const RandomEngine *engine)
 
response responseHCAL (int mip, double energy, double eta, int partype)
 
 ~HCALResponse ()
 

Private Member Functions

void interEM (double e, int ie, int ieta)
 
void interHD (int mip, double e, int ie, int ieta)
 
void interMU (double e, int ie, int ieta)
 

Private Attributes

double eBias
 
double eGridEM [maxEMe]
 
double eGridHD [maxHDe]
 
double eGridMU [maxMUe]
 
double eResponseCoefficient
 
double eResponseCorrection
 
double eResponseExponent
 
double eResponsePlateau [3]
 
double eResponseScale [3]
 HCAL response parameters. More...
 
double etaGridMU [maxMUeta]
 
double etaStep
 
double mean
 
double meanEM [maxEMe][maxEMeta]
 
double meanHD [maxHDe][maxHDeta]
 
double meanHD_mip [maxHDe][maxHDeta]
 
double meanHD_nomip [maxHDe][maxHDeta]
 
double muStep
 
const RandomEnginerandom
 
double responseMU [maxMUe][maxMUeta][maxMUbin]
 
double RespPar [3][2][3]
 
double sigma
 
double sigmaEM [maxEMe][maxEMeta]
 
double sigmaHD [maxHDe][maxHDeta]
 
double sigmaHD_mip [maxHDe][maxHDeta]
 
double sigmaHD_nomip [maxHDe][maxHDeta]
 

Detailed Description

Definition at line 30 of file HCALResponse.h.

Constructor & Destructor Documentation

HCALResponse::HCALResponse ( const edm::ParameterSet pset,
const RandomEngine engine 
)

Definition at line 16 of file HCALResponse.cc.

References debug, eBias, eGridEM, eGridHD, eGridMU, eResponseCoefficient, eResponseCorrection, eResponseExponent, eResponsePlateau, eResponseScale, etaGridMU, etaStep, edm::ParameterSet::getParameter(), HCAL, i, j, LogDebug, maxEMe, maxEMeta, maxHDe, maxHDeta, maxMUbin, maxMUe, maxMUeta, meanEM, meanHD, meanHD_mip, meanHD_nomip, muStep, responseMU, RespPar, sigmaEM, sigmaHD, sigmaHD_mip, sigmaHD_nomip, and VFCAL.

17  :
18  random(engine)
19 {
20 
21  RespPar[HCAL][0][0] =
22  pset.getParameter<double>("HadronBarrelResolution_Stochastic");
23  RespPar[HCAL][0][1] =
24  pset.getParameter<double>("HadronBarrelResolution_Constant");
25  RespPar[HCAL][0][2] =
26  pset.getParameter<double>("HadronBarrelResolution_Noise");
27 
28  RespPar[HCAL][1][0] =
29  pset.getParameter<double>("HadronEndcapResolution_Stochastic");
30  RespPar[HCAL][1][1] =
31  pset.getParameter<double>("HadronEndcapResolution_Constant");
32  RespPar[HCAL][1][2] =
33  pset.getParameter<double>("HadronEndcapResolution_Noise");
34 
35  RespPar[VFCAL][0][0] =
36  pset.getParameter<double>("HadronForwardResolution_Stochastic");
37  RespPar[VFCAL][0][1] =
38  pset.getParameter<double>("HadronForwardResolution_Constant");
39  RespPar[VFCAL][0][2] =
40  pset.getParameter<double>("HadronForwardResolution_Noise");
41 
42  RespPar[VFCAL][1][0] =
43  pset.getParameter<double>("ElectronForwardResolution_Stochastic");
44  RespPar[VFCAL][1][1] =
45  pset.getParameter<double>("ElectronForwardResolution_Constant");
46  RespPar[VFCAL][1][2] =
47  pset.getParameter<double>("ElectronForwardResolution_Noise");
48 
49  eResponseScale[0] =
50  pset.getParameter<double>("eResponseScaleHB");
51  eResponseScale[1] =
52  pset.getParameter<double>("eResponseScaleHE");
53  eResponseScale[2] =
54  pset.getParameter<double>("eResponseScaleHF");
55 
56  eResponsePlateau[0] =
57  pset.getParameter<double>("eResponsePlateauHB");
58  eResponsePlateau[1] =
59  pset.getParameter<double>("eResponsePlateauHE");
60  eResponsePlateau[2] =
61  pset.getParameter<double>("eResponsePlateauHF");
62 
64  pset.getParameter<double>("eResponseExponent");
65 
67  pset.getParameter<double>("eResponseCoefficient");
68 
70  pset.getParameter<double>("eResponseCorrection");
71 
72  // If need - add a small energy to each hadron ...
73  eBias =
74  pset.getParameter<double>("energyBias");
75 
76 
77  etaStep = 0.1;
78  muStep = 0.25;
79 
80  double _eGridHD[maxHDe] = {1., 2., 3., 5., 9., 15., 20., 30., 50., 100., 150., 225., 300., 1000., 3000. };
81  double _eGridEM[maxEMe] = {10., 30., 100., 300., 1000., 3000.};
82  double _eGridMU[maxMUe] = {10., 30., 100., 300.};
83  double _etaGridMU[maxMUeta] = {0.3, 0.6, 0.8, 1.25, 1.4, 3.0};
84 
85  // additional tuning factor to correct the response in the barrel
86  // 1 2 3 5 9 15 20 30
87  double barrelCorrection[15] = {1.02, 1.01, 1.02, 1.02, 1.02, 1.02, 1.02, 1.03, 1.03, 1.03, 1.03, 1.03, 1.03, 1.03, 1.03};
88  double endcapCorrection[15] = {1.12, 1.12, 1.12, 1.12, 1.12, 1.13, 1.13, 1.14, 1.14, 1.15, 1.15, 1.16, 1.16, 1.16, 1.16};
89  // 1-15 >>> 20 30 50 100 150 225
90  double forwardCorrection[15] = {1.09, 1.09, 1.08, 1.08, 1.07, 1.06,
91  1.05, 1.05, 1.06, 1.08, 1.09, 1.10,
92  1.09, 1.08, 1.08};
93 
94  // MEAN energy response for (1) all (2) MIP in ECAL (3) non-MIP in ECAL
95  //-----------------------------------------------------------------------
96 
97  double _meanHD[maxHDe][maxHDeta] = {
98 
99  // 1
100  {0.498065, 0.404691, 0.548967, 0.495652, 0.534227, 0.524606, 0.508564, 0.481217, 0.521575, 0.515757, 0.440118, 0.403436, 0.428668, 0.301629, 0.307736, 0.234175, 0.164866, 0.234019, 0.211831, 0.0653153, 0.107834, 0.330683, 0.180608, 0.207589, 0.304273, 0.0540994, 0.209118, 0.391319, 0.232648, 0.234898, 0.208077, 0.308006, 0.290552, 0.259652, 0.18443, 0.133599, 0.3911, 0.347598, 0.312221, 0.359135, 0.232424, 0.320564, 0.311762, 0.254582, 0.217367, 0.122154, -0.00413722, -0.036424, 0.126612, 0.111143, 0.288317},
101  // 2
102  {1.57972, 1.37399, 1.43655, 1.5125, 1.31345, 1.36459, 1.38216, 1.40692, 1.32073, 1.26229, 1.30908, 1.43567, 1.38469, 1.26809, 1.47129, 1.32678, 1.23131, 1.39958, 1.46372, 1.18126, 1.0845, 1.06794, 1.00575, 0.965808, 0.900216, 0.944202, 0.874973, 0.898207, 0.867519, 0.733549, 0.870763, 1.17635, 1.21511, 1.21462, 1.18553, 1.13462, 1.28003, 1.12645, 1.20299, 1.14238, 1.01274, 0.965059, 1.11555, 1.02381, 0.928315, 0.794881, 0.382241, 0.246772, 0.193689, 0.656259, 0.625278},
103  // 3
104  {2.12989, 2.31481, 2.15544, 2.19007, 2.13461, 2.0792, 2.17335, 2.11172, 2.02293, 2.08878, 2.06673, 1.93027, 2.06126, 1.97278, 2.09217, 2.14697, 2.11711, 2.01625, 1.91831, 1.94221, 1.64667, 1.83264, 1.62192, 1.70733, 1.39248, 1.46817, 1.62296, 1.65423, 1.36795, 1.18386, 1.62018, 2.12758, 2.17206, 2.15099, 2.02866, 1.92812, 2.10885, 2.01636, 1.93395, 1.94289, 1.8381, 1.8196, 1.76276, 1.70083, 1.62286, 1.37874, 0.927394, 0.664318, 0.390784, 1.08148, 0.94247},
105  // 5
106  {3.79969, 3.83696, 3.85438, 3.77577, 3.82985, 3.69219, 3.65657, 3.55887, 3.65097, 3.51659, 3.47784, 3.20721, 3.39076, 3.29976, 3.52155, 4.03899, 3.48854, 3.40099, 3.32876, 3.27881, 3.23115, 3.15658, 3.10874, 2.99215, 2.86622, 2.83488, 2.88909, 2.87325, 2.53987, 2.27076, 2.6893, 3.72487, 3.64249, 3.7106, 3.72475, 3.50516, 3.651, 3.53005, 3.35889, 3.42014, 3.40874, 3.38803, 3.04444, 2.84825, 2.83796, 2.74883, 2.11095, 1.91744, 1.2277, 2.01679, 1.91946},
107  // 9
108  {7.33418, 7.037, 7.1857, 7.22616, 7.06822, 7.0287, 6.87545, 7.04592, 6.9982, 6.83358, 6.61643, 6.53737, 6.35026, 6.47591, 6.7283, 7.33445, 7.05116, 6.61201, 6.44648, 6.50046, 6.32645, 6.14354, 6.22557, 5.97735, 5.88157, 5.57615, 5.49984, 5.66394, 4.92412, 4.10878, 5.51943, 6.73539, 6.73847, 6.98001, 6.93693, 6.66939, 6.61707, 6.59897, 6.32261, 6.22746, 6.29714, 6.18276, 5.78676, 5.69114, 5.90317, 5.38993, 4.59656, 4.41804, 3.01731, 4.29533, 4.00189},
109  // 15
110  {12.3987, 12.2643, 12.2793, 12.179, 12.3547, 12.0935, 11.8597, 12.1653, 11.788, 11.539, 11.5729, 11.2289, 11.1504, 11.4779, 11.5958, 12.6938, 12.1197, 11.6919, 11.3114, 11.6247, 11.4269, 11.063, 11.0909, 10.6237, 10.7047, 10.5085, 10.2482, 9.88405, 9.03025, 7.37058, 9.93625, 12.1988, 12.7835, 11.9396, 12.3678, 12.1135, 11.6804, 11.8069, 11.473, 11.5157, 10.7531, 10.8982, 10.9306, 10.23, 10.0229, 9.64279, 9.49989, 8.60977, 7.03686, 8.28512, 7.54974},
111  // 20
112  {17.3384, 17.0781, 17.2163, 17.3061, 17.3213, 16.8364, 16.5958, 16.8607, 16.7517, 16.2522, 16.1777, 15.658, 15.6477, 15.8748, 16.3848, 17.5565, 17.0197, 16.5522, 16.3709, 16.4071, 16.3072, 15.9921, 15.4634, 15.5757, 15.2698, 15.3085, 14.9893, 14.3979, 12.9883, 10.8171, 14.2262, 16.0727, 16.6616, 16.0846, 16.7279, 17.3604, 16.4479, 16.2404, 15.6615, 15.8759, 15.7255, 15.1258, 15.0434, 14.3791, 14.2026, 13.6396, 12.8426, 12.6552, 11.2295, 11.7883, 10.1417},
113  // 30
114  {26.7466, 26.5803, 26.5499, 26.9091, 26.809, 26.3558, 26.1633, 26.0755, 25.7335, 25.7752, 25.5418, 24.7251, 24.4703, 24.987, 26.0398, 27.2819, 26.7082, 26.0559, 25.8818, 25.5768, 25.5367, 25.2871, 25.1106, 24.5522, 24.5346, 24.0219, 23.7035, 23.2678, 21.3194, 17.419, 22.5762, 25.7012, 26.4278, 26.9853, 26.089, 26.0745, 25.8231, 25.1559, 24.992, 25.1553, 24.5522, 24.0027, 23.9581, 23.2477, 22.507, 22.1746, 21.6159, 21.2836, 18.4349, 19.1561, 17.5485},
115  // 50
116  {45.2787, 44.7183, 44.9181, 45.3035, 45.0191, 44.1854, 44.3352, 44.2505, 43.4297, 43.6013, 43.1144, 42.1869, 41.8493, 42.9457, 44.0329, 46.2096, 45.028, 44.622, 43.9874, 44.0502, 43.7725, 43.2233, 42.6152, 42.6214, 41.9467, 41.3583, 40.9533, 39.7945, 36.6845, 30.5753, 40.4273, 45.2536, 46.5445, 46.6267, 46.7933, 47.2467, 45.8736, 45.6788, 44.515, 44.6325, 43.3669, 43.4235, 43.2972, 42.6776, 41.5965, 39.5964, 39.752, 38.4141, 36.3177, 36.0982, 33.4089},
117  // 100
118  {91.8725, 91.3321, 90.8971, 92.2019, 91.2672, 90.2137, 90.8733, 90.0962, 89.0324, 88.7248, 88.0996, 86.2052, 86.1663, 87.1758, 90.7845, 94.5074, 92.5074, 90.9688, 90.4699, 89.9941, 89.4472, 88.9629, 88.7093, 86.9898, 86.7386, 86.0378, 84.5077, 82.8183, 77.299, 66.3294, 87.5922, 95.2022, 97.8843, 98.7436, 99.6861, 99.1151, 98.3366, 97.9507, 97.6038, 96.4471, 94.0358, 93.0037, 92.9773, 91.2049, 88.1207, 87.4069, 84.2282, 83.8522, 81.8764, 78.9989, 70.298},
119  // 150
120  {138.006, 137.443, 138.89, 137.97, 136.92, 136.528, 135.441, 136.217, 134.672, 133.332, 132.949, 130.944, 130.32, 131.672, 134.696, 142.14, 139.952, 137.62, 137.413, 136.931, 135.878, 135.271, 134.911, 133.299, 132.028, 131.485, 129.275, 126.061, 118.607, 101.446, 131.992, 144.464, 148.213, 150.13, 150.987, 151.286, 150.791, 149.995, 148.368, 147.577, 145.48, 142.34, 143.454, 138.375, 135.837, 132.561, 129.091, 128.208, 126.132, 119.948, 111.099,},
121  // 225
122  {208.434, 206.644, 206.761, 208.121, 208.672, 206.279, 205.651, 205.209, 202.451, 202.843, 200.412, 197.773, 197.344, 198.311, 203.822, 214.97, 211.144, 209.616, 207.132, 207.941, 206.874, 204.48, 204.091, 201.978, 201.087, 199.66, 196.069, 192.911, 180.729, 156.775, 204.908, 219.108, 228.108, 229.749, 228.067, 226.528, 230.235, 228.524, 225.871, 225.174, 219.457, 217.595, 216.638, 212.493, 208.688, 204.828, 201.991, 196.901, 194.538, 184.078, 169.081},
123  // 300
124  {279.737, 276.864, 277.859, 279.048, 277.58, 275.103, 273.656, 274.063, 271.992, 271.212, 268.653, 265.553, 261.791, 267.537, 272.599, 288.29, 283.04, 278.909, 276.672, 278.153, 276.332, 274.104, 274.267, 270.842, 268.532, 268.08, 263.793, 257.801, 243.432, 211.312, 277.612, 295.489, 307.189, 307.943, 310.223, 310.02, 314.238, 309.12, 306.579, 303.694, 300.318, 298.695, 293.55, 289.409, 284.556, 277.424, 271.741, 269.034, 265.426, 253.705, 232.875},
125  // 1000
126  {930.426, 930.435, 930.099, 930.338, 931.365, 922.105, 920.117, 915.776, 915.421, 910.612, 908.278, 894.039, 887.25, 895.609, 932.412, 963.949, 956.491, 942.734, 932.293, 939.009, 933.408, 927.949, 928.508, 919.239, 915.86, 918.757, 903.507, 886.135, 847.219, 760.95, 981.542, 1029.26, 1069.04, 1068.39, 1081.64, 1080.06, 1086.39, 1074.79, 1082.87, 1064.78, 1057.94, 1045.98, 1031.85, 1022.71, 992.495, 981.055, 966.408, 949.906, 943.805, 881.26, 833.582},
127 
128  // 3000
129  {2767.08, 2761.52, 2766.4, 2752.21, 2764.56, 2745.52, 2755.25, 2767.94, 2756.84, 2754.28, 2734.55, 2703.34, 2679.54, 2698.1, 2725.23, 2866.94, 2855.41, 2835.59, 2816.65, 2820.5, 2813.94, 2801.05, 2784.99, 2770.56, 2761.05, 2757.94, 2722.04, 2662.61, 2559.62, 2275.27, 3017.4, 3121.92, 3229.64, 3274.97, 3302.15, 3318.3, 3300.48, 3302.31, 3278.61, 3254.56, 3220.55, 3191.32, 3160.05, 3123.17, 3053.1, 3005.8, 2934.83, 2866.33, 2798.92, 2662.28, 2497.03}
130  };
131 
132 
133 
134  double _meanHD_mip[maxHDe][maxHDeta] = {
135 
136  // 1
137  {0.470401, 0.420807, 0.582019, 0.513316, 0.582146, 0.507601, 0.425305, 0.496197, 0.462072, 0.500715, 0.45951, 0.35951, 0.326801, 0.27982, 0.334088, 0.206558, 0.0753332, 0.160812, 0.185407, 0.0125398, 0.140744, 0.358137, 0.0823871, 0.206733, 0.245851, 0.0529039, 0.185571, 0.324772, 0.187823, 0.206319, 0.206809, 0.305131, 0.290422, 0.259652, 0.18443, 0.133599, 0.3911, 0.347598, 0.312221, 0.359135, 0.232424, 0.320564, 0.311762, 0.254582, 0.217367, 0.122154, -0.00413722, -0.036424, 0.126612, 0.111143, 0.288317},
138  // 2
139  {1.97994, 1.7386, 1.70442, 1.77383, 1.64153, 1.56375, 1.90802, 1.63272, 1.50595, 1.64778, 1.54636, 1.87225, 1.54531, 1.69112, 1.57854, 1.47766, 1.29508, 1.53696, 1.45168, 1.21659, 1.2014, 1.06158, 0.884319, 1.08992, 0.846027, 1.09638, 0.899982, 0.935183, 0.719585, 0.756828, 0.867439, 1.17839, 1.21802, 1.21462, 1.18553, 1.13462, 1.28003, 1.12645, 1.20299, 1.14238, 1.01274, 0.965059, 1.11555, 1.02381, 0.928315, 0.794881, 0.382241, 0.246772, 0.193689, 0.656259, 0.625278},
140  // 3
141  {2.71594, 2.79159, 2.59821, 2.58225, 2.68199, 2.66167, 2.7375, 2.48203, 2.63667, 2.58193, 2.52125, 2.37671, 2.62732, 2.16079, 2.55597, 2.26316, 2.3525, 2.29651, 2.12106, 2.21009, 1.88882, 1.99457, 1.80421, 1.75014, 1.53729, 1.81885, 1.81352, 1.72573, 1.49147, 1.31362, 1.6589, 2.13777, 2.17206, 2.15099, 2.02866, 1.92812, 2.10885, 2.01636, 1.93395, 1.94289, 1.8381, 1.8196, 1.76276, 1.70083, 1.62286, 1.37874, 0.927394, 0.664318, 0.390784, 1.08148, 0.94247},
142  // 5
143  {4.75151, 4.63625, 4.85254, 4.56444, 4.63668, 4.45475, 4.36332, 4.3556, 4.38966, 4.29637, 4.21689, 3.94001, 4.468, 4.13119, 4.43904, 4.8149, 4.05317, 4.22918, 3.97242, 4.20607, 4.2177, 4.09719, 3.97134, 3.63644, 3.63634, 3.64081, 3.41821, 3.59108, 3.04798, 2.48535, 2.76348, 3.73573, 3.64249, 3.7106, 3.72475, 3.50516, 3.651, 3.53005, 3.35889, 3.42014, 3.40874, 3.38803, 3.04444, 2.84825, 2.83796, 2.74883, 2.11095, 1.91744, 1.2277, 2.01679, 1.91946},
144  // 9
145  {8.70073, 8.37734, 8.47582, 8.75102, 8.42956, 8.37756, 8.09668, 8.4846, 8.55989, 8.46654, 7.84586, 8.13407, 7.9355, 8.10852, 8.45778, 8.54585, 8.55344, 8.3817, 7.97998, 8.0996, 7.68261, 7.94504, 7.90402, 7.37088, 7.64637, 7.01952, 6.85184, 7.10643, 6.11873, 4.60073, 5.6986, 6.78406, 6.73847, 6.98001, 6.93693, 6.66939, 6.61707, 6.59897, 6.32261, 6.22746, 6.29714, 6.18276, 5.78676, 5.69114, 5.90317, 5.38993, 4.59656, 4.41804, 3.01731, 4.29533, 4.00189},
146  // 15
147  {14.2601, 13.8824, 13.9055, 13.4131, 13.8953, 13.5235, 13.5502, 13.7647, 13.7798, 13.4293, 13.1247, 13.2181, 12.8636, 14.0848, 13.6479, 13.7527, 13.7484, 13.826, 12.9325, 13.8022, 13.6611, 13.1938, 12.952, 12.4985, 12.8824, 12.5299, 12.4391, 11.9163, 11.0181, 8.33753, 10.2206, 12.2827, 12.7835, 11.9396, 12.3678, 12.1135, 11.6804, 11.8069, 11.473, 11.5157, 10.7531, 10.8982, 10.9306, 10.23, 10.0229, 9.64279, 9.49989, 8.60977, 7.03686, 8.28512, 7.54974},
148  // 20
149  {19.1167, 19.1172, 19.286, 18.9669, 19.1198, 18.6396, 18.4973, 18.9448, 18.9708, 18.3458, 18.4377, 17.9278, 18.3301, 19.6231, 19.1867, 19.0734, 19.1304, 18.6843, 18.7502, 18.9822, 18.7113, 18.9523, 18.1198, 18.5638, 18.1078, 17.8885, 17.9659, 16.6333, 15.614, 12.1879, 14.6052, 16.181, 16.6616, 16.0846, 16.7279, 17.3604, 16.4479, 16.2404, 15.6615, 15.8759, 15.7255, 15.1258, 15.0434, 14.3791, 14.2026, 13.6396, 12.8426, 12.6552, 11.2295, 11.7883, 10.1417},
150  // 30
151  {28.9749, 28.5726, 29.172, 29.4858, 29.6026, 28.5177, 29.0576, 28.3767, 28.5346, 28.6647, 28.4945, 28.2276, 28.2084, 28.6309, 30.2471, 29.0976, 29.0621, 29.2827, 28.9496, 29.2011, 28.8115, 28.7003, 28.5203, 28.1136, 28.412, 27.6112, 27.7741, 26.0693, 24.8016, 19.0662, 23.2434, 25.8155, 26.4278, 26.9853, 26.089, 26.0745, 25.8231, 25.1559, 24.992, 25.1553, 24.5522, 24.0027, 23.9581, 23.2477, 22.507, 22.1746, 21.6159, 21.2836, 18.4349, 19.1561, 17.5485},
152  // 50
153  {48.7874, 48.1071, 48.4495, 49.4601, 49.1021, 48.5374, 48.9075, 48.4611, 48.3038, 48.5488, 47.4558, 47.2834, 47.122, 51.2157, 49.7897, 48.7864, 48.4591, 49.6476, 48.5436, 48.9401, 48.653, 48.1094, 47.3705, 47.9376, 47.3971, 47.0711, 45.8921, 44.158, 41.5615, 33.0918, 41.7188, 45.4356, 46.5445, 46.6267, 46.7933, 47.2467, 45.8736, 45.6788, 44.515, 44.6325, 43.3669, 43.4235, 43.2972, 42.6776, 41.5965, 39.5964, 39.752, 38.4141, 36.3177, 36.0982, 33.4089},
154  // 100
155  {98.1442, 97.8033, 97.4476, 98.8587, 99.309, 97.7537, 98.2409, 97.3532, 97.7625, 97.193, 96.887, 95.3895, 97.465, 100.999, 101.174, 98.589, 98.7491, 97.5652, 98.3535, 97.7735, 98.2814, 98.2271, 97.0003, 95.9617, 95.6252, 95.5939, 92.8623, 89.5072, 84.8809, 69.9022, 89.8172, 95.5743, 97.8843, 98.7436, 99.6861, 99.1151, 98.3366, 97.9507, 97.6038, 96.4471, 94.0358, 93.0037, 92.9773, 91.2049, 88.1207, 87.4069, 84.2282, 83.8522, 81.8764, 78.9989, 70.298},
156  // 150
157  {147.203, 146.956, 149.324, 148.346, 147.17, 146.798, 147.541, 146.59, 146.661, 143.988, 144.108, 143.151, 145.65, 151.785, 149.991, 146.177, 148.883, 146.917, 148.254, 146.948, 147.936, 147.766, 146.004, 146.068, 143.403, 144.279, 140.408, 136.858, 130.549, 107.279, 134.718, 145.068, 148.213, 150.13, 150.987, 151.286, 150.791, 149.995, 148.368, 147.577, 145.48, 142.34, 143.454, 138.375, 135.837, 132.561, 129.091, 128.208, 126.132, 119.948, 111.099},
158  // 225
159  {224.229, 224.043, 220.105, 222.924, 223.355, 222.03, 221.909, 222.766, 219.544, 221.056, 216.508, 216.161, 222.002, 233.047, 226.028, 220.528, 222.104, 223.327, 221.452, 222.739, 222.681, 222.698, 222.379, 219.474, 217.868, 217.092, 212.225, 206.507, 194.671, 164.038, 209.773, 219.534, 228.108, 229.749, 228.067, 226.528, 230.235, 228.524, 225.871, 225.174, 219.457, 217.595, 216.638, 212.493, 208.688, 204.828, 201.991, 196.901, 194.538, 184.078, 169.081},
160  // 300
161  {301.394, 299.771, 301.235, 301.02, 300.507, 298.555, 297.249, 292.877, 296.764, 296.562, 295.809, 291.398, 292.9, 316.596, 302.764, 298.404, 295.682, 295.77, 293.368, 296.398, 295.075, 294.662, 295.356, 292.611, 287.658, 290.223, 284.301, 275.682, 263.832, 219.641, 283.083, 296.316, 307.189, 307.943, 310.223, 310.02, 314.238, 309.12, 306.579, 303.694, 300.318, 298.695, 293.55, 289.409, 284.556, 277.424, 271.741, 269.034, 265.426, 253.705, 232.875},
162  // 1000
163  {1003.07, 999.293, 998.375, 1004.44, 1002.26, 998.555, 979.203, 978.408, 973.797, 978.299, 958.427, 941.507, 958.405, 1021.84, 1007.45, 979.226, 994.857, 989.671, 990.326, 984.519, 994.589, 991.448, 990.205, 984.08, 976.489, 978.4, 955.416, 929.705, 900.975, 788.13, 986.688, 1029.66, 1069.04, 1068.39, 1081.64, 1080.06, 1086.39, 1074.79, 1082.87, 1064.78, 1057.94, 1045.98, 1031.85, 1022.71, 992.495, 981.055, 966.408, 949.906, 943.805, 881.26, 833.582},
164  // 3000
165  {2814.24, 2818.89, 2811.41, 2769.88, 2814.53, 2784.61, 2834.7, 2852.19, 2859.22, 2878.11, 2855.71, 2849.99, 2816.53, 2806.13, 2820.78, 2858.65, 2896.53, 2877.99, 2875.06, 2871.91, 2877.39, 2870.12, 2863.07, 2846.81, 2839.81, 2849.02, 2810.73, 2723.37, 2663.06, 2302.37, 3036.7, 3122.08, 3229.64, 3274.97, 3302.15, 3318.3, 3300.48, 3302.31, 3278.61, 3254.56, 3220.55, 3191.32, 3160.05, 3123.17, 3053.1, 3005.8, 2934.83, 2866.33, 2798.92, 2662.28, 2497.03}
166 
167  };
168 
169 
170  double _meanHD_nomip[maxHDe][maxHDeta] = {
171 
172  // 1
173  {0.538035, 0.380346, 0.502414, 0.474803, 0.463365, 0.546573, 0.612518, 0.461013, 0.611347, 0.536771, 0.407523, 0.480637, 0.589332, 0.3402, 0.237015, 0.380297, 0.577407, 0.576915, 0.349076, 0.310323, -0.0509831, 0.202025, 0.701234, 0.213346, 0.65973, 0.0614016, 0.345311, 0.671091, 0.496759, 0.652966, 0.336046, 0.886645, 0.471441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
174  // 2
175  {1.31187, 1.15209, 1.25928, 1.37094, 1.11478, 1.24876, 1.09264, 1.26967, 1.21653, 1.05327, 1.18939, 1.20603, 1.29638, 1.08811, 1.37928, 1.10916, 1.1724, 1.27499, 1.47554, 1.14582, 0.945006, 1.0752, 1.14979, 0.824152, 0.969066, 0.768981, 0.844886, 0.859602, 1.05618, 0.622927, 0.956376, 0.910133, -3.17789, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
176  // 3
177  {1.76283, 2.04742, 1.90964, 1.98401, 1.81918, 1.7511, 1.8688, 1.91406, 1.74089, 1.8593, 1.86467, 1.71051, 1.82464, 1.88763, 1.78568, 2.02434, 1.96735, 1.82166, 1.76662, 1.73633, 1.46003, 1.70062, 1.46702, 1.67231, 1.2741, 1.16183, 1.45725, 1.60227, 1.26306, 0.800212, 0.548262, 0.854848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
178  // 5
179  {3.25403, 3.39252, 3.29012, 3.38248, 3.41375, 3.30431, 3.32948, 3.15393, 3.31146, 3.14037, 3.15738, 2.89084, 2.92799, 3.02174, 2.97057, 3.44817, 3.17555, 2.96205, 2.95103, 2.71578, 2.65455, 2.58593, 2.59574, 2.58151, 2.38628, 2.32248, 2.55864, 2.39301, 2.17953, 1.86248, 1.46207, 1.87986, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
180  // 9
181  {6.66052, 6.32375, 6.46965, 6.44203, 6.32701, 6.34328, 6.34491, 6.26752, 6.3171, 6.13838, 6.18042, 5.84043, 5.77492, 5.89014, 5.71905, 6.41413, 6.27692, 5.71089, 5.62836, 5.72954, 5.56298, 5.13405, 5.27806, 5.1817, 4.8646, 4.7633, 4.69759, 4.79047, 4.23171, 3.24406, 2.64129, 1.48333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
182  // 15
183  {11.5267, 11.5275, 11.5939, 11.6157, 11.6608, 11.5146, 11.1743, 11.3789, 10.9857, 10.8249, 10.9503, 10.4856, 10.6288, 10.5684, 10.5441, 11.9903, 11.3749, 10.6982, 10.5491, 10.4975, 10.3165, 10.13, 10.1151, 9.60929, 9.60629, 9.42971, 8.99902, 8.7732, 7.91507, 5.95748, 5.37731, 4.42891, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
184  // 20
185  {16.4108, 16.1001, 16.2784, 16.5151, 16.4263, 16.0978, 15.7983, 15.8776, 15.8171, 15.4325, 15.3691, 14.8097, 14.8394, 14.8536, 14.9256, 16.4697, 15.9176, 15.4887, 15.3125, 15.1783, 15.0219, 14.5696, 14.1231, 14.0434, 13.8381, 13.713, 13.1931, 13.1034, 11.4965, 8.8448, 6.70916, 4.38266, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
186  // 30
187  {25.5365, 25.6331, 25.2689, 25.7105, 25.4534, 25.3369, 25.0056, 25.0437, 24.6447, 24.4564, 24.3698, 23.4038, 23.5035, 24.0512, 24.1803, 25.9993, 25.4781, 24.5336, 24.3231, 23.8557, 23.8954, 23.5883, 23.2132, 22.7173, 22.4483, 21.9378, 21.4239, 21.4063, 19.4302, 15.1999, 12.1803, 12.7179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
188  // 50
189  {43.6082, 43.2859, 43.5543, 43.7581, 43.2892, 42.665, 42.7535, 42.5985, 41.823, 42.0454, 41.5345, 40.2785, 40.3667, 41.2179, 41.2877, 44.5395, 43.2688, 42.2997, 41.9365, 41.8111, 41.4475, 40.5245, 40.2431, 39.8221, 39.2722, 38.3172, 37.7767, 37.2045, 33.9799, 27.3247, 21.653, 19.7784, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
190  // 100
191  {89.6457, 89.2045, 88.9257, 90.3777, 88.8238, 88.0398, 88.5256, 87.8205, 86.6693, 86.3962, 85.9306, 83.5703, 84.054, 85.1409, 86.0575, 91.9994, 90.0152, 88.3933, 87.4175, 86.7935, 85.9223, 84.8021, 84.3199, 83.2051, 82.2645, 81.4098, 79.8567, 79.2858, 73.4298, 61.6089, 56.7125, 50.2075, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
192  // 150
193  {135.592, 134.999, 136.288, 135.588, 134.585, 134.194, 132.704, 133.445, 132.067, 131.135, 130.598, 128.281, 128.079, 129.792, 130.654, 139.978, 137, 134.32, 134.014, 133.403, 132.114, 130.32, 130.261, 128.019, 127.189, 125.742, 123.715, 121.009, 113.176, 94.4467, 94.7822, 97.0659, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
194  // 225
195  {205.592, 203.502, 204.61, 205.399, 205.599, 203.664, 202.814, 201.351, 199.485, 199.466, 197.502, 194.228, 194.506, 195.902, 197.194, 212.282, 208.354, 205.311, 203.11, 203.268, 202.374, 198.863, 198.434, 195.344, 195.098, 192.408, 187.982, 187.202, 175.03, 148.03, 147.666, 181.691, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
196  // 300
197  {276.262, 273.28, 274.689, 276.186, 273.902, 271.735, 270.656, 271.094, 268.774, 267.281, 264.614, 261.285, 259.014, 264.033, 265.301, 284.45, 279.862, 275.308, 272.565, 273.018, 271.529, 268.402, 267.81, 264.43, 262.264, 260.079, 255.824, 250.103, 235.431, 202.416, 213.619, 229.86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
198  // 1000
199  {920.885, 919.367, 919.677, 919.82, 916.141, 913.914, 903.201, 904.213, 897.768, 893.266, 892.848, 878.024, 870.951, 885.334, 902.636, 958.534, 948.168, 930.635, 919.911, 926.424, 919.985, 916.535, 912.798, 903.747, 900.96, 899.07, 883.885, 868.323, 827.483, 724.471, 825.028, 817.925, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
200  // 3000
201  {2748.63, 2742.59, 2751.1, 2745.87, 2747.05, 2733.63, 2733.25, 2739.41, 2725.2, 2714.84, 2698.01, 2663.16, 2655.27, 2676.47, 2689.86, 2871.04, 2844.13, 2824.38, 2801.95, 2807.07, 2797.07, 2782.14, 2765.89, 2748.2, 2740.18, 2732.74, 2692.31, 2641.15, 2527.92, 2250.5, 2651.6, 2966.71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
202 
203  };
204 
205  // --------------------------------------- SIGMAS (from RMS)
206  // -------------------------------------------------------------------------
207 
208  double _sigmaHD[maxHDe][maxHDeta] = {
209 
210  // 1
211  {0.654243, 0.54759, 0.554919, 0.540598, 0.614809, 0.541676, 0.51995, 0.528313, 0.524612, 0.451454, 0.539606, 0.496828, 0.521872, 0.553163, 0.53043, 0.681183, 0.642071, 0.633848, 0.641433, 0.52785, 0.635601, 0.689876, 0.556327, 0.654269, 0.699126, 0.597849, 0.620694, 0.576555, 0.74591, 0.953982, 1.18004, 1.27418, 0.990666, 1.05536, 1.02326, 1.1367, 1.01794, 1.01225, 1.08847, 1.07718, 1.02113, 1.01568, 0.977003, 1.00096, 1.08425, 1.02849, 1.10268, 0.837944, 0, 1.09619, 1.03152},
212  // 2
213  {1.04849, 0.95042, 1.07076, 0.938815, 0.958506, 0.901895, 0.934511, 0.909165, 0.877238, 0.947066, 0.800055, 0.863728, 0.851536, 0.897028, 1.08678, 1.1785, 0.9976, 1.10224, 1.0848, 1.13915, 1.066, 1.10804, 1.26671, 1.15587, 1.13133, 1.20492, 1.22911, 1.23427, 1.0922, 1.42662, 1.95473, 1.96945, 1.88187, 2.02005, 1.93721, 1.94036, 1.92859, 1.7827, 1.85167, 1.89864, 1.77171, 1.80239, 1.92528, 1.75196, 2.05081, 2.02081, 1.79087, 1.9192, 1.58171, 1.85944, 2.02791},
214  // 3
215  {1.4294, 1.2456, 1.20707, 1.14556, 1.25742, 1.2199, 1.16569, 1.19243, 1.15026, 1.12949, 1.05493, 1.16273, 1.03159, 1.18381, 1.33897, 1.52733, 1.48233, 1.41865, 1.27196, 1.50468, 1.5215, 1.50577, 1.56971, 1.48321, 1.54208, 1.54648, 1.43802, 1.50561, 1.48878, 1.75328, 2.6017, 2.50123, 2.45695, 2.47525, 2.52202, 2.57096, 2.58251, 2.59535, 2.61837, 2.64694, 2.52185, 2.58304, 2.57567, 2.59575, 2.58563, 2.50564, 2.7245, 2.5858, 2.17512, 2.15902, 2.41278},
216  // 5
217  {1.81831, 1.81742, 1.75487, 1.72162, 1.64749, 1.5866, 1.69199, 1.63862, 1.68482, 1.58405, 1.70946, 1.63601, 1.57029, 1.69973, 1.91585, 2.18734, 1.84282, 2.02572, 1.93117, 2.02463, 1.92167, 2.23995, 2.19176, 2.14821, 2.04342, 2.05693, 1.88699, 2.2405, 2.33248, 2.23391, 3.21682, 3.70269, 3.708, 3.59491, 3.9369, 3.95298, 3.75865, 3.49118, 3.5627, 3.66728, 3.63721, 3.62393, 3.6652, 3.4398, 3.57089, 3.78434, 3.26152, 3.2083, 3.40895, 3.32569, 2.98498},
218  // 9
219  {2.52668, 2.44778, 2.44177, 2.42032, 2.53905, 2.38791, 2.52553, 2.50969, 2.60929, 2.42961, 2.31846, 2.48905, 2.27869, 2.433, 3.00791, 2.8618, 3.11658, 2.97914, 2.77078, 2.88684, 3.02479, 2.86153, 3.06224, 2.99113, 2.90642, 2.92377, 2.77296, 2.9994, 2.68947, 3.15869, 5.20636, 5.38235, 5.73539, 5.53785, 5.5623, 5.19174, 5.54152, 5.43156, 5.26755, 5.31479, 5.28972, 5.41666, 5.12447, 5.22247, 5.38052, 5.11109, 5.093, 5.33558, 5.1815, 4.93659, 4.65727},
220  // 15
221  {3.14832, 3.05504, 3.14571, 3.00289, 3.1173, 2.99701, 3.03887, 3.21416, 3.10122, 3.20582, 2.97096, 3.19932, 3.4257, 3.47036, 3.59931, 3.74147, 3.43376, 3.52894, 3.45358, 3.81862, 3.61217, 3.62717, 3.6696, 3.48641, 3.81029, 3.66759, 3.73557, 3.58479, 3.69214, 4.24557, 7.25288, 7.6224, 7.8853, 7.97948, 7.99384, 7.70162, 7.71505, 7.49541, 7.87982, 7.51382, 7.56649, 7.83046, 7.87266, 7.44729, 7.56599, 7.22515, 7.51595, 7.02557, 6.70885, 7.1887, 6.8927},
222  // 20
223  {3.65942, 3.71614, 3.74617, 3.66571, 3.74753, 3.5772, 3.60349, 3.60986, 3.81491, 3.65451, 3.79229, 3.85787, 3.9636, 4.21572, 4.70849, 4.34, 4.12324, 4.1588, 4.16405, 4.24259, 4.27687, 4.39028, 4.6248, 4.25679, 4.39827, 4.60956, 4.49145, 4.323, 4.61318, 5.35888, 8.80925, 8.93697, 9.09177, 8.72766, 9.29694, 9.49524, 9.20403, 9.03093, 9.46118, 9.54883, 9.31422, 9.28219, 8.88813, 8.65058, 8.74377, 8.67198, 8.17223, 8.07636, 8.47314, 8.28788, 7.30018},
224  // 30
225  {4.48183, 4.58054, 4.56734, 4.79134, 4.64243, 4.53877, 4.78416, 4.53241, 4.8177, 4.99135, 4.89975, 5.13506, 5.12159, 5.49841, 5.88801, 5.0184, 5.20165, 5.23251, 5.38127, 5.15948, 5.43023, 5.36552, 5.45139, 5.58202, 5.45562, 5.48219, 5.63453, 5.42961, 5.73878, 6.50813, 11.5501, 11.3124, 11.4657, 11.7336, 11.5705, 11.169, 10.9813, 11.3242, 11.1847, 11.2608, 11.0911, 10.8234, 11.236, 10.5069, 11.0018, 10.899, 11.0764, 10.8729, 10.1028, 10.1989, 10.1941},
226  // 50
227  {6.2121, 6.1742, 6.34747, 6.37806, 6.34637, 6.28515, 6.47774, 6.61278, 6.86245, 7.15145, 7.04701, 7.27502, 7.36053, 8.27777, 8.29453, 6.68087, 6.65543, 7.71098, 7.12222, 7.1565, 7.09359, 7.41065, 7.23412, 7.52493, 7.27621, 7.91761, 7.66554, 7.47463, 8.03413, 9.70782, 18.1241, 16.483, 17.1813, 17.3658, 17.4841, 18.6194, 17.5862, 17.7405, 16.9355, 17.501, 17.0814, 16.8238, 17.2449, 17.2871, 17.4992, 16.3745, 16.5136, 16.7275, 16.5255, 16.8767, 16.1624},
228  // 100
229  {9.47186, 10.2362, 9.56713, 9.21796, 9.9144, 9.91375, 10.3168, 10.1675, 10.9019, 11.1353, 11.4252, 12.3321, 12.45, 13.5292, 13.8654, 9.52318, 9.95835, 10.1922, 11.2597, 10.6527, 11.2355, 11.4173, 11.4988, 11.2949, 11.8111, 11.9417, 11.5431, 11.3764, 12.4696, 16.1244, 29.5567, 27.3882, 28.588, 29.1074, 28.3109, 27.8629, 28.8158, 28.7806, 28.7331, 28.9457, 28.6342, 27.3588, 28.3431, 27.7969, 28.256, 28.8408, 28.486, 27.1806, 29.2728, 27.7144, 26.7184},
230  // 150
231  {12.4276, 13.5292, 13.5804, 12.6999, 12.9549, 13.5128, 14.2977, 13.6446, 14.4192, 14.53, 14.7085, 16.5145, 16.4166, 18.2974, 16.6537, 11.4149, 12.5243, 13.443, 13.6957, 13.0088, 13.632, 14.3784, 14.4194, 15.1285, 13.8689, 15.6477, 15.171, 15.3448, 17.2841, 22.2132, 39.9953, 35.4014, 37.6362, 36.8467, 37.3134, 38.101, 38.6699, 38.8439, 38.1075, 37.8466, 37.6496, 37.2975, 38.6973, 39.1277, 38.0919, 37.2578, 37.0307, 37.5844, 37.2306, 35.9936, 36.708},
232  // 225
233  {17.6391, 18.4868, 17.3573, 16.4683, 16.2583, 17.9271, 18.8133, 18.1503, 19.8413, 20.3529, 21.1942, 22.3488, 22.9126, 25.649, 25.5353, 15.1312, 15.0908, 17.571, 18.0511, 16.8729, 17.395, 18.3989, 18.7657, 19.0412, 18.7768, 20.1612, 21.1617, 19.3891, 21.7359, 32.3984, 49.1524, 44.9927, 44.7472, 47.214, 46.1513, 46.044, 46.8023, 46.4742, 47.7225, 46.3888, 45.4054, 45.2045, 45.7073, 45.7436, 46.683, 47.4651, 44.7381, 44.5912, 48.9839, 44.0898, 43.3713},
234  // 300
235  {20.4991, 26.3044, 22.8877, 20.9287, 22.0241, 23.2163, 23.1972, 21.6865, 23.8184, 24.655, 27.6292, 28.457, 30.6513, 37.2257, 32.9059, 17.475, 16.8226, 19.8153, 21.1167, 20.2592, 21.1095, 21.8057, 22.2603, 22.6789, 24.3058, 24.5198, 23.4713, 25.9872, 27.2996, 39.2299, 58.8975, 52.6489, 51.4979, 52.7112, 52.3372, 54.8999, 54.1426, 52.5347, 54.1224, 54.0766, 53.6057, 52.9367, 54.6645, 55.8427, 51.8527, 52.8579, 53.6665, 53.8615, 57.953, 51.8215, 50.002},
236  // 1000
237  {76.8692, 72.894, 65.4229, 71.375, 65.7604, 64.1007, 72.4559, 65.5679, 77.6797, 70.0211, 80.8702, 78.6715, 83.8302, 96.6057, 93.2839, 55.4212, 59.688, 63.2679, 59.6005, 45.0842, 48.1845, 49.4618, 52.4163, 56.1897, 52.4311, 57.0064, 55.6159, 54.6314, 65.0613, 130.91, 165.476, 160.834, 170.718, 167.347, 170.811, 164.406, 166.097, 162.292, 170.88, 169.925, 164.988, 170.948, 174.354, 170.179, 174.459, 173.268, 175.867, 177.236, 178.42, 179.31, 183.959},
238  // 3000
239  {213.071, 209.01, 202.003, 220.047, 206.91, 210.66, 187.343, 179.07, 193.637, 187.63, 206.509, 215.351, 223.517, 262.794, 264.415, 108.394, 98.3669, 127.004, 135.795, 107.451, 118.536, 129.427, 135.41, 130.023, 125.538, 149.714, 137.456, 133.275, 156.462, 321.834, 323.063, 307.204, 324.542, 306.463, 317.174, 324.326, 330.111, 321.972, 334.589, 340.288, 339.401, 342.602, 345.941, 337.956, 357.865, 331.336, 339.223, 352.806, 347.789, 357.553, 350.867}
240  };
241 
242 
243  double _sigmaHD_mip[maxHDe][maxHDeta] = {
244 
245  // 1
246  {0.726138, 0.606843, 0.609745, 0.590281, 0.680991, 0.590601, 0.571659, 0.593314, 0.581745, 0.494778, 0.598463, 0.548825, 0.580369, 0.603817, 0.552516, 0.700541, 0.662277, 0.649192, 0.656628, 0.532553, 0.644946, 0.694764, 0.561231, 0.65879, 0.705496, 0.589957, 0.624619, 0.581866, 0.754053, 0.962787, 1.182, 1.27418, 0.990666, 1.05536, 1.02326, 1.1367, 1.01794, 1.01225, 1.08847, 1.07718, 1.02113, 1.01568, 0.977003, 1.00096, 1.08425, 1.02849, 1.10268, 0.837944, 0, 1.09619, 1.03152},
247  // 2
248  {1.26665, 1.14514, 1.32436, 1.14718, 1.1652, 1.06516, 1.18738, 1.13125, 1.11887, 1.16329, 0.983976, 1.1278, 1.06695, 1.23121, 1.26499, 1.33537, 1.1389, 1.25225, 1.21155, 1.2503, 1.1477, 1.20299, 1.27943, 1.2334, 1.174, 1.28106, 1.29091, 1.30902, 1.12832, 1.45286, 1.9583, 1.96945, 1.88187, 2.02005, 1.93721, 1.94036, 1.92859, 1.7827, 1.85167, 1.89864, 1.77171, 1.80239, 1.92528, 1.75196, 2.05081, 2.02081, 1.79087, 1.9192, 1.58171, 1.85944, 2.02791},
249  // 3
250  {1.76565, 1.48257, 1.40457, 1.33341, 1.50712, 1.47268, 1.37172, 1.49195, 1.50123, 1.36156, 1.34367, 1.35746, 1.2792, 1.4677, 1.67986, 1.79449, 1.80841, 1.63634, 1.50944, 1.7525, 1.79757, 1.70692, 1.73941, 1.62181, 1.71103, 1.66543, 1.56833, 1.64141, 1.62448, 1.79835, 2.60384, 2.50123, 2.45695, 2.47525, 2.52202, 2.57096, 2.58251, 2.59535, 2.61837, 2.64694, 2.52185, 2.58304, 2.57567, 2.59575, 2.58563, 2.50564, 2.7245, 2.5858, 2.17512, 2.15902, 2.41278},
251  // 5
252  {2.13897, 2.17439, 2.09798, 2.00055, 1.90815, 1.87392, 2.02572, 2.03359, 2.07205, 1.94283, 2.15733, 1.96784, 2.04426, 2.24208, 2.39818, 2.5643, 2.16222, 2.41454, 2.25228, 2.36592, 2.23594, 2.72316, 2.53867, 2.4222, 2.283, 2.26317, 2.15004, 2.47632, 2.66362, 2.35903, 3.22988, 3.70269, 3.708, 3.59491, 3.9369, 3.95298, 3.75865, 3.49118, 3.5627, 3.66728, 3.63721, 3.62393, 3.6652, 3.4398, 3.57089, 3.78434, 3.26152, 3.2083, 3.40895, 3.32569, 2.98498},
253  // 9
254  {2.72321, 2.77203, 2.57304, 2.66525, 2.84513, 2.64469, 2.98115, 2.89133, 3.14374, 2.86366, 2.77452, 2.89181, 2.5313, 2.88834, 3.22573, 3.00814, 3.60749, 3.36813, 2.96722, 3.27775, 3.45248, 3.02828, 3.49416, 3.10162, 3.14364, 3.13388, 3.0518, 3.283, 2.95514, 3.39547, 5.24004, 5.38197, 5.73539, 5.53785, 5.5623, 5.19174, 5.54152, 5.43156, 5.26755, 5.31479, 5.28972, 5.41666, 5.12447, 5.22247, 5.38052, 5.11109, 5.093, 5.33558, 5.1815, 4.93659, 4.65727},
255  // 15
256  {3.40577, 3.21705, 3.61672, 3.22548, 3.25841, 3.17806, 3.42777, 3.65423, 3.42134, 3.41287, 2.98251, 3.54689, 3.9228, 4.00323, 4.05739, 3.87708, 3.74517, 3.78553, 3.82884, 4.06609, 3.85715, 3.71809, 3.75815, 3.59145, 4.0311, 3.94035, 3.86857, 3.7066, 3.84449, 4.54871, 7.30297, 7.61376, 7.8853, 7.97948, 7.99384, 7.70162, 7.71505, 7.49541, 7.87982, 7.51382, 7.56649, 7.83046, 7.87266, 7.44729, 7.56599, 7.22515, 7.51595, 7.02557, 6.70885, 7.1887, 6.8927},
257  // 20
258  {3.85932, 4.21247, 3.96252, 3.78676, 3.9639, 3.8895, 3.86129, 3.75728, 3.9122, 3.69085, 4.12874, 4.01927, 4.68508, 4.78171, 4.86119, 4.63851, 4.52335, 4.42512, 4.53993, 4.21258, 4.4623, 4.32235, 4.68967, 4.2494, 4.44706, 4.6705, 4.50057, 4.33045, 4.80956, 5.74826, 8.83168, 8.92139, 9.09177, 8.72766, 9.29694, 9.49524, 9.20403, 9.03093, 9.46118, 9.54883, 9.31422, 9.28219, 8.88813, 8.65058, 8.74377, 8.67198, 8.17223, 8.07636, 8.47314, 8.28788, 7.30018},
259  // 30
260  {4.62986, 4.72569, 4.50718, 5.0973, 4.96277, 4.52224, 4.81016, 4.76865, 5.04285, 5.12472, 5.03809, 5.28763, 5.67856, 6.16948, 5.5554, 4.98644, 5.64655, 5.16931, 5.39158, 5.14164, 5.0178, 5.11762, 5.19113, 5.52529, 4.99832, 5.46049, 5.203, 5.32034, 5.43115, 6.86722, 11.4765, 11.2819, 11.4657, 11.7336, 11.5705, 11.169, 10.9813, 11.3242, 11.1847, 11.2608, 11.0911, 10.8234, 11.236, 10.5069, 11.0018, 10.899, 11.0764, 10.8729, 10.1028, 10.1989, 10.1941},
261  // 50
262  {6.29826, 6.33234, 5.94593, 6.32841, 5.97286, 6.13765, 6.28593, 6.70057, 6.85038, 6.76979, 6.64328, 6.93836, 7.95126, 8.32031, 7.4751, 6.59424, 6.77376, 7.37931, 6.42456, 6.9036, 6.47467, 6.37218, 6.55568, 6.73402, 6.66384, 7.04671, 6.77803, 6.67119, 7.44412, 10.3416, 17.8305, 16.3546, 17.1813, 17.3658, 17.4841, 18.6194, 17.5862, 17.7405, 16.9355, 17.501, 17.0814, 16.8238, 17.2449, 17.2871, 17.4992, 16.3745, 16.5136, 16.7275, 16.5255, 16.8767, 16.1624},
263  // 100
264  {8.7221, 9.21099, 9.75916, 8.5584, 9.78641, 9.40806, 9.75344, 9.78962, 9.99414, 10.0105, 11.3647, 11.6419, 12.1345, 11.3424, 10.0414, 8.97915, 9.69895, 9.33555, 9.73919, 9.2147, 8.89525, 9.60328, 9.68976, 9.15348, 9.6642, 9.40434, 9.05406, 9.57242, 10.1645, 17.4044, 28.9406, 27.108, 28.588, 29.1074, 28.3109, 27.8629, 28.8158, 28.7806, 28.7331, 28.9457, 28.6342, 27.3588, 28.3431, 27.7969, 28.256, 28.8408, 28.486, 27.1806, 29.2728, 27.7144, 26.7184},
265  // 150
266  {12.0432, 11.3025, 11.4065, 11.673, 11.9818, 12.0084, 10.4297, 13.8448, 12.8515, 14.33, 13.5828, 16.3788, 18.5152, 18.1639, 12.4814, 10.9913, 10.8769, 11.2605, 11.1472, 10.2735, 11.0674, 10.9639, 11.7156, 11.8188, 10.5128, 12.6841, 12.1581, 13.1062, 13.8433, 23.9359, 39.3712, 35.0411, 37.6362, 36.8467, 37.3134, 38.101, 38.6699, 38.8439, 38.1075, 37.8466, 37.6496, 37.2975, 38.6973, 39.1277, 38.0919, 37.2578, 37.0307, 37.5844, 37.2306, 35.9936, 36.708},
267  // 225
268  {13.8641, 15.542, 15.1054, 14.9161, 15.1604, 18.0233, 16.9022, 15.1899, 18.3394, 16.0125, 19.5938, 20.6606, 19.3887, 30.5977, 15.7143, 14.2806, 12.6543, 15.5073, 13.4936, 13.2129, 13.5063, 13.3172, 13.7496, 13.7341, 13.908, 13.9222, 17.9723, 14.4024, 19.2603, 36.4234, 46.9016, 44.8268, 44.7472, 47.214, 46.1513, 46.044, 46.8023, 46.4742, 47.7225, 46.3888, 45.4054, 45.2045, 45.7073, 45.7436, 46.683, 47.4651, 44.7381, 44.5912, 48.9839, 44.0898, 43.3713},
269  // 300
270  {16.9944, 18.9205, 20.8001, 17.8224, 19.3021, 16.7482, 21.1001, 18.0842, 20.5991, 19.8241, 24.8666, 26.4907, 32.3758, 30.6717, 20.8016, 15.1935, 14.7758, 15.0471, 15.1962, 16.2268, 15.0031, 15.3989, 15.9812, 16.3309, 24.8515, 17.9795, 16.2584, 23.4372, 21.5472, 44.4881, 56.4241, 52.3563, 51.4979, 52.7112, 52.3372, 54.8999, 54.1426, 52.5347, 54.1224, 54.0766, 53.6057, 52.9367, 54.6645, 55.8427, 51.8527, 52.8579, 53.6665, 53.8615, 57.953, 51.8215, 50.002},
271  // 1000
272  {59.0244, 63.6645, 62.6869, 70.7556, 67.7925, 72.2779, 55.8689, 58.9518, 60.2247, 58.3482, 71.5504, 83.0422, 80.3075, 94.9576, 41.5711, 30.6758, 35.3841, 31.4403, 32.1144, 33.5467, 30.1252, 29.5774, 32.7844, 30.9231, 29.7836, 33.3183, 38.1399, 39.2919, 48.5019, 153.296, 164.454, 160.703, 170.718, 167.347, 170.811, 164.406, 166.097, 162.292, 170.88, 169.925, 164.988, 170.948, 174.354, 170.179, 174.459, 173.268, 175.867, 177.236, 178.42, 179.31, 183.959},
273  // 3000
274  {283.151, 255.142, 273.786, 297.296, 292.621, 301.363, 242.577, 243.369, 234.127, 240.297, 240.279, 204.427, 232.687, 349.512, 269.475, 143.788, 123.22, 130.551, 133.728, 122.405, 154.145, 163.873, 191.197, 159.676, 142.329, 198.347, 143.764, 157.205, 129.523, 404.048, 313.681, 307.322, 324.542, 306.463, 317.174, 324.326, 330.111, 321.972, 334.589, 340.288, 339.401, 342.602, 345.941, 337.956, 357.865, 331.336, 339.223, 352.806, 347.789, 357.553, 350.867}
275 
276  };
277 
278 
279 
280  double _sigmaHD_nomip[maxHDe][maxHDeta] = {
281 
282  // 1
283  {0.425279, 0.339273, 0.389316, 0.409793, 0.386133, 0.39614, 0.37742, 0.304747, 0.311317, 0.310081, 0.291173, 0.29778, 0.325339, 0.291068, 0.313641, 0.257993, 0.22569, 0.154834, 0.167121, 0.171794, 0.13655, 0.135869, 0.271888, 0.280532, 0.298494, 0.855501, 0.218673, 0.187485, 0.366677, 0.108571, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
284  // 2
285  {0.75719, 0.71597, 0.737951, 0.6957, 0.699902, 0.715328, 0.655913, 0.621224, 0.626306, 0.719005, 0.610581, 0.563811, 0.596934, 0.558679, 0.636214, 0.619313, 0.650394, 0.667241, 0.686055, 0.7966, 0.695469, 0.664227, 1.19689, 0.607486, 0.855758, 0.634348, 0.509801, 0.608603, 0.773866, 0.397242, 0.447583, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
286  // 3
287  {1.0093, 0.976643, 0.982287, 0.922133, 0.975993, 0.936507, 0.916898, 0.893869, 0.846689, 0.920078, 0.806065, 0.989527, 0.830185, 0.944449, 0.776194, 0.981227, 1.00997, 1.07422, 0.813579, 0.881027, 0.867415, 0.936386, 1.00341, 1.04398, 0.785985, 1.07454, 0.714963, 1.01231, 0.798676, 0.899543, 1.94893, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
288  // 5
289  { 1.41022, 1.40199, 1.30995, 1.3703, 1.30774, 1.25226, 1.3549, 1.18622, 1.32315, 1.17598, 1.33558, 1.34884, 1.14969, 1.2871, 1.25497, 1.64569, 1.45693, 1.52425, 1.44791, 1.43443, 1.25058, 1.1704, 1.55611, 1.60772, 1.47771, 1.49061, 1.21322, 1.57805, 1.32767, 1.24772, 1.01461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
290  // 9
291  {2.1282, 2.00456, 2.00904, 1.99597, 2.01448, 1.94432, 2.05738, 1.94753, 2.00776, 1.87321, 1.95674, 2.03121, 1.93692, 1.99244, 2.29846, 2.4523, 2.38904, 2.27696, 2.31332, 2.31142, 2.12105, 2.19571, 2.1931, 2.48426, 2.13065, 2.28861, 1.95762, 2.16347, 2.00876, 1.93497, 2.41443, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
292  // 15
293  {2.61598, 2.70499, 2.65084, 2.65553, 2.83135, 2.67948, 2.58397, 2.64841, 2.59011, 2.84365, 2.69072, 2.76119, 3.05387, 2.82506, 2.75112, 3.41642, 2.91361, 3.02394, 2.90582, 3.06331, 3.01564, 3.02435, 3.16734, 2.77598, 3.1145, 2.92145, 3.09567, 3.00313, 3.05968, 3.16881, 3.17696, 2.72369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
294  // 20
295  {3.17133, 3.06967, 3.19656, 3.29202, 3.31358, 3.14671, 3.163, 3.1411, 3.3873, 3.33715, 3.28855, 3.41333, 3.37018, 3.49255, 3.96126, 3.71765, 3.42684, 3.55911, 3.52645, 3.6549, 3.5134, 3.72378, 3.95295, 3.44384, 3.51834, 3.68805, 3.39884, 3.70982, 3.72924, 4.08001, 3.44122, 2.26957, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,},
296  // 30
297  {3.98032, 4.12848, 4.03269, 4.19262, 3.86747, 4.11783, 4.27295, 4.01387, 4.27327, 4.43392, 4.37632, 4.41582, 4.46359, 4.8768, 5.08438, 4.66853, 4.49082, 4.54816, 4.62596, 4.18638, 4.81035, 4.55389, 4.53817, 4.52524, 4.50569, 4.39844, 4.59143, 4.54169, 4.92757, 5.12576, 6.8169, 8.08539, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
298  // 50
299  {5.50739, 5.57815, 5.93501, 5.7277, 5.66154, 5.61796, 5.77919, 5.71603, 6.05937, 6.43391, 6.4725, 6.4409, 6.52976, 7.14274, 7.17463, 6.20589, 5.86831, 6.70149, 6.40698, 6.0592, 6.14269, 6.45153, 6.18661, 6.30111, 5.93083, 6.32151, 6.26149, 6.66151, 6.84189, 7.78437, 9.99489, 8.08376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
300  // 100
301  {8.69684, 9.64567, 8.57978, 8.52717, 8.56985, 8.94329, 9.33978, 9.16784, 9.88795, 10.2661, 10.3495, 11.2109, 11.3191, 12.6007, 12.7432, 8.96379, 8.91282, 9.31623, 10.284, 9.49166, 10.0732, 9.57189, 9.84152, 9.88767, 10.1458, 10.1583, 10.0645, 10.643, 11.7393, 12.8119, 18.7507, 23.5734, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
302  // 150
303  {11.3527, 12.9622, 12.8083, 11.6895, 11.9984, 12.7244, 13.618, 12.1766, 13.3862, 13.5674, 13.8307, 15.3004, 14.813, 17.1439, 15.2088, 11.0446, 11.5982, 12.5813, 12.6103, 11.9947, 12.0849, 12.4356, 12.8193, 13.0559, 12.1942, 13.2699, 13.3592, 13.6087, 15.9092, 17.556, 28.1058, 31.176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
304  // 225
305  {16.7204, 17.1848, 16.7253, 15.2463, 14.7305, 16.516, 17.6545, 16.386, 18.5506, 19.251, 20.1416, 20.8738, 21.5431, 23.4329, 24.1218, 14.7947, 14.373, 15.8937, 17.1008, 15.1155, 15.6658, 15.9474, 16.345, 16.3842, 16.5222, 17.7741, 17.7266, 18.3433, 20.0502, 24.0027, 37.4783, 43.7664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
306  // 300
307  {18.8139, 25.4799, 21.262, 19.5607, 20.1308, 22.0406, 21.6825, 20.6939, 22.267, 22.9367, 25.6699, 26.4405, 28.9086, 35.1191, 31.0916, 16.736, 15.7791, 18.8272, 20.3313, 18.2148, 19.724, 19.7957, 19.7784, 20.1637, 20.5624, 21.4588, 20.8648, 23.0802, 25.0646, 30.2594, 48.5815, 29.1331, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
308  // 1000
309  {69.0244, 73.6645, 62.6869, 70.7556, 67.7925, 72.2779, 65.8689, 62.9518, 60.2247, 58.3482, 71.5504, 83.0422, 80.3075, 94.9576, 41.5711, 30.6758, 35.3841, 31.4403, 28.1144, 33.5467, 30.1252, 29.5774, 32.7844, 30.9231, 29.7836, 33.3183, 38.1399, 39.2919, 48.5019, 153.296, 164.454, 160.703, 170.718, 167.347, 170.811, 164.406, 166.097, 162.292, 170.88, 169.925, 164.988, 170.948, 174.354, 170.179, 174.459, 173.268, 175.867, 177.236, 178.42, 179.31, 183.959},
310  // 3000
311  {174.9, 187.545, 168.146, 184.227, 163.178, 154.515, 162.136, 155.853, 167.044, 175.335, 179.813, 200.312, 212.852, 235.845, 223.548, 185.388, 187.0394, 123.643, 132.309, 98.8791, 100.563, 111.001, 109.645, 110.376, 111.755, 121.66, 121.568, 116.369, 150.191, 218.452, 2747.046, 273.926, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
312 
313  };
314 
315 
316 
317  // e-gamma mean response and sigma in HF
318  double _meanEM[maxEMe][maxEMeta] =
319  {
320  // 10
321  {7.8757, 8.54299, 8.31929, 8.73801, 8.49535, 8.7193, 8.40631, 8.29179, 8.40983, 8.10598, 8.45281, 8.21852, 8.32999, 8.00596, 7.80171, 7.79796, 7.65744, 7.34728, 7.71235, 7.79666, 7.02263 },
322  // 30
323  {25.3453, 27.55, 27.2665, 27.4085, 26.8778, 27.4831, 27.1889, 26.6712, 26.9011, 26.7303, 26.6148, 26.0337, 26.1737, 25.9955, 25.4115, 25.4994, 25.1352, 24.6945, 24.4964, 23.3701, 22.354 },
324  // 100
325  { 90.7679, 98.4241, 99.1375, 98.121, 97.1997, 97.9898, 97.5763, 96.4063, 95.6132, 95.2455, 95.0654, 93.9277, 94.6812, 92.6419, 92.6798, 89.9094, 89.148, 88.9531, 87.1606, 85.7692, 79.0264 },
326  // 300
327  {287.124, 313.334, 317.253, 317.406, 314.405, 313.192, 311.142, 312.162, 309.664, 308.535, 305.681, 302.984, 301.737, 299.043, 297.731, 292.476, 290.687, 283.472, 280.144, 277.89, 259.707 },
328  // 1000
329  {1037.98, 1156.5, 1167.59, 1155.32, 1157.02, 1160.62, 1142.1, 1137.42, 1135.19, 1137.04, 1130, 1117.67, 1109.17, 1094.39, 1092.35, 1085.32, 1055.6, 1040.6, 1032.99, 1006.05, 956.675 },
330  // 3000
331  {2943.94, 3264.31, 3169.64, 3261.88, 3188.14, 3349.69, 3370.97, 3370.68, 3375.69, 3331.67, 3337.76, 3323.93, 3312.87, 3263.96, 3284.73, 3218.47, 3187.94, 3188.04, 3087.53, 3023.14, 2886.91 }
332 
333  };
334 
335  double _sigmaEM[maxEMe][maxEMeta] =
336  {
337 
338  // 10
339  {5.6531, 6.27197, 6.24877, 6.13235, 6.27261, 6.25803, 6.2146, 6.31748, 6.3178, 5.92181, 6.49741, 6.12966, 6.33539, 6.14887, 5.92745, 5.86183, 5.84069, 5.67205, 5.99716, 6.18501, 5.74927 },
340  // 30
341  {10.7631, 11.6839, 12.0031, 12.0105, 11.3945, 12.0823, 11.9511, 11.5226, 11.737, 11.4636, 11.7777, 11.6057, 11.6463, 11.7102, 11.4542, 11.814, 11.7707, 11.45, 11.6129, 11.2084, 11.5158 },
342  // 100
343  {27.1053, 31.0103, 32.5718, 31.2112, 30.6487, 31.9749, 32.4812, 31.8854, 30.8795, 31.5266, 31.4954, 31.9637, 32.6102, 30.9646, 31.6948, 32.5483, 31.967, 32.886, 32.2816, 32.7599, 33.0516 },
344  // 300
345  { 56.5496, 58.6146, 59.9897, 60.5523, 62.1159, 61.182, 62.4681, 61.5686, 62.7223, 64.3423, 63.2253, 63.3899, 65.9444, 67.1132, 65.4711, 67.7073, 65.9442, 67.0971, 66.6814, 67.0256, 68.3018},
346  // 1000
347  { 204.75, 222.083, 224.726, 221.883, 235.668, 234.81, 242.02, 244.02, 238.789, 252.229, 239.422, 251.573, 242.6, 259.176, 261.525, 259.249, 263.13, 274.504, 274.11, 271.536, 277.354},
348  // 3000
349  {408.394, 376.008, 371.877, 385.928, 384.045, 408.71, 428.087, 406.591, 435.168, 424.928, 465.78, 462.915, 484.967, 480.945, 502.854, 545.007, 537.067, 530.899, 527.306, 519.876, 536.353 }
350 
351  };
352 
353 
354  // MUON probability histos for bin size = 0.25 GeV (0-10 GeV, 40 bins)
355 
356  double _responseMU[maxMUe][maxMUeta][maxMUbin] = {
357  {
358  // 10 GeV
359  {1, 0.999009, 0.999009, 0.999009, 0.997027, 0.981169, 0.949455, 0.922696, 0.863231, 0.782953, 0.665015, 0.555996, 0.443013, 0.322101, 0.230922, 0.162537, 0.114965, 0.0812686, 0.0604559, 0.0475719, 0.0376611, 0.0307235, 0.0178394, 0.0138751, 0.0099108, 0.00792864, 0.00792864, 0.00693756, 0.00396432, 0.00297324, 0.00297324, 0.00198216, 0.00198216, 0.00198216, 0.00198216, 0.00198216, 0.00198216, 0.00099108, 0.00099108, 0},
360  {1, 1, 1, 0.998037, 0.993131, 0.976447, 0.908734, 0.843965, 0.698724, 0.546614, 0.437684, 0.336605, 0.245339, 0.177625, 0.123651, 0.077527, 0.063788, 0.0451423, 0.0353288, 0.0284593, 0.0245339, 0.0215898, 0.0186457, 0.0147203, 0.013739, 0.00981354, 0.00490677, 0.00490677, 0.00392542, 0.00294406, 0.00294406, 0.00196271, 0.00196271, 0.00196271, 0.00196271, 0.000981354, 0.000981354, 0.000981354, 0.000981354, 0},
361  {1, 1, 1, 1, 0.99854, 0.986861, 0.964964, 0.941606, 0.870073, 0.747445, 0.640876, 0.562044, 0.426277, 0.344526, 0.255474, 0.191241, 0.135766, 0.109489, 0.0729927, 0.0525547, 0.0423358, 0.0291971, 0.0233577, 0.0175182, 0.0131387, 0.010219, 0.00437956, 0.00437956, 0.00437956, 0.00291971, 0.00145985, 0, 0, 0, 0, 0, 0, 0, 0, 0},
362  {1, 1, 1, 1, 1, 1, 0.987603, 0.982782, 0.9573, 0.909091, 0.85124, 0.800275, 0.727961, 0.626722, 0.536501, 0.447658, 0.341598, 0.274793, 0.208678, 0.153581, 0.125344, 0.0971074, 0.0764463, 0.0633609, 0.0495868, 0.0371901, 0.0316804, 0.0213499, 0.0172176, 0.0144628, 0.0110193, 0.00964187, 0.00826446, 0.00757576, 0.00688705, 0.00413223, 0.00344353, 0.00206612, 0.00206612, 0.00206612},
363  {1, 0.995918, 0.995918, 0.995918, 0.953061, 0.846939, 0.75102, 0.634694, 0.512245, 0.355102, 0.263265, 0.218367, 0.136735, 0.0836735, 0.0612245, 0.0469388, 0.0326531, 0.0265306, 0.0142857, 0.0102041, 0.00408163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0, 0, 0, 0},
364  {1, 0.999541, 0.999541, 0.999541, 0.996784, 0.977257, 0.977257, 0.909028, 0.909028, 0.769354, 0.698369, 0.698369, 0.455088, 0.244659, 0.244429, 0.129566, 0.129336, 0.0884448, 0.0443372, 0.0438778, 0.0238916, 0.0238916, 0.0130944, 0.00987824, 0.00735125, 0.00574317, 0.00436481, 0.00229727, 0.00229727, 0.00160809, 0.00160809, 0.00160809, 0.00114863, 0.00114863, 0.000459453, 0.000229727, 0.000229727, 0.000229727, 0.000229727, 0}
365  },
366  //30 GeV
367  {
368  {1, 1, 1, 1, 1, 0.997006, 0.981038, 0.963074, 0.928144, 0.852295, 0.761477, 0.662675, 0.538922, 0.399202, 0.299401, 0.234531, 0.190619, 0.154691, 0.125749, 0.0918164, 0.0718563, 0.0638723, 0.0568862, 0.0399202, 0.0319361, 0.0259481, 0.0199601, 0.0159681, 0.0149701, 0.011976, 0.00898204, 0.00798403, 0.00299401, 0.00299401, 0.00299401, 0.00299401, 0.00199601, 0.00199601, 0.000998004, 0.000998004},
369  {1, 0.998024, 0.998024, 0.998024, 0.996047, 0.982213, 0.927866, 0.885375, 0.791502, 0.601779, 0.477273, 0.383399, 0.29249, 0.205534, 0.177866, 0.126482, 0.100791, 0.0790514, 0.0494071, 0.0375494, 0.0286561, 0.0217391, 0.0217391, 0.0158103, 0.0128458, 0.0118577, 0.0108696, 0.00988142, 0.00889328, 0.00889328, 0.00889328, 0.00790514, 0.00592885, 0.00592885, 0.00395257, 0.00197628, 0.000988142, 0.000988142, 0, 0},
370  {1, 1, 1, 1, 1, 0.997041, 0.97929, 0.964497, 0.903846, 0.803254, 0.681953, 0.594675, 0.5, 0.360947, 0.298817, 0.214497, 0.150888, 0.130178, 0.0872781, 0.0695266, 0.0591716, 0.0384615, 0.0340237, 0.0251479, 0.0192308, 0.0177515, 0.0177515, 0.0162722, 0.0162722, 0.0133136, 0.010355, 0.00739645, 0.00443787, 0.00443787, 0.00443787, 0.00443787, 0.00295858, 0.00295858, 0, 0},
371  {1, 1, 1, 1, 1, 0.999306, 0.997917, 0.997222, 0.986111, 0.953472, 0.901389, 0.865972, 0.775, 0.6625, 0.603472, 0.501389, 0.402083, 0.349306, 0.264583, 0.220833, 0.194444, 0.145139, 0.119444, 0.09375, 0.0763889, 0.0625, 0.0472222, 0.0368056, 0.0326389, 0.0291667, 0.0201389, 0.0145833, 0.0145833, 0.0111111, 0.00833333, 0.00694444, 0.00486111, 0.00416667, 0.00208333, 0.000694444},
372  {1, 0.991803, 0.991803, 0.991803, 0.969262, 0.881148, 0.762295, 0.67623, 0.532787, 0.409836, 0.295082, 0.243852, 0.188525, 0.139344, 0.122951, 0.0778689, 0.0532787, 0.0471311, 0.0368852, 0.0286885, 0.0286885, 0.022541, 0.0184426, 0.0163934, 0.0163934, 0.0122951, 0.0122951, 0.00819672, 0.00819672, 0.00819672, 0.00819672, 0.00614754, 0.00204918, 0.00204918, 0.00204918, 0.00204918, 0, 0, 0, 0},
373  {1, 0.999304, 0.999304, 0.999304, 0.998609, 0.990958, 0.990958, 0.952469, 0.952237, 0.819615, 0.777417, 0.777417, 0.563877, 0.332251, 0.332251, 0.190587, 0.190587, 0.157663, 0.0987712, 0.0987712, 0.061674, 0.061674, 0.0377927, 0.0352423, 0.0268954, 0.0257361, 0.0234176, 0.0132159, 0.0127521, 0.0106654, 0.0106654, 0.00881057, 0.00394157, 0.00394157, 0.00370971, 0.001623, 0.001623, 0.000927429, 0.000927429, 0.000695572}
374  },
375  // 100 GeV
376  {
377  {1, 1, 1, 1, 1, 0.998976, 0.9826, 0.971341, 0.947799, 0.895599, 0.804504, 0.73695, 0.650972, 0.520983, 0.417605, 0.350051, 0.286592, 0.239509, 0.192426, 0.146366, 0.125896, 0.106448, 0.0921187, 0.073695, 0.0593654, 0.0470829, 0.0388946, 0.0286592, 0.0225179, 0.0214944, 0.0184237, 0.0153531, 0.0143296, 0.011259, 0.00921187, 0.00716479, 0.00716479, 0.00511771, 0.00409417, 0.00307062},
378  {1, 1, 1, 1, 0.999004, 0.989044, 0.949203, 0.922311, 0.850598, 0.724104, 0.600598, 0.510956, 0.432271, 0.334661, 0.293825, 0.217131, 0.184263, 0.164343, 0.123506, 0.10757, 0.0916335, 0.0717131, 0.062749, 0.0507968, 0.0418327, 0.0408367, 0.0328685, 0.0278884, 0.0268924, 0.0229084, 0.0199203, 0.0179283, 0.0149402, 0.0119522, 0.0109562, 0.00996016, 0.00896414, 0.00697211, 0.00498008, 0.00199203},
379  {1, 1, 1, 1, 1, 0.994048, 0.985119, 0.974702, 0.934524, 0.827381, 0.708333, 0.639881, 0.5625, 0.450893, 0.392857, 0.316964, 0.258929, 0.235119, 0.162202, 0.130952, 0.120536, 0.0907738, 0.078869, 0.0669643, 0.0625, 0.0565476, 0.047619, 0.0357143, 0.0342262, 0.0282738, 0.0208333, 0.0208333, 0.016369, 0.0133929, 0.0119048, 0.0104167, 0.00446429, 0.00446429, 0.0014881, 0.0014881},
380  {1, 0.999281, 0.999281, 0.999281, 0.999281, 0.999281, 0.997124, 0.996405, 0.991373, 0.966211, 0.925953, 0.893602, 0.839684, 0.742631, 0.695902, 0.597412, 0.507549, 0.470884, 0.38821, 0.327822, 0.295471, 0.230769, 0.199856, 0.166068, 0.136592, 0.119339, 0.0941769, 0.0754853, 0.069734, 0.0603882, 0.0510424, 0.0409777, 0.0359454, 0.0287563, 0.0201294, 0.0143781, 0.0107836, 0.00790798, 0.00647017, 0.00359454},
381  {1, 0.997934, 0.997934, 0.997934, 0.987603, 0.92562, 0.834711, 0.77686, 0.654959, 0.518595, 0.409091, 0.353306, 0.299587, 0.216942, 0.206612, 0.161157, 0.130165, 0.123967, 0.0909091, 0.0867769, 0.0681818, 0.053719, 0.0433884, 0.035124, 0.0330579, 0.0330579, 0.0289256, 0.0268595, 0.0227273, 0.0227273, 0.0206612, 0.018595, 0.0123967, 0.0103306, 0.00619835, 0.00619835, 0.00413223, 0.00413223, 0.00206612, 0.00206612},
382  {1, 1, 1, 1, 0.999765, 0.995535, 0.9953, 0.970153, 0.969918, 0.881316, 0.853584, 0.853584, 0.670035, 0.441833, 0.441833, 0.286251, 0.286016, 0.251234, 0.171798, 0.171798, 0.114454, 0.114454, 0.0777908, 0.0747356, 0.0571093, 0.0552291, 0.053349, 0.0293772, 0.0293772, 0.026557, 0.0249119, 0.0211516, 0.012691, 0.0115159, 0.0110458, 0.00658049, 0.00634548, 0.00305523, 0.00305523, 0.00188014}
383  },
384  // 300 GeV
385  {
386  {1, 1, 1, 1, 1, 0.997817, 0.99345, 0.983624, 0.966157, 0.933406, 0.873362, 0.815502, 0.74345, 0.64083, 0.558952, 0.479258, 0.419214, 0.379913, 0.325328, 0.270742, 0.239083, 0.19869, 0.167031, 0.141921, 0.113537, 0.0971616, 0.0840611, 0.0687773, 0.058952, 0.0436681, 0.0393013, 0.0327511, 0.0305677, 0.0262009, 0.0196507, 0.0163755, 0.0120087, 0.00982533, 0.00873362, 0.00327511},
387  {1, 1, 1, 1, 1, 0.996865, 0.972832, 0.948798, 0.904911, 0.802508, 0.719958, 0.649948, 0.584117, 0.491118, 0.46604, 0.364681, 0.331243, 0.308255, 0.244514, 0.221526, 0.202717, 0.169279, 0.15256, 0.126437, 0.111808, 0.106583, 0.0909091, 0.0783699, 0.0710554, 0.0574713, 0.0501567, 0.045977, 0.0376176, 0.0344828, 0.030303, 0.0261233, 0.0188088, 0.0135841, 0.0104493, 0.00522466},
388  {1, 1, 1, 1, 1, 0.998415, 0.993661, 0.988906, 0.977813, 0.935024, 0.858954, 0.812995, 0.762282, 0.662441, 0.622821, 0.505547, 0.445325, 0.426307, 0.329635, 0.29794, 0.275753, 0.242472, 0.22187, 0.191759, 0.171157, 0.158479, 0.141046, 0.125198, 0.120444, 0.110935, 0.0982567, 0.0792393, 0.0586371, 0.0570523, 0.0538827, 0.0459588, 0.0332805, 0.0269414, 0.0174326, 0.0110935},
389  {1, 1, 1, 1, 1, 1, 0.998436, 0.997654, 0.992963, 0.982017, 0.960125, 0.94527, 0.906177, 0.845192, 0.820954, 0.744332, 0.671618, 0.624707, 0.538702, 0.475371, 0.441751, 0.36982, 0.333855, 0.291634, 0.250977, 0.22674, 0.199375, 0.1681, 0.150899, 0.137608, 0.110242, 0.0992963, 0.0820954, 0.0664582, 0.0578577, 0.0453479, 0.0359656, 0.0289289, 0.0187647, 0.00938233},
390  {1, 1, 1, 1, 0.989177, 0.941558, 0.887446, 0.839827, 0.75974, 0.612554, 0.525974, 0.478355, 0.426407, 0.361472, 0.350649, 0.279221, 0.253247, 0.24026, 0.168831, 0.145022, 0.134199, 0.108225, 0.101732, 0.0779221, 0.0606061, 0.0562771, 0.0497835, 0.04329, 0.0411255, 0.034632, 0.034632, 0.0238095, 0.0194805, 0.017316, 0.017316, 0.0108225, 0.0108225, 0.0108225, 0.00649351, 0.00649351},
391  {1, 0.99926, 0.99926, 0.99926, 0.99852, 0.995312, 0.995312, 0.984949, 0.984703, 0.925241, 0.915865, 0.915865, 0.798668, 0.630891, 0.630891, 0.484826, 0.484579, 0.455712, 0.356279, 0.356279, 0.268937, 0.268937, 0.196891, 0.191463, 0.154453, 0.149519, 0.146558, 0.0957316, 0.0949914, 0.0885764, 0.0880829, 0.0745127, 0.0478658, 0.0471256, 0.0446583, 0.0264002, 0.0261535, 0.0157908, 0.0152973, 0.00986923}
392  }
393  };
394 
395  // now assign
396  for (int i1 = 0; i1 < maxMUe; i1++) {
397  eGridMU[i1] = _eGridMU[i1];
398  for (int i2 = 0; i2 < maxMUeta; i2++) {
399  for (int i3 = 0; i3 < maxMUbin; i3++) {
400 
401  responseMU[i1][i2][i3] = _responseMU[i1][i2][i3];
402 
403  if(debug) {
404  //cout.width(6);
405  LogDebug("FastCalorimetry") << " responseMU " << i1 << " " << i2 << " " << i3 << " = "
406  << responseMU[i1][i2][i3] << std::endl;
407  }
408 
409  }
410  }
411  }
412  for (int i2 = 0; i2 < maxMUeta; i2++) {
413  etaGridMU[i2] = _etaGridMU[i2];
414  }
415 
416 
417  // Normalize the response and sigmas to the corresponding energies
418  for(int i = 0; i<maxHDe; i++) {
419  eGridHD[i] = _eGridHD[i];
420  for(int j = 0; j<maxHDeta; j++) {
421 
422  double factor = 1.0;
423  double factor_s = 1.0;
424 
425  if( j < 16) factor = barrelCorrection[i]; // special HB
426  if( j < 30 && j >= 16) factor = endcapCorrection[i]; // special HE
427  if( j >= 30) factor = forwardCorrection[i]; // special HF
428 
429  meanHD[i][j] = factor * _meanHD[i][j] / eGridHD[i];
430  sigmaHD[i][j] = factor_s * _sigmaHD[i][j] / eGridHD[i];
431 
432  meanHD_mip[i][j] = factor * _meanHD_mip[i][j] / eGridHD[i];
433  sigmaHD_mip[i][j] = factor_s * _sigmaHD_mip[i][j] / eGridHD[i];
434 
435  meanHD_nomip[i][j] = factor * _meanHD_nomip[i][j] / eGridHD[i];
436  sigmaHD_nomip[i][j] = factor_s * _sigmaHD_nomip[i][j] / eGridHD[i];
437 
438  }
439  }
440 
441 
442  for(int i = 0; i<maxEMe; i++) {
443  eGridEM[i] = _eGridEM[i];
444  for(int j = 0; j<maxEMeta; j++) {
445  meanEM[i][j] = 0.92 * _meanEM[i][j] / eGridEM[i];
446  sigmaEM[i][j] = 0.92 * _sigmaEM[i][j] / eGridEM[i];
447  }
448  }
449 
450 
451 }
#define LogDebug(id)
double etaStep
Definition: HCALResponse.h:70
T getParameter(std::string const &) const
double RespPar[3][2][3]
Definition: HCALResponse.h:59
#define maxEMeta
Definition: HCALResponse.h:15
double sigmaHD_mip[maxHDe][maxHDeta]
Definition: HCALResponse.h:82
int i
Definition: DBlmapReader.cc:9
double meanHD_mip[maxHDe][maxHDeta]
Definition: HCALResponse.h:82
const RandomEngine * random
Definition: HCALResponse.h:92
double eResponseCoefficient
Definition: HCALResponse.h:65
double eResponseScale[3]
HCAL response parameters.
Definition: HCALResponse.h:62
double eGridHD[maxHDe]
Definition: HCALResponse.h:75
#define maxHDeta
Definition: HCALResponse.h:13
double eResponseExponent
Definition: HCALResponse.h:64
double sigmaHD[maxHDe][maxHDeta]
Definition: HCALResponse.h:81
double meanHD[maxHDe][maxHDeta]
Definition: HCALResponse.h:81
double muStep
Definition: HCALResponse.h:70
#define maxEMe
Definition: HCALResponse.h:14
#define maxMUbin
Definition: HCALResponse.h:18
double meanEM[maxEMe][maxEMeta]
Definition: HCALResponse.h:86
double eResponseCorrection
Definition: HCALResponse.h:66
int j
Definition: DBlmapReader.cc:9
double meanHD_nomip[maxHDe][maxHDeta]
Definition: HCALResponse.h:83
double etaGridMU[maxMUeta]
Definition: HCALResponse.h:78
double eGridEM[maxEMe]
Definition: HCALResponse.h:76
#define maxHDe
Definition: HCALResponse.h:12
double eBias
Definition: HCALResponse.h:67
double eGridMU[maxMUe]
Definition: HCALResponse.h:77
double sigmaEM[maxEMe][maxEMeta]
Definition: HCALResponse.h:86
#define maxMUe
Definition: HCALResponse.h:16
#define debug
Definition: MEtoEDMFormat.h:34
#define maxMUeta
Definition: HCALResponse.h:17
double responseMU[maxMUe][maxMUeta][maxMUbin]
Definition: HCALResponse.h:89
double sigmaHD_nomip[maxHDe][maxHDeta]
Definition: HCALResponse.h:83
double eResponsePlateau[3]
Definition: HCALResponse.h:63
HCALResponse::~HCALResponse ( )
inline

Definition at line 35 of file HCALResponse.h.

35 {;}

Member Function Documentation

double HCALResponse::getHCALEnergyResolution ( double  e,
int  hit 
)

Definition at line 709 of file HCALResponse.cc.

References HCAL, hcforward, RespPar, mathSSE::sqrt(), and VFCAL.

Referenced by CalorimetryManager::HDShowerSimulation(), and CalorimetryManager::reconstructHCAL().

709  {
710 
711  if(hit==hcforward)
712  return e *sqrt( RespPar[VFCAL][1][0]*RespPar[VFCAL][1][0] / e +
713  RespPar[VFCAL][1][1]*RespPar[VFCAL][1][1] );
714  else
715  return e * sqrt( RespPar[HCAL][hit][0]*RespPar[HCAL][hit][0]/(e)
716  + RespPar[HCAL][hit][1]*RespPar[HCAL][hit][1]);
717 
718 }
double RespPar[3][2][3]
Definition: HCALResponse.h:59
T sqrt(T t)
Definition: SSEVec.h:28
double HCALResponse::getHCALEnergyResponse ( double  e,
int  hit 
)

Definition at line 721 of file HCALResponse.cc.

References trackerHits::c, eResponseCoefficient, eResponseExponent, eResponsePlateau, eResponseScale, funct::exp(), funct::log(), n, L1TEmulatorMonitor_cff::p, and asciidump::s.

Referenced by CalorimetryManager::HDShowerSimulation(), and CalorimetryManager::reconstructHCAL().

721  {
722 
723  double s = eResponseScale[hit];
724  double n = eResponseExponent;
725  double p = eResponsePlateau[hit];
726  double c = eResponseCoefficient;
727 
728  double response = e * p / (1+c*exp(n * log(s/e)));
729 
730  if(response<0.) response = 0.;
731 
732  return response;
733 }
double eResponseCoefficient
Definition: HCALResponse.h:65
double eResponseScale[3]
HCAL response parameters.
Definition: HCALResponse.h:62
std::pair< double, double > response
Definition: HCALResponse.h:20
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
double eResponseExponent
Definition: HCALResponse.h:64
Log< T >::type log(const T &t)
Definition: Log.h:22
string s
Definition: asciidump.py:422
double eResponsePlateau[3]
Definition: HCALResponse.h:63
double HCALResponse::getHFEnergyResolution ( double  EGen)

Definition at line 736 of file HCALResponse.cc.

References RespPar, mathSSE::sqrt(), and VFCAL.

737 {
738  return EGen *sqrt( RespPar[VFCAL][0][0]*RespPar[VFCAL][0][0] / EGen +
739  RespPar[VFCAL][0][1]*RespPar[VFCAL][0][1] );
740 }
double RespPar[3][2][3]
Definition: HCALResponse.h:59
T sqrt(T t)
Definition: SSEVec.h:28
void HCALResponse::interEM ( double  e,
int  ie,
int  ieta 
)
private

Definition at line 673 of file HCALResponse.cc.

References debug, eGridEM, LogDebug, mean, meanEM, sigma, and sigmaEM.

Referenced by responseHCAL().

674 {
675  double y1 = meanEM[ie][ieta];
676  double y2 = meanEM[ie+1][ieta];
677  double x1 = eGridEM[ie];
678  double x2 = eGridEM[ie+1];
679 
680  if(debug) {
681  // cout.width(6);
682  LogDebug("FastCalorimetry") << std::endl
683  << " HCALResponse::interEM mean " << std::endl
684  << " x, x1-x2, y1-y2 = "
685  << e << ", " << x1 <<"-" << x2 << " " << y1 <<"-" << y2 << std::endl;
686 
687  }
688 
689  mean = e * (y1 + (y2 - y1) * (e - x1)/(x2 - x1));
690 
691  y1 = sigmaEM[ie][ieta];
692  y2 = sigmaEM[ie+1][ieta];
693 
694  if(debug) {
695  // cout.width(6);
696  LogDebug("FastCalorimetry") << std::endl
697  << " HCALResponse::interEM sigma" << std::endl
698  << " x, x1-x2, y1-y2 = "
699  << e << ", " << x1 <<"-" << x2 << " " << y1 <<"-" << y2 << std::endl;
700 
701  }
702 
703  sigma = e * (y1 + (y2 - y1) * (e - x1)/(x2 - x1));
704 }
#define LogDebug(id)
double meanEM[maxEMe][maxEMeta]
Definition: HCALResponse.h:86
double eGridEM[maxEMe]
Definition: HCALResponse.h:76
double sigma
Definition: HCALResponse.h:72
double sigmaEM[maxEMe][maxEMeta]
Definition: HCALResponse.h:86
#define debug
Definition: MEtoEDMFormat.h:34
void HCALResponse::interHD ( int  mip,
double  e,
int  ie,
int  ieta 
)
private

Definition at line 600 of file HCALResponse.cc.

References debug, eGridHD, LogDebug, mean, meanHD, meanHD_mip, meanHD_nomip, sigma, sigmaHD, sigmaHD_mip, and sigmaHD_nomip.

Referenced by responseHCAL().

601 {
602 
603  double y1, y2;
604 
605  double x1 = eGridHD[ie];
606  double x2 = eGridHD[ie+1];
607 
608  if(mip == 2) { // mip doesn't matter
609  y1 = meanHD[ie][ieta];
610  y2 = meanHD[ie+1][ieta];
611  }
612  else {
613  if(mip == 0) { // not mip
614  y1 = meanHD_nomip[ie][ieta];
615  y2 = meanHD_nomip[ie+1][ieta];
616  }
617  else { // mip in ECAL
618  y1 = meanHD_mip[ie][ieta];
619  y2 = meanHD_mip[ie+1][ieta];
620  }
621  }
622 
623  if(debug) {
624  // cout.width(6);
625  LogDebug("FastCalorimetry") << std::endl
626  << " HCALResponse::interHD mean " << std::endl
627  << " x, x1-x2, y1-y2 = "
628  << e << ", " << x1 <<"-" << x2 << " "
629  << y1 <<"-" << y2 << std::endl;
630  }
631 
632  mean = e * (y1 + (y2 - y1) * (e - x1)/(x2 - x1));
633 
634 
635  if(mip == 2) { // mip doesn't matter
636  y1 = sigmaHD[ie][ieta];
637  y2 = sigmaHD[ie+1][ieta];
638  }
639  else {
640  if(mip == 0) { // not mip
641  y1 = sigmaHD_nomip[ie][ieta];
642  y2 = sigmaHD_nomip[ie+1][ieta];
643  }
644  else { // mip in ECAL
645  y1 = sigmaHD_mip[ie][ieta];
646  y2 = sigmaHD_mip[ie+1][ieta];
647  }
648  }
649 
650  if(debug) {
651  // cout.width(6);
652  LogDebug("FastCalorimetry") << std::endl
653  << " HCALResponse::interHD sigma" << std::endl
654  << " x, x1-x2, y1-y2 = "
655  << e << ", " << x1 <<"-" << x2 << " " << y1 <<"-" << y2 << std::endl;
656 
657  }
658 
659  sigma = e * (y1 + (y2 - y1) * (e - x1)/(x2 - x1));
660 
661 
662  if(debug) {
663  //cout.width(6);
664  LogDebug("FastCalorimetry") << std::endl
665  << " HCALResponse::interHD " << std::endl
666  << " e, ie, ieta = " << e << " " << ie << " " << ieta << std::endl
667  << " mean, sigma = " << mean << " " << sigma << std::endl ;
668  }
669 
670 }
#define LogDebug(id)
double sigmaHD_mip[maxHDe][maxHDeta]
Definition: HCALResponse.h:82
double meanHD_mip[maxHDe][maxHDeta]
Definition: HCALResponse.h:82
double eGridHD[maxHDe]
Definition: HCALResponse.h:75
double sigmaHD[maxHDe][maxHDeta]
Definition: HCALResponse.h:81
double meanHD[maxHDe][maxHDeta]
Definition: HCALResponse.h:81
double meanHD_nomip[maxHDe][maxHDeta]
Definition: HCALResponse.h:83
double sigma
Definition: HCALResponse.h:72
#define debug
Definition: MEtoEDMFormat.h:34
double sigmaHD_nomip[maxHDe][maxHDeta]
Definition: HCALResponse.h:83
void HCALResponse::interMU ( double  e,
int  ie,
int  ieta 
)
private

Definition at line 552 of file HCALResponse.cc.

References debug, eGridMU, RandomEngine::flatShoot(), i, LogDebug, maxMUbin, mean, muStep, random, responseMU, sigma, and x.

Referenced by responseHCAL().

553 {
554 
555  double x = random->flatShoot();
556 
557  int bin1 = maxMUbin;
558  for(int i = 0; i < maxMUbin; i++) {
559  if(x > responseMU[ie][ieta][i]) {
560  bin1 = i-1;
561  break;
562  }
563  }
564  int bin2 = maxMUbin;
565  for(int i = 0; i < maxMUbin; i++) {
566  if(x > responseMU[ie+1][ieta][i]) {
567  bin2 = i-1;
568  break;
569  }
570  }
571 
572  double x1 = eGridMU[ie];
573  double x2 = eGridMU[ie+1];
574  double y1 = (bin1 + random->flatShoot()) * muStep;
575  double y2 = (bin2 + random->flatShoot()) * muStep;
576 
577  if(debug) {
578  // cout.width(6);
579  LogDebug("FastCalorimetry") << std::endl
580  << " HCALResponse::interMU " << std::endl
581  << " x, x1-x2, y1-y2 = "
582  << e << ", " << x1 <<"-" << x2 << " " << y1 <<"-" << y2 << std::endl;
583 
584  }
585 
586 
587  mean = y1 + (y2-y1) * (e - x1)/(x2 - x1);
588  sigma = 0.;
589 
590  if(debug) {
591  //cout.width(6);
592  LogDebug("FastCalorimetry") << std::endl
593  << " HCALResponse::interMU " << std::endl
594  << " e, ie, ieta = " << e << " " << ie << " " << ieta << std::endl
595  << " response = " << mean << std::endl;
596  }
597 
598 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
const RandomEngine * random
Definition: HCALResponse.h:92
double muStep
Definition: HCALResponse.h:70
#define maxMUbin
Definition: HCALResponse.h:18
double flatShoot(double xmin=0.0, double xmax=1.0) const
Definition: RandomEngine.h:30
double sigma
Definition: HCALResponse.h:72
double eGridMU[maxMUe]
Definition: HCALResponse.h:77
Definition: DDAxes.h:10
#define debug
Definition: MEtoEDMFormat.h:34
double responseMU[maxMUe][maxMUeta][maxMUbin]
Definition: HCALResponse.h:89
std::pair< double, double > HCALResponse::responseHCAL ( int  mip,
double  energy,
double  eta,
int  partype 
)

Definition at line 455 of file HCALResponse.cc.

References abs, debug, eBias, eGridEM, eGridHD, eGridMU, relval_parameters_module::energy, eResponseCorrection, etaGridMU, etaStep, i, interEM(), interHD(), interMU(), LogDebug, maxEMe, maxEMeta, maxHDe, maxHDeta, maxMUe, maxMUeta, mean, and sigma.

Referenced by CalorimetryManager::HDShowerSimulation(), CalorimetryManager::reconstructECAL(), and CalorimetryManager::reconstructHCAL().

456 {
457 
458  int ieta = abs((int)(eta / etaStep)) ;
459  int ie = -1;
460 
461  mean = 0.;
462  sigma = 0.;
463 
464  // e/gamma
465  if(partype == 0) {
466  ieta -= 30; // HF starts at ieta=30 till ieta=51
467  // but resp.vector from index=0 through 20
468  if(ieta >= maxEMeta ) ieta = maxEMeta;
469  else if(ieta < 0) ieta = 0;
470 
471  for (int i = 0; i < maxEMe; i++) {
472  if(energy < eGridEM[i]) {
473  if(i == 0) ie = 0;
474  else ie = i-1;
475  break;
476  }
477  }
478  if(ie == -1) ie = maxEMe - 2;
479  interEM(energy, ie, ieta);
480  }
481 
482  else {
483  // hadrons
484  if(partype == 1) {
485 
486  if(ieta >= maxHDeta) ieta = maxHDeta;
487 
488  if(ieta < 0 ) ieta = 0;
489  for (int i = 0; i < maxHDe; i++) {
490  if(energy < eGridHD[i]) {
491  if(i == 0) ie = 0; // less than minimal -
492  else ie = i-1; // back extrapolation with the 1st interval
493  break;
494  }
495  }
496  if(ie == -1) ie = maxHDe - 2; // more than maximum -
497  interHD(mip, energy, ie, ieta); // extrapolation with last interv.
498 
499  }
500 
501 
502  // finally apply energy scale correction
504  mean += eBias;
506 
507 
508  }
509 
510  // muons
511  if(partype == 2) {
512 
513  ieta = maxMUeta;
514  for(int i = 0; i < maxMUeta; i++) {
515  if(fabs(eta) < etaGridMU[i]) {
516  ieta = i;
517  break;
518  }
519  }
520 
521  if(ieta < 0) ieta = 0;
522  if(ieta < maxMUeta) { // HB-HE
523 
524  for (int i = 0; i < maxMUe; i++) {
525  if(energy < eGridMU[i]) {
526  if(i == 0) ie = 0; // less than minimal -
527  else ie = i-1; // back extrapolation with the first interval
528  break;
529  }
530 
531  if(ie == -1) ie = maxMUe - 2; // more than maximum -
532  interMU(energy, ie, ieta); // extrapolation using the last interv
533  if(mean > energy) mean = energy;
534 
535  }
536  }
537  }
538 
539  // debugging
540  if(debug) {
541  // cout.width(6);
542  LogDebug("FastCalorimetry") << std::endl
543  << " HCALResponse::responseHCAL, partype = " << partype
544  << " E, eta = " << energy << " " << eta
545  << " mean & sigma = " << mean << " " << sigma << std::endl;
546  }
547 
548  return std::pair<double,double>(mean,sigma);
549 
550 }
#define LogDebug(id)
double etaStep
Definition: HCALResponse.h:70
#define maxEMeta
Definition: HCALResponse.h:15
int i
Definition: DBlmapReader.cc:9
double eGridHD[maxHDe]
Definition: HCALResponse.h:75
#define abs(x)
Definition: mlp_lapack.h:159
#define maxHDeta
Definition: HCALResponse.h:13
T eta() const
#define maxEMe
Definition: HCALResponse.h:14
double eResponseCorrection
Definition: HCALResponse.h:66
void interHD(int mip, double e, int ie, int ieta)
void interMU(double e, int ie, int ieta)
void interEM(double e, int ie, int ieta)
double etaGridMU[maxMUeta]
Definition: HCALResponse.h:78
double eGridEM[maxEMe]
Definition: HCALResponse.h:76
#define maxHDe
Definition: HCALResponse.h:12
double eBias
Definition: HCALResponse.h:67
double sigma
Definition: HCALResponse.h:72
double eGridMU[maxMUe]
Definition: HCALResponse.h:77
#define maxMUe
Definition: HCALResponse.h:16
#define debug
Definition: MEtoEDMFormat.h:34
#define maxMUeta
Definition: HCALResponse.h:17

Member Data Documentation

double HCALResponse::eBias
private

Definition at line 67 of file HCALResponse.h.

Referenced by HCALResponse(), and responseHCAL().

double HCALResponse::eGridEM[maxEMe]
private

Definition at line 76 of file HCALResponse.h.

Referenced by HCALResponse(), interEM(), and responseHCAL().

double HCALResponse::eGridHD[maxHDe]
private

Definition at line 75 of file HCALResponse.h.

Referenced by HCALResponse(), interHD(), and responseHCAL().

double HCALResponse::eGridMU[maxMUe]
private

Definition at line 77 of file HCALResponse.h.

Referenced by HCALResponse(), interMU(), and responseHCAL().

double HCALResponse::eResponseCoefficient
private

Definition at line 65 of file HCALResponse.h.

Referenced by getHCALEnergyResponse(), and HCALResponse().

double HCALResponse::eResponseCorrection
private

Definition at line 66 of file HCALResponse.h.

Referenced by HCALResponse(), and responseHCAL().

double HCALResponse::eResponseExponent
private

Definition at line 64 of file HCALResponse.h.

Referenced by getHCALEnergyResponse(), and HCALResponse().

double HCALResponse::eResponsePlateau[3]
private

Definition at line 63 of file HCALResponse.h.

Referenced by getHCALEnergyResponse(), and HCALResponse().

double HCALResponse::eResponseScale[3]
private

HCAL response parameters.

Definition at line 62 of file HCALResponse.h.

Referenced by getHCALEnergyResponse(), and HCALResponse().

double HCALResponse::etaGridMU[maxMUeta]
private

Definition at line 78 of file HCALResponse.h.

Referenced by HCALResponse(), and responseHCAL().

double HCALResponse::etaStep
private

Definition at line 70 of file HCALResponse.h.

Referenced by HCALResponse(), and responseHCAL().

double HCALResponse::mean
private

Definition at line 72 of file HCALResponse.h.

Referenced by interEM(), interHD(), interMU(), and responseHCAL().

double HCALResponse::meanEM[maxEMe][maxEMeta]
private

Definition at line 86 of file HCALResponse.h.

Referenced by HCALResponse(), and interEM().

double HCALResponse::meanHD[maxHDe][maxHDeta]
private

Definition at line 81 of file HCALResponse.h.

Referenced by HCALResponse(), and interHD().

double HCALResponse::meanHD_mip[maxHDe][maxHDeta]
private

Definition at line 82 of file HCALResponse.h.

Referenced by HCALResponse(), and interHD().

double HCALResponse::meanHD_nomip[maxHDe][maxHDeta]
private

Definition at line 83 of file HCALResponse.h.

Referenced by HCALResponse(), and interHD().

double HCALResponse::muStep
private

Definition at line 70 of file HCALResponse.h.

Referenced by HCALResponse(), and interMU().

const RandomEngine* HCALResponse::random
private

Definition at line 92 of file HCALResponse.h.

Referenced by interMU().

double HCALResponse::responseMU[maxMUe][maxMUeta][maxMUbin]
private

Definition at line 89 of file HCALResponse.h.

Referenced by HCALResponse(), and interMU().

double HCALResponse::RespPar[3][2][3]
private

Default values for resolution parametrisation: stochastic, constant and noise.

Definition at line 59 of file HCALResponse.h.

Referenced by getHCALEnergyResolution(), getHFEnergyResolution(), and HCALResponse().

double HCALResponse::sigma
private

Definition at line 72 of file HCALResponse.h.

Referenced by interEM(), interHD(), interMU(), and responseHCAL().

double HCALResponse::sigmaEM[maxEMe][maxEMeta]
private

Definition at line 86 of file HCALResponse.h.

Referenced by HCALResponse(), and interEM().

double HCALResponse::sigmaHD[maxHDe][maxHDeta]
private

Definition at line 81 of file HCALResponse.h.

Referenced by HCALResponse(), and interHD().

double HCALResponse::sigmaHD_mip[maxHDe][maxHDeta]
private

Definition at line 82 of file HCALResponse.h.

Referenced by HCALResponse(), and interHD().

double HCALResponse::sigmaHD_nomip[maxHDe][maxHDeta]
private

Definition at line 83 of file HCALResponse.h.

Referenced by HCALResponse(), and interHD().