From 7f756422dc039ab47b5ed3dc32797cac6fa470c3 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Tue, 20 Oct 2020 14:55:09 +0200 Subject: [PATCH] TrkExTools: flake8 fixes --- .../TrkExTools/python/AtlasExtrapolator.py | 22 ++++++-------- .../TrkExTools/python/LocalExtrapolator.py | 7 ++--- .../TrkExTools/python/TimedExtrapolator.py | 29 ++++++++----------- .../TrkExTools/python/UserExtrapolator.py | 8 +---- 4 files changed, 24 insertions(+), 42 deletions(-) diff --git a/Tracking/TrkExtrapolation/TrkExTools/python/AtlasExtrapolator.py b/Tracking/TrkExtrapolation/TrkExTools/python/AtlasExtrapolator.py index ab8ffd6d8eb..4acccfb4f21 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/python/AtlasExtrapolator.py +++ b/Tracking/TrkExtrapolation/TrkExTools/python/AtlasExtrapolator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ###################################################### # AtlasExtrapolator module @@ -8,9 +8,6 @@ # ###################################################### -# import the include statement -from AthenaCommon.Include import Include, IncludeError, include - # import the Extrapolator configurable from TrkExTools.TrkExToolsConf import Trk__Extrapolator @@ -20,9 +17,8 @@ class AtlasExtrapolator( Trk__Extrapolator ): def __init__(self,name = 'AtlasExtrapolator'): # get the correct TrackingGeometry setup - from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc + from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc # noqa: F401 from AthenaCommon.AppMgr import ServiceMgr as svcMgr - AtlasTrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc # import the ToolSvc from AthenaCommon.AppMgr import ToolSvc @@ -64,7 +60,7 @@ class AtlasExtrapolator( Trk__Extrapolator ): # the UNIQUE NAVIGATOR ( === UNIQUE GEOMETRY) -------------------------------------------------------------- from TrkExTools.TrkExToolsConf import Trk__Navigator AtlasNavigator = Trk__Navigator(name = 'AtlasNavigator') - AtlasNavigator.TrackingGeometrySvc = AtlasTrackingGeometrySvc + AtlasNavigator.TrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc ToolSvc += AtlasNavigator # CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE @@ -100,12 +96,12 @@ class AtlasExtrapolator( Trk__Extrapolator ): # ---------------------------------------------------------------------------------------------------------- # call the base class constructor - Trk__Extrapolator.__init__(self,name,\ - Navigator = AtlasNavigator,\ - MaterialEffectsUpdators = self.AtlasUpdators,\ - Propagators = self.AtlasPropagators,\ - SubPropagators = AtlasSubPropagators,\ - SubMEUpdators = AtlasSubUpdators,\ + Trk__Extrapolator.__init__(self,name, + Navigator = AtlasNavigator, + MaterialEffectsUpdators = self.AtlasUpdators, + Propagators = self.AtlasPropagators, + SubPropagators = AtlasSubPropagators, + SubMEUpdators = AtlasSubUpdators, DoCaloDynamic = False ) diff --git a/Tracking/TrkExtrapolation/TrkExTools/python/LocalExtrapolator.py b/Tracking/TrkExtrapolation/TrkExTools/python/LocalExtrapolator.py index 7e0cc65076e..32d2a27ae3f 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/python/LocalExtrapolator.py +++ b/Tracking/TrkExtrapolation/TrkExTools/python/LocalExtrapolator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ###################################################### # LocalExtrapolator module @@ -9,10 +9,7 @@ ###################################################### # import the include statement -from AthenaCommon.Include import Include, IncludeError, include - -# import the ToolSvc -from AthenaCommon.AppMgr import ToolSvc +from AthenaCommon.Include import include # import the Extrapolator configurable from TrkExTools.TrkExToolsConf import Trk__Extrapolator diff --git a/Tracking/TrkExtrapolation/TrkExTools/python/TimedExtrapolator.py b/Tracking/TrkExtrapolation/TrkExTools/python/TimedExtrapolator.py index 482d52807d8..0bfcff1152c 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/python/TimedExtrapolator.py +++ b/Tracking/TrkExtrapolation/TrkExTools/python/TimedExtrapolator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ###################################################### # TimedExtrapolator module @@ -8,9 +8,6 @@ # ###################################################### -# import the include statement -from AthenaCommon.Include import Include, IncludeError, include - # define the non-interacting material updator from TrkExTools.TrkExToolsConf import Trk__NIMatEffUpdator # define the class @@ -21,12 +18,11 @@ class NIMatEffUpdator( Trk__NIMatEffUpdator ): # get defaut material updator from TrkExTools.TrkExToolsConf import Trk__MaterialEffectsUpdator MaterialEffectsUpdator = Trk__MaterialEffectsUpdator(name = 'MaterialEffectsUpdator') + from AthenaCommon.AppMgr import ToolSvc ToolSvc += MaterialEffectsUpdator # call the base class constructor - Trk__NIMatEffUpdator.__init__(self,name,\ - MaterialEffectsUpdator = MaterialEffectsUpdator - ) + Trk__NIMatEffUpdator.__init__(self,name,MaterialEffectsUpdator = MaterialEffectsUpdator) # import the Extrapolator configurable @@ -38,9 +34,8 @@ class TimedExtrapolator( Trk__TimedExtrapolator ): def __init__(self,name = 'TimedExtrapolator'): # get the correct TrackingGeometry setup - from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc + from TrkDetDescrSvc.AtlasTrackingGeometrySvc import AtlasTrackingGeometrySvc # noqa: F401 from AthenaCommon.AppMgr import ServiceMgr as svcMgr - AtlasTrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc # import the ToolSvc from AthenaCommon.AppMgr import ToolSvc @@ -80,7 +75,7 @@ class TimedExtrapolator( Trk__TimedExtrapolator ): # the UNIQUE NAVIGATOR ( === UNIQUE GEOMETRY) -------------------------------------------------------------- from TrkExTools.TrkExToolsConf import Trk__Navigator AtlasNavigator = Trk__Navigator(name = 'AtlasNavigator') - AtlasNavigator.TrackingGeometrySvc = AtlasTrackingGeometrySvc + AtlasNavigator.TrackingGeometrySvc = svcMgr.AtlasTrackingGeometrySvc ToolSvc += AtlasNavigator # CONFIGURE PROPAGATORS/UPDATORS ACCORDING TO GEOMETRY SIGNATURE @@ -116,13 +111,13 @@ class TimedExtrapolator( Trk__TimedExtrapolator ): # ---------------------------------------------------------------------------------------------------------- # call the base class constructor - Trk__TimedExtrapolator.__init__(self,name,\ - Navigator = AtlasNavigator,\ - MaterialEffectsUpdators = self.TimedUpdators,\ - Propagators = self.TimedPropagators,\ - SubPropagators = TimedSubPropagators,\ - SubMEUpdators = TimedSubUpdators,\ - DoCaloDynamic = False + Trk__TimedExtrapolator.__init__(self,name, + Navigator = AtlasNavigator, + MaterialEffectsUpdators = self.TimedUpdators, + Propagators = self.TimedPropagators, + SubPropagators = TimedSubPropagators, + SubMEUpdators = TimedSubUpdators, + DoCaloDynamic = False ) # switches for simple steering : output navigators diff --git a/Tracking/TrkExtrapolation/TrkExTools/python/UserExtrapolator.py b/Tracking/TrkExtrapolation/TrkExTools/python/UserExtrapolator.py index 98ffd4a5c7e..f4672d4bd30 100755 --- a/Tracking/TrkExtrapolation/TrkExTools/python/UserExtrapolator.py +++ b/Tracking/TrkExtrapolation/TrkExTools/python/UserExtrapolator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration ###################################################### # UserExtrapolator module @@ -9,12 +9,6 @@ # ###################################################### -# import the include statement -from AthenaCommon.Include import Include, IncludeError, include - -# import the ToolSvc -from AthenaCommon.AppMgr import ToolSvc - # import the Extrapolator configurable from TrkExTools.AtlasExtrapolator import AtlasExtrapolator -- GitLab