Skip to content

Commit

Permalink
Merge pull request #45411 from mseidel42/Rivet4_NanoGen
Browse files Browse the repository at this point in the history
Fix NanoGen with Rivet4
  • Loading branch information
cmsbuild authored Jul 11, 2024
2 parents 61923d8 + 9eab131 commit 43d4c02
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions PhysicsTools/NanoAOD/python/nanogen_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,22 @@ def customizeNanoGEN(process):
variables = cms.PSet(PTVars)
)

process.rivetProducerHTXS.HepMCCollection = "generatorSmeared"
process.nanogenSequence.insert(0, process.genParticles2HepMCHiggsVtx)
process.nanogenSequence.insert(0, process.genParticles2HepMC)
process.genParticles2HepMCHiggsVtx.genParticles = "genParticles"
process.genParticles2HepMC.genParticles = "genParticles"

process.rivetProducerHTXS.HepMCCollection = "genParticles2HepMCHiggsVtx:unsmeared"
process.genParticleTable.src = "genParticles"
process.patJetPartonsNano.particles = "genParticles"
process.particleLevel.src = "generatorSmeared"
process.particleLevel.src = "genParticles2HepMC:unsmeared"

process.genJetTable.src = "ak4GenJetsNoNu"
process.genJetAK8Table.src = "ak8GenJetsNoNu"
process.tauGenJetsForNano.GenParticles = "genParticles"
process.genVisTaus.srcGenParticles = "genParticles"

# In case customizeNanoGENFromMini has already been called
process.nanogenSequence.remove(process.genParticles2HepMCHiggsVtx)
process.nanogenSequence.remove(process.genParticles2HepMC)
process.nanogenSequence.remove(process.mergedGenParticles)
process.nanogenSequence.remove(process.genIso)
delattr(process.genParticleTable.externalVariables,"iso")
Expand Down

0 comments on commit 43d4c02

Please sign in to comment.