CMS 3D CMS Logo

puppiForMET_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4 
5 from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask
6 
7 def makePuppies( process ):
8  task = getPatAlgosToolsTask(process)
9  process.load('CommonTools.PileupAlgos.Puppi_cff')
10  task.add(process.puppi)
11  task.add(process.puppiNoLep)
12 
13 def makePuppiesFromMiniAOD( process, createScheduledSequence=False ):
14  task = getPatAlgosToolsTask(process)
15  process.load('CommonTools.PileupAlgos.Puppi_cff')
16  task.add(process.puppi)
17  process.puppi.candName = 'packedPFCandidates'
18  process.puppi.clonePackedCands = True
19  process.puppi.vertexName = 'offlineSlimmedPrimaryVertices'
20  process.puppi.useExistingWeights = True
21  task.add(process.puppiNoLep)
22  process.puppiNoLep.candName = 'packedPFCandidates'
23  process.puppiNoLep.clonePackedCands = True
24  process.puppiNoLep.vertexName = 'offlineSlimmedPrimaryVertices'
25  process.puppiNoLep.useExistingWeights = True
26 
27  #making a sequence for people running the MET tool in scheduled mode
28  if createScheduledSequence:
29  puppiMETTask = cms.Task(process.puppi, process.puppiNoLep)
30  setattr(process, "puppiMETTask", puppiMETTask)
31  puppiMETSequence = cms.Sequence(puppiMETTask)
32  setattr(process, "puppiMETSequence", puppiMETSequence)
def makePuppies(process)
def getPatAlgosToolsTask(process)
Definition: helpers.py:13
def makePuppiesFromMiniAOD(process, createScheduledSequence=False)