Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:17

0001 #ifndef STANDALONE_ECALCORR
0002 #include "EgammaAnalysis/ElectronTools/interface/EcalIsolationCorrector.h"
0003 #else
0004 #include "EcalIsolationCorrector.h"
0005 #endif
0006 
0007 EcalIsolationCorrector::EcalIsolationCorrector(bool forElectrons) : isElectron_(forElectrons) {}
0008 
0009 EcalIsolationCorrector::RunRange EcalIsolationCorrector::checkRunRange(int runNumber) {
0010   EcalIsolationCorrector::RunRange runRange = RunAB;
0011 
0012   if (runNumber <= 203755 && runNumber > 197770)
0013     runRange = RunC;
0014   else if (runNumber > 203755)
0015     runRange = RunD;
0016 
0017   return runRange;
0018 }
0019 
0020 float EcalIsolationCorrector::correctForNoise(float iso,
0021                                               bool isBarrel,
0022                                               EcalIsolationCorrector::RunRange runRange,
0023                                               bool isData) {
0024   float result = iso;
0025 
0026   if (!isElectron_) {
0027     if (!isData) {
0028       if (runRange == RunAB) {
0029         if (!isBarrel)
0030           result = (iso - 0.2827) / 1.0949;
0031         else
0032           result = (iso - 0.0931) / 1.0738;
0033       } else if (runRange == RunC) {
0034         if (!isBarrel)
0035           result = (iso - 0.5690) / 0.9217;
0036         else
0037           result = (iso - 0.1824) / 0.9279;
0038       } else if (runRange == RunD) {
0039         if (!isBarrel)
0040           result = (iso - 0.9997) / 0.8781;
0041         else
0042           result = (iso - 0.0944) / 0.8140;
0043       }
0044     } else {
0045       std::cout << "Warning: you should correct MC to data" << std::endl;
0046     }
0047   } else {
0048     if (!isData) {
0049       if (runRange == RunAB) {
0050         if (!isBarrel)
0051           result = (iso + 0.1174) / 1.0012;
0052         else
0053           result = (iso + 0.2736) / 0.9948;
0054       } else if (runRange == RunC) {
0055         if (!isBarrel)
0056           result = (iso + 0.2271) / 0.9684;
0057         else
0058           result = (iso + 0.5962) / 0.9568;
0059       } else if (runRange == RunD) {
0060         if (!isBarrel)
0061           result = (iso + 0.2907) / 1.0005;
0062         else
0063           result = (iso + 0.9098) / 0.9395;
0064       }
0065     } else {
0066       std::cout << "Warning: you should correct MC to data" << std::endl;
0067     }
0068   }
0069 
0070   return result;
0071 }
0072 
0073 #ifndef STANDALONE_ECALCORR
0074 // GSF Electron Methods
0075 float EcalIsolationCorrector::correctForNoise(reco::GsfElectron e, int runNumber, bool isData) {
0076   if (!isElectron_)
0077     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0078 
0079   float iso = e.dr03EcalRecHitSumEt();
0080   EcalIsolationCorrector::RunRange runRange = checkRunRange(runNumber);
0081 
0082   return correctForNoise(iso, e.isEB(), runRange, isData);
0083 }
0084 
0085 float EcalIsolationCorrector::correctForNoise(reco::GsfElectron e, std::string runName, bool isData) {
0086   if (!isElectron_)
0087     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0088 
0089   float iso = e.dr03EcalRecHitSumEt();
0090   EcalIsolationCorrector::RunRange runRange = RunAB;
0091 
0092   if (runName == "RunAB")
0093     runRange = RunAB;
0094   else if (runName == "RunC")
0095     runRange = RunC;
0096   else if (runName == "RunD")
0097     runRange = RunD;
0098   else {
0099     std::cerr << "Error: Unknown run range " << runName << std::endl;
0100     abort();
0101   }
0102 
0103   return correctForNoise(iso, e.isEB(), runRange, isData);
0104 }
0105 
0106 float EcalIsolationCorrector::correctForNoise(
0107     reco::GsfElectron e, bool isData, float intL_AB, float intL_C, float intL_D) {
0108   if (!isElectron_)
0109     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0110 
0111   float iso = e.dr03EcalRecHitSumEt();
0112   float combination =
0113       (intL_AB * correctForNoise(iso, e.isEB(), RunAB, isData) + intL_C * correctForNoise(iso, e.isEB(), RunC, isData) +
0114        intL_D * correctForNoise(iso, e.isEB(), RunD, isData)) /
0115       (intL_AB + intL_C + intL_D);
0116 
0117   return combination;
0118 }
0119 
0120 // PAT Electron Methods
0121 float EcalIsolationCorrector::correctForNoise(pat::Electron e, int runNumber, bool isData) {
0122   if (!isElectron_)
0123     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0124 
0125   float iso = e.dr03EcalRecHitSumEt();
0126   EcalIsolationCorrector::RunRange runRange = checkRunRange(runNumber);
0127 
0128   return correctForNoise(iso, e.isEB(), runRange, isData);
0129 }
0130 
0131 float EcalIsolationCorrector::correctForNoise(pat::Electron e, std::string runName, bool isData) {
0132   if (!isElectron_)
0133     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0134 
0135   float iso = e.dr03EcalRecHitSumEt();
0136   EcalIsolationCorrector::RunRange runRange = RunAB;
0137 
0138   if (runName == "RunAB")
0139     runRange = RunAB;
0140   else if (runName == "RunC")
0141     runRange = RunC;
0142   else if (runName == "RunD")
0143     runRange = RunD;
0144   else {
0145     std::cerr << "Error: Unknown run range " << runName << std::endl;
0146     abort();
0147   }
0148 
0149   return correctForNoise(iso, e.isEB(), runRange, isData);
0150 }
0151 
0152 float EcalIsolationCorrector::correctForNoise(pat::Electron e, bool isData, float intL_AB, float intL_C, float intL_D) {
0153   if (!isElectron_)
0154     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0155 
0156   float iso = e.dr03EcalRecHitSumEt();
0157   float combination =
0158       (intL_AB * correctForNoise(iso, e.isEB(), RunAB, isData) + intL_C * correctForNoise(iso, e.isEB(), RunC, isData) +
0159        intL_D * correctForNoise(iso, e.isEB(), RunD, isData)) /
0160       (intL_AB + intL_C + intL_D);
0161 
0162   return combination;
0163 }
0164 
0165 // RECO Photon Method
0166 float EcalIsolationCorrector::correctForNoise(reco::Photon p, int runNumber, bool isData) {
0167   if (isElectron_)
0168     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0169 
0170   float iso = p.ecalRecHitSumEtConeDR03();
0171   EcalIsolationCorrector::RunRange runRange = checkRunRange(runNumber);
0172 
0173   return correctForNoise(iso, p.isEB(), runRange, isData);
0174 }
0175 
0176 float EcalIsolationCorrector::correctForNoise(reco::Photon p, std::string runName, bool isData) {
0177   if (isElectron_)
0178     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0179 
0180   float iso = p.ecalRecHitSumEtConeDR03();
0181   EcalIsolationCorrector::RunRange runRange = RunAB;
0182 
0183   if (runName == "RunAB")
0184     runRange = RunAB;
0185   else if (runName == "RunC")
0186     runRange = RunC;
0187   else if (runName == "RunD")
0188     runRange = RunD;
0189   else {
0190     std::cerr << "Error: Unknown run range " << runName << std::endl;
0191     abort();
0192   }
0193 
0194   return correctForNoise(iso, p.isEB(), runRange, isData);
0195 }
0196 
0197 float EcalIsolationCorrector::correctForNoise(reco::Photon p, bool isData, float intL_AB, float intL_C, float intL_D) {
0198   if (isElectron_)
0199     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0200 
0201   float iso = p.ecalRecHitSumEtConeDR03();
0202   float combination =
0203       (intL_AB * correctForNoise(iso, p.isEB(), RunAB, isData) + intL_C * correctForNoise(iso, p.isEB(), RunC, isData) +
0204        intL_D * correctForNoise(iso, p.isEB(), RunD, isData)) /
0205       (intL_AB + intL_C + intL_D);
0206 
0207   return combination;
0208 }
0209 
0210 // PAT Photon Method
0211 float EcalIsolationCorrector::correctForNoise(pat::Photon p, int runNumber, bool isData) {
0212   if (isElectron_)
0213     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0214 
0215   float iso = p.ecalRecHitSumEtConeDR03();
0216   EcalIsolationCorrector::RunRange runRange = checkRunRange(runNumber);
0217 
0218   return correctForNoise(iso, p.isEB(), runRange, isData);
0219 }
0220 
0221 float EcalIsolationCorrector::correctForNoise(pat::Photon p, std::string runName, bool isData) {
0222   if (isElectron_)
0223     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0224 
0225   float iso = p.ecalRecHitSumEtConeDR03();
0226   EcalIsolationCorrector::RunRange runRange = RunAB;
0227 
0228   if (runName == "RunAB")
0229     runRange = RunAB;
0230   else if (runName == "RunC")
0231     runRange = RunC;
0232   else if (runName == "RunD")
0233     runRange = RunD;
0234   else {
0235     std::cerr << "Error: Unknown run range " << runName << std::endl;
0236     abort();
0237   }
0238 
0239   return correctForNoise(iso, p.isEB(), runRange, isData);
0240 }
0241 
0242 float EcalIsolationCorrector::correctForNoise(pat::Photon p, bool isData, float intL_AB, float intL_C, float intL_D) {
0243   if (isElectron_)
0244     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0245 
0246   float iso = p.ecalRecHitSumEtConeDR03();
0247   float combination =
0248       (intL_AB * correctForNoise(iso, p.isEB(), RunAB, isData) + intL_C * correctForNoise(iso, p.isEB(), RunC, isData) +
0249        intL_D * correctForNoise(iso, p.isEB(), RunD, isData)) /
0250       (intL_AB + intL_C + intL_D);
0251 
0252   return combination;
0253 }
0254 #else
0255 float EcalIsolationCorrector::correctForNoise(float iso, bool isBarrel, int runNumber, bool isData) {
0256   EcalIsolationCorrector::RunRange runRange = checkRunRange(runNumber);
0257 
0258   return correctForNoise(iso, isBarrel, runRange, isData);
0259 }
0260 
0261 float EcalIsolationCorrector::correctForNoise(float iso, bool isBarrel, std::string runName, bool isData) {
0262   EcalIsolationCorrector::RunRange runRange = RunAB;
0263 
0264   if (runName == "RunAB")
0265     runRange = RunAB;
0266   else if (runName == "RunC")
0267     runRange = RunC;
0268   else if (runName == "RunD")
0269     runRange = RunD;
0270   else {
0271     std::cerr << "Error: Unknown run range " << runName << std::endl;
0272     abort();
0273   }
0274 
0275   return correctForNoise(iso, isBarrel, runRange, isData);
0276 }
0277 
0278 float EcalIsolationCorrector::correctForNoise(
0279     float iso, bool isBarrel, bool isData, float intL_AB, float intL_C, float intL_D) {
0280   float combination =
0281       (intL_AB * correctForNoise(iso, isBarrel, RunAB, isData) + intL_C * correctForNoise(iso, isBarrel, RunC, isData) +
0282        intL_D * correctForNoise(iso, isBarrel, RunD, isData)) /
0283       (intL_AB + intL_C + intL_D);
0284 
0285   return combination;
0286 }
0287 #endif
0288 
0289 float EcalIsolationCorrector::correctForHLTDefinition(float iso,
0290                                                       bool isBarrel,
0291                                                       EcalIsolationCorrector::RunRange runRange) {
0292   float result = iso;
0293 
0294   if (!isElectron_) {
0295     if (runRange == RunAB) {
0296       if (!isBarrel)
0297         result = iso * 0.8499 - 0.6510;
0298       else
0299         result = iso * 0.8504 - 0.5658;
0300     } else if (runRange == RunC) {
0301       if (!isBarrel)
0302         result = iso * 0.9346 - 0.9987;
0303       else
0304         result = iso * 0.8529 - 0.6816;
0305     } else if (runRange == RunD) {
0306       if (!isBarrel)
0307         result = iso * 0.8318 - 0.9999;
0308       else
0309         result = iso * 0.8853 - 0.8783;
0310     }
0311   } else {
0312     if (runRange == RunAB) {
0313       if (!isBarrel)
0314         result = iso * 0.9849 - 0.6871;
0315       else
0316         result = iso * 0.8542 - 0.3558;
0317     } else if (runRange == RunC) {
0318       if (!isBarrel)
0319         result = iso * 0.9996 - 0.8485;
0320       else
0321         result = iso * 0.9994 - 0.5085;
0322     } else if (runRange == RunD) {
0323       if (!isBarrel)
0324         result = iso * 0.9467 - 0.9998;
0325       else
0326         result = iso * 0.8574 - 0.4862;
0327     }
0328   }
0329 
0330   return result;
0331 }
0332 
0333 #ifndef STANDALONE_ECALCORR
0334 // GSF Electron Methods
0335 float EcalIsolationCorrector::correctForHLTDefinition(reco::GsfElectron e, int runNumber, bool isData) {
0336   if (!isElectron_)
0337     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0338 
0339   float iso = e.dr03EcalRecHitSumEt();
0340   EcalIsolationCorrector::RunRange runRange = checkRunRange(runNumber);
0341 
0342   if (!isData)
0343     iso = correctForNoise(iso, e.isEB(), runRange, false);
0344 
0345   return correctForHLTDefinition(iso, e.isEB(), runRange);
0346 }
0347 
0348 float EcalIsolationCorrector::correctForHLTDefinition(reco::GsfElectron e, std::string runName, bool isData) {
0349   if (!isElectron_)
0350     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0351 
0352   float iso = e.dr03EcalRecHitSumEt();
0353   EcalIsolationCorrector::RunRange runRange = RunAB;
0354   if (runName == "RunAB")
0355     runRange = RunAB;
0356   else if (runName == "RunC")
0357     runRange = RunC;
0358   else if (runName == "RunD")
0359     runRange = RunD;
0360   else {
0361     std::cerr << "Error: Unknown run range " << runName << std::endl;
0362     abort();
0363   }
0364 
0365   if (!isData)
0366     iso = correctForNoise(iso, e.isEB(), runRange, false);
0367 
0368   return correctForHLTDefinition(iso, e.isEB(), runRange);
0369 }
0370 
0371 float EcalIsolationCorrector::correctForHLTDefinition(
0372     reco::GsfElectron e, bool isData, float intL_AB, float intL_C, float intL_D) {
0373   if (!isElectron_)
0374     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0375 
0376   float iso = e.dr03EcalRecHitSumEt();
0377   if (!isData)
0378     iso = correctForNoise(e, isData, intL_AB, intL_C, intL_D);
0379 
0380   float combination =
0381       (intL_AB * correctForHLTDefinition(iso, e.isEB(), RunAB) + intL_C * correctForHLTDefinition(iso, e.isEB(), RunC) +
0382        intL_D * correctForHLTDefinition(iso, e.isEB(), RunD)) /
0383       (intL_AB + intL_C + intL_D);
0384 
0385   return combination;
0386 }
0387 
0388 // PAT Electron Methods
0389 float EcalIsolationCorrector::correctForHLTDefinition(pat::Electron e, int runNumber, bool isData) {
0390   if (!isElectron_)
0391     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0392 
0393   float iso = e.dr03EcalRecHitSumEt();
0394   EcalIsolationCorrector::RunRange runRange = checkRunRange(runNumber);
0395 
0396   if (!isData)
0397     iso = correctForNoise(iso, e.isEB(), runRange, false);
0398 
0399   return correctForHLTDefinition(iso, e.isEB(), runRange);
0400 }
0401 
0402 float EcalIsolationCorrector::correctForHLTDefinition(pat::Electron e, std::string runName, bool isData) {
0403   if (!isElectron_)
0404     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0405 
0406   float iso = e.dr03EcalRecHitSumEt();
0407   EcalIsolationCorrector::RunRange runRange = RunAB;
0408   if (runName == "RunAB")
0409     runRange = RunAB;
0410   else if (runName == "RunC")
0411     runRange = RunC;
0412   else if (runName == "RunD")
0413     runRange = RunD;
0414   else {
0415     std::cerr << "Error: Unknown run range " << runName << std::endl;
0416     abort();
0417   }
0418 
0419   if (!isData)
0420     iso = correctForNoise(iso, e.isEB(), runRange, false);
0421 
0422   return correctForHLTDefinition(iso, e.isEB(), runRange);
0423 }
0424 
0425 float EcalIsolationCorrector::correctForHLTDefinition(
0426     pat::Electron e, bool isData, float intL_AB, float intL_C, float intL_D) {
0427   if (!isElectron_)
0428     std::cerr << "Warning: this corrector is setup for photons and you are passing an electron !" << std::endl;
0429 
0430   float iso = e.dr03EcalRecHitSumEt();
0431   if (!isData)
0432     iso = correctForNoise(e, isData, intL_AB, intL_C, intL_D);
0433 
0434   float combination =
0435       (intL_AB * correctForHLTDefinition(iso, e.isEB(), RunAB) + intL_C * correctForHLTDefinition(iso, e.isEB(), RunC) +
0436        intL_D * correctForHLTDefinition(iso, e.isEB(), RunD)) /
0437       (intL_AB + intL_C + intL_D);
0438 
0439   return combination;
0440 }
0441 
0442 // RECO Photon Methods
0443 float EcalIsolationCorrector::correctForHLTDefinition(reco::Photon p, int runNumber, bool isData) {
0444   if (isElectron_)
0445     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0446 
0447   float iso = p.ecalRecHitSumEtConeDR03();
0448   EcalIsolationCorrector::RunRange runRange = checkRunRange(runNumber);
0449 
0450   if (!isData)
0451     iso = correctForNoise(iso, p.isEB(), runRange, false);
0452 
0453   return correctForHLTDefinition(iso, p.isEB(), runRange);
0454 }
0455 
0456 float EcalIsolationCorrector::correctForHLTDefinition(reco::Photon p, std::string runName, bool isData) {
0457   if (isElectron_)
0458     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0459 
0460   float iso = p.ecalRecHitSumEtConeDR03();
0461 
0462   EcalIsolationCorrector::RunRange runRange = RunAB;
0463   if (runName == "RunAB")
0464     runRange = RunAB;
0465   else if (runName == "RunC")
0466     runRange = RunC;
0467   else if (runName == "RunD")
0468     runRange = RunD;
0469   else {
0470     std::cerr << "Error: Unknown run range " << runName << std::endl;
0471     abort();
0472   }
0473 
0474   if (!isData)
0475     iso = correctForNoise(iso, p.isEB(), runRange, false);
0476 
0477   return correctForHLTDefinition(iso, p.isEB(), runRange);
0478 }
0479 
0480 float EcalIsolationCorrector::correctForHLTDefinition(
0481     reco::Photon p, bool isData, float intL_AB, float intL_C, float intL_D) {
0482   if (isElectron_)
0483     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0484 
0485   float iso = p.ecalRecHitSumEtConeDR03();
0486 
0487   if (!isData)
0488     iso = correctForNoise(p, isData, intL_AB, intL_C, intL_D);
0489 
0490   float combination =
0491       (intL_AB * correctForHLTDefinition(iso, p.isEB(), RunAB) + intL_C * correctForHLTDefinition(iso, p.isEB(), RunC) +
0492        intL_D * correctForHLTDefinition(iso, p.isEB(), RunD)) /
0493       (intL_AB + intL_C + intL_D);
0494 
0495   return combination;
0496 }
0497 
0498 // PAT Photon Methods
0499 float EcalIsolationCorrector::correctForHLTDefinition(pat::Photon p, int runNumber, bool isData) {
0500   if (isElectron_)
0501     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0502 
0503   float iso = p.ecalRecHitSumEtConeDR03();
0504   EcalIsolationCorrector::RunRange runRange = checkRunRange(runNumber);
0505 
0506   if (!isData)
0507     iso = correctForNoise(iso, p.isEB(), runRange, false);
0508 
0509   return correctForHLTDefinition(iso, p.isEB(), runRange);
0510 }
0511 
0512 float EcalIsolationCorrector::correctForHLTDefinition(pat::Photon p, std::string runName, bool isData) {
0513   if (isElectron_)
0514     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0515 
0516   float iso = p.ecalRecHitSumEtConeDR03();
0517 
0518   EcalIsolationCorrector::RunRange runRange = RunAB;
0519   if (runName == "RunAB")
0520     runRange = RunAB;
0521   else if (runName == "RunC")
0522     runRange = RunC;
0523   else if (runName == "RunD")
0524     runRange = RunD;
0525   else {
0526     std::cerr << "Error: Unknown run range " << runName << std::endl;
0527     abort();
0528   }
0529 
0530   if (!isData)
0531     iso = correctForNoise(iso, p.isEB(), runRange, false);
0532 
0533   return correctForHLTDefinition(iso, p.isEB(), runRange);
0534 }
0535 
0536 float EcalIsolationCorrector::correctForHLTDefinition(
0537     pat::Photon p, bool isData, float intL_AB, float intL_C, float intL_D) {
0538   if (isElectron_)
0539     std::cerr << "Warning: this corrector is setup for electrons and you are passing a photon !" << std::endl;
0540 
0541   float iso = p.ecalRecHitSumEtConeDR03();
0542 
0543   if (!isData)
0544     iso = correctForNoise(p, isData, intL_AB, intL_C, intL_D);
0545 
0546   float combination =
0547       (intL_AB * correctForHLTDefinition(iso, p.isEB(), RunAB) + intL_C * correctForHLTDefinition(iso, p.isEB(), RunC) +
0548        intL_D * correctForHLTDefinition(iso, p.isEB(), RunD)) /
0549       (intL_AB + intL_C + intL_D);
0550 
0551   return combination;
0552 }
0553 #else
0554 float EcalIsolationCorrector::correctForHLTDefinition(float iso, bool isBarrel, int runNumber, bool isData) {
0555   EcalIsolationCorrector::RunRange runRange = checkRunRange(runNumber);
0556 
0557   if (!isData)
0558     iso = correctForNoise(iso, isBarrel, runRange, false);
0559 
0560   return correctForHLTDefinition(iso, isBarrel, runRange);
0561 }
0562 
0563 float EcalIsolationCorrector::correctForHLTDefinition(float iso, bool isBarrel, std::string runName, bool isData) {
0564   EcalIsolationCorrector::RunRange runRange = RunAB;
0565   if (runName == "RunAB")
0566     runRange = RunAB;
0567   else if (runName == "RunC")
0568     runRange = RunC;
0569   else if (runName == "RunD")
0570     runRange = RunD;
0571   else {
0572     std::cerr << "Error: Unknown run range " << runName << std::endl;
0573     abort();
0574   }
0575 
0576   if (!isData)
0577     iso = correctForNoise(iso, isBarrel, runRange, false);
0578 
0579   return correctForHLTDefinition(iso, isBarrel, runRange);
0580 }
0581 
0582 float EcalIsolationCorrector::correctForHLTDefinition(
0583     float iso, bool isBarrel, bool isData, float intL_AB, float intL_C, float intL_D) {
0584   if (!isData)
0585     iso = correctForNoise(iso, isBarrel, false, intL_AB, intL_C, intL_D);
0586 
0587   float combination =
0588       (intL_AB * correctForHLTDefinition(iso, isBarrel, RunAB) + intL_C * correctForHLTDefinition(iso, isBarrel, RunC) +
0589        intL_D * correctForHLTDefinition(iso, isBarrel, RunD)) /
0590       (intL_AB + intL_C + intL_D);
0591 
0592   return combination;
0593 }
0594 #endif