diff --git a/RecoEcal/Configuration/python/RecoEcal_cff.py b/RecoEcal/Configuration/python/RecoEcal_cff.py index e3bd0163e65eb..79369134f393f 100644 --- a/RecoEcal/Configuration/python/RecoEcal_cff.py +++ b/RecoEcal/Configuration/python/RecoEcal_cff.py @@ -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) diff --git a/RecoEcal/EgammaClusterProducers/python/correctedIslandBarrelSuperClusters_cfi.py b/RecoEcal/EgammaClusterProducers/python/correctedIslandBarrelSuperClusters_cfi.py index b29b661956630..f117104eacb15 100644 --- a/RecoEcal/EgammaClusterProducers/python/correctedIslandBarrelSuperClusters_cfi.py +++ b/RecoEcal/EgammaClusterProducers/python/correctedIslandBarrelSuperClusters_cfi.py @@ -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) diff --git a/RecoEcal/EgammaClusterProducers/python/correctedIslandEndcapSuperClusters_cfi.py b/RecoEcal/EgammaClusterProducers/python/correctedIslandEndcapSuperClusters_cfi.py index ad8f2f14bf599..bd7d53987b00e 100644 --- a/RecoEcal/EgammaClusterProducers/python/correctedIslandEndcapSuperClusters_cfi.py +++ b/RecoEcal/EgammaClusterProducers/python/correctedIslandEndcapSuperClusters_cfi.py @@ -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) diff --git a/RecoEcal/EgammaClusterProducers/python/islandSuperClusters_cfi.py b/RecoEcal/EgammaClusterProducers/python/islandSuperClusters_cfi.py index 102920793f790..46978e12b304d 100644 --- a/RecoEcal/EgammaClusterProducers/python/islandSuperClusters_cfi.py +++ b/RecoEcal/EgammaClusterProducers/python/islandSuperClusters_cfi.py @@ -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) diff --git a/RecoEgamma/Configuration/python/RecoEgamma_EventContent_cff.py b/RecoEgamma/Configuration/python/RecoEgamma_EventContent_cff.py index c7f1c7a4690a6..4470b249ff0dd 100644 --- a/RecoEgamma/Configuration/python/RecoEgamma_EventContent_cff.py +++ b/RecoEgamma/Configuration/python/RecoEgamma_EventContent_cff.py @@ -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_*_*' ]) ) diff --git a/RecoEgamma/Configuration/python/RecoEgamma_cff.py b/RecoEgamma/Configuration/python/RecoEgamma_cff.py index 020cdcb6677d1..09aaced8c1c1e 100644 --- a/RecoEgamma/Configuration/python/RecoEgamma_cff.py +++ b/RecoEgamma/Configuration/python/RecoEgamma_cff.py @@ -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) diff --git a/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py b/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py index 5f4477930658d..9bfef9ac6c9b6 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py +++ b/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py @@ -21,7 +21,7 @@ pixelSeedProducer = 'electronMergedSeedsFromMultiCl' ) -photonCoreIsland = photonCore.clone( +islandPhotonCore = photonCore.clone( scHybridBarrelProducer = "correctedIslandBarrelSuperClusters", scIslandEndcapProducer = "correctedIslandEndcapSuperClusters", minSCEt = 8.0 diff --git a/RecoEgamma/EgammaPhotonProducers/python/photonSequence_cff.py b/RecoEgamma/EgammaPhotonProducers/python/photonSequence_cff.py index 80b89e657003e..aad56e6df767a 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/photonSequence_cff.py +++ b/RecoEgamma/EgammaPhotonProducers/python/photonSequence_cff.py @@ -11,7 +11,7 @@ _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 @@ -19,8 +19,8 @@ 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) diff --git a/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py b/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py index 3833158e5fcfb..75b237bad14cc 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py +++ b/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py @@ -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, ) diff --git a/RecoHI/HiEgammaAlgos/python/photonIsolationHIProducer_cfi.py b/RecoHI/HiEgammaAlgos/python/photonIsolationHIProducer_cfi.py index e02e9a3dcd2f3..399ed1c19cfbe 100644 --- a/RecoHI/HiEgammaAlgos/python/photonIsolationHIProducer_cfi.py +++ b/RecoHI/HiEgammaAlgos/python/photonIsolationHIProducer_cfi.py @@ -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)