From 1977a60dcfada414f5ddd8f95acfe65f0682fb74 Mon Sep 17 00:00:00 2001 From: Rajarshi Bhattacharya Date: Mon, 19 Feb 2024 15:29:22 +0100 Subject: [PATCH] Increase of the precision of pt, eta, phi of the GenParticles --- PhysicsTools/NanoAOD/python/custom_muon_cff.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PhysicsTools/NanoAOD/python/custom_muon_cff.py b/PhysicsTools/NanoAOD/python/custom_muon_cff.py index 5cf72e74ec9e5..3ae8c3b1f8cdc 100644 --- a/PhysicsTools/NanoAOD/python/custom_muon_cff.py +++ b/PhysicsTools/NanoAOD/python/custom_muon_cff.py @@ -329,12 +329,21 @@ def AddTriggerObjectBits(process): return process +def IncreaseGenPrecesion(process): + + process.genParticleTable.variables.pt = Var("pt", float, precision=16) + process.genParticleTable.variables.eta = Var("eta", float,precision=16) + process.genParticleTable.variables.phi = Var("phi", float,precision=16) + + return process + def PrepMuonCustomNanoAOD(process): process = Custom_Muon_Task(process) process = AddPFTracks(process) process = AddVariablesForMuon(process) process = AddTriggerObjectBits(process) + process = IncreaseGenPrecesion(process) return process