3 import FWCore.ParameterSet.Config
as cms
8 process.particleFlowORG = process.particleFlow.clone()
15 if hasattr(process,
'particleFlowTmp'):
16 process.particleFlowTmpMixed = cms.EDProducer(
'PFCandidateMixer',
17 col1 = cms.untracked.InputTag(
"cleanedParticleFlow"),
18 col2 = cms.untracked.InputTag(
"particleFlowTmp",
""),
19 trackCol = cms.untracked.InputTag(
"generalTracks"),
22 muons = cms.untracked.InputTag(
""),
23 gsfElectrons = cms.untracked.InputTag(
"")
25 process.muons.PFCandidates = cms.InputTag(
"particleFlowTmpMixed")
27 for p
in process.paths:
28 pth = getattr(process,p)
29 if "particleFlow" in pth.moduleNames():
30 pth.replace(process.particleFlow, process.particleFlowORG*process.particleFlow)
31 if "muons" in pth.moduleNames():
32 pth.replace(process.muons, process.particleFlowTmpMixed*process.muons)
35 if hasattr(process,
"famosParticleFlowSequence"):
36 process.famosParticleFlowSequence.remove(process.pfPhotonTranslatorSequence)
37 process.famosParticleFlowSequence.remove(process.pfElectronTranslatorSequence)
38 process.famosParticleFlowSequence.remove(process.particleFlow)
39 process.famosParticleFlowSequence.__iadd__(process.particleFlowORG)
40 process.famosParticleFlowSequence.__iadd__(process.particleFlow)
41 process.famosParticleFlowSequence.__iadd__(process.pfElectronTranslatorSequence)
42 process.famosParticleFlowSequence.__iadd__(process.pfPhotonTranslatorSequence)
43 elif hasattr(process,
"particleFlowReco"):
44 process.particleFlowReco.remove(process.pfPhotonTranslatorSequence)
45 process.particleFlowReco.remove(process.pfElectronTranslatorSequence)
46 process.particleFlowReco.remove(process.particleFlow)
47 process.particleFlowReco.__iadd__(process.particleFlowORG)
48 process.particleFlowReco.__iadd__(process.particleFlow)
49 process.particleFlowReco.__iadd__(process.pfElectronTranslatorSequence)
50 process.particleFlowReco.__iadd__(process.pfPhotonTranslatorSequence)
52 raise "Cannot find particleFlow sequence"
54 process.pfSelectedElectrons.src = cms.InputTag(
"particleFlowORG")
55 process.pfSelectedPhotons.src = cms.InputTag(
"particleFlowORG")
57 process.particleFlow = cms.EDProducer(
'PFCandidateMixer',
58 col1 = cms.untracked.InputTag(
"cleanedParticleFlow"),
59 col2 = cms.untracked.InputTag(
"particleFlowORG",
""),
60 trackCol = cms.untracked.InputTag(
"generalTracks"),
61 muons = cms.untracked.InputTag(
"muons"),
62 gsfElectrons = cms.untracked.InputTag(
"gsfElectrons")