From 465911e291a7398e78504b18819c80a059c672cf Mon Sep 17 00:00:00 2001 From: Moritz Molch Date: Thu, 9 Feb 2023 21:52:49 +0100 Subject: [PATCH 1/2] Adapt float precision of gen. four-vector to defaults --- PhysicsTools/NanoAOD/python/genparticles_cff.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/genparticles_cff.py b/PhysicsTools/NanoAOD/python/genparticles_cff.py index e2ffeacd44ca5..20901caeea9f0 100644 --- a/PhysicsTools/NanoAOD/python/genparticles_cff.py +++ b/PhysicsTools/NanoAOD/python/genparticles_cff.py @@ -39,10 +39,10 @@ singleton = cms.bool(False), # the number of entries is variable extension = cms.bool(False), # this is the main table for the taus variables = cms.PSet( - pt = Var("pt", float, precision=8), - phi = Var("phi", float,precision=8), - eta = Var("eta", float,precision=8), - mass = Var("?!((abs(pdgId)>=1 && abs(pdgId)<=5) || (abs(pdgId)>=11 && abs(pdgId)<=16) || pdgId==21 || pdgId==111 || abs(pdgId)==211 || abs(pdgId)==421 || abs(pdgId)==411 || (pdgId==22 && mass<1))?mass:0", float,precision="?((abs(pdgId)==6 || abs(pdgId)>1000000) && statusFlags().isLastCopy())?20:8",doc="Mass stored for all particles with the exception of quarks (except top), leptons/neutrinos, photons with mass < 1 GeV, gluons, pi0(111), pi+(211), D0(421), and D+(411). For these particles, you can lookup the value from PDG."), + pt = Var("pt", float, precision=-1), + phi = Var("phi", float,precision=12), + eta = Var("eta", float,precision=12), + mass = Var("?!((abs(pdgId)>=1 && abs(pdgId)<=5) || (abs(pdgId)>=11 && abs(pdgId)<=16) || pdgId==21 || pdgId==111 || abs(pdgId)==211 || abs(pdgId)==421 || abs(pdgId)==411 || (pdgId==22 && mass<1))?mass:0", float,precision="?((abs(pdgId)==6 || abs(pdgId)>1000000) && statusFlags().isLastCopy())?20:(abs(pdgId)==25 || abs(pdgId)==15)?10:8",doc="Mass stored for all particles with the exception of quarks (except top), leptons/neutrinos, photons with mass < 1 GeV, gluons, pi0(111), pi+(211), D0(421), and D+(411). For these particles, you can lookup the value from PDG."), pdgId = Var("pdgId", int, doc="PDG id"), status = Var("status", int, doc="Particle status. 1=stable"), genPartIdxMother = Var("?numberOfMothers>0?motherRef(0).key():-1", int, doc="index of the mother particle"), From 5de692029600720b868028689d60401bf04e7bc5 Mon Sep 17 00:00:00 2001 From: Moritz Molch Date: Thu, 6 Apr 2023 10:27:29 +0200 Subject: [PATCH 2/2] Add MET covariance matrix elements to PUPPI MET table --- PhysicsTools/NanoAOD/python/met_cff.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PhysicsTools/NanoAOD/python/met_cff.py b/PhysicsTools/NanoAOD/python/met_cff.py index 3e804aa91de8b..fe300c9947e98 100644 --- a/PhysicsTools/NanoAOD/python/met_cff.py +++ b/PhysicsTools/NanoAOD/python/met_cff.py @@ -60,6 +60,9 @@ extension = cms.bool(False), # this is the main table for the MET variables = cms.PSet(PTVars, sumEt = Var("sumEt()", float, doc="scalar sum of Et",precision=10), + covXX = Var("getSignificanceMatrix().At(0,0)",float,doc="xx element of met covariance matrix", precision=8), + covXY = Var("getSignificanceMatrix().At(0,1)",float,doc="xy element of met covariance matrix", precision=8), + covYY = Var("getSignificanceMatrix().At(1,1)",float,doc="yy element of met covariance matrix", precision=8), ptJERUp = Var("shiftedPt('JetResUp')", float, doc="JER up pt",precision=10), ptJERDown = Var("shiftedPt('JetResDown')", float, doc="JER down pt",precision=10), phiJERUp = Var("shiftedPhi('JetResUp')", float, doc="JER up phi",precision=10),