From 5f0ac89693235410504579192b6382fbc0bb250c Mon Sep 17 00:00:00 2001 From: Emanuele Di Marco Date: Thu, 27 Aug 2015 13:05:07 +0200 Subject: [PATCH] implement the Spring15 Effective Areas for 25ns and 50ns --- .../analyzers/objects/LeptonAnalyzer.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/Heppy/python/analyzers/objects/LeptonAnalyzer.py b/PhysicsTools/Heppy/python/analyzers/objects/LeptonAnalyzer.py index 5e68e3a628fb1..9ab1ee6a2e71e 100644 --- a/PhysicsTools/Heppy/python/analyzers/objects/LeptonAnalyzer.py +++ b/PhysicsTools/Heppy/python/analyzers/objects/LeptonAnalyzer.py @@ -304,7 +304,22 @@ def makeAllElectrons(self, event): elif aeta < 1.300: ele.EffectiveArea04 = 0.1734 elif aeta < 2.000: ele.EffectiveArea04 = 0.1077 elif aeta < 2.200: ele.EffectiveArea04 = 0.1565 - else: ele.EffectiveArea04 = 0.2680 + elif self.eleEffectiveArea == "Spring15_50ns_v1": + aeta = abs(ele.eta()) + ## ----- https://github.com/ikrav/cmssw/blob/egm_id_747_v2/RecoEgamma/ElectronIdentification/data/Spring15/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_50ns.txt + if aeta < 0.800: ele.EffectiveArea03 = 0.0973 + elif aeta < 1.300: ele.EffectiveArea03 = 0.0954 + elif aeta < 2.000: ele.EffectiveArea03 = 0.0632 + elif aeta < 2.200: ele.EffectiveArea03 = 0.0727 + else: ele.EffectiveArea03 = 0.1337 + ## ----- https://github.com/ikrav/cmssw/blob/egm_id_747_v2/RecoEgamma/ElectronIdentification/data/Spring15/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_25ns.txt + if aeta < 1.000: ele.EffectiveArea03 = 0.1752 + elif aeta < 1.479: ele.EffectiveArea03 = 0.1862 + elif aeta < 2.000: ele.EffectiveArea03 = 0.1411 + elif aeta < 2.200: ele.EffectiveArea03 = 0.1534 + elif aeta < 2.300: ele.EffectiveArea03 = 0.1903 + elif aeta < 2.400: ele.EffectiveArea03 = 0.2243 + else: ele.EffectiveArea03 = 0.2687 else: raise RuntimeError, "Unsupported value for ele_effectiveAreas: can only use Data2012 (rho: ?) and Phys14_v1 (rho: fixedGridRhoFastjetAll)" # Electron scale calibrations @@ -502,7 +517,7 @@ def process(self, event): mu_tightId = "POG_ID_Tight" , # electron isolation correction method (can be "rhoArea" or "deltaBeta") ele_isoCorr = "rhoArea" , - el_effectiveAreas = "Phys14_25ns_v1" , #(can be 'Data2012' or 'Phys14_25ns_v1') + el_effectiveAreas = "Spring15_25ns_v1" , #(can be 'Data2012' or 'Phys14_25ns_v1', or 'Spring15_50ns_v1' or 'Spring15_25ns_v1') ele_tightId = "Cuts_2012" , # minimum deltaR between a loose electron and a loose muon (on overlaps, discard the electron) min_dr_electron_muon = 0.02,