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

TrackD3PDMaker: enable flake8 and make code compliant

parent 6f6a97cd
No related branches found
No related tags found
No related merge requests found
...@@ -9,4 +9,4 @@ atlas_add_component( TrackD3PDMaker ...@@ -9,4 +9,4 @@ atlas_add_component( TrackD3PDMaker
LINK_LIBRARIES TrkParameters AthenaKernel CxxUtils Identifier EventPrimitives xAODBase xAODPrimitives xAODTracking GaudiKernel InDetIdentifier InDetReadoutGeometry InDetTestBLayerLib ParticleEvent D3PDMakerInterfaces D3PDMakerUtils Particle InDetRecToolInterfaces ITrackToVertex RecoToolInterfaces TrkEventPrimitives TrkParticleBase VxVertex InDetBeamSpotServiceLib ) LINK_LIBRARIES TrkParameters AthenaKernel CxxUtils Identifier EventPrimitives xAODBase xAODPrimitives xAODTracking GaudiKernel InDetIdentifier InDetReadoutGeometry InDetTestBLayerLib ParticleEvent D3PDMakerInterfaces D3PDMakerUtils Particle InDetRecToolInterfaces ITrackToVertex RecoToolInterfaces TrkEventPrimitives TrkParticleBase VxVertex InDetBeamSpotServiceLib )
# 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} )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# $Id$
# #
# @file TrackD3PDMaker/python/TrackParticleImpactParameters.py # @file TrackD3PDMaker/python/TrackParticleImpactParameters.py
# @author scott snyder <snyder@bnl.gov> # @author scott snyder <snyder@bnl.gov>
...@@ -11,9 +10,6 @@ ...@@ -11,9 +10,6 @@
import TrackD3PDMaker import TrackD3PDMaker
from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
import D3PDMakerCoreComps
def TrackParticleImpactParameters (TPD3PDObject, def TrackParticleImpactParameters (TPD3PDObject,
prefix = 'track', prefix = 'track',
......
...@@ -5,10 +5,6 @@ for k, v in TrackD3PDMakerConf.__dict__.items(): ...@@ -5,10 +5,6 @@ for k, v in TrackD3PDMakerConf.__dict__.items():
if k.startswith ('D3PD__'): if k.startswith ('D3PD__'):
globals()[k[6:]] = v globals()[k[6:]] = v
# Backwards compatibility.
TrackPerigeeFillerTool = PerigeeFillerTool
# Copy these here from TrackSummary.h so that we don't need to load # Copy these here from TrackSummary.h so that we don't need to load
# all the EDM libraries to get these during configuration. # all the EDM libraries to get these during configuration.
# (FIXME: The enums should be split into a separate dictionary # (FIXME: The enums should be split into a separate dictionary
......
...@@ -7,7 +7,6 @@ from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject ...@@ -7,7 +7,6 @@ from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
from D3PDMakerCoreComps.IndexAssociation import IndexAssociation from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
from TrackD3PDMaker.PerigeeAssociation import PerigeeAssociation from TrackD3PDMaker.PerigeeAssociation import PerigeeAssociation
from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
from AthenaCommon.AppMgr import ToolSvc
def xAODTrackD3PDObject(_label='trkTrack', def xAODTrackD3PDObject(_label='trkTrack',
...@@ -54,16 +53,14 @@ def xAODTrackD3PDObject(_label='trkTrack', ...@@ -54,16 +53,14 @@ def xAODTrackD3PDObject(_label='trkTrack',
InDetTestBLayerTool = ToolSvc.InDetRecTestBLayerTool) InDetTestBLayerTool = ToolSvc.InDetRecTestBLayerTool)
# perigee at Primary Vertex # perigee at Primary Vertex
PerigeeAtPVAssoc = PerigeeAssociation\ PerigeeAtPVAssoc = PerigeeAssociation(object, # noqa: F841
(object,
TrackD3PDMaker.TrackParticlePerigeeAtPVAssociationTool, TrackD3PDMaker.TrackParticlePerigeeAtPVAssociationTool,
"PerigeeAtPV", "PerigeeAtPV",
suffix='_wrtPV', suffix='_wrtPV',
levelName = 'trackParametersAtPrimaryVertexLevelOfDetails') levelName = 'trackParametersAtPrimaryVertexLevelOfDetails')
# perigee at Beam Spot # perigee at Beam Spot
PerigeeAtBSAssoc = PerigeeAssociation\ PerigeeAtBSAssoc = PerigeeAssociation(object, # noqa: F841
(object,
TrackD3PDMaker.TrackParticlePerigeeAtBSAssociationTool, TrackD3PDMaker.TrackParticlePerigeeAtBSAssociationTool,
"PerigeeAtBS", "PerigeeAtBS",
suffix='_wrtBS', suffix='_wrtBS',
...@@ -242,8 +239,7 @@ def xAODTrackD3PDObject(_label='trkTrack', ...@@ -242,8 +239,7 @@ def xAODTrackD3PDObject(_label='trkTrack',
'patternRecoInfo']) 'patternRecoInfo'])
# Vertex association # Vertex association
VertexAssoc = IndexAssociation ( VertexAssoc = IndexAssociation(object, # noqa: F841
object,
TrackD3PDMaker.TrackParticleVertexAssociationTool, TrackD3PDMaker.TrackParticleVertexAssociationTool,
vertexTarget, vertexTarget,
prefix = vertexPrefix, prefix = vertexPrefix,
......
...@@ -118,7 +118,7 @@ def xAODTrackSummaryFiller (obj, lod, blockName, ...@@ -118,7 +118,7 @@ def xAODTrackSummaryFiller (obj, lod, blockName,
**kw): **kw):
varlist = [] varlist = []
for tags, v in sumvars: for tags, v in sumvars:
if type(tags) != type([]): tags = [tags] if not isinstance(tags, list): tags = [tags]
sel = FullInfo sel = FullInfo
for t in tags: for t in tags:
sel += eval(t) sel += eval(t)
......
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