1 import FWCore.ParameterSet.Config
as cms
11 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
12 task.add(process.puppi)
13 process.pfNoLepPUPPI = cms.EDFilter(
"PdgIdCandViewSelector",
14 src = cms.InputTag(
"particleFlow"),
15 pdgId = cms.vint32( 1,2,22,111,130,310,2112,211,-211,321,-321,999211,2212,-2212 )
17 task.add(process.pfNoLepPUPPI)
18 process.pfLeptonsPUPPET = cms.EDFilter(
"PdgIdCandViewSelector",
19 src = cms.InputTag(
"particleFlow"),
20 pdgId = cms.vint32(-11,11,-13,13),
22 task.add(process.pfLeptonsPUPPET)
25 process.puppiNoLep.candName = cms.InputTag(
'pfNoLepPUPPI')
26 process.puppiMerged = cms.EDProducer(
"CandViewMerger",src = cms.VInputTag(
'puppiNoLep',
'pfLeptonsPUPPET'))
27 task.add(process.puppiMerged)
28 process.load(
'CommonTools.PileupAlgos.PhotonPuppi_cff')
29 task.add(process.puppiPhoton)
32 process.puppiForMET.useRefs =
False 34 process.puppiForMET.puppiCandName =
'puppiMerged' 39 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
40 task.add(process.puppi)
41 process.puppi.candName = cms.InputTag(
'packedPFCandidates')
42 process.puppi.clonePackedCands = cms.bool(
True)
43 process.puppi.vertexName = cms.InputTag(
'offlineSlimmedPrimaryVertices')
44 process.puppi.useExistingWeights = cms.bool(
True)
45 process.pfNoLepPUPPI = cms.EDFilter(
"CandPtrSelector", src = cms.InputTag(
"packedPFCandidates"), cut = cms.string(
"abs(pdgId) != 13 && abs(pdgId) != 11 && abs(pdgId) != 15"))
46 task.add(process.pfNoLepPUPPI)
47 process.pfLeptonsPUPPET = cms.EDFilter(
"CandPtrSelector", src = cms.InputTag(
"packedPFCandidates"), cut = cms.string(
"abs(pdgId) == 13 || abs(pdgId) == 11 || abs(pdgId) == 15"))
48 task.add(process.pfLeptonsPUPPET)
50 process.puppiNoLep.candName = cms.InputTag(
'pfNoLepPUPPI')
51 process.puppiNoLep.useWeightsNoLep = cms.bool(
True)
52 process.puppiNoLep.useExistingWeights = cms.bool(
True)
53 process.puppiMerged = cms.EDProducer(
"CandViewMerger",src = cms.VInputTag(
'puppiNoLep',
'pfLeptonsPUPPET'))
54 task.add(process.puppiMerged)
55 process.load(
'CommonTools.PileupAlgos.PhotonPuppi_cff')
56 task.add(process.puppiPhoton)
58 process.puppiForMET.candName = cms.InputTag(
'packedPFCandidates')
59 process.puppiForMET.photonName = cms.InputTag(
'slimmedPhotons')
60 process.puppiForMET.runOnMiniAOD = cms.bool(
True)
62 process.puppiForMET.useRefs =
False 64 process.puppiForMET.puppiCandName =
'puppiMerged' 67 if createScheduledSequence:
68 puppiMETSequence = cms.Sequence(process.puppi*process.pfLeptonsPUPPET*process.pfNoLepPUPPI*process.puppiNoLep*process.puppiMerged*process.puppiForMET)
69 setattr(process,
"puppiMETSequence", puppiMETSequence)
def addToProcessAndTask(label, module, process, task)
def getPatAlgosToolsTask(process)