40 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
41 task.add(process.puppi)
42 process.puppi.candName = cms.InputTag(
'packedPFCandidates')
43 process.puppi.clonePackedCands = cms.bool(
True)
44 process.puppi.vertexName = cms.InputTag(
'offlineSlimmedPrimaryVertices')
45 process.puppi.useExistingWeights = cms.bool(
True)
46 process.pfNoLepPUPPI = cms.EDFilter(
"CandPtrSelector", src = cms.InputTag(
"packedPFCandidates"), cut = cms.string(
"abs(pdgId) != 13 && abs(pdgId) != 11 && abs(pdgId) != 15"))
47 task.add(process.pfNoLepPUPPI)
48 process.pfLeptonsPUPPET = cms.EDFilter(
"CandPtrSelector", src = cms.InputTag(
"packedPFCandidates"), cut = cms.string(
"abs(pdgId) == 13 || abs(pdgId) == 11 || abs(pdgId) == 15"))
49 task.add(process.pfLeptonsPUPPET)
51 process.puppiNoLep.candName = cms.InputTag(
'pfNoLepPUPPI')
52 process.puppiNoLep.useWeightsNoLep = cms.bool(
True)
53 process.puppiNoLep.useExistingWeights = cms.bool(
True)
54 process.puppiMerged = cms.EDProducer(
"CandViewMerger",src = cms.VInputTag(
'puppiNoLep',
'pfLeptonsPUPPET'))
55 task.add(process.puppiMerged)
56 process.load(
'CommonTools.PileupAlgos.PhotonPuppi_cff')
57 task.add(process.puppiPhoton)
59 process.puppiForMET.candName = cms.InputTag(
'packedPFCandidates')
60 process.puppiForMET.photonName = cms.InputTag(
'slimmedPhotons')
61 process.puppiForMET.runOnMiniAOD = cms.bool(
True)
63 task.add(process.egmPhotonIDTask)
65 process.puppiForMET.useRefs =
False 67 process.puppiForMET.puppiCandName =
'puppiMerged' 70 if createScheduledSequence:
71 puppiMETSequence = cms.Sequence(process.puppi*process.pfLeptonsPUPPET*process.pfNoLepPUPPI*process.puppiNoLep*process.puppiMerged*process.puppiForMET)
72 setattr(process,
"puppiMETSequence", puppiMETSequence)
73 def addToProcessAndTask(label, module, process, task)
def setupPuppiPhotonMiniAOD(process)
def getPatAlgosToolsTask(process)