Skip to content

Commit

Permalink
comments from Maria
Browse files Browse the repository at this point in the history
  • Loading branch information
ahinzmann committed Sep 6, 2021
1 parent 74a7975 commit d216e83
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions PhysicsTools/PatAlgos/python/slimming/puppiForMET_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def makePuppies( process ):

def makePuppiesFromMiniAOD( process, createScheduledSequence=False ):
task = getPatAlgosToolsTask(process)
process.load('CommonTools.ParticleFlow.pfCHS_cff')
from CommonTools.ParticleFlow.pfCHS_cff import packedPrimaryVertexAssociationJME
setattr(process, "packedPrimaryVertexAssociationJME", packedPrimaryVertexAssociationJME.clone())
task.add(process.packedPrimaryVertexAssociationJME)
process.load('CommonTools.PileupAlgos.Puppi_cff')
task.add(process.puppi)
Expand All @@ -30,5 +31,7 @@ def makePuppiesFromMiniAOD( process, createScheduledSequence=False ):

#making a sequence for people running the MET tool in scheduled mode
if createScheduledSequence:
puppiMETSequence = cms.Sequence(process.packedPrimaryVertexAssociationJME*process.puppi*process.puppiNoLep)
puppiMETTask = cms.Task(process.packedPrimaryVertexAssociationJME, process.puppi, process.puppiNoLep)
setattr(process, "puppiMETTask", puppiMETTask)
puppiMETSequence = cms.Sequence(puppiMETTask)
setattr(process, "puppiMETSequence", puppiMETSequence)
3 changes: 2 additions & 1 deletion PhysicsTools/PatAlgos/python/tools/jetCollectionTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,9 @@ def addRecoJetCollection(self,
#
elif recoJetInfo.jetPUMethod == "chs":
from CommonTools.ParticleFlow.pfCHS_cff import pfCHS, packedPrimaryVertexAssociationJME
self.addProcessAndTask(proc, "packedPrimaryVertexAssociationJME", packedPrimaryVertexAssociationJME.clone())
self.prerequisites.append("packedPrimaryVertexAssociationJME")
self.addProcessAndTask(proc, pfCand, pfCHS.clone())
self.prerequisites.append(process.packedPrimaryVertexAssociationJME)
self.prerequisites.append(pfCand)
#
# PUPPI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ def getMETUncertainties(self, process, metType, metModName, electronCollection,
# PFPhotons :
#------------
pfPhotons = cms.EDFilter("CandPtrSelector",
src = pfCandCollection,
src = pfCandCollection if self._parameters["Puppi"].value or not self._parameters["onMiniAOD"].value else cms.InputTag("pfCHS"),
cut = cms.string("abs(pdgId) = 22")
)
addToProcessAndTask("pfPhotons"+postfix, pfPhotons, process, task)
Expand Down

0 comments on commit d216e83

Please sign in to comment.