CMS 3D CMS Logo

List of all members | Public Member Functions
EnergyUncertaintyPhotonSpecific Class Reference

#include <EnergyUncertaintyPhotonSpecific.h>

Public Member Functions

double computePhotonEnergyUncertainty_highR9 (double eta, double brem, double energy)
 
double computePhotonEnergyUncertainty_lowR9 (double eta, double brem, double energy)
 
 EnergyUncertaintyPhotonSpecific (const edm::ParameterSet &config)
 
void init (const edm::EventSetup &theEventSetup)
 
 ~EnergyUncertaintyPhotonSpecific ()
 

Detailed Description

Author
Nicolas Chanon, ETH Zurich, Switzerland

Definition at line 16 of file EnergyUncertaintyPhotonSpecific.h.

Constructor & Destructor Documentation

◆ EnergyUncertaintyPhotonSpecific()

EnergyUncertaintyPhotonSpecific::EnergyUncertaintyPhotonSpecific ( const edm::ParameterSet config)

Definition at line 5 of file EnergyUncertaintyPhotonSpecific.cc.

5 {}

◆ ~EnergyUncertaintyPhotonSpecific()

EnergyUncertaintyPhotonSpecific::~EnergyUncertaintyPhotonSpecific ( )

Definition at line 7 of file EnergyUncertaintyPhotonSpecific.cc.

7 {}

Member Function Documentation

◆ computePhotonEnergyUncertainty_highR9()

double EnergyUncertaintyPhotonSpecific::computePhotonEnergyUncertainty_highR9 ( double  eta,
double  brem,
double  energy 
)

Definition at line 241 of file EnergyUncertaintyPhotonSpecific.cc.

