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 particleBasedIsolationTmp.photonProducer = cms.InputTag(
"gedPhotonsTmp")
25 particleBasedIsolationTmp.electronProducer = cms.InputTag(
"gedGsfElectronsTmp")
26 particleBasedIsolationTmp.pfCandidates = cms.InputTag(
"particleFlowTmp")
27 particleBasedIsolationTmp.valueMapPhoPFblockIso = cms.string(
"gedPhotonsTmp")
28 particleBasedIsolationTmp.valueMapElePFblockIso = cms.string(
"gedGsfElectronsTmp")
30 egmPhotonIsolationCITK = _egmPhotonIsolationAOD.clone()
31 egmElectronIsolationCITK = _egmElectronIsolationCITK.clone()
32 egmElectronIsolationPileUpCITK = _egmElectronIsolationCITKPileUp.clone()
35 IsoConeDefinitionsPhotonsTmp = copy.deepcopy(IsoConeDefinitions)
36 for iPSet
in IsoConeDefinitionsPhotonsTmp:
37 iPSet.particleBasedIsolation = cms.InputTag(
"particleBasedIsolationTmp",
"gedPhotonsTmp")
39 for iPSet
in egmElectronIsolationCITK.isolationConeDefinitions:
40 iPSet.particleBasedIsolation = cms.InputTag(
"particleBasedIsolationTmp",
"gedGsfElectronsTmp")
42 for iPSet
in egmElectronIsolationPileUpCITK.isolationConeDefinitions:
43 iPSet.particleBasedIsolation = cms.InputTag(
"particleBasedIsolationTmp",
"gedGsfElectronsTmp")
46 egmPhotonIsolationCITK.srcToIsolate = cms.InputTag(
"gedPhotonsTmp")
47 egmPhotonIsolationCITK.srcForIsolationCone = cms.InputTag(
"pfNoPileUpCandidates")
48 egmPhotonIsolationCITK.isolationConeDefinitions = IsoConeDefinitionsPhotonsTmp
50 egmElectronIsolationCITK.srcToIsolate = cms.InputTag(
"gedGsfElectronsTmp")
51 egmElectronIsolationCITK.srcForIsolationCone = cms.InputTag(
"pfNoPileUpCandidates")
53 egmElectronIsolationPileUpCITK.srcToIsolate = cms.InputTag(
"gedGsfElectronsTmp")
54 egmElectronIsolationPileUpCITK.srcForIsolationCone = cms.InputTag(
"pfPileUpAllChargedParticles")
56 photonIDValueMaps = cms.EDProducer(
57 "PhotonIDValueMapProducer",
58 ebReducedRecHitCollection = cms.InputTag(
"ecalRecHit",
"EcalRecHitsEB"),
59 ebReducedRecHitCollectionMiniAOD = cms.InputTag(
""),
60 eeReducedRecHitCollection = cms.InputTag(
"ecalRecHit",
"EcalRecHitsEE"),
61 eeReducedRecHitCollectionMiniAOD = cms.InputTag(
""),
62 esReducedRecHitCollection = cms.InputTag(
"ecalPreshowerRecHit",
"EcalRecHitsES"),
63 esReducedRecHitCollectionMiniAOD = cms.InputTag(
""),
64 particleBasedIsolation = cms.InputTag(
"particleBasedIsolationTmp",
"gedPhotonsTmp"),
65 pfCandidates = cms.InputTag(
"particleFlowTmp"),
66 pfCandidatesMiniAOD = cms.InputTag(
""),
67 src = cms.InputTag(
"gedPhotonsTmp"),
68 srcMiniAOD = cms.InputTag(
""),
69 vertices = cms.InputTag(
"offlinePrimaryVertices"),
70 verticesMiniAOD = cms.InputTag(
"")
74 particleFlowEGammaFull = cms.Sequence(particleFlowEGamma*gedGsfElectronSequenceTmp*gedPhotonSequenceTmp*ootPhotonSequence)
75 particleFlowEGammaFinal = cms.Sequence(particleBasedIsolationTmp*
76 pfNoPileUpIsoSequence*
77 cms.ignore(pfNoPileUpCandidates)*
78 cms.ignore(pfPileUpAllChargedParticles)*
79 egmPhotonIsolationCITK*
80 egmElectronIsolationCITK*
81 egmElectronIsolationPileUpCITK*
84 gedElectronPFIsoSequence)
86 from Configuration.Eras.Modifier_pp_on_AA_2018_cff
import pp_on_AA_2018
87 pp_on_AA_2018.toReplaceWith(particleFlowEGammaFull, particleFlowEGammaFull.copyAndExclude([ootPhotonSequence]))