From 0e3a50d00bfd170860a63ae15e6018112409560d Mon Sep 17 00:00:00 2001 From: cramonal Date: Thu, 15 Feb 2024 11:02:41 +0100 Subject: [PATCH] fix on mvaID for muons adding worngly removed softmvarun3 (squashed) --- PhysicsTools/NanoAOD/python/muons_cff.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/muons_cff.py b/PhysicsTools/NanoAOD/python/muons_cff.py index c7b6cefc3c345..094a9dc3ccacc 100644 --- a/PhysicsTools/NanoAOD/python/muons_cff.py +++ b/PhysicsTools/NanoAOD/python/muons_cff.py @@ -65,16 +65,14 @@ ptRel = cms.InputTag("ptRatioRelForMu:ptRel"), jetNDauChargedMVASel = cms.InputTag("ptRatioRelForMu:jetNDauChargedMVASel"), mvaIDMuon_wpMedium = cms.InputTag("muonMVAID:wpMedium"), - mvaIDMuon_wpTight = cms.InputTag("muonMVAID:wpTight") + mvaIDMuon_wpTight = cms.InputTag("muonMVAID:wpTight"), + mvaIDMuon = cms.InputTag("muonMVAID:probGOOD") ), userCands = cms.PSet( jetForLepJetVar = cms.InputTag("ptRatioRelForMu:jetForLepJetVar") # warning: Ptr is null if no match is found ), ) -(run2_nanoAOD_106Xv2 | run3_nanoAOD_122 ).toModify(slimmedMuonsWithUserData.userFloats, - mvaIDMuon = cms.InputTag("muonMVAID:probGOOD")) - finalMuons = cms.EDFilter("PATMuonRefSelector", src = cms.InputTag("slimmedMuonsWithUserData"), @@ -169,7 +167,7 @@ pfIsoId = Var("passed('PFIsoVeryLoose')+passed('PFIsoLoose')+passed('PFIsoMedium')+passed('PFIsoTight')+passed('PFIsoVeryTight')+passed('PFIsoVeryVeryTight')","uint8",doc="PFIso ID from miniAOD selector (1=PFIsoVeryLoose, 2=PFIsoLoose, 3=PFIsoMedium, 4=PFIsoTight, 5=PFIsoVeryTight, 6=PFIsoVeryVeryTight)"), tkIsoId = Var("?passed('TkIsoTight')?2:passed('TkIsoLoose')","uint8",doc="TkIso ID (1=TkIsoLoose, 2=TkIsoTight)"), miniIsoId = Var("passed('MiniIsoLoose')+passed('MiniIsoMedium')+passed('MiniIsoTight')+passed('MiniIsoVeryTight')","uint8",doc="MiniIso ID from miniAOD selector (1=MiniIsoLoose, 2=MiniIsoMedium, 3=MiniIsoTight, 4=MiniIsoVeryTight)"), - mvaMuID = Var("mvaIDValue()",float,doc="MVA-based ID score ",precision=6), + mvaMuID = Var("userFloat('mvaIDMuon')", float, doc="MVA-based ID score",precision=6), mvaMuID_WP = Var("userFloat('mvaIDMuon_wpMedium') + userFloat('mvaIDMuon_wpTight')","uint8",doc="MVA-based ID selector WPs (1=MVAIDwpMedium,2=MVAIDwpTight)"), multiIsoId = Var("?passed('MultiIsoMedium')?2:passed('MultiIsoLoose')","uint8",doc="MultiIsoId from miniAOD selector (1=MultiIsoLoose, 2=MultiIsoMedium)"), puppiIsoId = Var("passed('PuppiIsoLoose')+passed('PuppiIsoMedium')+passed('PuppiIsoTight')", "uint8", doc="PuppiIsoId from miniAOD selector (1=Loose, 2=Medium, 3=Tight)"), @@ -191,9 +189,6 @@ muonTable.variables.eta.precision = 16 muonTable.variables.phi.precision = 16 -(run2_nanoAOD_106Xv2 | run3_nanoAOD_122).toModify(muonTable.variables,mvaMuID=None).toModify( - muonTable.variables, mvaMuID = Var("userFloat('mvaIDMuon')", float, doc="MVA-based ID score",precision=6)) - # Revert back to AK4 CHS jets for Run 2 run2_nanoAOD_ANY.toModify(