241  {
242  double et = energy / cosh(eta);
243 
244  const int nBinsEta = 6;
245  const double EtaBins[nBinsEta + 1] = {0.0, 0.7, 1.15, 1.44, 1.56, 2.0, 2.5};
246 
247  const int nBinsBrem = 6;
248  const double BremBins[nBinsBrem + 1] = {0.8, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0};
249 
250  float par0[nBinsEta][nBinsBrem];
251  float par1[nBinsEta][nBinsBrem];
252  float par2[nBinsEta][nBinsBrem];
253  float par3[nBinsEta][nBinsBrem];
254 
255  par0[0][0] = 0.00806753;
256  par1[0][0] = 0.143754;
257  par2[0][0] = -0.00368104;
258  par3[0][0] = 0.219829;
259 
260  par0[0][1] = 0.00899298;
261  par1[0][1] = 0.10159;
262  par2[0][1] = 4.70884;
263  par3[0][1] = 9.07419e-08;
264 
265  par0[0][2] = 0;
266  par1[0][2] = 0;
267  par2[0][2] = 0;
268  par3[0][2] = 0;
269 
270  par0[0][3] = 0;
271  par1[0][3] = 0;
272  par2[0][3] = 0;
273  par3[0][3] = 0;
274 
275  par0[0][4] = 0;
276  par1[0][4] = 0;
277  par2[0][4] = 0;
278  par3[0][4] = 0;
279 
280  par0[0][5] = 0;
281  par1[0][5] = 0;
282  par2[0][5] = 0;
283  par3[0][5] = 0;
284 
285  par0[1][0] = 0.00880649;
286  par1[1][0] = 0.0716169;
287  par2[1][0] = 5.23856;
288  par3[1][0] = 0.00632907;
289 
290  par0[1][1] = 0.00972275;
291  par1[1][1] = 0.0752675;
292  par2[1][1] = 3.35623;
293  par3[1][1] = 2.49397e-07;
294 
295  par0[1][2] = 0;
296  par1[1][2] = 0;
297  par2[1][2] = 0;
298  par3[1][2] = 0;
299 
300  par0[1][3] = 0;
301  par1[1][3] = 0;
302  par2[1][3] = 0;
303  par3[1][3] = 0;
304 
305  par0[1][4] = 0;
306  par1[1][4] = 0;
307  par2[1][4] = 0;
308  par3[1][4] = 0;
309 
310  par0[1][5] = 0;
311  par1[1][5] = 0;
312  par2[1][5] = 0;
313  par3[1][5] = 0;
314 
315  par0[2][0] = 0.0101474;
316  par1[2][0] = -0.332171;
317  par2[2][0] = -31.8456;
318  par3[2][0] = 22.543;
319 
320  par0[2][1] = 0.0109109;
321  par1[2][1] = 0.0425903;
322  par2[2][1] = 6.52561;
323  par3[2][1] = 2.18593e-08;
324 
325  par0[2][2] = 0;
326  par1[2][2] = 0;
327  par2[2][2] = 0;
328  par3[2][2] = 0;
329 
330  par0[2][3] = 0;
331  par1[2][3] = 0;
332  par2[2][3] = 0;
333  par3[2][3] = 0;
334 
335  par0[2][4] = 0;
336  par1[2][4] = 0;
337  par2[2][4] = 0;
338  par3[2][4] = 0;
339 
340  par0[2][5] = 0;
341  par1[2][5] = 0;
342  par2[2][5] = 0;
343  par3[2][5] = 0;
344 
345  par0[3][0] = 0.00343003;
346  par1[3][0] = 11.5791;
347  par2[3][0] = -112.084;
348  par3[3][0] = -863.968;
349 
350  par0[3][1] = 0.0372159;
351  par1[3][1] = 1.44028;
352  par2[3][1] = -40;
353  par3[3][1] = 0.00102639;
354 
355  par0[3][2] = 0;
356  par1[3][2] = 0;
357  par2[3][2] = 0;
358  par3[3][2] = 0;
359 
360  par0[3][3] = 0;
361  par1[3][3] = 0;
362  par2[3][3] = 0;
363  par3[3][3] = 0;
364 
365  par0[3][4] = 0;
366  par1[3][4] = 0;
367  par2[3][4] = 0;
368  par3[3][4] = 0;
369 
370  par0[3][5] = 0;
371  par1[3][5] = 0;
372  par2[3][5] = 0;
373  par3[3][5] = 0;
374 
375  par0[4][0] = 0.0192411;
376  par1[4][0] = 0.0511006;
377  par2[4][0] = 7.56304;
378  par3[4][0] = 0.00331583;
379 
380  par0[4][1] = 0.0195124;
381  par1[4][1] = 0.104321;
382  par2[4][1] = 5.71476;
383  par3[4][1] = 6.12472e-06;
384 
385  par0[4][2] = 0;
386  par1[4][2] = 0;
387  par2[4][2] = 0;
388  par3[4][2] = 0;
389 
390  par0[4][3] = 0;
391  par1[4][3] = 0;
392  par2[4][3] = 0;
393  par3[4][3] = 0;
394 
395  par0[4][4] = 0;
396  par1[4][4] = 0;
397  par2[4][4] = 0;
398  par3[4][4] = 0;
399 
400  par0[4][5] = 0;
401  par1[4][5] = 0;
402  par2[4][5] = 0;
403  par3[4][5] = 0;
404 
405  par0[5][0] = 0.0203644;
406  par1[5][0] = -0.050789;
407  par2[5][0] = -7.96854;
408  par3[5][0] = 4.71223;
409 
410  par0[5][1] = 0.0198718;
411  par1[5][1] = 0.106859;
412  par2[5][1] = 3.54235;
413  par3[5][1] = 6.89631e-06;
414 
415  par0[5][2] = 0;
416  par1[5][2] = 0;
417  par2[5][2] = 0;
418  par3[5][2] = 0;
419 
420  par0[5][3] = 0;
421  par1[5][3] = 0;
422  par2[5][3] = 0;
423  par3[5][3] = 0;
424 
425  par0[5][4] = 0;
426  par1[5][4] = 0;
427  par2[5][4] = 0;
428  par3[5][4] = 0;
429 
430  par0[5][5] = 0;
431  par1[5][5] = 0;
432  par2[5][5] = 0;
433  par3[5][5] = 0;
434 
435  int iEtaSl = -1;
436  for (int iEta = 0; iEta < nBinsEta; ++iEta) {
437  if (EtaBins[iEta] <= std::abs(eta) && std::abs(eta) < EtaBins[iEta + 1]) {
438  iEtaSl = iEta;
439  }
440  }
441 
442  int iBremSl = -1;
443  for (int iBrem = 0; iBrem < nBinsBrem; ++iBrem) {
444  if (BremBins[iBrem] <= brem && brem < BremBins[iBrem + 1]) {
445  iBremSl = iBrem;
446  }
447  }
448 
449  if (std::abs(eta) > 2.5)
450  iEtaSl = nBinsEta - 1;
451  if (brem < BremBins[0])
452  iBremSl = 0;
453  if (brem > BremBins[nBinsBrem - 1])
454  iBremSl = nBinsBrem - 1;
455  if (brem > 2)
456  iBremSl = 1;
457 
458  float uncertainty = 0;
459  if (iBremSl >= 0 && iBremSl < nBinsBrem && iEtaSl >= 0 && iEtaSl < nBinsEta) {
460  if (et < 5)
461  uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl] / (5 - par2[iEtaSl][iBremSl]) +
462  par3[iEtaSl][iBremSl] / ((5 - par2[iEtaSl][iBremSl]) * (5 - par2[iEtaSl][iBremSl]));
463  else if (et > 200)
464  uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl] / (200 - par2[iEtaSl][iBremSl]) +
465  par3[iEtaSl][iBremSl] / ((200 - par2[iEtaSl][iBremSl]) * (200 - par2[iEtaSl][iBremSl]));
466  else if (et >= 5 && et <= 200)
467  uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl] / (et - par2[iEtaSl][iBremSl]) +
468  par3[iEtaSl][iBremSl] / ((et - par2[iEtaSl][iBremSl]) * (et - par2[iEtaSl][iBremSl]));
469  }
470 
471  return (uncertainty * energy);
472 }

