From 6b8c8ad7dfd6a38a2e2c89345712db7e9c5140b7 Mon Sep 17 00:00:00 2001 From: Sam Harper Date: Wed, 10 Jul 2019 21:42:05 +0100 Subject: [PATCH 1/9] adding light by light modifier --- Configuration/StandardSequences/python/Eras.py | 3 ++- .../python/particleFlowSuperClusterECAL_cfi.py | 7 +++++++ .../python/ecalDrivenElectronSeeds_cfi.py | 4 ++++ .../python/gedGsfElectrons_cfi.py | 8 ++++++++ .../EgammaElectronProducers/python/gsfElectrons_cfi.py | 8 ++++++++ .../python/gedPhotonSequence_cff.py | 9 +++++++-- .../EgammaPhotonProducers/python/photonCore_cfi.py | 3 +++ RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py | 10 ++++++++++ .../PFProducer/python/particleFlowBlock_cfi.py | 6 ++++++ RecoParticleFlow/PFProducer/python/particleFlow_cfi.py | 3 +++ RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py | 4 ++-- .../python/trackerDrivenElectronSeeds_cfi.py | 3 +++ 12 files changed, 63 insertions(+), 5 deletions(-) diff --git a/Configuration/StandardSequences/python/Eras.py b/Configuration/StandardSequences/python/Eras.py index 6131362f95b18..d0121a58b3673 100644 --- a/Configuration/StandardSequences/python/Eras.py +++ b/Configuration/StandardSequences/python/Eras.py @@ -66,7 +66,8 @@ def __init__(self): 'run2_miniAOD_devel', 'run2_nanoAOD_102Xv1', 'hcalHardcodeConditions', 'hcalSkipPacker', 'run2_HLTconditions_2016','run2_HLTconditions_2017','run2_HLTconditions_2018', - 'bParking'] + 'bParking', + 'lightByLightLowPt'] internalUseModChains = ['run2_2017_noTrackingModifier'] self.pythonCfgLines = {} diff --git a/RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusterECAL_cfi.py b/RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusterECAL_cfi.py index 18e35853162ff..6f1e1f3d2da3c 100644 --- a/RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusterECAL_cfi.py +++ b/RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusterECAL_cfi.py @@ -155,3 +155,10 @@ pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, useDynamicDPhiWindow = False) pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, phiwidth_SuperClusterBarrel = 0.20) pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, phiwidth_SuperClusterEndcap = 0.20) + +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(particleFlowSuperClusterECAL, + thresh_SCEt = 1.0, + thresh_PFClusterSeedBarrel = 0.5, + thresh_PFClusterSeedEndcap = 0.5) + diff --git a/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py b/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py index ae6afde22b6cd..a9c1f2d403324 100644 --- a/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py +++ b/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py @@ -98,6 +98,10 @@ SeedConfiguration = dict( allowHGCal = True ) ) +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(ecalDrivenElectronSeeds.SeedConfiguration + LowPtThreshold =1.0, + applyHOverECut = False) # create ecal driven seeds for electron using HGCal Multiclusters ecalDrivenElectronSeedsFromMultiCl = ecalDrivenElectronSeeds.clone( diff --git a/RecoEgamma/EgammaElectronProducers/python/gedGsfElectrons_cfi.py b/RecoEgamma/EgammaElectronProducers/python/gedGsfElectrons_cfi.py index 4df661cb3284c..7d815c7d62ce2 100644 --- a/RecoEgamma/EgammaElectronProducers/python/gedGsfElectrons_cfi.py +++ b/RecoEgamma/EgammaElectronProducers/python/gedGsfElectrons_cfi.py @@ -63,3 +63,11 @@ from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018 pp_on_AA_2018.toModify(gedGsfElectronsTmp.preselection, minSCEtBarrel = 15.0) pp_on_AA_2018.toModify(gedGsfElectronsTmp.preselection, minSCEtEndcaps = 15.0) + +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(gedGsfElectronsTmp.preselection, + minSCEtBarrel = 1.0, + minSCEtEndcaps = 1.0) +lightByLightLowPt.toModify(gedGsfElectronsTmp, + applyPreselection = False) + diff --git a/RecoEgamma/EgammaElectronProducers/python/gsfElectrons_cfi.py b/RecoEgamma/EgammaElectronProducers/python/gsfElectrons_cfi.py index df2cd341081b6..d7c56be1aea75 100644 --- a/RecoEgamma/EgammaElectronProducers/python/gsfElectrons_cfi.py +++ b/RecoEgamma/EgammaElectronProducers/python/gsfElectrons_cfi.py @@ -117,3 +117,11 @@ ecalDrivenGsfElectronsFromMultiCl = ecalDrivenGsfElectrons.clone( gsfElectronCoresTag = "ecalDrivenGsfElectronCoresFromMultiCl", ) + +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(gsfElectrons.preselection, + minSCEtBarrel = 1.0, + minSCEtEndcaps = 1.0) + +lightByLightLowPt.toModify(gedGsfElectronsTmp, + applyPreselection = False) diff --git a/RecoEgamma/EgammaPhotonProducers/python/gedPhotonSequence_cff.py b/RecoEgamma/EgammaPhotonProducers/python/gedPhotonSequence_cff.py index d78beddf505fa..c1130296acd57 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/gedPhotonSequence_cff.py +++ b/RecoEgamma/EgammaPhotonProducers/python/gedPhotonSequence_cff.py @@ -36,5 +36,10 @@ gedPhotonSequence = cms.Sequence(gedPhotons) - - +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(gedPhotons, + minSCEtBarrel = 1.0, + minSCEtEndcap = 1.0) +lightByLightLowPt.toModify(gedPhotonsTmp, + minSCEtBarrel = 1.0, + minSCEtEndcap = 1.0) diff --git a/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py b/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py index 9bfef9ac6c9b6..94814fe9b08f4 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py +++ b/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py @@ -26,3 +26,6 @@ scIslandEndcapProducer = "correctedIslandEndcapSuperClusters", minSCEt = 8.0 ) +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(photonCore,minSCEt=0) # +lightByLightLowPt.toModify(islandPhotonCore,minSCEt = 1.0) #default 8 diff --git a/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py b/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py index 7912ab28a8487..d46780bee9b4d 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py +++ b/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py @@ -150,3 +150,13 @@ RecHitFlagToBeExcludedEE = multi5x5BasicClustersCleaned.RecHitFlagToBeExcluded, RecHitSeverityToBeExcludedEE = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded, ) + + +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +#check what these actually do +lightByLightLowPt.toModify(photons, + minSCEtBarrel = 1.0, #default 10 + minSCEtEndcap = 1.0) #default 10 +lightByLightLowPt.toModify(islandPhotons, + minSCEtBarrel = 1.0, #default 5 + minSCEtEndcap = 1.0) #default 15 diff --git a/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py b/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py index 51e56eba568c9..5fa9c99f53b23 100644 --- a/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py +++ b/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py @@ -209,3 +209,9 @@ def _findIndicesByModule(name): particleFlowBlock, elementImporters = _addTimingLayer ) + +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(particleFlowBlock.elementImporters[2], + minSuperClusterPt = 1.0, + minPTforBypass = 0.0) + diff --git a/RecoParticleFlow/PFProducer/python/particleFlow_cfi.py b/RecoParticleFlow/PFProducer/python/particleFlow_cfi.py index 4816734d259ad..451096640064c 100644 --- a/RecoParticleFlow/PFProducer/python/particleFlow_cfi.py +++ b/RecoParticleFlow/PFProducer/python/particleFlow_cfi.py @@ -231,3 +231,6 @@ electron_protectionsForBadHcal = dict(enableProtections = True), photon_protectionsForBadHcal = dict(enableProtections = True)) + +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(particleFlowTmp,photon_MinEt = 1.) diff --git a/RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py b/RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py index 01819a3d3b325..b38c2e73be202 100644 --- a/RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py +++ b/RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py @@ -41,5 +41,5 @@ pf_convBremFinderID_mvaWeightFileEndcapsHighPt = cms.FileInPath('RecoParticleFlow/PFTracking/data/TMVAClassification_ConvBremFinder_Testetgt20absetagt1_479_BDT.weights.xml') ) - - +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(pfTrackElec,MinSCEnergy = 1.0) diff --git a/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py b/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py index 9c247e9025be9..9ed6557a5f8c6 100644 --- a/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py +++ b/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py @@ -71,3 +71,6 @@ _fastSim_trackerDrivenElectronSeeds.idCollection = cms.VInputTag("trackerDrivenElectronSeedsTmp:preid",) fastSim.toReplaceWith(trackerDrivenElectronSeeds,_fastSim_trackerDrivenElectronSeeds) + +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(trackerDrivenElectronSeeds,MinPt = 1.0) From 7929e6a3b932384edab5513316a4b929aa36d3b7 Mon Sep 17 00:00:00 2001 From: rchudasa Date: Thu, 11 Jul 2019 16:21:20 +0200 Subject: [PATCH 2/9] updating rechits and ecal digis selectors --- .../EgammaClusterProducers/python/ecalDigiSelector_cfi.py | 5 +++++ .../python/reducedRecHitsSequence_cff.py | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/RecoEcal/EgammaClusterProducers/python/ecalDigiSelector_cfi.py b/RecoEcal/EgammaClusterProducers/python/ecalDigiSelector_cfi.py index 9da215549b081..6b53ab5046a8a 100644 --- a/RecoEcal/EgammaClusterProducers/python/ecalDigiSelector_cfi.py +++ b/RecoEcal/EgammaClusterProducers/python/ecalDigiSelector_cfi.py @@ -13,3 +13,8 @@ selectedEcalEBDigiCollection = cms.string('selectedEcalEBDigiCollection'), selectedEcalEEDigiCollection = cms.string('selectedEcalEEDigiCollection') ) + +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(selectDigi, + cluster_pt_thresh = 1.0, + single_cluster_thresh = 1.0) diff --git a/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py b/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py index 949ee4e8588e8..85bd9ac6c5d35 100644 --- a/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py +++ b/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py @@ -195,3 +195,7 @@ pp_on_AA_2018.toModify(reducedEcalRecHitsEE.interestingDetIdCollections, func = lambda list: list.remove(cms.InputTag("interestingOotGamIsoDetIdEE")) ) pp_on_AA_2018.toModify(reducedEcalRecHitsES.interestingDetIds, func = lambda list: list.remove(cms.InputTag("interestingEcalDetIdOOTPFES")) ) pp_on_AA_2018.toModify(reducedEcalRecHitsES.interestingDetIdsNotToClean, func = lambda list: list.remove(cms.InputTag("interestingOotEgammaIsoESDetId")) ) + +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(reducedEcalRecHitsES, + scEtThreshold = 1.0) From ce82fec478d796f111a1d42003d38cd8406b4e62 Mon Sep 17 00:00:00 2001 From: rchudasa Date: Mon, 15 Jul 2019 11:20:16 +0200 Subject: [PATCH 3/9] Modifier for lbyl added to Eras repo --- Configuration/Eras/python/Modifier_lightByLightLowPt_cff.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Configuration/Eras/python/Modifier_lightByLightLowPt_cff.py diff --git a/Configuration/Eras/python/Modifier_lightByLightLowPt_cff.py b/Configuration/Eras/python/Modifier_lightByLightLowPt_cff.py new file mode 100644 index 0000000000000..8a66ca3994a44 --- /dev/null +++ b/Configuration/Eras/python/Modifier_lightByLightLowPt_cff.py @@ -0,0 +1,4 @@ +import FWCore.ParameterSet.Config as cms + +lightByLightLowPt = cms.Modifier() + From bf4ecb0ee246c4c1dfe24c77d339a8fc075e39ce Mon Sep 17 00:00:00 2001 From: rchudasa Date: Wed, 31 Jul 2019 11:43:41 +0200 Subject: [PATCH 4/9] interesting rechit threshold updated --- .../python/interestingEgammaIsoDetIdsSequence_cff.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/RecoEgamma/EgammaIsolationAlgos/python/interestingEgammaIsoDetIdsSequence_cff.py b/RecoEgamma/EgammaIsolationAlgos/python/interestingEgammaIsoDetIdsSequence_cff.py index c068b0dd21e5c..6b76c5e5f0251 100644 --- a/RecoEgamma/EgammaIsolationAlgos/python/interestingEgammaIsoDetIdsSequence_cff.py +++ b/RecoEgamma/EgammaIsolationAlgos/python/interestingEgammaIsoDetIdsSequence_cff.py @@ -136,3 +136,15 @@ from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018 pp_on_AA_2018.toReplaceWith(interestingEgammaIsoDetIdsTask, _pp_on_AA_interestingEgammaIsoDetIdsTask) + +from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt +lightByLightLowPt.toModify(interestingGedEgammaIsoESDetId, + minSCEt = 1.0, #default 500 + minEleEt = 1.0, #default 20 + minPhoEt = 1.0 #default 20 +) +lightByLightLowPt.toModify(interestingGedEgammaIsoHCALDetId, + minSCEt = 1.0, #default 20 + minEleEt= 1.0, #default 20 + minPhoEt= 1.0 #default 20 +) From 645b6198df584667c0b6265af657135285c26f1f Mon Sep 17 00:00:00 2001 From: rchudasa Date: Thu, 1 Aug 2019 17:04:17 +0200 Subject: [PATCH 5/9] ecalDrivenElectronseed merge conflict solved --- .../python/ecalDrivenElectronSeeds_cfi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py b/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py index a9c1f2d403324..df4f17454da3f 100644 --- a/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py +++ b/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py @@ -99,7 +99,7 @@ ) from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(ecalDrivenElectronSeeds.SeedConfiguration +lightByLightLowPt.toModify(ecalDrivenElectronSeeds.SeedConfiguration, LowPtThreshold =1.0, applyHOverECut = False) From e7abd482fe9af0490b6840687ac9d4e2168efef0 Mon Sep 17 00:00:00 2001 From: rchudasa Date: Mon, 5 Aug 2019 15:32:54 +0200 Subject: [PATCH 6/9] Light by light modifier renamed to egamma_lowPt_exclusive and repo changed to process modifier --- .../python/egamma_lowPt_exclusive_cff.py} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename Configuration/{Eras/python/Modifier_lightByLightLowPt_cff.py => ProcessModifiers/python/egamma_lowPt_exclusive_cff.py} (50%) diff --git a/Configuration/Eras/python/Modifier_lightByLightLowPt_cff.py b/Configuration/ProcessModifiers/python/egamma_lowPt_exclusive_cff.py similarity index 50% rename from Configuration/Eras/python/Modifier_lightByLightLowPt_cff.py rename to Configuration/ProcessModifiers/python/egamma_lowPt_exclusive_cff.py index 8a66ca3994a44..d97112cae14a4 100644 --- a/Configuration/Eras/python/Modifier_lightByLightLowPt_cff.py +++ b/Configuration/ProcessModifiers/python/egamma_lowPt_exclusive_cff.py @@ -1,4 +1,3 @@ import FWCore.ParameterSet.Config as cms -lightByLightLowPt = cms.Modifier() - +egamma_lowPt_exclusive = cms.Modifier() From 287747f8783845804c3950e452abffee9333fce4 Mon Sep 17 00:00:00 2001 From: rchudasa Date: Mon, 5 Aug 2019 15:39:08 +0200 Subject: [PATCH 7/9] Light by light modifier renamed to egamma_lowPt_exclusive in corresponding Egamma scripts --- Configuration/StandardSequences/python/Eras.py | 3 +-- .../EgammaClusterProducers/python/ecalDigiSelector_cfi.py | 4 ++-- .../python/particleFlowSuperClusterECAL_cfi.py | 4 ++-- .../python/reducedRecHitsSequence_cff.py | 4 ++-- .../python/ecalDrivenElectronSeeds_cfi.py | 4 ++-- .../EgammaElectronProducers/python/gedGsfElectrons_cfi.py | 6 +++--- .../EgammaElectronProducers/python/gsfElectrons_cfi.py | 6 +++--- .../python/interestingEgammaIsoDetIdsSequence_cff.py | 6 +++--- .../EgammaPhotonProducers/python/gedPhotonSequence_cff.py | 6 +++--- RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py | 6 +++--- RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py | 8 +++----- .../PFProducer/python/particleFlowBlock_cfi.py | 4 ++-- RecoParticleFlow/PFProducer/python/particleFlow_cfi.py | 5 ++--- RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py | 4 ++-- .../PFTracking/python/trackerDrivenElectronSeeds_cfi.py | 5 ++--- 15 files changed, 35 insertions(+), 40 deletions(-) diff --git a/Configuration/StandardSequences/python/Eras.py b/Configuration/StandardSequences/python/Eras.py index d0121a58b3673..6131362f95b18 100644 --- a/Configuration/StandardSequences/python/Eras.py +++ b/Configuration/StandardSequences/python/Eras.py @@ -66,8 +66,7 @@ def __init__(self): 'run2_miniAOD_devel', 'run2_nanoAOD_102Xv1', 'hcalHardcodeConditions', 'hcalSkipPacker', 'run2_HLTconditions_2016','run2_HLTconditions_2017','run2_HLTconditions_2018', - 'bParking', - 'lightByLightLowPt'] + 'bParking'] internalUseModChains = ['run2_2017_noTrackingModifier'] self.pythonCfgLines = {} diff --git a/RecoEcal/EgammaClusterProducers/python/ecalDigiSelector_cfi.py b/RecoEcal/EgammaClusterProducers/python/ecalDigiSelector_cfi.py index 6b53ab5046a8a..571e38da782f9 100644 --- a/RecoEcal/EgammaClusterProducers/python/ecalDigiSelector_cfi.py +++ b/RecoEcal/EgammaClusterProducers/python/ecalDigiSelector_cfi.py @@ -14,7 +14,7 @@ selectedEcalEEDigiCollection = cms.string('selectedEcalEEDigiCollection') ) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(selectDigi, +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(selectDigi, cluster_pt_thresh = 1.0, single_cluster_thresh = 1.0) diff --git a/RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusterECAL_cfi.py b/RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusterECAL_cfi.py index 6f1e1f3d2da3c..fcebf68ded310 100644 --- a/RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusterECAL_cfi.py +++ b/RecoEcal/EgammaClusterProducers/python/particleFlowSuperClusterECAL_cfi.py @@ -156,8 +156,8 @@ pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, phiwidth_SuperClusterBarrel = 0.20) pp_on_AA_2018.toModify(particleFlowSuperClusterECAL, phiwidth_SuperClusterEndcap = 0.20) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(particleFlowSuperClusterECAL, +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(particleFlowSuperClusterECAL, thresh_SCEt = 1.0, thresh_PFClusterSeedBarrel = 0.5, thresh_PFClusterSeedEndcap = 0.5) diff --git a/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py b/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py index 85bd9ac6c5d35..b221230dda8c0 100644 --- a/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py +++ b/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py @@ -196,6 +196,6 @@ pp_on_AA_2018.toModify(reducedEcalRecHitsES.interestingDetIds, func = lambda list: list.remove(cms.InputTag("interestingEcalDetIdOOTPFES")) ) pp_on_AA_2018.toModify(reducedEcalRecHitsES.interestingDetIdsNotToClean, func = lambda list: list.remove(cms.InputTag("interestingOotEgammaIsoESDetId")) ) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(reducedEcalRecHitsES, +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(reducedEcalRecHitsES, scEtThreshold = 1.0) diff --git a/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py b/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py index df4f17454da3f..0af5d7fae5b72 100644 --- a/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py +++ b/RecoEgamma/EgammaElectronProducers/python/ecalDrivenElectronSeeds_cfi.py @@ -98,8 +98,8 @@ SeedConfiguration = dict( allowHGCal = True ) ) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(ecalDrivenElectronSeeds.SeedConfiguration, +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(ecalDrivenElectronSeeds.SeedConfiguration, LowPtThreshold =1.0, applyHOverECut = False) diff --git a/RecoEgamma/EgammaElectronProducers/python/gedGsfElectrons_cfi.py b/RecoEgamma/EgammaElectronProducers/python/gedGsfElectrons_cfi.py index 7d815c7d62ce2..e5af2dc609e5b 100644 --- a/RecoEgamma/EgammaElectronProducers/python/gedGsfElectrons_cfi.py +++ b/RecoEgamma/EgammaElectronProducers/python/gedGsfElectrons_cfi.py @@ -64,10 +64,10 @@ pp_on_AA_2018.toModify(gedGsfElectronsTmp.preselection, minSCEtBarrel = 15.0) pp_on_AA_2018.toModify(gedGsfElectronsTmp.preselection, minSCEtEndcaps = 15.0) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(gedGsfElectronsTmp.preselection, +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(gedGsfElectronsTmp.preselection, minSCEtBarrel = 1.0, minSCEtEndcaps = 1.0) -lightByLightLowPt.toModify(gedGsfElectronsTmp, +egamma_lowPt_exclusive.toModify(gedGsfElectronsTmp, applyPreselection = False) diff --git a/RecoEgamma/EgammaElectronProducers/python/gsfElectrons_cfi.py b/RecoEgamma/EgammaElectronProducers/python/gsfElectrons_cfi.py index d7c56be1aea75..bfa0b43f8222a 100644 --- a/RecoEgamma/EgammaElectronProducers/python/gsfElectrons_cfi.py +++ b/RecoEgamma/EgammaElectronProducers/python/gsfElectrons_cfi.py @@ -118,10 +118,10 @@ gsfElectronCoresTag = "ecalDrivenGsfElectronCoresFromMultiCl", ) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(gsfElectrons.preselection, +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(gsfElectrons.preselection, minSCEtBarrel = 1.0, minSCEtEndcaps = 1.0) -lightByLightLowPt.toModify(gedGsfElectronsTmp, +egamma_lowPt_exclusive.toModify(gsfElectrons, applyPreselection = False) diff --git a/RecoEgamma/EgammaIsolationAlgos/python/interestingEgammaIsoDetIdsSequence_cff.py b/RecoEgamma/EgammaIsolationAlgos/python/interestingEgammaIsoDetIdsSequence_cff.py index 6b76c5e5f0251..7de3e8e910aa8 100644 --- a/RecoEgamma/EgammaIsolationAlgos/python/interestingEgammaIsoDetIdsSequence_cff.py +++ b/RecoEgamma/EgammaIsolationAlgos/python/interestingEgammaIsoDetIdsSequence_cff.py @@ -137,13 +137,13 @@ from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018 pp_on_AA_2018.toReplaceWith(interestingEgammaIsoDetIdsTask, _pp_on_AA_interestingEgammaIsoDetIdsTask) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(interestingGedEgammaIsoESDetId, +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(interestingGedEgammaIsoESDetId, minSCEt = 1.0, #default 500 minEleEt = 1.0, #default 20 minPhoEt = 1.0 #default 20 ) -lightByLightLowPt.toModify(interestingGedEgammaIsoHCALDetId, +egamma_lowPt_exclusive.toModify(interestingGedEgammaIsoHCALDetId, minSCEt = 1.0, #default 20 minEleEt= 1.0, #default 20 minPhoEt= 1.0 #default 20 diff --git a/RecoEgamma/EgammaPhotonProducers/python/gedPhotonSequence_cff.py b/RecoEgamma/EgammaPhotonProducers/python/gedPhotonSequence_cff.py index c1130296acd57..c4b569b857f21 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/gedPhotonSequence_cff.py +++ b/RecoEgamma/EgammaPhotonProducers/python/gedPhotonSequence_cff.py @@ -36,10 +36,10 @@ gedPhotonSequence = cms.Sequence(gedPhotons) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(gedPhotons, +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(gedPhotons, minSCEtBarrel = 1.0, minSCEtEndcap = 1.0) -lightByLightLowPt.toModify(gedPhotonsTmp, +egamma_lowPt_exclusive.toModify(gedPhotonsTmp, minSCEtBarrel = 1.0, minSCEtEndcap = 1.0) diff --git a/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py b/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py index 94814fe9b08f4..c5c6e2a4e3051 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py +++ b/RecoEgamma/EgammaPhotonProducers/python/photonCore_cfi.py @@ -26,6 +26,6 @@ scIslandEndcapProducer = "correctedIslandEndcapSuperClusters", minSCEt = 8.0 ) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(photonCore,minSCEt=0) # -lightByLightLowPt.toModify(islandPhotonCore,minSCEt = 1.0) #default 8 +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(photonCore,minSCEt=0) # +egamma_lowPt_exclusive.toModify(islandPhotonCore,minSCEt = 1.0) #default 8 diff --git a/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py b/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py index d46780bee9b4d..1269d15628b1a 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py +++ b/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py @@ -151,12 +151,10 @@ RecHitSeverityToBeExcludedEE = cleanedHybridSuperClusters.RecHitSeverityToBeExcluded, ) - -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -#check what these actually do -lightByLightLowPt.toModify(photons, +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(photons, minSCEtBarrel = 1.0, #default 10 minSCEtEndcap = 1.0) #default 10 -lightByLightLowPt.toModify(islandPhotons, +egamma_lowPt_exclusive.toModify(islandPhotons, minSCEtBarrel = 1.0, #default 5 minSCEtEndcap = 1.0) #default 15 diff --git a/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py b/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py index 5fa9c99f53b23..1ca652d941659 100644 --- a/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py +++ b/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py @@ -210,8 +210,8 @@ def _findIndicesByModule(name): elementImporters = _addTimingLayer ) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(particleFlowBlock.elementImporters[2], +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(particleFlowBlock.elementImporters[2], minSuperClusterPt = 1.0, minPTforBypass = 0.0) diff --git a/RecoParticleFlow/PFProducer/python/particleFlow_cfi.py b/RecoParticleFlow/PFProducer/python/particleFlow_cfi.py index 451096640064c..f4dbe87ee77e4 100644 --- a/RecoParticleFlow/PFProducer/python/particleFlow_cfi.py +++ b/RecoParticleFlow/PFProducer/python/particleFlow_cfi.py @@ -231,6 +231,5 @@ electron_protectionsForBadHcal = dict(enableProtections = True), photon_protectionsForBadHcal = dict(enableProtections = True)) - -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(particleFlowTmp,photon_MinEt = 1.) +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(particleFlowTmp,photon_MinEt = 1.) diff --git a/RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py b/RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py index b38c2e73be202..0758a3b3949eb 100644 --- a/RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py +++ b/RecoParticleFlow/PFTracking/python/pfTrackElec_cfi.py @@ -41,5 +41,5 @@ pf_convBremFinderID_mvaWeightFileEndcapsHighPt = cms.FileInPath('RecoParticleFlow/PFTracking/data/TMVAClassification_ConvBremFinder_Testetgt20absetagt1_479_BDT.weights.xml') ) -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(pfTrackElec,MinSCEnergy = 1.0) +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(pfTrackElec,MinSCEnergy = 1.0) diff --git a/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py b/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py index 9ed6557a5f8c6..28e58d27c5084 100644 --- a/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py +++ b/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py @@ -71,6 +71,5 @@ _fastSim_trackerDrivenElectronSeeds.idCollection = cms.VInputTag("trackerDrivenElectronSeedsTmp:preid",) fastSim.toReplaceWith(trackerDrivenElectronSeeds,_fastSim_trackerDrivenElectronSeeds) - -from Configuration.Eras.Modifier_lightByLightLowPt_cff import lightByLightLowPt -lightByLightLowPt.toModify(trackerDrivenElectronSeeds,MinPt = 1.0) +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(trackerDrivenElectronSeeds,MinPt = 1.0) From 38a560dc6e2a6b138bb4f0a768bbac9602f642c6 Mon Sep 17 00:00:00 2001 From: rchudasa Date: Mon, 12 Aug 2019 18:31:31 +0200 Subject: [PATCH 8/9] Event content code based, island photon threshold not changed and Slava's comment on PFBlock addressed --- .../python/photons_cfi.py | 3 --- .../python/RecoLocalCalo_EventContent_cff.py | 10 +++++++++ .../RecoLocalTracker_EventContent_cff.py | 6 ++++++ .../python/particleFlowBlock_cfi.py | 21 ++++++++++++++----- 4 files changed, 32 insertions(+), 8 deletions(-) diff --git a/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py b/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py index 1269d15628b1a..2eca73e0bdd52 100644 --- a/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py +++ b/RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py @@ -155,6 +155,3 @@ egamma_lowPt_exclusive.toModify(photons, minSCEtBarrel = 1.0, #default 10 minSCEtEndcap = 1.0) #default 10 -egamma_lowPt_exclusive.toModify(islandPhotons, - minSCEtBarrel = 1.0, #default 5 - minSCEtEndcap = 1.0) #default 15 diff --git a/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py b/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py index eef751657822c..3e0f16a09a115 100644 --- a/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py +++ b/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py @@ -97,3 +97,13 @@ def _updateOutput( era, outputPSets, commands): 'keep QIE10DataFrameHcalDataFrameContainer_hcalDigis_ZDC_*' ]) ) + +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify( RecoLocalCaloAOD, + outputCommands = RecoLocalCaloAOD.outputCommands + ['keep *_towerMaker_*_*', + 'keep *_zdcreco_*_*', + 'keep ZDCDataFramesSorted_hcalDigis_*_*', + 'keep ZDCDataFramesSorted_castorDigis_*_*', + 'keep QIE10DataFrameHcalDataFrameContainer_hcalDigis_ZDC_*']) + + diff --git a/RecoLocalTracker/Configuration/python/RecoLocalTracker_EventContent_cff.py b/RecoLocalTracker/Configuration/python/RecoLocalTracker_EventContent_cff.py index 1760b8c5ae452..cebe90bf2f3e7 100644 --- a/RecoLocalTracker/Configuration/python/RecoLocalTracker_EventContent_cff.py +++ b/RecoLocalTracker/Configuration/python/RecoLocalTracker_EventContent_cff.py @@ -29,3 +29,9 @@ phase2_tracker.toModify(RecoLocalTrackerFEVT, outputCommands = RecoLocalTrackerFEVT.outputCommands + ['keep *_siPhase2Clusters_*_*'] ) phase2_tracker.toModify(RecoLocalTrackerRECO, outputCommands = RecoLocalTrackerRECO.outputCommands + ['keep *_siPhase2Clusters_*_*'] ) +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify( RecoLocalTrackerAOD, + outputCommands = RecoLocalTrackerAOD.outputCommands + ['keep *_siPixelRecHits_*_*', + 'keep *_siPixelClusters_*_*']) + + diff --git a/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py b/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py index 1ca652d941659..66e1894a45349 100644 --- a/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py +++ b/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py @@ -138,6 +138,15 @@ ) ) +for imp in particleFlowBlock.elementImporters: + if imp.importerName.value() == "SuperClusterImporter": + _scImporter = imp + +from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +egamma_lowPt_exclusive.toModify(_scImporter, + minSuperClusterPt = 1.0, + minPTforBypass = 0.0) + def _findIndicesByModule(name): ret = [] for i, pset in enumerate(particleFlowBlock.elementImporters): @@ -145,6 +154,7 @@ def _findIndicesByModule(name): ret.append(i) return ret + from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal # kill tracks in the HGCal _insertGeneralTracksImporter = {} @@ -210,8 +220,9 @@ def _findIndicesByModule(name): elementImporters = _addTimingLayer ) -from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive -egamma_lowPt_exclusive.toModify(particleFlowBlock.elementImporters[2], - minSuperClusterPt = 1.0, - minPTforBypass = 0.0) - +#from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive +#egamma_lowPt_exclusive.toModify(particleFlowBlock.elementImporters[2], +#egamma_lowPt_exclusive.toModify(particleFlowBlock.findIndicesByModule("SuperClusterImporter")[0], +# minSuperClusterPt = 1.0, +# minPTforBypass = 0.0) +# From fb097ff535b1d3f4f036c184e8cebea4ce87941b Mon Sep 17 00:00:00 2001 From: rchudasa Date: Mon, 12 Aug 2019 18:35:57 +0200 Subject: [PATCH 9/9] removed commented lines in particleFlowBlock --- RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py b/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py index 66e1894a45349..d46de79b4e901 100644 --- a/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py +++ b/RecoParticleFlow/PFProducer/python/particleFlowBlock_cfi.py @@ -220,9 +220,3 @@ def _findIndicesByModule(name): elementImporters = _addTimingLayer ) -#from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive -#egamma_lowPt_exclusive.toModify(particleFlowBlock.elementImporters[2], -#egamma_lowPt_exclusive.toModify(particleFlowBlock.findIndicesByModule("SuperClusterImporter")[0], -# minSuperClusterPt = 1.0, -# minPTforBypass = 0.0) -#