** Warning **

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle dbname=lxr at /lxr/lib/LXR/Common.pm line 1103.

Last-Modified: Fri, 29 Sep 2022 01:12:18 GMT Content-Type: text/html; charset=utf-8 /CMSSW_12_6_X_2022-09-28-2300/PhysicsTools/PatAlgos/python/slimming/puppiForMET_cff.py
Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-26 04:12:33

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from CommonTools.PileupAlgos.Puppi_cff import *
0004 
0005 from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask, addToProcessAndTask
0006 
0007 def makePuppies( process ):
0008     task = getPatAlgosToolsTask(process)
0009     process.load('CommonTools.PileupAlgos.Puppi_cff')
0010     task.add(process.puppi)
0011     task.add(process.puppiNoLep)
0012 
0013 def makePuppiesFromMiniAOD( process, createScheduledSequence=False ):
0014     task = getPatAlgosToolsTask(process)
0015     process.load('CommonTools.PileupAlgos.Puppi_cff')
0016     task.add(process.puppi)
0017     process.puppi.candName = 'packedPFCandidates'
0018     process.puppi.clonePackedCands = True
0019     process.puppi.vertexName = 'offlineSlimmedPrimaryVertices'
0020     process.puppi.useExistingWeights = True
0021     task.add(process.puppiNoLep)
0022     process.puppiNoLep.candName = 'packedPFCandidates'
0023     process.puppiNoLep.clonePackedCands = True
0024     process.puppiNoLep.vertexName = 'offlineSlimmedPrimaryVertices'
0025     process.puppiNoLep.useExistingWeights = True
0026 
0027     #making a sequence for people running the MET tool in scheduled mode
0028     if createScheduledSequence:
0029         puppiMETTask = cms.Task(process.puppi, process.puppiNoLep)
0030         setattr(process, "puppiMETTask", puppiMETTask)
0031         puppiMETSequence = cms.Sequence(puppiMETTask)
0032         setattr(process, "puppiMETSequence", puppiMETSequence)