References funct::abs(), HCALHighEnergyHPDFilter_cfi::energy, EgHLTOffHistBins_cfi::et, PVValHelper::eta, MuonErrorMatrixAnalyzer_cfi::EtaBins, L1TowerCalibrationProducer_cfi::iEta, hgcalTowerMapProducer_cfi::nBinsEta, pfMETCorrectionType0_cfi::par0, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, and pfMETCorrectionType0_cfi::par3.

◆ computePhotonEnergyUncertainty_lowR9()

double EnergyUncertaintyPhotonSpecific::computePhotonEnergyUncertainty_lowR9 ( double  eta,
double  brem,
double  energy 
)

Definition at line 11 of file EnergyUncertaintyPhotonSpecific.cc.

11  {
12  double et = energy / cosh(eta);
13 
14  const int nBinsEta = 6;
15  const double EtaBins[nBinsEta + 1] = {0.0, 0.7, 1.15, 1.44, 1.56, 2.0, 2.5};
16 
17  const int nBinsBrem = 6;
18  const double BremBins[nBinsBrem + 1] = {0.8, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0};
19 
20  float par0[nBinsEta][nBinsBrem];
21  float par1[nBinsEta][nBinsBrem];
22  float par2[nBinsEta][nBinsBrem];
23  float par3[nBinsEta][nBinsBrem];
24 
25  par0[0][0] = 0.0232291;
26  par1[0][0] = 0;
27  par2[0][0] = 0;
28  par3[0][0] = 0;
29 
30  par0[0][1] = 0.00703187;
31  par1[0][1] = 0.646644;
32  par2[0][1] = -7.4698;
33  par3[0][1] = 5.53373e-08;
34 
35  par0[0][2] = 0.00692465;
36  par1[0][2] = 0.292698;
37  par2[0][2] = 4.16907;
38  par3[0][2] = 5.61149e-06;
39 
40  par0[0][3] = 0.00855993;
41  par1[0][3] = 0.280843;
42  par2[0][3] = 4.25527;
43  par3[0][3] = 9.6404e-07;
44 
45  par0[0][4] = 0.00795058;
46  par1[0][4] = 0.370007;
47  par2[0][4] = 3.03429;
48  par3[0][4] = 4.43986e-07;
49 
50  par0[0][5] = 0.0107494;
51  par1[0][5] = 0.276159;
52  par2[0][5] = 4.44532;
53  par3[0][5] = 2.58822e-06;
54 
55  par0[1][0] = 0.0614866;
56  par1[1][0] = 0;
57  par2[1][0] = 0;
58  par3[1][0] = 0;
59 
60  par0[1][1] = 0.00894211;
61  par1[1][1] = 0.466937;
62  par2[1][1] = 3.33434;
63  par3[1][1] = 0.000114835;
64 
65  par0[1][2] = 0.0102959;
66  par1[1][2] = 0.313568;
67  par2[1][2] = 6.34301;
68  par3[1][2] = 2.86726e-07;
69 
70  par0[1][3] = 0.0128934;
71  par1[1][3] = 0.302943;
72  par2[1][3] = 6.35598;
73  par3[1][3] = 0.00190694;
74 
75  par0[1][4] = 0.0130199;
76  par1[1][4] = 0.505135;
77  par2[1][4] = 2.52964;
78  par3[1][4] = 0.120204;
79 
80  par0[1][5] = 0.0180839;
81  par1[1][5] = 0.382134;
82  par2[1][5] = 5.3388;
83  par3[1][5] = 3.59921e-07;
84 
85  par0[2][0] = 0.0291343;
86  par1[2][0] = 0;
87  par2[2][0] = 0;
88  par3[2][0] = 0;
89 
90  par0[2][1] = 0.00876269;
91  par1[2][1] = 0.375159;
92  par2[2][1] = 7.11411;
93  par3[2][1] = 0.0438575;
94 
95  par0[2][2] = 0.0120863;
96  par1[2][2] = 0.397635;
97  par2[2][2] = 5.97451;
98  par3[2][2] = 0.0469782;
99 
100  par0[2][3] = 0.0112655;
101  par1[2][3] = 0.856565;
102  par2[2][3] = -5.76122;
103  par3[2][3] = 4.99993;
104 
105  par0[2][4] = 0.0168267;
106  par1[2][4] = 0.636468;
107  par2[2][4] = -1.54548;
108  par3[2][4] = 4.99992;
109 
110  par0[2][5] = 0.0168059;
111  par1[2][5] = 1.09268;
112  par2[2][5] = -0.547554;
113  par3[2][5] = 0.0952985;
114 
115  par0[3][0] = 0.158403;
116  par1[3][0] = 0;
117  par2[3][0] = 0;
118  par3[3][0] = 0;
119 
120  par0[3][1] = 0.0717431;
121  par1[3][1] = 1.66981;
122  par2[3][1] = 6.86275;
123  par3[3][1] = 0.00543544;
124 
125  par0[3][2] = 0.0385666;
126  par1[3][2] = 3.6319;
127  par2[3][2] = -3.76633;
128  par3[3][2] = 6.56718e-05;
129 
130  par0[3][3] = 0.0142631;
131  par1[3][3] = 8.85991;
132  par2[3][3] = -32.6073;
133  par3[3][3] = 0.00119538;
134 
135  par0[3][4] = 0.0421638;
136  par1[3][4] = 3.1289;
137  par2[3][4] = -6.58653;
138  par3[3][4] = 1.10125e-05;
139 
140  par0[3][5] = 0.046331;
141  par1[3][5] = 1.29951;
142  par2[3][5] = 1.76117;
143  par3[3][5] = 0.00204206;
144 
145  par0[4][0] = 0.0483944;
146  par1[4][0] = 0;
147  par2[4][0] = 0;
148  par3[4][0] = 0;
149 
150  par0[4][1] = 0.0168516;
151  par1[4][1] = 1.19617;
152  par2[4][1] = -6.78666;
153  par3[4][1] = 4.98192;
154 
155  par0[4][2] = 0.0243039;
156  par1[4][2] = 0.994626;
157  par2[4][2] = -4.26073;
158  par3[4][2] = 4.99984;
159 
160  par0[4][3] = 0.031795;
161  par1[4][3] = 0.875925;
162  par2[4][3] = 1.43183;
163  par3[4][3] = 0.0920944;
164 
165  par0[4][4] = 0.0414953;
166  par1[4][4] = 0.654605;
167  par2[4][4] = 4.45367;
168  par3[4][4] = 0.030385;
169 
170  par0[4][5] = 0.058031;
171  par1[4][5] = 0.292915;
172  par2[4][5] = 8.48307;
173  par3[4][5] = 0.0134321;
174 
175  par0[5][0] = 0.107158;
176  par1[5][0] = 0;
177  par2[5][0] = 0;
178  par3[5][0] = 0;
179 
180  par0[5][1] = 0.021685;
181  par1[5][1] = 0.574207;
182  par2[5][1] = -0.566981;
183  par3[5][1] = 0.0120609;
184 
185  par0[5][2] = 0.0196619;
186  par1[5][2] = 0.940217;
187  par2[5][2] = -6.05845;
188  par3[5][2] = 0.000193818;
189 
190  par0[5][3] = 0.0324734;
191  par1[5][3] = 0.574766;
192  par2[5][3] = -5.23571;
193  par3[5][3] = 4.9419;
194 
195  par0[5][4] = 0.0414953;
196  par1[5][4] = 0.654605;
197  par2[5][4] = 4.45367;
198  par3[5][4] = 0.030385;
199 
200  par0[5][5] = 0.058031;
201  par1[5][5] = 0.292915;
202  par2[5][5] = 8.48307;
203  par3[5][5] = 0.0134321;
204 
205  int iEtaSl = -1;
206  for (int iEta = 0; iEta < nBinsEta; ++iEta) {
207  if (EtaBins[iEta] <= std::abs(eta) && std::abs(eta) < EtaBins[iEta + 1]) {
208  iEtaSl = iEta;
209  }
210  }
211 
212  int iBremSl = -1;
213  for (int iBrem = 0; iBrem < nBinsBrem; ++iBrem) {
214  if (BremBins[iBrem] <= brem && brem < BremBins[iBrem + 1]) {
215  iBremSl = iBrem;
216  }
217  }
218 
219  if (std::abs(eta) > 2.5)
220  iEtaSl = nBinsEta - 1;
221  if (brem < BremBins[0])
222  iBremSl = 0;
223  if (brem > BremBins[nBinsBrem - 1])
224  iBremSl = nBinsBrem - 1;
225 
226  float uncertainty = 0;
227  if (et < 5)
228  uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl] / (5 - par2[iEtaSl][iBremSl]) +
229  par3[iEtaSl][iBremSl] / ((5 - par2[iEtaSl][iBremSl]) * (5 - par2[iEtaSl][iBremSl]));
230  if (et > 200)
231  uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl] / (200 - par2[iEtaSl][iBremSl]) +
232  par3[iEtaSl][iBremSl] / ((200 - par2[iEtaSl][iBremSl]) * (200 - par2[iEtaSl][iBremSl]));
233 
234  if (et > 5 && et < 200)
235  uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl] / (et - par2[iEtaSl][iBremSl]) +
236  par3[iEtaSl][iBremSl] / ((et - par2[iEtaSl][iBremSl]) * (et - par2[iEtaSl][iBremSl]));
237 
238  return (uncertainty * energy);
239 }

