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

Bug fix for track MET in MET correction tools #34860

Merged
merged 2 commits into from
Aug 27, 2021
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
7 changes: 3 additions & 4 deletions PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA

from PhysicsTools.PatUtils.tools.pfforTrkMET_cff import *

def miniAOD_customizeCommon(process):
process.patMuons.isoDeposits = cms.PSet()
process.patElectrons.isoDeposits = cms.PSet()
Expand Down Expand Up @@ -216,10 +218,7 @@ def _add_slimmedMETsNoHF(process):
# ================== CHSMET

# ================== TrkMET
process.TrkCands = cms.EDFilter("CandPtrSelector",
src=cms.InputTag("packedPFCandidates"),
cut=cms.string("charge()!=0 && pvAssociationQuality()>=4 && vertexRef().key()==0")
)
process.TrkCands = chargedPackedCandsForTkMet.clone()
task.add(process.TrkCands)

process.pfMetTrk = pfMet.clone(src = 'TrkCands')
Expand Down
6 changes: 6 additions & 0 deletions PhysicsTools/PatUtils/python/tools/pfforTrkMET_cff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import FWCore.ParameterSet.Config as cms

chargedPackedCandsForTkMet = cms.EDFilter("CandPtrSelector",
src=cms.InputTag("packedPFCandidates"),
cut=cms.string("charge()!=0 && pvAssociationQuality()>=4 && vertexRef().key()==0")
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask
from PhysicsTools.PatAlgos.tools.jetTools import switchJetCollection
import CommonTools.CandAlgos.candPtrProjector_cfi as _mod
from PhysicsTools.PatUtils.tools.pfforTrkMET_cff import *


def isValidInputTag(input):
Expand Down Expand Up @@ -1727,8 +1728,8 @@ def miniAODConfigurationPre(self, process, patMetModuleSequence, pfCandCollectio
patMetModuleSequence += getattr(process, "pfCHS")
patMetModuleSequence += getattr(process, "pfMetCHS")
patMetModuleSequence += getattr(process, "patCHSMet")

pfTrk = cms.EDFilter("CandPtrSelector", src = cms.InputTag("packedPFCandidates"), cut = cms.string("fromPV(0) > 0 && charge()!=0"))
pfTrk = chargedPackedCandsForTkMet.clone()
addToProcessAndTask("pfTrk", pfTrk, process, task)
pfMetTrk = pfMet.clone(src = 'pfTrk')
addToProcessAndTask("pfMetTrk", pfMetTrk, process, task)
Expand Down