Skip to content
Snippets Groups Projects
Commit 29d5f8d7 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

tauRec: enable flake8 and fix code

parent ee56bf65
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!37904Reconstruction/tau: cmake cleanup, enable flake8
...@@ -14,6 +14,5 @@ atlas_add_component( tauRec ...@@ -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 ) 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: # 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 ) atlas_install_joboptions( share/*.py )
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
#@author Felix Friedrich <felix.friedrich@cern.ch> #@author Felix Friedrich <felix.friedrich@cern.ch>
################################################################################ ################################################################################
from AthenaCommon.SystemOfUnits import * from AthenaCommon.SystemOfUnits import GeV, mm
from AthenaCommon.Constants import *
from tauRec.tauRecFlags import tauFlags from tauRec.tauRecFlags import tauFlags
cached_instances = {} cached_instances = {}
...@@ -287,8 +286,6 @@ def getTauVertexVariables(): ...@@ -287,8 +286,6 @@ def getTauVertexVariables():
if _name in cached_instances: if _name in cached_instances:
return cached_instances[_name] return cached_instances[_name]
from tauRec.tauRecFlags import jobproperties
from tauRecTools.tauRecToolsConf import TauVertexVariables from tauRecTools.tauRecToolsConf import TauVertexVariables
TauVertexVariables = TauVertexVariables( name = _name, TauVertexVariables = TauVertexVariables( name = _name,
VertexFitter = getTauAdaptiveVertexFitter(), VertexFitter = getTauAdaptiveVertexFitter(),
...@@ -559,7 +556,6 @@ def getInDetTrackSelectorToolxAOD(): ...@@ -559,7 +556,6 @@ def getInDetTrackSelectorToolxAOD():
# setup up JVA tools # setup up JVA tools
# Currently not used - moved into TauRecConfigured.py and added directly to topSequence # Currently not used - moved into TauRecConfigured.py and added directly to topSequence
def setupTauJVFTool(): def setupTauJVFTool():
from AthenaCommon.AppMgr import ToolSvc
#Configures tau track selection tool for TJVA #Configures tau track selection tool for TJVA
""" """
...@@ -1023,7 +1019,7 @@ def getTauVertexCorrection(): ...@@ -1023,7 +1019,7 @@ def getTauVertexCorrection():
def getParticleCache(): 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 #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 from RecExConfig.RecFlags import rec
if True == rec.doESD: if rec.doESD is True:
ParticleCache = "ParticleCaloExtension" ParticleCache = "ParticleCaloExtension"
else : else :
ParticleCache = "" ParticleCache = ""
......
...@@ -17,17 +17,8 @@ ...@@ -17,17 +17,8 @@
################################################################################ ################################################################################
import os, sys, string
from AthenaCommon.Logging import logging 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 import traceback
from RecExConfig.Configured import Configured
from TauRecConfigured import TauRecConfigured from TauRecConfigured import TauRecConfigured
################################################################################ ################################################################################
...@@ -89,12 +80,9 @@ class TauRecAODProcessor ( TauRecConfigured ) : ...@@ -89,12 +80,9 @@ class TauRecAODProcessor ( TauRecConfigured ) :
import TauDiscriminant.TauDiscriGetter as tauDisc import TauDiscriminant.TauDiscriGetter as tauDisc
tauDiscTools=tauDisc.getTauDiscriminantTools(mlog) tauDiscTools=tauDisc.getTauDiscriminantTools(mlog)
if len(tauDiscTools)==0: if len(tauDiscTools)==0:
try: import DOESNOTEXIST mlog.error("No TauDiscriminantTools appended")
except Exception: traceback.print_stack()
mlog.error("No TauDiscriminantTools appended") return False
traceback.print_exc()
return False
pass
tools+=tauDiscTools tools+=tauDiscTools
pass pass
......
...@@ -12,13 +12,8 @@ ...@@ -12,13 +12,8 @@
# #
################################################################################ ################################################################################
import os, sys, string
from AthenaCommon.Logging import logging from AthenaCommon.Logging import logging
from AthenaCommon.SystemOfUnits import *
from AthenaCommon.Constants import *
from AthenaCommon.BeamFlags import jobproperties
import traceback import traceback
from RecExConfig.Configured import Configured
from .TauRecConfigured import TauRecConfigured from .TauRecConfigured import TauRecConfigured
################################################################################ ################################################################################
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
from RecExConfig.Configured import Configured from RecExConfig.Configured import Configured
from AthenaCommon.BeamFlags import jobproperties from AthenaCommon.BeamFlags import jobproperties
from AthenaCommon.SystemOfUnits import * from AthenaCommon.SystemOfUnits import mm
################################################################################ ################################################################################
## @class TauRecConfigured ## @class TauRecConfigured
...@@ -34,7 +34,6 @@ class TauRecConfigured ( Configured ) : ...@@ -34,7 +34,6 @@ class TauRecConfigured ( Configured ) :
from CaloRec.CaloRecConf import CaloCellContainerFinalizerTool from CaloRec.CaloRecConf import CaloCellContainerFinalizerTool
# add calo cell finalizer tool # add calo cell finalizer tool
TauCellContainerFinalizer = CaloCellContainerFinalizerTool(name='tauRec_tauPi0CellContainerFinalizer') TauCellContainerFinalizer = CaloCellContainerFinalizerTool(name='tauRec_tauPi0CellContainerFinalizer')
from AthenaCommon.AppMgr import ToolSvc
self._TauProcessorAlgHandle = TauProcessorAlg ( name=self.name+'Alg', self._TauProcessorAlgHandle = TauProcessorAlg ( name=self.name+'Alg',
Key_jetInputContainer=tauFlags.tauRecSeedJetCollection(), Key_jetInputContainer=tauFlags.tauRecSeedJetCollection(),
......
...@@ -27,8 +27,7 @@ class TauRecRunConfigured ( Configured ) : ...@@ -27,8 +27,7 @@ class TauRecRunConfigured ( Configured ) :
def __init__(self, name = "TauRecRunConfigured", msglevel=3, ignoreExistingDataObject=True) : def __init__(self, name = "TauRecRunConfigured", msglevel=3, ignoreExistingDataObject=True) :
self.name = name self.name = name
self.msglevel = msglevel self.msglevel = msglevel
from tauRec.tauRecConf import TauRunnerAlg from tauRec.tauRecConf import TauRunnerAlg
from tauRec.tauRecFlags import tauFlags
self._TauRunnerAlgHandle = TauRunnerAlg ( name=self.name+'Alg', self._TauRunnerAlgHandle = TauRunnerAlg ( name=self.name+'Alg',
Key_tauInputContainer="tmp_TauJets", Key_tauInputContainer="tmp_TauJets",
Key_Pi0ClusterInputContainer="TauPi0Clusters", Key_Pi0ClusterInputContainer="TauPi0Clusters",
......
...@@ -12,13 +12,8 @@ ...@@ -12,13 +12,8 @@
# #
################################################################################ ################################################################################
import os, sys, string
from AthenaCommon.Logging import logging from AthenaCommon.Logging import logging
from AthenaCommon.SystemOfUnits import *
from AthenaCommon.Constants import *
from AthenaCommon.BeamFlags import jobproperties from AthenaCommon.BeamFlags import jobproperties
import traceback
from RecExConfig.Configured import Configured
from .TauRecRunConfigured import TauRecRunConfigured from .TauRecRunConfigured import TauRecRunConfigured
################################################################################ ################################################################################
...@@ -37,8 +32,7 @@ class TauRecRunner ( TauRecRunConfigured ) : ...@@ -37,8 +32,7 @@ class TauRecRunner ( TauRecRunConfigured ) :
def configure(self): def configure(self):
mlog = logging.getLogger ('TauRecRunner.py::configure:') mlog = logging.getLogger ('TauRecRunner.py::configure:')
mlog.info('entering') mlog.info('entering')
from RecExConfig.RecFlags import rec
import tauRec.TauAlgorithmsHolder as taualgs import tauRec.TauAlgorithmsHolder as taualgs
from tauRec.tauRecFlags import tauFlags from tauRec.tauRecFlags import tauFlags
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment