diff --git a/CommonTools/PileupAlgos/python/Puppi_cff.py b/CommonTools/PileupAlgos/python/Puppi_cff.py index bb11fae46c55c..a3500d45d8962 100644 --- a/CommonTools/PileupAlgos/python/Puppi_cff.py +++ b/CommonTools/PileupAlgos/python/Puppi_cff.py @@ -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., diff --git a/PhysicsTools/NanoAOD/python/nano_cff.py b/PhysicsTools/NanoAOD/python/nano_cff.py index 7b3ee97b2dd2a..7e056d63b71a7 100644 --- a/PhysicsTools/NanoAOD/python/nano_cff.py +++ b/PhysicsTools/NanoAOD/python/nano_cff.py @@ -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 @@ -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