CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
puppiForMET_cff Namespace Reference

Functions

def makePuppies
 
def makePuppiesFromMiniAOD
 

Function Documentation

def puppiForMET_cff.makePuppies (   process)

Definition at line 7 of file puppiForMET_cff.py.

References helpers.getPatAlgosToolsTask().

7 
8 def makePuppies( process ):
9  task = getPatAlgosToolsTask(process)
10  process.load('CommonTools.PileupAlgos.Puppi_cff')
11  task.add(process.puppi)
12  task.add(process.puppiNoLep)
def getPatAlgosToolsTask
Definition: helpers.py:13
def puppiForMET_cff.makePuppiesFromMiniAOD (   process,
  createScheduledSequence = False 
)

Definition at line 13 of file puppiForMET_cff.py.

References helpers.getPatAlgosToolsTask().

Referenced by nano_cff.nanoAOD_recalibrateMETs().

13 
14 def makePuppiesFromMiniAOD( process, createScheduledSequence=False ):
15  task = getPatAlgosToolsTask(process)
16  from CommonTools.ParticleFlow.pfCHS_cff import packedPrimaryVertexAssociationJME
17  setattr(process, "packedPrimaryVertexAssociationJME", packedPrimaryVertexAssociationJME.clone())
18  task.add(process.packedPrimaryVertexAssociationJME)
19  process.load('CommonTools.PileupAlgos.Puppi_cff')
20  task.add(process.puppi)
21  process.puppi.candName = 'packedPFCandidates'
22  process.puppi.clonePackedCands = True
23  process.puppi.vertexName = 'offlineSlimmedPrimaryVertices'
24  process.puppi.useExistingWeights = True
25  process.puppi.vertexAssociation = 'packedPrimaryVertexAssociationJME:original'
26  task.add(process.puppiNoLep)
27  process.puppiNoLep.candName = 'packedPFCandidates'
28  process.puppiNoLep.clonePackedCands = True
29  process.puppiNoLep.vertexName = 'offlineSlimmedPrimaryVertices'
30  process.puppiNoLep.useExistingWeights = True
31  process.puppiNoLep.vertexAssociation = 'packedPrimaryVertexAssociationJME:original'
32 
33  #making a sequence for people running the MET tool in scheduled mode
34  if createScheduledSequence:
35  puppiMETTask = cms.Task(process.packedPrimaryVertexAssociationJME, process.puppi, process.puppiNoLep)
36  setattr(process, "puppiMETTask", puppiMETTask)
37  puppiMETSequence = cms.Sequence(puppiMETTask)
38  setattr(process, "puppiMETSequence", puppiMETSequence)
def getPatAlgosToolsTask
Definition: helpers.py:13