Skip to content

Commit

Permalink
Add Pileup Jet ID for AK4 Puppi jets
Browse files Browse the repository at this point in the history
  • Loading branch information
nurfikri89 committed Sep 26, 2024
1 parent fbed391 commit 298c232
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def _add_deepFlavour(process):
(pp_on_AA).toReplaceWith(
process.makePatTausTask, _makePatTausTaskWithTauReReco
)

# Adding puppi jets
process.load('CommonTools.PileupAlgos.Puppi_cff')
process.load('RecoJets.JetProducers.ak4PFJets_cfi')
Expand All @@ -383,6 +383,10 @@ def _add_deepFlavour(process):
)
task.add(process.patJetPuppiCharge)

## PUJetID for ak4PFJetsPuppi
process.load("RecoJets.JetProducers.PileupJetID_cfi")
task.add(process.pileUpJetIDPuppiTask)

def _add_jetsPuppi(process):
from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection
noDeepFlavourDiscriminators = [x.value() if isinstance(x, cms.InputTag) else x for x in process.patJets.discriminatorSources
Expand All @@ -394,9 +398,13 @@ def _add_jetsPuppi(process):
)

process.patJetGenJetMatchPuppi.matched = 'slimmedGenJets'

process.patJetsPuppi.jetChargeSource = cms.InputTag("patJetPuppiCharge")


## Store PUJetID variables in patJetsPuppi
process.patJetsPuppi.userData.userFloats.src += [cms.InputTag("pileupJetIdPuppi:fullDiscriminant")]
process.patJetsPuppi.userData.userInts.src += [cms.InputTag("pileupJetIdPuppi:fullId")]

process.selectedPatJetsPuppi.cut = cms.string("pt > 10")

from PhysicsTools.PatAlgos.slimming.applyDeepBtagging_cff import applyDeepBtagging
Expand Down

0 comments on commit 298c232

Please sign in to comment.