CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ecalClusterEnergyUncertaintyElectronSpecific.cc
Go to the documentation of this file.
3 
5  float en = superCluster.energy();
6  float eta = fabs(superCluster.eta());
7  float et = en / cosh(eta);
8  float brem = superCluster.etaWidth() != 0 ? superCluster.phiWidth() / superCluster.etaWidth() : 0;
9 
10  const int nBinsEta = 6;
11  const float EtaBins[nBinsEta + 1] = {0.0, 0.7, 1.15, 1.44, 1.56, 2.0, 2.5};
12 
13  const int nBinsBrem = 6;
14  const float BremBins[nBinsBrem + 1] = {0.8, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0};
15 
16  float par0[nBinsEta][nBinsBrem];
17  float par1[nBinsEta][nBinsBrem];
18  float par2[nBinsEta][nBinsBrem];
19  float par3[nBinsEta][nBinsBrem];
20 
21  par0[0][0] = 0.00640519;
22  par1[0][0] = 0.257578;
23  par2[0][0] = 1.72437;
24  par3[0][0] = 4.04686e-06;
25 
26  par0[0][1] = 0.00709569;
27  par1[0][1] = 0.279844;
28  par2[0][1] = 1.13789;
29  par3[0][1] = 1.16239e-05;
30 
31  par0[0][2] = 0.0075544;
32  par1[0][2] = 0.341346;
33  par2[0][2] = 0.513396;
34  par3[0][2] = 2.90054e-06;
35 
36  par0[0][3] = 0.00659365;
37  par1[0][3] = 0.517649;
38  par2[0][3] = -3.1847;
39  par3[0][3] = 7.37152e-07;
40 
41  par0[0][4] = 0.00771696;
42  par1[0][4] = 0.492897;
43  par2[0][4] = -1.42222;
44  par3[0][4] = 0.000358677;
45 
46  par0[0][5] = 0.00561532;
47  par1[0][5] = 0.655138;
48  par2[0][5] = -3.29839;
49  par3[0][5] = 6.25898e-07;
50 
51  par0[1][0] = 0.00273646;
52  par1[1][0] = 0.714568;
53  par2[1][0] = -4.82956;
54  par3[1][0] = 4.45878e-07;
55 
56  par0[1][1] = 0.00679797;
57  par1[1][1] = 0.472856;
58  par2[1][1] = -0.281699;
59  par3[1][1] = 5.46479e-05;
60 
61  par0[1][2] = 0.00845532;
62  par1[1][2] = 0.611624;
63  par2[1][2] = -1.10104;
64  par3[1][2] = 1.16803e-05;
65 
66  par0[1][3] = 0.00831068;
67  par1[1][3] = 0.853653;
68  par2[1][3] = -4.23761;
69  par3[1][3] = 2.61247e-05;
70 
71  par0[1][4] = 0.00845457;
72  par1[1][4] = 0.984985;
73  par2[1][4] = -5.19548;
74  par3[1][4] = 2.05044e-07;
75 
76  par0[1][5] = 0.0110227;
77  par1[1][5] = 1.00356;
78  par2[1][5] = -4.31936;
79  par3[1][5] = 0.14384;
80 
81  par0[2][0] = -0.00192618;
82  par1[2][0] = 1.69986;
83  par2[2][0] = -16.4355;
84  par3[2][0] = 1.94946e-06;
85 
86  par0[2][1] = 0.0067622;
87  par1[2][1] = 0.792209;
88  par2[2][1] = -1.18521;
89  par3[2][1] = 0.066577;
90 
91  par0[2][2] = 0.00761595;
92  par1[2][2] = 1.03058;
93  par2[2][2] = -4.17237;
94  par3[2][2] = 0.168543;
95 
96  par0[2][3] = 0.0119179;
97  par1[2][3] = 0.910145;
98  par2[2][3] = -2.14122;
99  par3[2][3] = 0.00342264;
100 
101  par0[2][4] = 0.0139921;
102  par1[2][4] = 1.01488;
103  par2[2][4] = -2.46637;
104  par3[2][4] = 0.0458434;
105 
106  par0[2][5] = 0.013724;
107  par1[2][5] = 1.49078;
108  par2[2][5] = -6.60661;
109  par3[2][5] = 0.297821;
110 
111  par0[3][0] = -0.00197909;
112  par1[3][0] = 4.40696;
113  par2[3][0] = -4.88737;
114  par3[3][0] = 4.99999;
115 
116  par0[3][1] = 0.0340196;
117  par1[3][1] = 3.86278;
118  par2[3][1] = -10.899;
119  par3[3][1] = 0.130098;
120 
121  par0[3][2] = 0.0102397;
122  par1[3][2] = 8.99643;
123  par2[3][2] = -31.5122;
124  par3[3][2] = 0.00118335;
125 
126  par0[3][3] = 0.0110891;
127  par1[3][3] = 8.01794;
128  par2[3][3] = -21.9038;
129  par3[3][3] = 0.000245975;
130 
131  par0[3][4] = 0.0328931;
132  par1[3][4] = 4.73441;
133  par2[3][4] = -12.1148;
134  par3[3][4] = 3.01721e-05;
135 
136  par0[3][5] = 0.0395614;
137  par1[3][5] = 3.54327;
138  par2[3][5] = -12.6514;
139  par3[3][5] = 0.119761;
140 
141  par0[4][0] = 0.0121809;
142  par1[4][0] = 0.965608;
143  par2[4][0] = -4.19667;
144  par3[4][0] = 0.129896;
145 
146  par0[4][1] = 0.0168951;
147  par1[4][1] = 1.0218;
148  par2[4][1] = -4.03078;
149  par3[4][1] = 0.374291;
150 
151  par0[4][2] = 0.0213549;
152  par1[4][2] = 1.29613;
153  par2[4][2] = -4.89024;
154  par3[4][2] = 0.0297165;
155 
156  par0[4][3] = 0.0262602;
157  par1[4][3] = 1.41674;
158  par2[4][3] = -5.94928;
159  par3[4][3] = 0.19298;
160 
161  par0[4][4] = 0.0334892;
162  par1[4][4] = 1.48572;
163  par2[4][4] = -5.3175;
164  par3[4][4] = 0.0157013;
165 
166  par0[4][5] = 0.0347093;
167  par1[4][5] = 1.63127;
168  par2[4][5] = -7.27426;
169  par3[4][5] = 0.201164;
170 
171  par0[5][0] = 0.0185321;
172  par1[5][0] = 0.255205;
173  par2[5][0] = 1.56798;
174  par3[5][0] = 5.07655e-11;
175 
176  par0[5][1] = 0.0182718;
177  par1[5][1] = 0.459086;
178  par2[5][1] = -0.48198;
179  par3[5][1] = 0.00114946;
180 
181  par0[5][2] = 0.0175505;
182  par1[5][2] = 0.92848;
183  par2[5][2] = -4.52737;
184  par3[5][2] = 0.154827;
185 
186  par0[5][3] = 0.0233833;
187  par1[5][3] = 0.804105;
188  par2[5][3] = -3.75131;
189  par3[5][3] = 2.84172;
190 
191  par0[5][4] = 0.0334892;
192  par1[5][4] = 1.48572;
193  par2[5][4] = -5.3175;
194  par3[5][4] = 0.0157013;
195 
196  par0[5][5] = 0.0347093;
197  par1[5][5] = 1.63127;
198  par2[5][5] = -7.27426;
199  par3[5][5] = 0.201164;
200 
201  int iEtaSl = -1;
202  for (int iEta = 0; iEta < nBinsEta; ++iEta) {
203  if (EtaBins[iEta] <= eta && eta < EtaBins[iEta + 1]) {
204  iEtaSl = iEta;
205  }
206  }
207 
208  int iBremSl = -1;
209  for (int iBrem = 0; iBrem < nBinsBrem; ++iBrem) {
210  if (BremBins[iBrem] <= brem && brem < BremBins[iBrem + 1]) {
211  iBremSl = iBrem;
212  }
213  }
214 
215  //this code is confusing as it has no concept of under and overflow bins
216  //we will use Et as an example but also applies to eta
217  //underflow is 1st bin (naively currently labeled as 0 to 0.7, its really <0.7)
218  //overflow is the final bin (naviely currently labeled as 5 to 10, its really >=5)
219  //logic: if brem is 0<=brem <0.7 it will be already set to the 1st bin, this checks if its <0
220  //logic: if brem is 5<=brem<10 it will be set to the last bin so this then checks if its >5 at which point
221  //it also assigns it to the last bin. The value of 5 will have already been assigned in the for
222  //loop above to the last bin so its okay that its a >5 test
223  if (eta > EtaBins[nBinsEta - 1])
224  iEtaSl = nBinsEta - 1;
225  if (brem < BremBins[0])
226  iBremSl = 0;
227  if (brem > BremBins[nBinsBrem - 1])
228  iBremSl = nBinsBrem - 1;
229 
230  float uncertainty = 0;
231  if (et <= 5)
232  uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl] / (5 - par2[iEtaSl][iBremSl]) +
233  par3[iEtaSl][iBremSl] / ((5 - par2[iEtaSl][iBremSl]) * (5 - par2[iEtaSl][iBremSl]));
234  if (et >= 200)
235  uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl] / (200 - par2[iEtaSl][iBremSl]) +
236  par3[iEtaSl][iBremSl] / ((200 - par2[iEtaSl][iBremSl]) * (200 - par2[iEtaSl][iBremSl]));
237 
238  if (et > 5 && et < 200)
239  uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl] / (et - par2[iEtaSl][iBremSl]) +
240  par3[iEtaSl][iBremSl] / ((et - par2[iEtaSl][iBremSl]) * (et - par2[iEtaSl][iBremSl]));
241 
242  return (uncertainty * en);
243 }
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:66
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:181
double etaWidth() const
Definition: SuperCluster.h:67
double energy() const
cluster energy
Definition: CaloCluster.h:149
float ecalClusterEnergyUncertaintyElectronSpecific(reco::SuperCluster const &superCluster)