Skip to content

Commit

Permalink
Merge pull request #46244 from nurfikri89/from142X202409302300_subjet…
Browse files Browse the repository at this point in the history
…btag_puId_jmeNanoFix

[JMENano] Setup Pileup Jet ID for reclustered AK4 Puppi jets
  • Loading branch information
cmsbuild authored Oct 4, 2024
2 parents 30a984e + 49af8f6 commit 7373243
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion PhysicsTools/NanoAOD/python/custom_jme_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,9 +662,26 @@ def ReclusterAK4PuppiJets(proc, recoJA, runOnMC):
proc.jetPuppiTable.variables.phoMultiplicity = PFJETVARS.phoMultiplicity

#
# Add variables for pileup jet ID studies.
# Add Pileup Jet ID for Puppi jets
#
from RecoJets.JetProducers.PileupJetID_cfi import pileupJetIdPuppi
pileupJetIdName = "pileupJetId{}".format(jetName)
setattr(proc, pileupJetIdName, pileupJetIdPuppi.clone(
jets = "updatedJetsPuppi",
srcConstituentWeights = "packedpuppi",
vertexes = "offlineSlimmedPrimaryVertices",
inputIsCorrected=True,
applyJec=False
)
)
proc.jetPuppiTask.add(getattr(proc, pileupJetIdName))
proc.updatedJetsPuppiWithUserData.userFloats.puIdDisc = cms.InputTag(pileupJetIdName+':fullDiscriminant')
proc.jetPuppiTable.variables.puIdDisc = Var("userFloat('puIdDisc')", float, doc="Pileup ID BDT discriminant with 133X Winter24 PuppiV18 training",precision=10)


#
# Add variables for pileup jet ID studies.
#
proc = AddPileUpJetIDVars(proc,
jetName = jetName,
jetSrc = "updatedJetsPuppi",
Expand Down

0 comments on commit 7373243

Please sign in to comment.