From c661f9e8a8b29f8ebcb5ccb72cd543967a79e1c3 Mon Sep 17 00:00:00 2001 From: Nurfikri Norjoharuddeen Date: Thu, 19 Mar 2020 10:53:14 +0100 Subject: [PATCH] Add quark-gluon likelihood input variables for AK4PFCHS jets --- PhysicsTools/NanoAOD/python/custom_jme_cff.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/PhysicsTools/NanoAOD/python/custom_jme_cff.py b/PhysicsTools/NanoAOD/python/custom_jme_cff.py index 53b9df7219fa2..c6436fb807f9b 100644 --- a/PhysicsTools/NanoAOD/python/custom_jme_cff.py +++ b/PhysicsTools/NanoAOD/python/custom_jme_cff.py @@ -386,6 +386,20 @@ def AddPileUpJetIDVars(proc): proc.jetTable.variables.jetRchg = Var("userFloat('jetRchg')", float, doc="fraction of jet pT carried by the leading charged constituent", precision= 6) proc.jetTable.variables.nCharged = Var("userInt('nCharged')", int, doc="number of charged constituents") +def AddQGLTaggerVars(proc): + # + # Save variables as userFloats and userInts + # + proc.updatedJetsWithUserData.userFloats.qgl_axis2 = cms.InputTag("qgtagger:axis2") + proc.updatedJetsWithUserData.userFloats.qgl_ptD = cms.InputTag("qgtagger:ptD") + proc.updatedJetsWithUserData.userInts.qgl_mult = cms.InputTag("qgtagger:mult") + # + # Specfiy variables in the jetTable to save in NanoAOD + # + proc.jetTable.variables.qgl_axis2 = Var("userFloat('qgl_axis2')", float, doc="ellipse minor jet axis (Quark vs Gluon likelihood input variable)", precision= 6) + proc.jetTable.variables.qgl_ptD = Var("userFloat('qgl_ptD')", float, doc="pT-weighted average pT of constituents (Quark vs Gluon likelihood input variable)", precision= 6) + proc.jetTable.variables.qgl_mult = Var("userInt('qgl_mult')", int, doc="PF candidates multiplicity (Quark vs Gluon likelihood input variable)") + def PrepJMECustomNanoAOD(process,runOnMC): # # Additional variables to AK4GenJets @@ -443,6 +457,10 @@ def PrepJMECustomNanoAOD(process,runOnMC): # Add variables for pileup jet ID studies. # AddPileUpJetIDVars(process) + # + # Add variables for quark guon likelihood tagger studies. + # + AddQGLTaggerVars(process) ######################################################################################################################