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

Merge branch 'flake8_d3pdtrack' into 'master'

TrackD3PDMaker: enable flake8 and make code compliant

See merge request atlas/athena!39170
parents 1b3c2710 2a7e99e3
No related branches found
No related tags found
No related merge requests found
......@@ -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 )
# 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
# @author scott snyder <snyder@bnl.gov>
......@@ -11,9 +10,6 @@
import TrackD3PDMaker
from D3PDMakerCoreComps.SimpleAssociation import SimpleAssociation
from D3PDMakerConfig.D3PDMakerFlags import D3PDMakerFlags
import D3PDMakerCoreComps
def TrackParticleImpactParameters (TPD3PDObject,
prefix = 'track',
......
......@@ -5,10 +5,6 @@ for k, v in TrackD3PDMakerConf.__dict__.items():
if k.startswith ('D3PD__'):
globals()[k[6:]] = v
# Backwards compatibility.
TrackPerigeeFillerTool = PerigeeFillerTool
# Copy these here from TrackSummary.h so that we don't need to load
# all the EDM libraries to get these during configuration.
# (FIXME: The enums should be split into a separate dictionary
......
......@@ -7,7 +7,6 @@ from D3PDMakerCoreComps.D3PDObject import make_SGDataVector_D3PDObject
from D3PDMakerCoreComps.IndexAssociation import IndexAssociation
from TrackD3PDMaker.PerigeeAssociation import PerigeeAssociation
from TrackD3PDMaker.TrackD3PDMakerFlags import TrackD3PDFlags
from AthenaCommon.AppMgr import ToolSvc
def xAODTrackD3PDObject(_label='trkTrack',
......@@ -54,16 +53,14 @@ def xAODTrackD3PDObject(_label='trkTrack',
InDetTestBLayerTool = ToolSvc.InDetRecTestBLayerTool)
# perigee at Primary Vertex
PerigeeAtPVAssoc = PerigeeAssociation\
(object,
PerigeeAtPVAssoc = PerigeeAssociation(object, # noqa: F841
TrackD3PDMaker.TrackParticlePerigeeAtPVAssociationTool,
"PerigeeAtPV",
suffix='_wrtPV',
levelName = 'trackParametersAtPrimaryVertexLevelOfDetails')
# perigee at Beam Spot
PerigeeAtBSAssoc = PerigeeAssociation\
(object,
PerigeeAtBSAssoc = PerigeeAssociation(object, # noqa: F841
TrackD3PDMaker.TrackParticlePerigeeAtBSAssociationTool,
"PerigeeAtBS",
suffix='_wrtBS',
......@@ -242,8 +239,7 @@ def xAODTrackD3PDObject(_label='trkTrack',
'patternRecoInfo'])
# Vertex association
VertexAssoc = IndexAssociation (
object,
VertexAssoc = IndexAssociation(object, # noqa: F841
TrackD3PDMaker.TrackParticleVertexAssociationTool,
vertexTarget,
prefix = vertexPrefix,
......
......@@ -118,7 +118,7 @@ def xAODTrackSummaryFiller (obj, lod, blockName,
**kw):
varlist = []
for tags, v in sumvars:
if type(tags) != type([]): tags = [tags]
if not isinstance(tags, list): tags = [tags]
sel = FullInfo
for t in tags:
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