Skip to content

Commit

Permalink
fix the pp_on_XeXe_2017 era to run and store island photons
Browse files Browse the repository at this point in the history
apply the era modifiers to the original definitions in RecoEcal/EgammaClusterProducers
as suggested here cms-sw#20929 (comment)
and here cms-sw#20929 (comment)
  • Loading branch information
Kaya Tatar committed Oct 30, 2017
1 parent 33acb25 commit 472316f
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 12 deletions.
4 changes: 2 additions & 2 deletions RecoEcal/Configuration/python/RecoEcal_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

from RecoEcal.EgammaClusterProducers.islandBasicClusters_cfi import islandBasicClusters
from RecoEcal.EgammaClusterProducers.islandClusteringSequence_cff import *

_ecalClustersHI = ecalClusters.copy()
_ecalClustersHI += islandBasicClusters
_ecalClustersHI += islandClusteringSequence
for e in [pA_2016, peripheralPbPb, pp_on_XeXe_2017]:
e.toReplaceWith(ecalClusters, _ecalClustersHI)
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@
recHitProducer = cms.InputTag("ecalRecHit","EcalRecHitsEB")
)

from Configuration.Eras.Modifier_pA_2016_cff import pA_2016
from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

from RecoHI.HiEgammaAlgos.HiCorrectedIslandBarrelSuperClusters_cfi import correctedIslandBarrelSuperClusters as _hiCorrectedIslandBarrelSuperClusters

for e in [pA_2016, peripheralPbPb, pp_on_XeXe_2017]:
e.toReplaceWith(correctedIslandBarrelSuperClusters, _hiCorrectedIslandBarrelSuperClusters)
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@
recHitProducer = cms.InputTag("ecalRecHit","EcalRecHitsEE")
)

from Configuration.Eras.Modifier_pA_2016_cff import pA_2016
from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

from RecoHI.HiEgammaAlgos.HiCorrectedIslandEndcapSuperClusters_cfi import correctedIslandEndcapSuperClusters as _hiCorrectedIslandEndcapSuperClusters

for e in [pA_2016, peripheralPbPb, pp_on_XeXe_2017]:
e.toReplaceWith(correctedIslandEndcapSuperClusters, _hiCorrectedIslandEndcapSuperClusters)
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,11 @@
)
)

from Configuration.Eras.Modifier_pA_2016_cff import pA_2016
from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

from RecoHI.HiEgammaAlgos.HiIslandSuperClusters_cfi import islandSuperClusters as _hiIslandSuperClusters

for e in [pA_2016, peripheralPbPb, pp_on_XeXe_2017]:
e.toReplaceWith(islandSuperClusters, _hiIslandSuperClusters)
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@
for e in [pA_2016, peripheralPbPb, pp_on_XeXe_2017]:
for ec in [RecoEgammaAOD.outputCommands, RecoEgammaRECO.outputCommands, RecoEgammaFEVT.outputCommands]:
e.toModify( ec, func=lambda outputCommands: outputCommands.extend(['keep recoHIPhotonIsolationedmValueMap_photonIsolationHIProducerppGED_*_*',
'keep recoHIPhotonIsolationedmValueMap_photonIsolationHIProducerpp_*_*'
'keep recoHIPhotonIsolationedmValueMap_photonIsolationHIProducerpp_*_*',
'keep recoHIPhotonIsolationedmValueMap_photonIsolationHIProducerppIsland_*_*',
'keep recoPhotons_islandPhotons_*_*'
])
)
4 changes: 2 additions & 2 deletions RecoEgamma/Configuration/python/RecoEgamma_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
#HI-specific algorithms needed in pp scenario special configurations
from RecoEcal.EgammaClusterProducers.islandBasicClusters_cfi import islandBasicClusters
from RecoHI.HiEgammaAlgos.photonIsolationHIProducer_cfi import photonIsolationHIProducerpp
from RecoHI.HiEgammaAlgos.photonIsolationHIProducer_cfi import photonIsolationHIProducerppGED
from RecoHI.HiEgammaAlgos.photonIsolationHIProducer_cfi import photonIsolationHIProducerppIsland

_egammaHighLevelRecoPostPF_HI = egammaHighLevelRecoPostPF.copy()
_egammaHighLevelRecoPostPF_HI += islandBasicClusters
_egammaHighLevelRecoPostPF_HI += photonIsolationHIProducerpp
_egammaHighLevelRecoPostPF_HI += photonIsolationHIProducerppGED
_egammaHighLevelRecoPostPF_HI += photonIsolationHIProducerppIsland
for e in [pA_2016, peripheralPbPb, pp_on_XeXe_2017]:
e.toReplaceWith(egammaHighLevelRecoPostPF, _egammaHighLevelRecoPostPF_HI)
2 changes: 1 addition & 1 deletion RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# MVA_weights_location = cms.string('RecoEgamma/EgammaTools/data/TMVAnalysis_Likelihood.weights.txt')
)

photonCoreIsland = photonCore.clone(
islandPhotonCore = photonCore.clone(
scHybridBarrelProducer = "correctedIslandBarrelSuperClusters",
scIslandEndcapProducer = "correctedIslandEndcapSuperClusters",
minSCEt = 8.0
Expand Down
9 changes: 5 additions & 4 deletions RecoEgamma/EgammaPhotonProducers/python/photonSequence_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
photonSequence = cms.Sequence( photonCore + photons )

_photonSequenceWithIsland = photonSequence.copy()
_photonSequenceWithIsland += ( photonCoreIsland + photonsIsland)
_photonSequenceWithIsland += ( islandPhotonCore + islandPhotons )

from Configuration.Eras.Modifier_pA_2016_cff import pA_2016
from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toReplaceWith(
photonSequence, _photonSequenceWithIsland
)
for e in [pA_2016, peripheralPbPb, pp_on_XeXe_2017]:
e.toReplaceWith(photonSequence, _photonSequenceWithIsland)
2 changes: 1 addition & 1 deletion RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
)


photonsIsland = photons.clone(
islandPhotons = photons.clone(
photonCoreProducer = "islandPhotonCore",
minSCEtBarrel = 5.0,
minSCEtEndcap = 15.0,
Expand Down
6 changes: 5 additions & 1 deletion RecoHI/HiEgammaAlgos/python/photonIsolationHIProducer_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@
photonProducer=cms.InputTag("gedPhotons")
)

photonIsolationHIProducerppIsland = photonIsolationHIProducerpp.clone(
photonProducer=cms.InputTag("islandPhotons")
)

from RecoEcal.EgammaClusterProducers.islandBasicClusters_cfi import *

islandBasicClustersGED = islandBasicClusters.clone()
photonIsolationHISequence = cms.Sequence(islandBasicClusters * photonIsolationHIProducerpp)
photonIsolationHISequenceGED = cms.Sequence(islandBasicClustersGED * photonIsolationHIProducerppGED)

photonIsolationHISequenceIsland = cms.Sequence(islandBasicClusters * photonIsolationHIProducerppIsland)

0 comments on commit 472316f

Please sign in to comment.