Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

island photons for XeXe collision era #20929

Merged
merged 10 commits into from Oct 31, 2017
4 changes: 2 additions & 2 deletions RecoEcal/Configuration/python/RecoEcal_cff.py
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)
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)
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]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there should be an easy way to avoid this ever lengthening set of modifiers and just have one.. I'll try to suggest something

Copy link
Contributor Author

@ttrk ttrk Oct 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make a new PR which adds an era for 2017 pp ref run. I can implement your suggestion in the new PR.

e.toReplaceWith(correctedIslandEndcapSuperClusters, _hiCorrectedIslandEndcapSuperClusters)
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)
Expand Up @@ -183,6 +183,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_*_*'
])
)
3 changes: 2 additions & 1 deletion RecoEgamma/Configuration/python/RecoEgamma_cff.py
Expand Up @@ -44,12 +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 += 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
Expand Up @@ -21,7 +21,7 @@
pixelSeedProducer = 'electronMergedSeedsFromMultiCl'
)

photonCoreIsland = photonCore.clone(
islandPhotonCore = photonCore.clone(
scHybridBarrelProducer = "correctedIslandBarrelSuperClusters",
scIslandEndcapProducer = "correctedIslandEndcapSuperClusters",
minSCEt = 8.0
Expand Down
10 changes: 5 additions & 5 deletions RecoEgamma/EgammaPhotonProducers/python/photonSequence_cff.py
Expand Up @@ -11,16 +11,16 @@
_photonSequenceFromMultiCl = photonSequence.copy()
_photonSequenceFromMultiCl += ( photonCoreFromMultiCl + photonsFromMultiCl)
_photonSequenceWithIsland = photonSequence.copy()
_photonSequenceWithIsland += ( photonCoreIsland + photonsIsland)
_photonSequenceWithIsland += ( islandPhotonCore + islandPhotons )


from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
phase2_hgcal.toReplaceWith(
photonSequence, _photonSequenceFromMultiCl
)

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)
72 changes: 64 additions & 8 deletions RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py
Expand Up @@ -84,12 +84,68 @@
photonProducer = 'photonCoreFromMultiCl'
)

photonsIsland = photons.clone(
photonProducer = "islandPhotonCore",
minSCEtBarrel = 5.0,
minSCEtEndcap = 15.0,
minR9Barrel = 10.,
minR9Endcap = 10.,
maxHoverEEndcap = 0.5,
maxHoverEBarrel = 0.99
islandPhotons = cms.EDProducer("PhotonProducer",
photonCoreProducer = cms.InputTag("islandPhotonCore"),
regressionWeightsFromDB = cms.bool(True),
energyRegressionWeightsFileLocation = cms.string('/afs/cern.ch/user/b/bendavid/cmspublic/regweights/gbrph.root'),
energyRegressionWeightsDBLocation = cms.string('wgbrph'),
superClusterEnergyCorrFunction = cms.string("EcalClusterEnergyCorrection"),
superClusterEnergyErrorFunction = cms.string("EcalClusterEnergyUncertainty"),
superClusterCrackEnergyCorrFunction = cms.string("EcalClusterCrackCorrection"),
photonEcalEnergyCorrFunction = cms.string("EcalClusterEnergyCorrectionObjectSpecific"),
candidateP4type = cms.string("fromEcalEnergy"),
isolationSumsCalculatorSet = cms.PSet(isolationSumsCalculator),
mipVariableSet = cms.PSet(mipVariable),
usePrimaryVertex = cms.bool(True),
primaryVertexProducer = cms.InputTag('offlinePrimaryVerticesWithBS'),
posCalc_t0_endcPresh = cms.double(3.6),
posCalc_logweight = cms.bool(True),
posCalc_w0 = cms.double(4.2),
hbheInstance = cms.string(''),
posCalc_t0_endc = cms.double(6.3),
barrelEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
hbheModule = cms.string('hbhereco'),
endcapEcalHits = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
hcalTowers = cms.InputTag("towerMaker"),
runMIPTagger = cms.bool(True),
highEt = cms.double(100.),
minR9Barrel = cms.double(10.0),
minR9Endcap = cms.double(10.0),
hOverEConeSize = cms.double(0.15),
posCalc_x0 = cms.double(0.89),
posCalc_t0_barl = cms.double(7.7),
minSCEtBarrel = cms.double(5.0),
minSCEtEndcap = cms.double(15.0),
maxHoverEBarrel = cms.double(0.99),
maxHoverEEndcap = cms.double(0.5),
ecalRecHitSumEtOffsetBarrel = cms.double(999999999),
ecalRecHitSumEtSlopeBarrel = cms.double(0.),
ecalRecHitSumEtOffsetEndcap = cms.double(999999999),
ecalRecHitSumEtSlopeEndcap = cms.double(0.),
hcalTowerSumEtOffsetBarrel = cms.double(999999999),
hcalTowerSumEtSlopeBarrel = cms.double(0.),
hcalTowerSumEtOffsetEndcap = cms.double(999999999),
hcalTowerSumEtSlopeEndcap = cms.double(0.),
nTrackSolidConeBarrel =cms.double(999999999),
nTrackSolidConeEndcap =cms.double(999999999),
nTrackHollowConeBarrel =cms.double(999999999),
nTrackHollowConeEndcap =cms.double(999999999),
trackPtSumSolidConeBarrel =cms.double(999999999),
trackPtSumSolidConeEndcap =cms.double(999999999),
trackPtSumHollowConeBarrel =cms.double(999999999),
trackPtSumHollowConeEndcap =cms.double(999999999),
sigmaIetaIetaCutBarrel=cms.double(999999999),
sigmaIetaIetaCutEndcap=cms.double(999999999),
posCalcParameters = cms.PSet( T0_barl = cms.double(7.4),
T0_endc = cms.double(6.3),
T0_endcPresh = cms.double(3.6),
LogWeighted = cms.bool(True),
W0 = cms.double(4.2),
X0 = cms.double(0.89)
),

RecHitFlagToBeExcludedEB = cleanedHybridSuperClusters.RecHitFlagToBeExcluded,
RecHitSeverityToBeExcludedEB = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
RecHitFlagToBeExcludedEE = multi5x5BasicClustersCleaned.RecHitFlagToBeExcluded,
RecHitSeverityToBeExcludedEE = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded,
)
6 changes: 5 additions & 1 deletion RecoHI/HiEgammaAlgos/python/photonIsolationHIProducer_cfi.py
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)