From d5381b2ea9d9263a5993f2a73c2b4bad7eb4a554 Mon Sep 17 00:00:00 2001 From: Huilin Qu Date: Thu, 25 Apr 2024 15:46:14 +0200 Subject: [PATCH] Fix metMCTable in NanoGEN. --- PhysicsTools/NanoAOD/python/nanogen_cff.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/NanoAOD/python/nanogen_cff.py b/PhysicsTools/NanoAOD/python/nanogen_cff.py index 45a8059ee40f2..f47c9d2ede2ff 100644 --- a/PhysicsTools/NanoAOD/python/nanogen_cff.py +++ b/PhysicsTools/NanoAOD/python/nanogen_cff.py @@ -7,6 +7,7 @@ from PhysicsTools.NanoAOD.genWeightsTable_cfi import * from PhysicsTools.NanoAOD.genVertex_cff import * from PhysicsTools.NanoAOD.common_cff import Var,CandVars +from PhysicsTools.NanoAOD.simpleSingletonCandidateFlatTableProducer_cfi import simpleSingletonCandidateFlatTableProducer nanoMetadata = cms.EDProducer("UniqueStringProducer", strings = cms.PSet( @@ -81,8 +82,12 @@ def customizeNanoGENFromMini(process): return process def customizeNanoGEN(process): - process.metMCTable.src = "genMetTrue" - process.metMCTable.variables = cms.PSet(PTVars) + process.metMCTable = simpleSingletonCandidateFlatTableProducer.clone( + src = "genMetTrue", + name = process.metMCTable.name, + doc = process.metMCTable.doc, + variables = cms.PSet(PTVars) + ) process.rivetProducerHTXS.HepMCCollection = "generatorSmeared" process.genParticleTable.src = "genParticles"