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  puppiMETSequence = cms.Sequence(process.puppi*process.puppiNoLep)
30  setattr(process, "puppiMETSequence", puppiMETSequence)
helpers.getPatAlgosToolsTask
def getPatAlgosToolsTask(process)
Definition: helpers.py:14
Puppi_cff
puppiForMET_cff.makePuppiesFromMiniAOD
def makePuppiesFromMiniAOD(process, createScheduledSequence=False)
Definition: puppiForMET_cff.py:13
puppiForMET_cff.makePuppies
def makePuppies(process)
Definition: puppiForMET_cff.py:7
helpers