diff --git a/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibFactories.py b/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibFactories.py index a0632e884e4cc2081f93fac3c73d5a2fa7d0351b..7ddea26c0ffd66b94d12615f25e0b46ece64119a 100644 --- a/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibFactories.py +++ b/Reconstruction/egamma/egammaMVACalib/python/egammaMVACalibFactories.py @@ -30,6 +30,7 @@ convertedPhotonMVATool = ToolFactory( egammaMVASvc = ServiceFactory( egammaMVACalibConf.egammaMVASvc, + name="egammaMVASvc_LegacyConfig", ElectronTool=electronMVATool, UnconvertedPhotonTool=unconvPhotonMVATool, ConvertedPhotonTool=convertedPhotonMVATool) diff --git a/Reconstruction/egamma/egammaTools/python/EMTrackMatchBuilder.py b/Reconstruction/egamma/egammaTools/python/EMTrackMatchBuilder.py deleted file mode 100644 index 5dab286d0120f3edfccb6a58b2f7dcdcb4174dc7..0000000000000000000000000000000000000000 --- a/Reconstruction/egamma/egammaTools/python/EMTrackMatchBuilder.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -__doc__ = """ToolFactory to instantiate -EMTrackMatchBuilder with default configuration""" -__author__ = "Bruno Lenzi" - -from egammaTools import egammaToolsConf -from egammaRec.Factories import ToolFactory -from egammaRec import egammaKeys -from AthenaCommon.BeamFlags import jobproperties -from egammaTrackTools.egammaTrackToolsFactories import ( - EMExtrapolationToolsCache) - -EMTrackMatchBuilder = ToolFactory( - egammaToolsConf.EMTrackMatchBuilder, - TrackParticlesName=egammaKeys.outputTrackParticleKey(), - ExtrapolationTool=EMExtrapolationToolsCache, - broadDeltaEta=0.1, # candidate match is done in 2 times this so +- 0.2 - broadDeltaPhi=0.15, # candidate match is done in 2 times this so +- 0.3 - useCandidateMatch=True, - useScoring=True, - SecondPassRescale=True, - UseRescaleMetric=True, - isCosmics=(jobproperties.Beam.beamType() == "cosmics") -) diff --git a/Reconstruction/egamma/egammaTools/python/egammaExtrapolators.py b/Reconstruction/egamma/egammaTools/python/egammaExtrapolators.py index ffccdf6af29de497fb43db50db18d0d00bb3b4e8..62201322425777057a891966bc3feb7cc2a4a9e9 100644 --- a/Reconstruction/egamma/egammaTools/python/egammaExtrapolators.py +++ b/Reconstruction/egamma/egammaTools/python/egammaExtrapolators.py @@ -1,6 +1,6 @@ # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration -from egammaRec.Factories import ToolFactory, PublicToolFactory +from egammaRec.Factories import ToolFactory from TrkExTools.AtlasExtrapolator import AtlasExtrapolator __doc__ = """ToolFactories to instantiate InDet tools for egamma with default configuration""" @@ -74,13 +74,6 @@ egammaExtrapolator = ToolFactory( AtlasExtrapolator, name='egammaExtrapolator') -# The general use extrapolator same as ATLAS default. -# Public as still needed due to some InnerDetector/Tracking -# tools -AtlasPublicExtrapolator = PublicToolFactory( - AtlasExtrapolator, - name='AtlasPublicExtrapolator') - # Extrapolator specialized for the e/gamma specific calo extrapolations # i.e ignore material effect that are not relevant. egammaCaloExtrapolator = ToolFactory( diff --git a/Reconstruction/egamma/egammaTools/python/egammaOQFlagsBuilder.py b/Reconstruction/egamma/egammaTools/python/egammaOQFlagsBuilder.py deleted file mode 100644 index 5f381654c9276edb832b04bb56fbd3079385ea74..0000000000000000000000000000000000000000 --- a/Reconstruction/egamma/egammaTools/python/egammaOQFlagsBuilder.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -from egammaTools import egammaToolsConf -from egammaRec.Factories import ToolFactory -from egammaRec import egammaKeys - -from CaloTools.CaloToolsConf import CaloAffectedTool - -egammaOQFlagsBuilder = ToolFactory( - egammaToolsConf.egammaOQFlagsBuilder, - QCellCut=4000., - QCellHECCut=60000., - QCellSporCut=4000., - LArQCut=0.8, - TCut=10., - TCutVsE=2., - RcellCut=0.8, - CellsName=egammaKeys.caloCellKey(), - affectedTool=CaloAffectedTool()) diff --git a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py index 9414f306eb680becdb6056e924a18653650547cd..4a1f14b52a274176a86992a79589c5ad9462d572 100644 --- a/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py +++ b/Reconstruction/egamma/egammaTools/python/egammaToolsFactories.py @@ -5,9 +5,6 @@ all egammaTools with default configuration""" __author__ = "Bruno Lenzi" -from ElectronPhotonSelectorTools.EgammaPIDdefs import egammaPID -from ElectronPhotonSelectorTools.ConfiguredAsgForwardElectronIsEMSelectors \ - import ConfiguredAsgForwardElectronIsEMSelector from .EMPIDBuilderBase import EMPIDBuilderPhotonBase from .EMPIDBuilderBase import EMPIDBuilderElectronBase from ElectronPhotonSelectorTools import ElectronPhotonSelectorToolsConf @@ -29,25 +26,6 @@ _clusterTypes = dict( ) -# Configure fixed-size (non-supercell) corrections -def configureFixedSizeClusterCorrections(swTool): - """Add attributes ClusterCorrectionToolsXX to egammaSwTool - object for fixed-size cluster corrections.""" - from CaloClusterCorrection.CaloSwCorrections import make_CaloSwCorrections - from CaloRec.CaloRecMakers import _process_tools - - for attrName, clName in _clusterTypes.items(): - x = 'ClusterCorrectionTools' + attrName - if not hasattr(swTool, x) or getattr(swTool, x): - continue - y = make_CaloSwCorrections( - clName, - suffix='EG', - version=jobproperties.egammaRecFlags.clusterCorrectionVersion(), - cells_name=egammaKeys.caloCellKey()) - setattr(swTool, x, _process_tools(swTool, y)) - - # Configure corrections for superclusters. def configureSuperClusterCorrections(swTool): """Add attributes ClusterCorrectionToolsXX to egammaSwTool @@ -69,12 +47,6 @@ def configureSuperClusterCorrections(swTool): cells_name=egammaKeys.caloCellKey()))) -# At the end we could keep only one version of the tools -# below -egammaSwTool = ToolFactory(egammaToolsConf.egammaSwTool, - postInit=[configureSuperClusterCorrections]) - - egammaSwSuperClusterTool = ToolFactory( egammaToolsConf.egammaSwTool, postInit=[configureSuperClusterCorrections]) @@ -122,24 +94,7 @@ PhotonPIDBuilder = ToolFactory( EMPIDBuilderPhotonBase, name="PhotonPIDBuilder") -# ForwardElectron Selectors - -LooseForwardElectronSelector = ToolFactory( - ConfiguredAsgForwardElectronIsEMSelector, - name="LooseForwardElectronSelector", - quality=egammaPID.ForwardElectronIDLoose) -MediumForwardElectronSelector = ToolFactory( - ConfiguredAsgForwardElectronIsEMSelector, - name="MediumForwardElectronSelector", - quality=egammaPID.ForwardElectronIDMedium) -TightForwardElectronSelector = ToolFactory( - ConfiguredAsgForwardElectronIsEMSelector, - name="TightForwardElectronSelector", - quality=egammaPID.ForwardElectronIDTight) - # ------------------------- # Import the factories that are not defined here -from .EMTrackMatchBuilder import EMTrackMatchBuilder # noqa: F401 -from .egammaOQFlagsBuilder import egammaOQFlagsBuilder # noqa: F401 from .EMShowerBuilder import EMShowerBuilder # noqa: F401 diff --git a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py index 536f84b2a295416db046112a266c5c335c151180..5726df84bee9acb3a91fa2e5d495c401277647e2 100644 --- a/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py +++ b/Reconstruction/egamma/egammaTrackTools/python/egammaTrackToolsFactories.py @@ -48,26 +48,3 @@ EMExtrapolationTools = ToolFactory( useLastCaching=False ) - -EMExtrapolationToolsCache = ToolFactory( - egammaTrackToolsConf.EMExtrapolationTools, - name="EMExtrapolationToolsCache", - LastCaloExtensionTool=EMLastCaloExtensionTool, - PerigeeCaloExtensionTool=EMParticleCaloExtensionTool, - Extrapolator=egammaExtrapolator, - PerigeeCache='GSFPerigeeCaloExtension', - LastCache='GSFLastCaloExtension', - useCaching=True, - useLastCaching=True -) - -EMExtrapolationToolsCommonCache = ToolFactory( - egammaTrackToolsConf.EMExtrapolationTools, - name="EMExtrapolationToolsCommonCache", - LastCaloExtensionTool=EMLastCaloExtensionTool, - PerigeeCaloExtensionTool=EMParticleCaloExtensionTool, - Extrapolator=egammaExtrapolator, - LastCache='ParticleCaloExtension', - useCaching=False, - useLastCaching=True -)