Skip to content

Commit

Permalink
Merge pull request cms-sw#18 from Sam-Harper/EgammaPostRecoTools_940
Browse files Browse the repository at this point in the history
Adding V2 IDs (except photon cut based) to PostRecoTools
  • Loading branch information
Sam-Harper authored Oct 12, 2018
2 parents 5e91d95 + 831d27a commit 192753e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions RecoEgamma/EgammaTools/python/EgammaPostRecoTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,28 @@
'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring16_nonTrig_V1_cff'
]

#the new Fall17V2 modules are loaded as default if they exist in the release
#we do it this way as we can use the same script for all releases and people who
#dont want V2 can still use this script
_fall17V2PhoIDModules = [
'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V2_cff'
]
_fall17V2EleIDModules = [
'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Fall17_94X_V2_cff',
'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_noIso_V2_cff',
'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Fall17_iso_V2_cff'
]

import pkgutil
if pkgutil.find_loader(_fall17V2EleIDModules[0]) != None:
_defaultEleIDModules.extend(_fall17V2EleIDModules)
else:
print "EgammaPostRecoTools: Fall17V2 electron modules not found, running ID without them. If you want Fall17V2 IDs, please merge the approprate PR"

if pkgutil.find_loader(_fall17V2PhoIDModules[0]) != None:
_defaultPhoIDModules.extend(_fall17V2PhoIDModules)
else:
print "EgammaPostRecoTools: Fall17V2 photons modules not found, running ID without them. If you want Fall17V2 IDs, please merge the approprate PR"

def _getEnergyCorrectionFile(era):
if era=="2017-Nov17ReReco":
Expand Down

0 comments on commit 192753e

Please sign in to comment.