Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUPPI v15 bug/crash fix for NANOAOD (106X backport) #32329

Merged
merged 2 commits into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CommonTools/PileupAlgos/python/Puppi_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@
)

from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
run2_miniAOD_UL.toModify(
from Configuration.Eras.Modifier_run2_nanoAOD_106Xv1_cff import run2_nanoAOD_106Xv1
(run2_miniAOD_UL|run2_nanoAOD_106Xv1).toModify(
puppi,
EtaMinUseDeltaZ = 2.4,
PtMaxCharged = 20.,
Expand Down
6 changes: 3 additions & 3 deletions PhysicsTools/NanoAOD/python/nano_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ def nanoAOD_recalibrateMETs(process,isData):
reclusterJets = cms.untracked.bool(False),
)
run2_nanoAOD_106Xv1.toModify(nanoAOD_PuppiV15_switch,recoMetFromPFCs=True,reclusterJets=True)
runMetCorAndUncFromMiniAOD(process,isData=isData,metType="Puppi",postfix="Puppi",jetFlavor="AK4PFPuppi", recoMetFromPFCs=bool(nanoAOD_PuppiV15_switch.recoMetFromPFCs), reclusterJets=bool(nanoAOD_PuppiV15_switch.reclusterJets))
if nanoAOD_PuppiV15_switch.reclusterJets:
from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets
from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask
Expand All @@ -243,11 +242,12 @@ def nanoAOD_recalibrateMETs(process,isData):
muSource =cms.InputTag( 'slimmedMuons'),
elSource = cms.InputTag('slimmedElectrons'),
genParticles= cms.InputTag('prunedGenParticles'),
getJetMCFlavour=False
getJetMCFlavour= False
)

process.patJetsPuppi.addGenPartonMatch = cms.bool(False)
process.patJetsPuppi.addGenJetMatch = cms.bool(False)

runMetCorAndUncFromMiniAOD(process,isData=isData,metType="Puppi",postfix="Puppi",jetFlavor="AK4PFPuppi", recoMetFromPFCs=bool(nanoAOD_PuppiV15_switch.recoMetFromPFCs), reclusterJets=bool(nanoAOD_PuppiV15_switch.reclusterJets))
process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(process.jetSequence),cms.Sequence(process.puppiMETSequence+process.fullPatMetSequencePuppi))
return process

Expand Down