1 import FWCore.ParameterSet.Config
as cms
9 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
10 task.add(process.puppi)
11 process.pfNoLepPUPPI = cms.EDFilter(
"PdgIdCandViewSelector",
12 src = cms.InputTag(
"particleFlow"),
13 pdgId = cms.vint32( 1,2,22,111,130,310,2112,211,-211,321,-321,999211,2212,-2212 )
15 task.add(process.pfNoLepPUPPI)
16 process.pfLeptonsPUPPET = cms.EDFilter(
"PdgIdCandViewSelector",
17 src = cms.InputTag(
"particleFlow"),
18 pdgId = cms.vint32(-11,11,-13,13),
20 task.add(process.pfLeptonsPUPPET)
22 process.puppiNoLep.candName = cms.InputTag(
'pfNoLepPUPPI')
23 process.puppiNoLep.PtMaxPhotons = 20.
24 process.puppiForMET = cms.EDProducer(
"CandViewMerger",src = cms.VInputTag(
'puppiNoLep',
'pfLeptonsPUPPET'))
25 task.add(process.puppiForMET)
29 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
30 task.add(process.puppi)
31 process.puppi.candName = cms.InputTag(
'packedPFCandidates')
32 process.puppi.clonePackedCands =
True 33 process.puppi.vertexName = cms.InputTag(
'offlineSlimmedPrimaryVertices')
34 process.puppi.useExistingWeights =
True 35 process.pfNoLepPUPPI = cms.EDFilter(
"CandPtrSelector", src = cms.InputTag(
"packedPFCandidates"), cut = cms.string(
"abs(pdgId) != 13 && abs(pdgId) != 11 && abs(pdgId) != 15"))
36 task.add(process.pfNoLepPUPPI)
37 process.pfLeptonsPUPPET = cms.EDFilter(
"CandPtrSelector", src = cms.InputTag(
"packedPFCandidates"), cut = cms.string(
"abs(pdgId) == 13 || abs(pdgId) == 11 || abs(pdgId) == 15"))
38 task.add(process.pfLeptonsPUPPET)
40 process.puppiNoLep.candName = cms.InputTag(
'pfNoLepPUPPI')
41 process.puppiNoLep.useWeightsNoLep =
True 42 process.puppiNoLep.PtMaxPhotons = 20.
43 process.puppiForMET = cms.EDProducer(
"CandViewMerger",src = cms.VInputTag(
'puppiNoLep',
'pfLeptonsPUPPET'))
44 task.add(process.puppiForMET)
47 if createScheduledSequence:
48 puppiMETSequence = cms.Sequence(process.puppi*process.pfLeptonsPUPPET*process.pfNoLepPUPPI*process.puppiNoLep*process.puppiForMET)
49 setattr(process,
"puppiMETSequence", puppiMETSequence)
def addToProcessAndTask(label, module, process, task)
def getPatAlgosToolsTask(process)