Skip to content

Commit

Permalink
Merge pull request cms-sw#188 from jpata/vhbbHeppy74X_Spring15EA_fromCMG
Browse files Browse the repository at this point in the history
from CERN-PH-CMG/cmg-cmssw/pull/501: implement the Spring15 Effective Areas for 25ns and 50ns
  • Loading branch information
arizzi committed Sep 30, 2015
2 parents dbc043d + 5f0ac89 commit 056fd0e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions PhysicsTools/Heppy/python/analyzers/objects/LeptonAnalyzer.py
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 056fd0e

Please sign in to comment.