References funct::abs(), HCALHighEnergyHPDFilter_cfi::energy, EgHLTOffHistBins_cfi::et, PVValHelper::eta, MuonErrorMatrixAnalyzer_cfi::EtaBins, L1TowerCalibrationProducer_cfi::iEta, hgcalTowerMapProducer_cfi::nBinsEta, pfMETCorrectionType0_cfi::par0, pfMETCorrectionType0_cfi::par1, pfMETCorrectionType0_cfi::par2, and pfMETCorrectionType0_cfi::par3.

◆ init()

void EnergyUncertaintyPhotonSpecific::init ( const edm::EventSetup theEventSetup)

Definition at line 9 of file EnergyUncertaintyPhotonSpecific.cc.

9 {}
pfMETCorrectionType0_cfi.par1
par1
Definition: pfMETCorrectionType0_cfi.py:48
pfMETCorrectionType0_cfi.par3
par3
Definition: pfMETCorrectionType0_cfi.py:50
PVValHelper::eta
Definition: PVValidationHelpers.h:70
hgcalTowerMapProducer_cfi.nBinsEta
nBinsEta
Definition: hgcalTowerMapProducer_cfi.py:10
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
MuonErrorMatrixAnalyzer_cfi.EtaBins
EtaBins
Definition: MuonErrorMatrixAnalyzer_cfi.py:15
pfMETCorrectionType0_cfi.par0
par0
Definition: pfMETCorrectionType0_cfi.py:47
pfMETCorrectionType0_cfi.par2
par2
Definition: pfMETCorrectionType0_cfi.py:49
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22