143 double eta_low[28] = {-2.4, -2.32, -2.22, -2.12, -2.02, -1.92, -1.82,
144 -1.72, -1.62, -1.37, -1.2, -0.8, -0.6, -0.4,
145 0., 0.4, 0.6, 0.8, 1.2, 1.52, 1.62,
146 1.72, 1.82, 1.92, 2.02, 2.12, 2.22, 2.32};
147 double eta_high[28] = {-2.32, -2.22, -2.12, -2.02, -1.92, -1.82, -1.72,
148 -1.62, -1.52, -1.2, -0.8, -0.6, -0.4, 0,
149 0.4, 0.6, 0.8, 1.2, 1.37, 1.62, 1.72,
150 1.82, 1.92, 2.02, 2.12, 2.22, 2.32, 2.4};
152 double diffES[28] = {
153 -0.0763457, 0.198092, -0.0288093, -0.0808452, 0.0271571, -0.0975428,
154 -0.0164521, -0.0737317, 0.136447, 0.0352632, -0.00197711, 0.0244447,
155 -0.0641183, 0.0810265, 0.00735352, -0.013568, -0.0169185, -0.0142155,
156 -0.0255637, 0.0586014, -0.163098, 0.0237162, -0.0690589, -0.0346536,
157 -0.0886648, -0.0914096, 0.0738988, -0.0376201};
159 double corrHG[28] = {
160 -0.484364, 0.263687, -0.037742, -0.0553371, -0.0640682, -0.201265,
161 -0.176052, -0.206764, 0.0224639, 0.00855262, -0.00583258, 0.00196343,
162 -0.108951, 0.0708467, -0.00438541, -0.0928867, -0.0487188, -0.0214743,
163 -0.0619355, -0.055117, -0.297427, -0.0795861, -0.173311, -0.0905191,
164 -0.297548, -0.147814, -0.0867268, -0.384337};
166 double corrMG[28] = {
167 -0.0160707, 0.199527, -0.000845413, -0.0611091, 0.0877896, 0.0479742,
168 0.141414, 0.639507, 0.72873, 0.21984, 0.0643192, 0.146518,
169 0.0279768, 0.140151, 0.0682126, 0.167472, 0.154887, 0.122343,
170 0.212282, 0.657224, 0.576652, 0.135954, 0.0798118, 0.0167071,
171 -0.0221686, -0.0398211, 0.128146, -0.0226478};
173 double range_energy[28] = {195., 180., 175., 160., 140., 145., 155.,
174 155., 145., 140., 120., 90., 90., 75.,
175 75., 90., 90., 120., 140., 145., 155.,
176 155., 145., 140., 160., 175., 180., 195.};
178 double corrM_G, corrE;
182 double energy_output;
186 if (fabs(eta_input) > 2.4)
187 return energy_input * 1000.;
189 int id_eta = -9999999;
191 for (
int i = 0;
i < 28;
i++) {
192 if ((eta_input >= eta_low[
i]) && (eta_input <= eta_high[
i])) {
199 double norm_unconv = 1.;
200 if (id_eta < 17 && id_eta > 10)
201 norm_unconv =
m_unconv_funcG[0][id_eta]->Eval(range_energy[id_eta]);
202 else if (id_eta < 25 && id_eta > 2)
203 norm_unconv =
m_unconv_funcG[1][id_eta]->Eval(range_energy[id_eta]);
205 norm_unconv =
m_unconv_funcG[2][id_eta]->Eval(range_energy[id_eta]);
207 if (energy_input < 92)
208 corrM_G = (
m_unconv_funcG[0][id_eta]->Eval(energy_input)) / (norm_unconv);
209 else if (energy_input < 160 && energy_input >= 92)
210 corrM_G = (
m_unconv_funcG[1][id_eta]->Eval(energy_input)) / (norm_unconv);
211 else if (energy_input < 400 && energy_input >= 160)
212 corrM_G = (
m_unconv_funcG[2][id_eta]->Eval(energy_input)) / (norm_unconv);
213 else if (energy_input >= 400)
214 corrM_G = (
m_unconv_funcG[3][id_eta]->Eval(energy_input)) / (norm_unconv);
222 funcG_com[0][id_eta] =
m_funcG[0][id_eta];
223 funcG_com[1][id_eta] =
m_funcG[1][id_eta];
224 funcG_com[2][id_eta] =
m_funcG[2][id_eta];
229 if (id_eta == 12 || id_eta == 13 || id_eta == 14 || id_eta == 15) {
230 if (energy_input < 105)
231 corrM_G = (funcG_com[0][id_eta]->Eval(energy_input)) /
232 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
233 else if (energy_input < 400 && energy_input >= 105)
234 corrM_G = (funcG_com[1][id_eta]->Eval(energy_input)) /
235 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
236 else if (energy_input >= 400)
237 corrM_G = (funcG_com[2][id_eta]->Eval(energy_input)) /
238 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
241 else if (id_eta == 11 || id_eta == 16) {
242 if (energy_input < 130)
243 corrM_G = (funcG_com[0][id_eta]->Eval(energy_input)) /
244 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
245 else if (energy_input < 440 && energy_input >= 130)
246 corrM_G = (funcG_com[1][id_eta]->Eval(energy_input)) /
247 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
248 else if (energy_input >= 440)
249 corrM_G = (funcG_com[2][id_eta]->Eval(energy_input)) /
250 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
253 else if (id_eta == 10 || id_eta == 17) {
254 if (energy_input < 190)
255 corrM_G = (funcG_com[0][id_eta]->Eval(energy_input)) /
256 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
257 else if (energy_input < 400 && energy_input >= 190)
258 corrM_G = (funcG_com[1][id_eta]->Eval(energy_input)) /
259 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
260 else if (energy_input >= 400)
261 corrM_G = (funcG_com[2][id_eta]->Eval(energy_input)) /
262 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
265 else if (id_eta == 9 || id_eta == 18) {
266 if (energy_input < 200)
267 corrM_G = (funcG_com[0][id_eta]->Eval(energy_input)) /
268 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
269 else if (energy_input < 480 && energy_input >= 200)
270 corrM_G = (funcG_com[1][id_eta]->Eval(energy_input)) /
271 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
272 else if (energy_input >= 480)
273 corrM_G = (funcG_com[2][id_eta]->Eval(energy_input)) /
274 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
277 else if (id_eta == 7 || id_eta == 8 || id_eta == 19 || id_eta == 20) {
278 if (energy_input < 250)
279 corrM_G = (funcG_com[0][id_eta]->Eval(energy_input)) /
280 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
281 else if (energy_input < 450 && energy_input >= 250)
282 corrM_G = (funcG_com[1][id_eta]->Eval(energy_input)) /
283 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
284 else if (energy_input >= 450)
285 corrM_G = (funcG_com[2][id_eta]->Eval(energy_input)) /
286 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
289 else if (id_eta == 6 || id_eta == 21) {
290 if (energy_input < 180)
291 corrM_G = (funcG_com[0][id_eta]->Eval(energy_input)) /
292 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
293 else if (energy_input < 385 && energy_input >= 180)
294 corrM_G = (funcG_com[1][id_eta]->Eval(energy_input)) /
295 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
296 else if (energy_input >= 385)
297 corrM_G = (funcG_com[2][id_eta]->Eval(energy_input)) /
298 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
301 else if (id_eta == 5 || id_eta == 22) {
302 if (energy_input < 165)
303 corrM_G = (funcG_com[0][id_eta]->Eval(energy_input)) /
304 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
305 else if (energy_input < 460 && energy_input >= 165)
306 corrM_G = (funcG_com[1][id_eta]->Eval(energy_input)) /
307 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
308 else if (energy_input >= 460)
309 corrM_G = (funcG_com[2][id_eta]->Eval(energy_input)) /
310 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
313 else if (id_eta == 4 || id_eta == 23) {
314 if (energy_input < 160)
315 corrM_G = (funcG_com[0][id_eta]->Eval(energy_input)) /
316 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
317 else if (energy_input < 450 && energy_input >= 160)
318 corrM_G = (funcG_com[1][id_eta]->Eval(energy_input)) /
319 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
320 else if (energy_input >= 450)
321 corrM_G = (funcG_com[2][id_eta]->Eval(energy_input)) /
322 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
326 if (energy_input < 200)
327 corrM_G = (funcG_com[0][id_eta]->Eval(energy_input)) /
328 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
329 else if (energy_input < 480 && energy_input >= 200)
330 corrM_G = (funcG_com[1][id_eta]->Eval(energy_input)) /
331 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
332 else if (energy_input >= 480)
333 corrM_G = (funcG_com[2][id_eta]->Eval(energy_input)) /
334 (funcG_com[0][id_eta]->Eval(range_energy[id_eta]));
339 return energy_input * 1000.;
342 double ets2 = energy_layer2_input / cosh(eta_input);
343 double valTO = (
m_funcTO[id_eta])->Eval(ets2);
350 (((corrMG[id_eta] / 91.2) - (diffES[id_eta] / 91.2)) * valTO * corrM_G +
351 ((corrHG[id_eta] / 91.2) - (diffES[id_eta] / 91.2)) * (1 - valTO));
352 energy_output = (energy_input + corrE) * 1000.;
353 return energy_output;