23 throw cms::Exception(
"GsfElectronAlgo|InternalError")<<
"unknown classification" ;
28 double et = energy/cosh(eta);
34 constexpr Double_t BremBins[nBinsBrem+1]= {0.8, 1.0, 1.1, 1.2, 1.3, 1.5, 8.0};
72 static_assert(par0[0][0] == 0.00567891
f);
73 static_assert(par0[0][1] == 0.0065673
f);
74 static_assert(par0[1][3] == 0.00574846
f);
112 constexpr float par2[nBinsEta][nBinsBrem] = {
149 for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
150 if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
156 for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
157 if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
162 if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
163 if (brem<BremBins[0]) iBremSl = 0;
164 if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
167 edm::LogError(
"BadRange")<<
"Bad eta value: "<<eta<<
" in computeElectronEnergyUncertainty_golden";
172 edm::LogError(
"BadRange")<<
"Bad brem value: "<<brem<<
" in computeElectronEnergyUncertainty_golden";
176 float uncertainty = 0;
177 if (et<5) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(5-par2[iEtaSl][iBremSl]);
178 if (et>100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(100-par2[iEtaSl][iBremSl]);
180 if (et>5 && et<100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(et-par2[iEtaSl][iBremSl]);
182 return (uncertainty*energy);
188 const double et = energy/cosh(eta);
194 constexpr Double_t BremBins[nBinsBrem+1]= {0.8, 8.0};
197 {{0.00593389}, {0.00266954},
198 {0.00500623}, {0.00841038} };
206 constexpr float par2[nBinsEta][nBinsBrem] =
212 constexpr float par3[nBinsEta][nBinsBrem] =
220 for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
221 if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
227 for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
228 if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
233 if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
234 if (brem<BremBins[0]) iBremSl = 0;
235 if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
238 edm::LogError(
"BadRange")<<
"Bad eta value: "<<eta<<
" in computeElectronEnergyUncertainty_bigbrem";
243 edm::LogError(
"BadRange")<<
"Bad brem value: "<<brem<<
" in computeElectronEnergyUncertainty_bigbrem";
247 float uncertainty = 0;
248 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]));
249 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]));
251 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]));
253 return (uncertainty*energy);
258 const double et = energy/cosh(eta);
264 constexpr Double_t BremBins[nBinsBrem+1]= {0.8, 8.0};
278 constexpr float par2[nBinsEta][nBinsBrem] =
284 constexpr float par3[nBinsEta][nBinsBrem]=
291 for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
292 if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
298 for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
299 if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
304 if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
305 if (brem<BremBins[0]) iBremSl = 0;
306 if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
309 edm::LogError(
"BadRange")<<
"Bad eta value: "<<eta<<
" in computeElectronEnergyUncertainty_badtrack";
314 edm::LogError(
"BadRange")<<
"Bad brem value: "<<brem<<
" in computeElectronEnergyUncertainty_badtrack";
318 float uncertainty = 0;
319 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]));
320 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]));
322 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]));
324 return (uncertainty*energy);
330 const double et = energy/cosh(eta);
336 constexpr Double_t BremBins[nBinsBrem+1]= {0.8, 1.8, 2.2, 3.0, 4.0, 8.0};
388 constexpr float par2[nBinsEta][nBinsBrem] = {
413 constexpr float par3[nBinsEta][nBinsBrem] = {
439 for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
440 if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
446 for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
447 if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
452 if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
453 if (brem<BremBins[0]) iBremSl = 0;
454 if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
457 edm::LogError(
"BadRange")<<
"Bad eta value: "<<eta<<
" in computeElectronEnergyUncertainty_showering";
462 edm::LogError(
"BadRange")<<
"Bad brem value: "<<brem<<
" in computeElectronEnergyUncertainty_showering";
466 float uncertainty = 0;
467 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]));
468 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]));
470 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]));
472 return (uncertainty*energy);
478 const double et = energy/cosh(eta);
481 constexpr Double_t
EtaBins[nBinsEta+1] = {0.0, 0.42, 0.78, 1.2, 1.52, 1.65};
484 constexpr Double_t BremBins[nBinsBrem+1]= {0.8, 1.2, 1.5, 2.1, 3., 4, 8.0};
558 constexpr float par2[nBinsEta][nBinsBrem] = {
595 static_assert(par0[0][3]==0.00596201
f);
596 static_assert(par1[0][3]==1.02501
f);
597 static_assert(par2[0][3]==-7.74555
f);
600 static_assert(par0[2][4]==0.00492161
f);
601 static_assert(par1[2][4]==1.84123
f);
602 static_assert(par2[2][4]==-10.6485
f);
604 static_assert(par0[4][3]==-0.0999965
f);
605 static_assert(par1[4][3]==19.9999
f);
606 static_assert(par2[4][3]==-47.074
f);
609 for (Int_t iEta = 0; iEta < nBinsEta; ++iEta){
610 if ( EtaBins[iEta] <= fabs(eta) && fabs(eta) <EtaBins[iEta+1] ){
616 for (Int_t iBrem = 0; iBrem < nBinsBrem; ++iBrem){
617 if ( BremBins[iBrem] <= brem && brem <BremBins[iBrem+1] ){
622 if (fabs(eta)>2.5) iEtaSl = nBinsEta-1;
623 if (brem<BremBins[0]) iBremSl = 0;
624 if (brem>BremBins[nBinsBrem-1]) iBremSl = nBinsBrem-1;
627 edm::LogError(
"BadRange")<<
"Bad eta value: "<<eta<<
" in computeElectronEnergyUncertainty_cracks";
632 edm::LogError(
"BadRange")<<
"Bad brem value: "<<brem<<
" in computeElectronEnergyUncertainty_cracks";
636 float uncertainty = 0;
637 if (et<5) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(5-par2[iEtaSl][iBremSl]);
638 if (et>100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(100-par2[iEtaSl][iBremSl]);
640 if (et>5 && et<100) uncertainty = par0[iEtaSl][iBremSl] + par1[iEtaSl][iBremSl]/(et-par2[iEtaSl][iBremSl]);
642 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()