23 throw cms::Exception(
"GsfElectronAlgo|InternalError")<<
"unknown classification" ;
28 double et = energy/cosh(eta);
31 const Double_t
EtaBins[nBinsEta+1] = {0.0, 0.4, 0.8, 1.5, 2.0, 2.5};
33 const int nBinsBrem=6;
34 const Double_t BremBins[nBinsBrem+1]= {0.8, 1.0, 1.1, 1.2, 1.3, 1.5, 8.0};
36 float par0[nBinsEta][nBinsBrem];
37 float par1[nBinsEta][nBinsBrem];
38 float par2[nBinsEta][nBinsBrem];
40 par0[0][0]=0.00567891;
48 par0[0][2]=0.00574742;
52 par0[0][3]=0.00542964;
56 par0[0][4]=0.00523293;
60 par0[0][5]=0.00547518;
64 par0[1][0]=0.00552517;
68 par0[1][1]=0.00611188;
76 par0[1][3]=0.00574846;
80 par0[1][4]=0.00447373;
84 par0[1][5]=0.00595789;
88 par0[2][0]=0.00356679;
92 par0[2][1]=0.00503827;
96 par0[2][2]=0.00328016;
100 par0[2][3]=0.00592303;
104 par0[2][4]=0.00512479;
106 par2[2][4]=-0.0985911;
108 par0[2][5]=0.00484166;
112 par0[3][0]=0.0109195;
116 par0[3][1]=0.0102361;
120 par0[3][2]=0.0101576;
124 par0[3][3]=0.0120683;
128 par0[3][4]=0.0155326;
132 par0[3][5]=0.0225035;
136 par0[4][0]=0.0109632;
140 par0[4][1]=0.0103342;
144 par0[4][2]=0.0103486;
148 par0[4][3]=0.00862762;
152 par0[4][4]=0.0111448;
156 par0[4][5]=0.0146648;
162 for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
163 if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
169 for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
170 if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
175 if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
176 if (brem<BremBins[0]) iBremSl = 0;
177 if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
179 float uncertainty = 0;
180 if (et<5) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(5-par2[iEtaSl][iBremSl]);
181 if (et>100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(100-par2[iEtaSl][iBremSl]);
183 if (et>5 && et<100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(et-par2[iEtaSl][iBremSl]);
185 return (uncertainty*energy);
191 double et = energy/cosh(eta);
193 const int nBinsEta=4;
194 const Double_t
EtaBins[nBinsEta+1] = {0.0, 0.8, 1.5, 2.0, 2.5};
196 const int nBinsBrem=1;
197 const Double_t BremBins[nBinsBrem+1]= {0.8, 8.0};
199 float par0[nBinsEta][nBinsBrem];
200 float par1[nBinsEta][nBinsBrem];
201 float par2[nBinsEta][nBinsBrem];
202 float par3[nBinsEta][nBinsBrem];
204 par0[0][0]=0.00593389;
209 par0[1][0]=0.00266954;
214 par0[2][0]=0.00500623;
217 par3[2][0]=-0.200323;
219 par0[3][0]=0.00841038;
222 par3[3][0]=-0.0646195;
226 for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
227 if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
233 for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
234 if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
239 if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
240 if (brem<BremBins[0]) iBremSl = 0;
241 if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
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>100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(100-par2[iEtaSl][iBremSl]) + par3[iEtaSl][iBremSl]/((100-par2[iEtaSl][iBremSl])*(100-par2[iEtaSl][iBremSl]));
247 if (et>5 && et<100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(et-par2[iEtaSl][iBremSl]) + par3[iEtaSl][iBremSl]/((et-par2[iEtaSl][iBremSl])*(et-par2[iEtaSl][iBremSl]));
249 return (uncertainty*energy);
254 double et = energy/cosh(eta);
256 const int nBinsEta=4;
257 const Double_t
EtaBins[nBinsEta+1] = {0.0, 0.7, 1.3, 1.8, 2.5};
259 const int nBinsBrem=1;
260 const Double_t BremBins[nBinsBrem+1]= {0.8, 8.0};
262 float par0[nBinsEta][nBinsBrem];
263 float par1[nBinsEta][nBinsBrem];
264 float par2[nBinsEta][nBinsBrem];
265 float par3[nBinsEta][nBinsBrem];
267 par0[0][0]=0.00601311;
272 par0[1][0]=0.0059814;
277 par0[2][0]=0.00953032;
280 par3[2][0]=-0.335786;
282 par0[3][0]=0.00728618;
289 for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
290 if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
296 for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
297 if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
302 if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
303 if (brem<BremBins[0]) iBremSl = 0;
304 if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
306 float uncertainty = 0;
307 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]));
308 if (et>100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(100-par2[iEtaSl][iBremSl]) + par3[iEtaSl][iBremSl]/((100-par2[iEtaSl][iBremSl])*(100-par2[iEtaSl][iBremSl]));
310 if (et>5 && et<100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(et-par2[iEtaSl][iBremSl]) + par3[iEtaSl][iBremSl]/((et-par2[iEtaSl][iBremSl])*(et-par2[iEtaSl][iBremSl]));
312 return (uncertainty*energy);
318 double et = energy/cosh(eta);
320 const int nBinsEta=4;
321 const Double_t
EtaBins[nBinsEta+1] = {0.0, 0.8, 1.2, 1.7, 2.5};
323 const int nBinsBrem=5;
324 const Double_t BremBins[nBinsBrem+1]= {0.8, 1.8, 2.2, 3.0, 4.0, 8.0};
326 float par0[nBinsEta][nBinsBrem];
327 float par1[nBinsEta][nBinsBrem];
328 float par2[nBinsEta][nBinsBrem];
329 float par3[nBinsEta][nBinsBrem];
331 par0[0][0]=0.0049351;
336 par0[0][1]=0.00566155;
341 par0[0][2]=0.0051397;
346 par0[0][3]=0.00468481;
351 par0[0][4]=0.00444475;
356 par0[1][0]=0.00201762;
361 par0[1][1]=0.00431475;
364 par3[1][1]=-0.153502;
366 par0[1][2]=0.00501004;
369 par3[1][2]=-0.355145;
371 par0[1][3]=0.00632666;
376 par0[1][4]=0.00636704;
379 par3[1][4]=-0.864123;
381 par0[2][0]=-0.00729396;
386 par0[2][1]=0.00539783;
391 par0[2][2]=0.00608149;
394 par3[2][2]=-0.922401;
396 par0[2][3]=0.00465335;
399 par3[2][3]=-0.230781;
401 par0[2][4]=0.00642685;
406 par0[3][0]=0.0149449;
411 par0[3][1]=0.0216691;
414 par3[3][1]=-0.601872;
416 par0[3][2]=0.0255957;
417 par1[3][2]=0.00775295;
421 par0[3][3]=0.0206101;
426 par0[3][4]=0.0180508;
433 for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
434 if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
440 for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
441 if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
446 if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
447 if (brem<BremBins[0]) iBremSl = 0;
448 if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
450 float uncertainty = 0;
451 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]));
452 if (et>100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(100-par2[iEtaSl][iBremSl]) + par3[iEtaSl][iBremSl]/((100-par2[iEtaSl][iBremSl])*(100-par2[iEtaSl][iBremSl]));
454 if (et>5 && et<100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(et-par2[iEtaSl][iBremSl]) + par3[iEtaSl][iBremSl]/((et-par2[iEtaSl][iBremSl])*(et-par2[iEtaSl][iBremSl]));
456 return (uncertainty*energy);
462 double et = energy/cosh(eta);
464 const int nBinsEta=5;
465 const Double_t
EtaBins[nBinsEta+1] = {0.0, 0.42, 0.78, 1.2, 1.52, 1.65};
467 const int nBinsBrem=6;
468 const Double_t BremBins[nBinsBrem+1]= {0.8, 1.2, 1.5, 2.1, 3., 4, 8.0};
470 float par0[nBinsEta][nBinsBrem];
471 float par1[nBinsEta][nBinsBrem];
472 float par2[nBinsEta][nBinsBrem];
474 par0[0][0]=0.0139815;
478 par0[0][1]=0.00550839;
482 par0[0][2]=0.0108292;
486 par0[0][3]=0.00596201;
490 par0[0][4]=-0.00498136;
494 par0[0][5]=0.000621696;
498 par0[1][0]=0.00467498;
502 par0[1][1]=0.00808463;
506 par0[1][2]=0.00546665;
510 par0[1][3]=0.00506318;
514 par0[1][4]=0.00608425;
518 par0[1][5]=-4.45641e-06;
522 par0[2][0]=0.00971734;
526 par0[2][1]=0.00063951;
530 par0[2][2]=-0.0121618;
534 par0[2][3]=-0.00604365;
538 par0[2][4]=0.00492161;
542 par0[2][5]=-0.00143907;
546 par0[3][0]=-0.0844907;
550 par0[3][1]=-0.0592498;
554 par0[3][2]=-0.0828631;
558 par0[3][3]=-0.0740798;
562 par0[3][4]=-0.0698045;
566 par0[3][5]=-0.0699518;
570 par0[4][0]=-0.0999971;
574 par0[4][1]=-0.0999996;
578 par0[4][2]=-0.0989356;
582 par0[4][3]=-0.0999965;
586 par0[4][4]=-0.0833049;
590 par0[4][5]=-0.020072;
596 for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
597 if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
603 for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
604 if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
609 if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
610 if (brem<BremBins[0]) iBremSl = 0;
611 if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
613 float uncertainty = 0;
614 if (et<5) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(5-par2[iEtaSl][iBremSl]);
615 if (et>100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(100-par2[iEtaSl][iBremSl]);
617 if (et>5 && et<100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(et-par2[iEtaSl][iBremSl]);
619 return (uncertainty*energy);
void init(const edm::EventSetup &theEventSetup)
double computeElectronEnergyUncertainty_badtrack(double eta, double brem, double energy)
double computeElectronEnergyUncertainty_cracks(double eta, double brem, double energy)
EnergyUncertaintyElectronSpecific()
double computeElectronEnergyUncertainty_showering(double eta, double brem, double energy)
double computeElectronEnergyUncertainty(reco::GsfElectron::Classification c, double eta, double brem, double energy)
et
define resolution functions of each parameter
double computeElectronEnergyUncertainty_golden(double eta, double brem, double energy)
double computeElectronEnergyUncertainty_bigbrem(double eta, double brem, double energy)
~EnergyUncertaintyElectronSpecific()