Skip to content

Commit

Permalink
Merge pull request cms-sw#244 from CERN-PH-CMG/heppy_7_2_2_patch2
Browse files Browse the repository at this point in the history
Merge Heppy in CMGTools to get in cms-sw#227 cms-sw#234 cms-sw#238
  • Loading branch information
gpetruc committed Feb 11, 2015
2 parents 31b3250 + 557e9bd commit 300abf5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 6 additions & 3 deletions PhysicsTools/Heppy/python/analyzers/objects/autophobj.py
Expand Up @@ -134,9 +134,12 @@
NTupleVariable("hOverE", lambda x : x.hOVERe(), float, help="hoverE for photons"),
NTupleVariable("r9", lambda x : x.full5x5_r9(), float, help="r9 for photons"),
NTupleVariable("sigmaIetaIeta", lambda x : x.full5x5_sigmaIetaIeta(), float, help="sigmaIetaIeta for photons"),
NTupleVariable("chHadIso", lambda x : x.chargedHadronIso(), float, help="chargedHadronIsolation for photons"),
NTupleVariable("neuHadIso", lambda x : x.neutralHadronIso(), float, help="neutralHadronIsolation for photons"),
NTupleVariable("phIso", lambda x : x.photonIso(), float, help="gammaIsolation for photons"),
#NTupleVariable("chHadIso", lambda x : x.chargedHadronIso(), float, help="chargedHadronIsolation for photons"),
#NTupleVariable("neuHadIso", lambda x : x.neutralHadronIso(), float, help="neutralHadronIsolation for photons"),
#NTupleVariable("phIso", lambda x : x.photonIso(), float, help="gammaIsolation for photons"),
NTupleVariable("chHadIso", lambda x : x.recoChargedHadronIso(), float, help="chargedHadronIsolation for photons"),
NTupleVariable("neuHadIso", lambda x : x.recoNeutralHadronIso(), float, help="neutralHadronIsolation for photons"),
NTupleVariable("phIso", lambda x : x.recoPhotonIso(), float, help="gammaIsolation for photons"),
NTupleVariable("mcMatchId", lambda x : x.mcMatchId, int, mcOnly=True, help="Match to source from hard scatter (pdgId of heaviest particle in chain, 25 for H, 6 for t, 23/24 for W/Z), zero if non-prompt or fake"),
])

Expand Down
6 changes: 6 additions & 0 deletions PhysicsTools/Heppy/python/physicsobjects/Photon.py
@@ -1,5 +1,7 @@
from PhysicsTools.Heppy.physicsobjects.PhysicsObject import *

import ROOT

class Photon(PhysicsObject ):

''' return object from the photon
Expand Down Expand Up @@ -43,3 +45,7 @@ def photonIDCSA14(self, name):
return keepThisPhoton

pass

setattr(ROOT.pat.Photon, "recoPhotonIso", ROOT.reco.Photon.photonIso)
setattr(ROOT.pat.Photon, "recoNeutralHadronIso", ROOT.reco.Photon.neutralHadronIso)
setattr(ROOT.pat.Photon, "recoChargedHadronIso", ROOT.reco.Photon.chargedHadronIso)

0 comments on commit 300abf5

Please sign in to comment.