From b7fed90b89d00ffe08a35890cc10bef630db0bb5 Mon Sep 17 00:00:00 2001 From: Christos Anastopoulos <christos.anastopoulos@cern.ch> Date: Mon, 2 Nov 2020 15:44:38 +0000 Subject: [PATCH] CaloROI selector, InDet and GSF . Python fixes . Also add Minimal sanity Reta . Should have ~0 effect for true electrons , could alter a bit the fakes we have --- .../share/InDetRecCaloSeededROISelection.py | 53 +++++++++++-------- .../python/egammaSelectedTrackCopy.py | 3 +- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCaloSeededROISelection.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCaloSeededROISelection.py index 444c62a8477..500af2e0a15 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCaloSeededROISelection.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecCaloSeededROISelection.py @@ -7,41 +7,48 @@ # # --- load the tool to check the energy deposits and select clusters # +from InDetCaloClusterROISelector.InDetCaloClusterROISelectorConf import ( + InDet__CaloClusterROI_Selector) +from InDetCaloClusterROIBuilder.InDetCaloClusterROIBuilderConf import ( + InDet__CaloClusterROI_Builder) +from InDetRecExample.InDetKeys import InDetKeys from egammaRec.Factories import ToolFactory -from egammaCaloTools.egammaCaloToolsFactories import egammaCheckEnergyDepositTool +from egammaCaloTools.egammaCaloToolsFactories import ( + egammaCheckEnergyDepositTool) from egammaCaloTools import egammaCaloToolsConf -egammaCaloClusterROISelector = ToolFactory( egammaCaloToolsConf.egammaCaloClusterSelector, - name = 'caloClusterROISelector', - egammaCheckEnergyDepositTool = egammaCheckEnergyDepositTool, - EMEtCut = 2250., - EMEtSplittingFraction = 0.7, - EMFCut = 0.7, - RetaCut = 0.65, - HadLeakCut = 0.15 - ) +egammaCaloClusterROISelector = ToolFactory( + egammaCaloToolsConf.egammaCaloClusterSelector, + name='caloClusterROISelector', + egammaCheckEnergyDepositTool=egammaCheckEnergyDepositTool, + EMEtCut=2250., + EMEtSplittingFraction=0.7, + EMFCut=0.7, + RetaCut=0.65, + HadLeakCut=0.15 +) # # --- get the builder tool # -from InDetCaloClusterROIBuilder.InDetCaloClusterROIBuilderConf import InDet__CaloClusterROI_Builder -InDetCaloClusterROIBuilder = InDet__CaloClusterROI_Builder(name = "InDetCaloClusterROIBuilder", - EMEnergyOnly = True) +InDetCaloClusterROIBuilder = InDet__CaloClusterROI_Builder( + name="InDetCaloClusterROIBuilder", + EMEnergyOnly=True) if (InDetFlags.doPrintConfigurables()): - printfunc (InDetCaloClusterROIBuilder) + printfunc(InDetCaloClusterROIBuilder) # # --- now load the algorithm # -from InDetCaloClusterROISelector.InDetCaloClusterROISelectorConf import InDet__CaloClusterROI_Selector -InDetCaloClusterROISelector = InDet__CaloClusterROI_Selector (name = "InDetCaloClusterROISelector", - InputClusterContainerName = InDetKeys.CaloClusterContainer(), # "egammaCaloCluster" - OutputClusterContainerName = InDetKeys.CaloClusterROIContainer(), # "InDetCaloClusterROIs" - CaloClusterROIBuilder = InDetCaloClusterROIBuilder, - egammaCaloClusterSelector = egammaCaloClusterROISelector() - ) +InDetCaloClusterROISelector = InDet__CaloClusterROI_Selector( + name="InDetCaloClusterROISelector", + InputClusterContainerName=InDetKeys.CaloClusterContainer(), + # "InDetCaloClusterROIs" + OutputClusterContainerName=InDetKeys.CaloClusterROIContainer(), + CaloClusterROIBuilder=InDetCaloClusterROIBuilder, + egammaCaloClusterSelector=egammaCaloClusterROISelector() +) topSequence += InDetCaloClusterROISelector if (InDetFlags.doPrintConfigurables()): - printfunc (InDetCaloClusterROISelector) - + printfunc(InDetCaloClusterROISelector) diff --git a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py index 95249d385d6..6e14d9b5399 100644 --- a/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py +++ b/Reconstruction/egamma/egammaAlgs/python/egammaSelectedTrackCopy.py @@ -26,7 +26,8 @@ egammaSelectedTrackCopy = AlgFactory( name='egammaSelectedTrackCopy', ExtrapolationTool=EMExtrapolationTools, ExtrapolationToolCommonCache=EMExtrapolationToolsCommonCache, - ClusterContainerName=jobproperties.egammaRecFlags.egammaTopoClusterCollection(), + ClusterContainerName=( + jobproperties.egammaRecFlags.egammaTopoClusterCollection()), TrackParticleContainerName=InDetKeys.xAODTrackParticleContainer(), egammaCaloClusterSelector=egammaCaloClusterGSFSelector ) -- GitLab