1 import FWCore.ParameterSet.Config
as cms
13 from RecoEgamma.EgammaIsolationAlgos.egmPhotonIsolationAOD_cff
import egmPhotonIsolation
as _egmPhotonIsolationAOD
21 from RecoEgamma.EgammaIsolationAlgos.egmIsoConeDefinitions_cfi
import IsoConeDefinitions
23 particleBasedIsolationTmp = _particleBasedIsolation.clone(
24 photonProducer =
"gedPhotonsTmp",
25 electronProducer =
"gedGsfElectronsTmp",
26 pfCandidates =
"particleFlowTmp",
27 valueMapPhoPFblockIso =
"gedPhotonsTmp",
28 valueMapElePFblockIso =
"gedGsfElectronsTmp"
31 IsoConeDefinitionsPhotonsTmp = copy.deepcopy(IsoConeDefinitions)
32 for iPSet
in IsoConeDefinitionsPhotonsTmp:
33 iPSet.particleBasedIsolation =
"particleBasedIsolationTmp:gedPhotonsTmp"
36 egmPhotonIsolationCITK = _egmPhotonIsolationAOD.clone(
37 srcToIsolate =
"gedPhotonsTmp",
38 srcForIsolationCone =
"pfNoPileUpCandidates",
39 isolationConeDefinitions = IsoConeDefinitionsPhotonsTmp
43 egmElectronIsolationCITK = _egmElectronIsolationCITK.clone(
44 srcToIsolate =
"gedGsfElectronsTmp",
45 srcForIsolationCone =
"pfNoPileUpCandidates"
48 for iPSet
in egmElectronIsolationCITK.isolationConeDefinitions:
49 iPSet.particleBasedIsolation =
"particleBasedIsolationTmp:gedGsfElectronsTmp"
52 egmElectronIsolationPileUpCITK = _egmElectronIsolationCITKPileUp.clone(
53 srcToIsolate =
"gedGsfElectronsTmp",
54 srcForIsolationCone =
"pfPileUpAllChargedParticles"
57 for iPSet
in egmElectronIsolationPileUpCITK.isolationConeDefinitions:
58 iPSet.particleBasedIsolation =
"particleBasedIsolationTmp:gedGsfElectronsTmp"
60 photonIDValueMaps = cms.EDProducer(
61 "PhotonIDValueMapProducer",
62 ebReducedRecHitCollection = cms.InputTag(
"ecalRecHit",
"EcalRecHitsEB"),
63 eeReducedRecHitCollection = cms.InputTag(
"ecalRecHit",
"EcalRecHitsEE"),
64 esReducedRecHitCollection = cms.InputTag(
"ecalPreshowerRecHit",
"EcalRecHitsES"),
65 particleBasedIsolation = cms.InputTag(
"particleBasedIsolationTmp",
"gedPhotonsTmp"),
66 pfCandidates = cms.InputTag(
"particleFlowTmp"),
67 src = cms.InputTag(
"gedPhotonsTmp"),
68 vertices = cms.InputTag(
"offlinePrimaryVertices"),
69 isAOD = cms.bool(
True)
73 particleFlowEGammaFullTask = cms.Task(particleFlowEGamma, gedGsfElectronTaskTmp, gedPhotonTaskTmp, ootPhotonTask)
74 particleFlowEGammaFull = cms.Sequence(particleFlowEGammaFullTask)
75 particleFlowEGammaFinalTask = cms.Task(particleBasedIsolationTmp,
78 pfPileUpAllChargedParticles,
79 egmPhotonIsolationCITK,
80 egmElectronIsolationCITK,
81 egmElectronIsolationPileUpCITK,
85 particleFlowEGammaFinal = cms.Sequence(particleFlowEGammaFinalTask)
87 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
88 pp_on_AA.toReplaceWith(particleFlowEGammaFullTask, particleFlowEGammaFullTask.copyAndExclude([ootPhotonTask]))