1 import FWCore.ParameterSet.Config
as cms
4 from CommonTools.PileupAlgos.PhotonPuppi_cff
import setupPuppiPhoton,setupPuppiPhotonMiniAOD
8 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
10 process.pfNoLepPUPPI = cms.EDFilter(
"PdgIdCandViewSelector",
11 src = cms.InputTag(
"particleFlow"),
12 pdgId = cms.vint32( 1,2,22,111,130,310,2112,211,-211,321,-321,999211,2212,-2212 )
14 process.pfLeptonsPUPPET = cms.EDFilter(
"PdgIdCandViewSelector",
15 src = cms.InputTag(
"particleFlow"),
16 pdgId = cms.vint32(-11,11,-13,13),
19 process.puppiNoLep = process.puppi.clone()
20 process.puppiNoLep.candName = cms.InputTag(
'pfNoLepPUPPI')
21 process.puppiMerged = cms.EDProducer(
"CandViewMerger",src = cms.VInputTag(
'puppiNoLep',
'pfLeptonsPUPPET'))
22 process.load(
'CommonTools.PileupAlgos.PhotonPuppi_cff')
23 process.puppiForMET = process.puppiPhoton.clone()
25 process.puppiForMET.useRefs =
False
27 process.puppiForMET.puppiCandName =
'puppiMerged'
31 process.load(
'CommonTools.PileupAlgos.Puppi_cff')
32 process.puppi.candName = cms.InputTag(
'packedPFCandidates')
33 process.puppi.vertexName = cms.InputTag(
'offlineSlimmedPrimaryVertices')
34 process.pfNoLepPUPPI = cms.EDFilter(
"CandPtrSelector", src = cms.InputTag(
"packedPFCandidates"), cut = cms.string(
"abs(pdgId) != 13 && abs(pdgId) != 11 && abs(pdgId) != 15"))
35 process.pfLeptonsPUPPET = cms.EDFilter(
"CandPtrSelector", src = cms.InputTag(
"packedPFCandidates"), cut = cms.string(
"abs(pdgId) == 13 || abs(pdgId) == 11 || abs(pdgId) == 15"))
36 process.puppiNoLep = process.puppi.clone()
37 process.puppiNoLep.candName = cms.InputTag(
'pfNoLepPUPPI')
38 process.puppiNoLep.useWeightsNoLep = cms.bool(
True)
39 process.puppiMerged = cms.EDProducer(
"CandViewMerger",src = cms.VInputTag(
'puppiNoLep',
'pfLeptonsPUPPET'))
40 process.load(
'CommonTools.PileupAlgos.PhotonPuppi_cff')
41 process.puppiForMET = process.puppiPhoton.clone()
def setupPuppiPhotonMiniAOD