diff --git a/Reconstruction/tauRec/CMakeLists.txt b/Reconstruction/tauRec/CMakeLists.txt index 6358a9be007a32e358f01b808fa496f6553c4d0f..ff32972471ceb4477d18ada95232e5781b53460c 100644 --- a/Reconstruction/tauRec/CMakeLists.txt +++ b/Reconstruction/tauRec/CMakeLists.txt @@ -14,6 +14,5 @@ atlas_add_component( tauRec LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps CaloEvent CaloInterfaceLib CaloUtilsLib GaudiKernel InDetReadoutGeometry NavFourMom StoreGateLib TRT_ReadoutGeometry tauRecToolsLib xAODCaloEvent xAODCore xAODJet xAODPFlow xAODParticleEvent xAODTau xAODTracking ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) - diff --git a/Reconstruction/tauRec/python/TauAlgorithmsHolder.py b/Reconstruction/tauRec/python/TauAlgorithmsHolder.py index 0868a8ec7684d4cf0f08bcc49a2fcfab131ac44c..acd1dd0d5bcaf9b69c522d7bf986e3502b22334f 100644 --- a/Reconstruction/tauRec/python/TauAlgorithmsHolder.py +++ b/Reconstruction/tauRec/python/TauAlgorithmsHolder.py @@ -9,8 +9,7 @@ #@author Felix Friedrich <felix.friedrich@cern.ch> ################################################################################ -from AthenaCommon.SystemOfUnits import * -from AthenaCommon.Constants import * +from AthenaCommon.SystemOfUnits import GeV, mm from tauRec.tauRecFlags import tauFlags cached_instances = {} @@ -287,8 +286,6 @@ def getTauVertexVariables(): if _name in cached_instances: return cached_instances[_name] - from tauRec.tauRecFlags import jobproperties - from tauRecTools.tauRecToolsConf import TauVertexVariables TauVertexVariables = TauVertexVariables( name = _name, VertexFitter = getTauAdaptiveVertexFitter(), @@ -559,7 +556,6 @@ def getInDetTrackSelectorToolxAOD(): # setup up JVA tools # Currently not used - moved into TauRecConfigured.py and added directly to topSequence def setupTauJVFTool(): - from AthenaCommon.AppMgr import ToolSvc #Configures tau track selection tool for TJVA """ @@ -1023,7 +1019,7 @@ def getTauVertexCorrection(): def getParticleCache(): #If reading from ESD we not create a cache of extrapolations to the calorimeter, so we should signify this by setting the cache key to a null string from RecExConfig.RecFlags import rec - if True == rec.doESD: + if rec.doESD is True: ParticleCache = "ParticleCaloExtension" else : ParticleCache = "" diff --git a/Reconstruction/tauRec/python/TauRecAODBuilder.py b/Reconstruction/tauRec/python/TauRecAODBuilder.py index deaa3be7cd7418a5e70a6a9af33fcb0e9a23bde3..5b784bd697c2fada6a09ea8bf82af6462f12af3d 100644 --- a/Reconstruction/tauRec/python/TauRecAODBuilder.py +++ b/Reconstruction/tauRec/python/TauRecAODBuilder.py @@ -17,17 +17,8 @@ ################################################################################ -import os, sys, string - from AthenaCommon.Logging import logging -from AthenaCommon.SystemOfUnits import * -from AthenaCommon.Constants import * -from AthenaCommon.AlgSequence import AlgSequence -from AthenaCommon.Resilience import treatException -from AthenaCommon.Include import include import traceback - -from RecExConfig.Configured import Configured from TauRecConfigured import TauRecConfigured ################################################################################ @@ -89,12 +80,9 @@ class TauRecAODProcessor ( TauRecConfigured ) : import TauDiscriminant.TauDiscriGetter as tauDisc tauDiscTools=tauDisc.getTauDiscriminantTools(mlog) if len(tauDiscTools)==0: - try: import DOESNOTEXIST - except Exception: - mlog.error("No TauDiscriminantTools appended") - traceback.print_exc() - return False - pass + mlog.error("No TauDiscriminantTools appended") + traceback.print_stack() + return False tools+=tauDiscTools pass diff --git a/Reconstruction/tauRec/python/TauRecBuilder.py b/Reconstruction/tauRec/python/TauRecBuilder.py index fc5db0cff396c58cdfb7f5306d7cba77868c9531..ec0c4400d6ed29b4d9162a12be0b4a232ee46faf 100644 --- a/Reconstruction/tauRec/python/TauRecBuilder.py +++ b/Reconstruction/tauRec/python/TauRecBuilder.py @@ -12,13 +12,8 @@ # ################################################################################ -import os, sys, string from AthenaCommon.Logging import logging -from AthenaCommon.SystemOfUnits import * -from AthenaCommon.Constants import * -from AthenaCommon.BeamFlags import jobproperties import traceback -from RecExConfig.Configured import Configured from .TauRecConfigured import TauRecConfigured ################################################################################ diff --git a/Reconstruction/tauRec/python/TauRecConfigured.py b/Reconstruction/tauRec/python/TauRecConfigured.py index 0e6b79a860528d95a0120da57a5298b385267751..d14c9781f087f6b74654e48bfffed319ce08bf26 100644 --- a/Reconstruction/tauRec/python/TauRecConfigured.py +++ b/Reconstruction/tauRec/python/TauRecConfigured.py @@ -15,7 +15,7 @@ from RecExConfig.Configured import Configured from AthenaCommon.BeamFlags import jobproperties -from AthenaCommon.SystemOfUnits import * +from AthenaCommon.SystemOfUnits import mm ################################################################################ ## @class TauRecConfigured @@ -34,7 +34,6 @@ class TauRecConfigured ( Configured ) : from CaloRec.CaloRecConf import CaloCellContainerFinalizerTool # add calo cell finalizer tool TauCellContainerFinalizer = CaloCellContainerFinalizerTool(name='tauRec_tauPi0CellContainerFinalizer') - from AthenaCommon.AppMgr import ToolSvc self._TauProcessorAlgHandle = TauProcessorAlg ( name=self.name+'Alg', Key_jetInputContainer=tauFlags.tauRecSeedJetCollection(), diff --git a/Reconstruction/tauRec/python/TauRecRunConfigured.py b/Reconstruction/tauRec/python/TauRecRunConfigured.py index a8a6415e0f364b60ff79d8af0b45e6df9b388cc8..7927097b9af0d7475ee518a507bb74583c609e99 100644 --- a/Reconstruction/tauRec/python/TauRecRunConfigured.py +++ b/Reconstruction/tauRec/python/TauRecRunConfigured.py @@ -27,8 +27,7 @@ class TauRecRunConfigured ( Configured ) : def __init__(self, name = "TauRecRunConfigured", msglevel=3, ignoreExistingDataObject=True) : self.name = name self.msglevel = msglevel - from tauRec.tauRecConf import TauRunnerAlg - from tauRec.tauRecFlags import tauFlags + from tauRec.tauRecConf import TauRunnerAlg self._TauRunnerAlgHandle = TauRunnerAlg ( name=self.name+'Alg', Key_tauInputContainer="tmp_TauJets", Key_Pi0ClusterInputContainer="TauPi0Clusters", diff --git a/Reconstruction/tauRec/python/TauRecRunner.py b/Reconstruction/tauRec/python/TauRecRunner.py index f87386826433f927eb51a839615740b0de05d4d6..91e3fa5f59c9b06e9d2256a93312bcae6b237cf0 100644 --- a/Reconstruction/tauRec/python/TauRecRunner.py +++ b/Reconstruction/tauRec/python/TauRecRunner.py @@ -12,13 +12,8 @@ # ################################################################################ -import os, sys, string from AthenaCommon.Logging import logging -from AthenaCommon.SystemOfUnits import * -from AthenaCommon.Constants import * from AthenaCommon.BeamFlags import jobproperties -import traceback -from RecExConfig.Configured import Configured from .TauRecRunConfigured import TauRecRunConfigured ################################################################################ @@ -37,8 +32,7 @@ class TauRecRunner ( TauRecRunConfigured ) : def configure(self): mlog = logging.getLogger ('TauRecRunner.py::configure:') mlog.info('entering') - - from RecExConfig.RecFlags import rec + import tauRec.TauAlgorithmsHolder as taualgs from tauRec.tauRecFlags import tauFlags