-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Enabling re-application of Type1 Corrections for PuppiMET and adding PUPPI MET Uncertainties #30922
Changes from all commits
ae4793e
23686ba
57393cd
13b0d6e
37c4c6f
7ab2c67
752fe0a
a11b12b
e6a936d
92a6a53
96f4105
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,7 +177,7 @@ 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(process.jetSequence),cms.Sequence(process.fullPatMetSequence)) | ||
|
@@ -195,10 +195,8 @@ def nanoAOD_recalibrateMETs(process,isData): | |
table.variables.muonSubtrFactor = Var("1-userFloat('muonSubtrRawPt')/(pt()*jecFactor('Uncorrected'))",float,doc="1-(muon-subtracted raw pt)/(raw pt)",precision=6) | ||
process.metTables += process.corrT1METJetTable | ||
# 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") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For the followup PR to switch to PUPPI v15 for run2_nanoAOD_106Xv1 consistently for MET, AK4 and AK8, please considered adding the switches "recoMetFromPFCs=True, reclusterJets=True" to runMetCorAndUncFromMiniAOD for run2_nanoAOD_106Xv1 (to recompute MET and Type-1 with v15). And test if it has the desired effect. |
||
process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(process.jetSequence),cms.Sequence(process.puppiMETSequence+process.fullPatMetSequencePuppi)) | ||
return process | ||
|
||
from PhysicsTools.SelectorUtils.tools.vid_id_tools import * | ||
|
@@ -266,7 +264,11 @@ def nanoAOD_runMETfixEE2017(process,isData): | |
process.nanoSequenceCommon.insert(process.nanoSequenceCommon.index(jetSequence),process.fullPatMetSequenceFixEE2017) | ||
|
||
def nanoAOD_customizeCommon(process): | ||
# makePuppiesFromMiniAOD(process,True) # call this here as it calls switchOnVIDPhotonIdProducer | ||
makePuppiesFromMiniAOD(process,True) | ||
process.puppiNoLep.useExistingWeights = True | ||
process.puppi.useExistingWeights = True | ||
run2_nanoAOD_106Xv1.toModify(process.puppiNoLep, useExistingWeights = False) | ||
run2_nanoAOD_106Xv1.toModify(process.puppi, useExistingWeights = False) | ||
process = nanoAOD_activateVID(process) | ||
nanoAOD_addDeepInfo_switch = cms.PSet( | ||
nanoAOD_addDeepBTag_switch = cms.untracked.bool(False), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we clean up this call ? same lines
process.puppiNoLep.useExistingWeights = False
process.puppi.useExistingWeights = False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have now modified this part to explicitly set as True the useExistingWeights as per the previous comment thread