Skip to content

Commit

Permalink
Merge pull request gem-sw#244 from peruzzim/noPuppiType1MET
Browse files Browse the repository at this point in the history
Remove PUPPI MET re-calibration
  • Loading branch information
peruzzim authored Nov 14, 2018
2 parents 3b9d0a7 + fc59229 commit f56b64e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion PhysicsTools/NanoAOD/python/met_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
puppiMetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
src = cms.InputTag("slimmedMETsPuppi"),
name = cms.string("PuppiMET"),
doc = cms.string("PUPPI MET, type-1 corrected"),
doc = cms.string("PUPPI MET"),
singleton = cms.bool(True), # there's always exactly one MET per event
extension = cms.bool(False), # this is the main table for the MET
variables = cms.PSet(PTVars,
Expand Down
14 changes: 7 additions & 7 deletions PhysicsTools/NanoAOD/python/nano_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ def nanoAOD_addDeepInfo(process,addDeepBTag,addDeepFlavour):
return process

from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties import runMetCorAndUncFromMiniAOD
from PhysicsTools.PatAlgos.slimming.puppiForMET_cff import makePuppiesFromMiniAOD
#from PhysicsTools.PatAlgos.slimming.puppiForMET_cff import makePuppiesFromMiniAOD
def nanoAOD_recalibrateMETs(process,isData):
runMetCorAndUncFromMiniAOD(process,isData=isData)
process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(jetSequence),cms.Sequence(process.fullPatMetSequence))
# makePuppiesFromMiniAOD(process,True) # call this before in the global customizer otherwise it would reset photon IDs in VID
runMetCorAndUncFromMiniAOD(process,isData=isData,metType="Puppi",postfix="Puppi",jetFlavor="AK4PFPuppi")
process.puppiNoLep.useExistingWeights = False
process.puppi.useExistingWeights = False
process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(jetSequence),cms.Sequence(process.puppiMETSequence+process.fullPatMetSequencePuppi))
# runMetCorAndUncFromMiniAOD(process,isData=isData,metType="Puppi",postfix="Puppi",jetFlavor="AK4PFPuppi")
# process.puppiNoLep.useExistingWeights = False
# process.puppi.useExistingWeights = False
# process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(jetSequence),cms.Sequence(process.puppiMETSequence+process.fullPatMetSequencePuppi))
return process

from PhysicsTools.SelectorUtils.tools.vid_id_tools import *
Expand All @@ -198,7 +198,7 @@ def nanoAOD_activateVID(process):
modifier.toModify(process.egmGsfElectronIDs, physicsObjectSrc = "slimmedElectronsUpdated")
if hasattr(process,"heepIDVarValueMaps"):
modifier.toModify(process.heepIDVarValueMaps, elesMiniAOD = "slimmedElectronsUpdated")
# switchOnVIDPhotonIdProducer(process,DataFormat.MiniAOD) # do not call this to avoid resetting photon IDs in VID (called before inside makePuppiesFromMiniAOD)
switchOnVIDPhotonIdProducer(process,DataFormat.MiniAOD) # do not call this to avoid resetting photon IDs in VID, if called before inside makePuppiesFromMiniAOD
for modname in photon_id_modules_WorkingPoints_nanoAOD.modules:
setupAllVIDIdsInModule(process,modname,setupVIDPhotonSelection)
process.photonSequence.insert(process.photonSequence.index(bitmapVIDForPho),process.egmPhotonIDSequence)
Expand Down Expand Up @@ -226,7 +226,7 @@ def nanoAOD_addDeepBoostedJetForPre103X(process):


def nanoAOD_customizeCommon(process):
makePuppiesFromMiniAOD(process,True) # call this here as it calls switchOnVIDPhotonIdProducer
# makePuppiesFromMiniAOD(process,True) # call this here as it calls switchOnVIDPhotonIdProducer
process = nanoAOD_activateVID(process)
nanoAOD_addDeepInfo_switch = cms.PSet(
nanoAOD_addDeepBTag_switch = cms.untracked.bool(False),
Expand Down

0 comments on commit f56b64e

Please sign in to comment.