Skip to content

Commit

Permalink
better way (keeps "Begin processing" messages)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpedro88 committed Jun 6, 2024
1 parent 591ff9a commit e17afa6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/runSVJ.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ def set_if_has(obj,attr,val):

if options.quiet and hasattr(process,'MessageLogger'):
for dest in process.MessageLogger.destinations:
setattr(getattr(process.MessageLogger,dest),'threshold',cms.untracked.string('ERROR'))
dest_attr = getattr(process.MessageLogger,dest)
for level in ['INFO','WARNING']:
existing_pset = getattr(dest_attr,level,cms.untracked.PSet())
existing_pset.limit = cms.untracked.int32(0)
setattr(dest_attr,level,existing_pset)

# genjet/met settings - treat DM stand-ins as invisible
_particles = ["genParticlesForJetsNoMuNoNu","genParticlesForJetsNoNu","genCandidatesForMET","genParticlesForMETAllVisible"]
Expand All @@ -175,7 +179,7 @@ def set_if_has(obj,attr,val):
getattr(process,_prod).ignoreParticleIDs.extend([51,52,53])
if hasattr(process,'recoGenJets') and hasattr(process,'recoAllGenJetsNoNu'):
process.recoGenJets += process.recoAllGenJetsNoNu
# to get hadronFlavour at gen level
# to get hadronFlavour at gen level
process.load("PhysicsTools.PatAlgos.slimming.genParticles_cff")
process.recoGenJets += process.prunedGenParticlesWithStatusOne
process.recoGenJets += process.prunedGenParticles
Expand Down

0 comments on commit e17afa6

Please sign in to comment.