CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/RecoEgamma/EgammaElectronAlgos/src/EnergyUncertaintyElectronSpecific.cc

Go to the documentation of this file.
00001 #include "RecoEgamma/EgammaElectronAlgos/interface/EnergyUncertaintyElectronSpecific.h"
00002 #include "TMath.h"
00003 
00004 #include <iostream>
00005 
00006 
00007 EnergyUncertaintyElectronSpecific::EnergyUncertaintyElectronSpecific() {
00008 }
00009 
00010 EnergyUncertaintyElectronSpecific::~EnergyUncertaintyElectronSpecific()
00011  {}
00012 
00013 void EnergyUncertaintyElectronSpecific::init(  const edm::EventSetup& theEventSetup )
00014  {}
00015 
00016 double EnergyUncertaintyElectronSpecific::computeElectronEnergyUncertainty( reco::GsfElectron::Classification c, double eta, double brem, double energy)
00017  {
00018   if (c == reco::GsfElectron::GOLDEN) return computeElectronEnergyUncertainty_golden(eta,brem,energy) ;
00019   if (c == reco::GsfElectron::BIGBREM) return computeElectronEnergyUncertainty_bigbrem(eta,brem,energy) ;
00020   if (c == reco::GsfElectron::SHOWERING) return computeElectronEnergyUncertainty_showering(eta,brem,energy) ;
00021   if (c == reco::GsfElectron::BADTRACK) return computeElectronEnergyUncertainty_badtrack(eta,brem,energy) ;
00022   if (c == reco::GsfElectron::GAP) return computeElectronEnergyUncertainty_cracks(eta,brem,energy) ;
00023   throw cms::Exception("GsfElectronAlgo|InternalError")<<"unknown classification" ;
00024  }
00025 
00026 double EnergyUncertaintyElectronSpecific::computeElectronEnergyUncertainty_golden(double eta, double brem, double energy){
00027 
00028   double et = energy/cosh(eta);
00029 
00030   const int nBinsEta=5;
00031   const Double_t EtaBins[nBinsEta+1]  = {0.0, 0.4, 0.8, 1.5, 2.0, 2.5};
00032 
00033   const int nBinsBrem=6;
00034   const Double_t BremBins[nBinsBrem+1]= {0.8,  1.0, 1.1, 1.2, 1.3, 1.5, 8.0};
00035 
00036   float par0[nBinsEta][nBinsBrem];
00037   float par1[nBinsEta][nBinsBrem];
00038   float par2[nBinsEta][nBinsBrem];
00039 
00040   par0[0][0]=0.00567891;
00041   par1[0][0]=0.238685;
00042   par2[0][0]=2.12035;
00043 
00044   par0[0][1]=0.0065673;
00045   par1[0][1]=0.193642;
00046   par2[0][1]=3.41493;
00047 
00048   par0[0][2]=0.00574742;
00049   par1[0][2]=0.249171;
00050   par2[0][2]=1.7401;
00051 
00052   par0[0][3]=0.00542964;
00053   par1[0][3]=0.259997;
00054   par2[0][3]=1.46234;
00055 
00056   par0[0][4]=0.00523293;
00057   par1[0][4]=0.310505;
00058   par2[0][4]=0.233226;
00059 
00060   par0[0][5]=0.00547518;
00061   par1[0][5]=0.390506;
00062   par2[0][5]=-2.78168;
00063 
00064   par0[1][0]=0.00552517;
00065   par1[1][0]=0.288736;
00066   par2[1][0]=1.30552;
00067 
00068   par0[1][1]=0.00611188;
00069   par1[1][1]=0.312303;
00070   par2[1][1]=0.137905;
00071 
00072   par0[1][2]=0.0062729;
00073   par1[1][2]=0.294717;
00074   par2[1][2]=0.653793;
00075 
00076   par0[1][3]=0.00574846;
00077   par1[1][3]=0.294491;
00078   par2[1][3]=0.790746;
00079 
00080   par0[1][4]=0.00447373;
00081   par1[1][4]=0.379178;
00082   par2[1][4]=-1.42584;
00083 
00084   par0[1][5]=0.00595789;
00085   par1[1][5]=0.38164;
00086   par2[1][5]=-2.34653;
00087 
00088   par0[2][0]=0.00356679;
00089   par1[2][0]=0.456456;
00090   par2[2][0]=0.610716;
00091 
00092   par0[2][1]=0.00503827;
00093   par1[2][1]=0.394912;
00094   par2[2][1]=0.778879;
00095 
00096   par0[2][2]=0.00328016;
00097   par1[2][2]=0.541713;
00098   par2[2][2]=-1.58577;
00099 
00100   par0[2][3]=0.00592303;
00101   par1[2][3]=0.401744;
00102   par2[2][3]=1.45098;
00103 
00104   par0[2][4]=0.00512479;
00105   par1[2][4]=0.483151;
00106   par2[2][4]=-0.0985911;
00107 
00108   par0[2][5]=0.00484166;
00109   par1[2][5]=0.657995;
00110   par2[2][5]=-3.47167;
00111 
00112   par0[3][0]=0.0109195;
00113   par1[3][0]=1.13803;
00114   par2[3][0]=-3.48281;
00115 
00116   par0[3][1]=0.0102361;
00117   par1[3][1]=1.39866;
00118   par2[3][1]=-6.4736;
00119 
00120   par0[3][2]=0.0101576;
00121   par1[3][2]=1.51353;
00122   par2[3][2]=-8.03308;
00123 
00124   par0[3][3]=0.0120683;
00125   par1[3][3]=1.48587;
00126   par2[3][3]=-7.55974;
00127 
00128   par0[3][4]=0.0155326;
00129   par1[3][4]=1.49732;
00130   par2[3][4]=-7.98843;
00131 
00132   par0[3][5]=0.0225035;
00133   par1[3][5]=1.82363;
00134   par2[3][5]=-10.1027;
00135 
00136   par0[4][0]=0.0109632;
00137   par1[4][0]=0.458212;
00138   par2[4][0]=0.995183;
00139 
00140   par0[4][1]=0.0103342;
00141   par1[4][1]=0.628761;
00142   par2[4][1]=-2.42889;
00143 
00144   par0[4][2]=0.0103486;
00145   par1[4][2]=0.659144;
00146   par2[4][2]=-2.14073;
00147 
00148   par0[4][3]=0.00862762;
00149   par1[4][3]=0.929563;
00150   par2[4][3]=-6.27768;
00151 
00152   par0[4][4]=0.0111448;
00153   par1[4][4]=1.06724;
00154   par2[4][4]=-7.68512;
00155 
00156   par0[4][5]=0.0146648;
00157   par1[4][5]=1.6427;
00158   par2[4][5]=-13.3504;
00159 
00160 
00161   Int_t iEtaSl = -1;
00162   for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
00163     if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
00164       iEtaSl = iEta;
00165     }
00166   }
00167 
00168   Int_t iBremSl = -1;
00169   for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
00170     if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
00171       iBremSl = iBrem;
00172     }
00173   }
00174 
00175   if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
00176   if (brem<BremBins[0]) iBremSl = 0;
00177   if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
00178 
00179   float uncertainty = 0;
00180   if (et<5) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(5-par2[iEtaSl][iBremSl]);
00181   if (et>100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(100-par2[iEtaSl][iBremSl]);
00182 
00183   if (et>5 && et<100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(et-par2[iEtaSl][iBremSl]);
00184 
00185   return (uncertainty*energy);
00186 
00187 }
00188 
00189 double EnergyUncertaintyElectronSpecific::computeElectronEnergyUncertainty_bigbrem(double eta, double brem, double energy){
00190 
00191   double et = energy/cosh(eta);
00192 
00193   const int nBinsEta=4;
00194   const Double_t EtaBins[nBinsEta+1]  = {0.0,  0.8,  1.5,  2.0,  2.5};
00195 
00196   const int nBinsBrem=1;
00197   const Double_t BremBins[nBinsBrem+1]= {0.8,  8.0};
00198 
00199   float par0[nBinsEta][nBinsBrem];
00200   float par1[nBinsEta][nBinsBrem];
00201   float par2[nBinsEta][nBinsBrem];
00202   float par3[nBinsEta][nBinsBrem];
00203 
00204   par0[0][0]=0.00593389;
00205   par1[0][0]=0.178275;
00206   par2[0][0]=-7.28273;
00207   par3[0][0]=13.2632;
00208 
00209   par0[1][0]=0.00266954;
00210   par1[1][0]=0.811415;
00211   par2[1][0]=-1.66063;
00212   par3[1][0]=1.03555;
00213 
00214   par0[2][0]=0.00500623;
00215   par1[2][0]=2.34018;
00216   par2[2][0]=-11.0129;
00217   par3[2][0]=-0.200323;
00218 
00219   par0[3][0]=0.00841038;
00220   par1[3][0]=1.06851;
00221   par2[3][0]=-4.1259;
00222   par3[3][0]=-0.0646195;
00223 
00224 
00225   Int_t iEtaSl = -1;
00226   for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
00227     if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
00228       iEtaSl = iEta;
00229     }
00230   }
00231 
00232   Int_t iBremSl = -1;
00233   for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
00234     if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
00235       iBremSl = iBrem;
00236     }
00237   }
00238 
00239   if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
00240   if (brem<BremBins[0]) iBremSl = 0;
00241   if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
00242 
00243   float uncertainty = 0;
00244   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]));
00245   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]));
00246 
00247   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]));
00248 
00249   return (uncertainty*energy);
00250 
00251 }
00252 double EnergyUncertaintyElectronSpecific::computeElectronEnergyUncertainty_badtrack(double eta, double brem, double energy){
00253 
00254   double et = energy/cosh(eta);
00255 
00256   const int nBinsEta=4;
00257   const Double_t EtaBins[nBinsEta+1]  = {0.0, 0.7, 1.3, 1.8, 2.5};
00258 
00259   const int nBinsBrem=1;
00260   const Double_t BremBins[nBinsBrem+1]= {0.8,  8.0};
00261 
00262   float par0[nBinsEta][nBinsBrem];
00263   float par1[nBinsEta][nBinsBrem];
00264   float par2[nBinsEta][nBinsBrem];
00265   float par3[nBinsEta][nBinsBrem];
00266 
00267   par0[0][0]=0.00601311;
00268   par1[0][0]=0.390988;
00269   par2[0][0]=-4.11919;
00270   par3[0][0]=4.61671;
00271 
00272   par0[1][0]=0.0059814;
00273   par1[1][0]=1.02668;
00274   par2[1][0]=-2.87477;
00275   par3[1][0]=0.163447;
00276 
00277   par0[2][0]=0.00953032;
00278   par1[2][0]=2.27491;
00279   par2[2][0]=-7.61675;
00280   par3[2][0]=-0.335786;
00281 
00282   par0[3][0]=0.00728618;
00283   par1[3][0]=2.08268;
00284   par2[3][0]=-8.66756;
00285   par3[3][0]=-1.27831;
00286 
00287 
00288   Int_t iEtaSl = -1;
00289   for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
00290     if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
00291       iEtaSl = iEta;
00292     }
00293   }
00294 
00295   Int_t iBremSl = -1;
00296   for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
00297     if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
00298       iBremSl = iBrem;
00299     }
00300   }
00301 
00302   if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
00303   if (brem<BremBins[0]) iBremSl = 0;
00304   if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
00305 
00306   float uncertainty = 0;
00307   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]));
00308   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]));
00309 
00310   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]));
00311 
00312   return (uncertainty*energy);
00313 
00314 }
00315 
00316 double EnergyUncertaintyElectronSpecific::computeElectronEnergyUncertainty_showering(double eta, double brem, double energy){
00317 
00318   double et = energy/cosh(eta);
00319 
00320   const int nBinsEta=4;
00321   const Double_t EtaBins[nBinsEta+1]  = {0.0,  0.8,  1.2,  1.7,  2.5};
00322 
00323   const int nBinsBrem=5;
00324   const Double_t BremBins[nBinsBrem+1]= {0.8,  1.8,  2.2,  3.0,  4.0,  8.0};
00325 
00326   float par0[nBinsEta][nBinsBrem];
00327   float par1[nBinsEta][nBinsBrem];
00328   float par2[nBinsEta][nBinsBrem];
00329   float par3[nBinsEta][nBinsBrem];
00330 
00331   par0[0][0]=0.0049351;
00332   par1[0][0]=0.579925;
00333   par2[0][0]=-9.33987;
00334   par3[0][0]=1.62129;
00335 
00336   par0[0][1]=0.00566155;
00337   par1[0][1]=0.496137;
00338   par2[0][1]=-5.52543;
00339   par3[0][1]=1.19101;
00340 
00341   par0[0][2]=0.0051397;
00342   par1[0][2]=0.551947;
00343   par2[0][2]=-7.30079;
00344   par3[0][2]=1.89701;
00345 
00346   par0[0][3]=0.00468481;
00347   par1[0][3]=0.63011;
00348   par2[0][3]=-6.7722;
00349   par3[0][3]=1.81614;
00350 
00351   par0[0][4]=0.00444475;
00352   par1[0][4]=0.684261;
00353   par2[0][4]=-4.67614;
00354   par3[0][4]=1.64415;
00355 
00356   par0[1][0]=0.00201762;
00357   par1[1][0]=0.914762;
00358   par2[1][0]=-4.48042;
00359   par3[1][0]=-1.50473;
00360 
00361   par0[1][1]=0.00431475;
00362   par1[1][1]=0.824483;
00363   par2[1][1]=-5.02885;
00364   par3[1][1]=-0.153502;
00365 
00366   par0[1][2]=0.00501004;
00367   par1[1][2]=0.888521;
00368   par2[1][2]=-4.77311;
00369   par3[1][2]=-0.355145;
00370 
00371   par0[1][3]=0.00632666;
00372   par1[1][3]=0.960241;
00373   par2[1][3]=-3.36742;
00374   par3[1][3]=-1.16499;
00375 
00376   par0[1][4]=0.00636704;
00377   par1[1][4]=1.25728;
00378   par2[1][4]=-5.53561;
00379   par3[1][4]=-0.864123;
00380 
00381   par0[2][0]=-0.00729396;
00382   par1[2][0]=3.24295;
00383   par2[2][0]=-17.1458;
00384   par3[2][0]=-4.69711;
00385 
00386   par0[2][1]=0.00539783;
00387   par1[2][1]=1.72935;
00388   par2[2][1]=-5.92807;
00389   par3[2][1]=-2.18733;
00390 
00391   par0[2][2]=0.00608149;
00392   par1[2][2]=1.80606;
00393   par2[2][2]=-6.67563;
00394   par3[2][2]=-0.922401;
00395 
00396   par0[2][3]=0.00465335;
00397   par1[2][3]=2.13562;
00398   par2[2][3]=-10.1105;
00399   par3[2][3]=-0.230781;
00400 
00401   par0[2][4]=0.00642685;
00402   par1[2][4]=2.07592;
00403   par2[2][4]=-7.50257;
00404   par3[2][4]=-2.91515;
00405 
00406   par0[3][0]=0.0149449;
00407   par1[3][0]=1.00448;
00408   par2[3][0]=-2.09368;
00409   par3[3][0]=0.455037;
00410 
00411   par0[3][1]=0.0216691;
00412   par1[3][1]=1.18393;
00413   par2[3][1]=-4.56674;
00414   par3[3][1]=-0.601872;
00415 
00416   par0[3][2]=0.0255957;
00417   par1[3][2]=0.00775295;
00418   par2[3][2]=-44.2722;
00419   par3[3][2]=241.516;
00420 
00421   par0[3][3]=0.0206101;
00422   par1[3][3]=2.59246;
00423   par2[3][3]=-13.1702;
00424   par3[3][3]=-2.35024;
00425 
00426   par0[3][4]=0.0180508;
00427   par1[3][4]=3.1099;
00428   par2[3][4]=-13.6208;
00429   par3[3][4]=-2.11069;
00430 
00431 
00432   Int_t iEtaSl = -1;
00433   for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
00434     if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
00435       iEtaSl = iEta;
00436     }
00437   }
00438 
00439   Int_t iBremSl = -1;
00440   for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
00441     if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
00442       iBremSl = iBrem;
00443     }
00444   }
00445 
00446   if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
00447   if (brem<BremBins[0]) iBremSl = 0;
00448   if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
00449 
00450   float uncertainty = 0;
00451   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]));
00452   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]));
00453 
00454   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]));
00455 
00456   return (uncertainty*energy);
00457 
00458 }
00459 
00460 double EnergyUncertaintyElectronSpecific::computeElectronEnergyUncertainty_cracks(double eta, double brem, double energy){
00461 
00462   double et = energy/cosh(eta);
00463 
00464   const int nBinsEta=5;
00465   const Double_t EtaBins[nBinsEta+1]  = {0.0, 0.42, 0.78, 1.2, 1.52, 1.65};
00466 
00467   const int nBinsBrem=6;
00468   const Double_t BremBins[nBinsBrem+1]= {0.8, 1.2, 1.5, 2.1, 3., 4, 8.0};
00469 
00470   float par0[nBinsEta][nBinsBrem];
00471   float par1[nBinsEta][nBinsBrem];
00472   float par2[nBinsEta][nBinsBrem];
00473 
00474   par0[0][0]=0.0139815;
00475   par1[0][0]=0.569273;
00476   par2[0][0]=-4.31243;
00477 
00478   par0[0][1]=0.00550839;
00479   par1[0][1]=0.674654;
00480   par2[0][1]=-3.071;
00481 
00482   par0[0][2]=0.0108292;
00483   par1[0][2]=0.523128;
00484   par2[0][2]=-2.56702;
00485 
00486   par0[0][3]=0.00596201;
00487   par1[0][3]=1.02501;
00488   par2[0][3]=-7.74555;
00489 
00490   par0[0][4]=-0.00498136;
00491   par1[0][4]=1.75645;
00492   par2[0][4]=-21.3726;
00493 
00494   par0[0][5]=0.000621696;
00495   par1[0][5]=0.955191;
00496   par2[0][5]=-6.2189;
00497 
00498   par0[1][0]=0.00467498;
00499   par1[1][0]=0.697951;
00500   par2[1][0]=-6.56009;
00501 
00502   par0[1][1]=0.00808463;
00503   par1[1][1]=0.580628;
00504   par2[1][1]=-3.66067;
00505 
00506   par0[1][2]=0.00546665;
00507   par1[1][2]=0.814515;
00508   par2[1][2]=-7.8275;
00509 
00510   par0[1][3]=0.00506318;
00511   par1[1][3]=0.819975;
00512   par2[1][3]=-6.01641;
00513 
00514   par0[1][4]=0.00608425;
00515   par1[1][4]=0.829616;
00516   par2[1][4]=-7.85456;
00517 
00518   par0[1][5]=-4.45641e-06;
00519   par1[1][5]=1.18952;
00520   par2[1][5]=-8.27071;
00521 
00522   par0[2][0]=0.00971734;
00523   par1[2][0]=3.79446;
00524   par2[2][0]=-49.9996;
00525 
00526   par0[2][1]=0.00063951;
00527   par1[2][1]=2.47472;
00528   par2[2][1]=-25.0724;
00529 
00530   par0[2][2]=-0.0121618;
00531   par1[2][2]=5.12931;
00532   par2[2][2]=-49.985;
00533 
00534   par0[2][3]=-0.00604365;
00535   par1[2][3]=3.42497;
00536   par2[2][3]=-28.1932;
00537 
00538   par0[2][4]=0.00492161;
00539   par1[2][4]=1.84123;
00540   par2[2][4]=-10.6485;
00541 
00542   par0[2][5]=-0.00143907;
00543   par1[2][5]=2.3773;
00544   par2[2][5]=-15.4014;
00545 
00546   par0[3][0]=-0.0844907;
00547   par1[3][0]=19.9999;
00548   par2[3][0]=-39.9444;
00549 
00550   par0[3][1]=-0.0592498;
00551   par1[3][1]=10.4079;
00552   par2[3][1]=-25.1133;
00553 
00554   par0[3][2]=-0.0828631;
00555   par1[3][2]=16.6273;
00556   par2[3][2]=-49.9999;
00557 
00558   par0[3][3]=-0.0740798;
00559   par1[3][3]=15.9316;
00560   par2[3][3]=-50;
00561 
00562   par0[3][4]=-0.0698045;
00563   par1[3][4]=15.4883;
00564   par2[3][4]=-49.9998;
00565 
00566   par0[3][5]=-0.0699518;
00567   par1[3][5]=14.7306;
00568   par2[3][5]=-49.9998;
00569 
00570   par0[4][0]=-0.0999971;
00571   par1[4][0]=15.9122;
00572   par2[4][0]=-30.1268;
00573 
00574   par0[4][1]=-0.0999996;
00575   par1[4][1]=18.5882;
00576   par2[4][1]=-42.6113;
00577 
00578   par0[4][2]=-0.0989356;
00579   par1[4][2]=19.9996;
00580   par2[4][2]=-46.6999;
00581 
00582   par0[4][3]=-0.0999965;
00583   par1[4][3]=19.9999;
00584   par2[4][3]=-47.074;
00585 
00586   par0[4][4]=-0.0833049;
00587   par1[4][4]=18.2281;
00588   par2[4][4]=-49.9995;
00589 
00590   par0[4][5]=-0.020072;
00591   par1[4][5]=8.1587;
00592   par2[4][5]=-25.2897;
00593 
00594 
00595   Int_t iEtaSl = -1;
00596   for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
00597     if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
00598       iEtaSl = iEta;
00599     }
00600   }
00601 
00602   Int_t iBremSl = -1;
00603   for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
00604     if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
00605       iBremSl = iBrem;
00606     }
00607   }
00608 
00609   if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
00610   if (brem<BremBins[0]) iBremSl = 0;
00611   if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
00612 
00613   float uncertainty = 0;
00614   if (et<5) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(5-par2[iEtaSl][iBremSl]);
00615   if (et>100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(100-par2[iEtaSl][iBremSl]);
00616 
00617   if (et>5 && et<100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(et-par2[iEtaSl][iBremSl]);
00618 
00619   return (uncertainty*energy);
00620 
00621 }