test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ( const edm::ParameterSet config)

Definition at line 7 of file EnergyUncertaintyPhotonSpecific.cc.

7  {
8 
9 
10 
11 }
EnergyUncertaintyPhotonSpecific::~EnergyUncertaintyPhotonSpecific ( )

Definition at line 14 of file EnergyUncertaintyPhotonSpecific.cc.

14  {
15 
16 }

Member Function Documentation

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

Definition at line 253 of file EnergyUncertaintyPhotonSpecific.cc.

References Abs(), and fitWZ::par0.

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

Definition at line 25 of file EnergyUncertaintyPhotonSpecific.cc.

References Abs(), and fitWZ::par0.

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

Definition at line 20 of file EnergyUncertaintyPhotonSpecific.cc.

20  {
21 
22 }