Skip to content

Commit

Permalink
chore: alias tracks in python examples (#2069)
Browse files Browse the repository at this point in the history
after trajectories -> tracks changes we did not alias the tracks like we do it for the trajectories. therefore we relied on `selectedTracks` to exist which is not always the case. this PR is adding the alias
  • Loading branch information
andiwand committed Apr 27, 2023
1 parent 1f7a8f4 commit e702f16
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Examples/Python/python/acts/examples/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,14 +856,14 @@ def addKalmanTracks(
calibrator=acts.examples.makePassThroughCalibrator(),
)
s.addAlgorithm(fitAlg)
s.addWhiteboardAlias("tracks", fitAlg.config.outputTracks)

trackConverter = acts.examples.TracksToTrajectories(
level=customLogLevel(),
inputTracks=fitAlg.config.outputTracks,
outputTrajectories="kfTrajectories",
)
s.addAlgorithm(trackConverter)

s.addWhiteboardAlias("trajectories", trackConverter.config.outputTrajectories)

return s
Expand Down Expand Up @@ -967,6 +967,7 @@ def addCKFTracks(
),
)
s.addAlgorithm(trackFinder)
s.addWhiteboardAlias("tracks", trackFinder.config.outputTracks)

trackConverter = acts.examples.TracksToTrajectories(
level=customLogLevel(),
Expand All @@ -984,6 +985,7 @@ def addCKFTracks(
outputTracks="selectedTracks",
logLevel=customLogLevel(),
)
s.addWhiteboardAlias("tracks", trackSelector.config.outputTracks)

selectedTrackConverter = acts.examples.TracksToTrajectories(
level=customLogLevel(),
Expand Down Expand Up @@ -1275,7 +1277,7 @@ def addAmbiguityResolution(

alg = AmbiguityResolutionAlgorithm(
level=customLogLevel(),
inputTracks="selectedTracks",
inputTracks="tracks",
outputTracks="filteredTrajectories",
**acts.examples.defaultKWArgs(
maximumSharedHits=config.maximumSharedHits,
Expand Down Expand Up @@ -1331,7 +1333,7 @@ def addAmbiguityResolutionML(

alg = AmbiguityResolutionMLAlgorithm(
level=customLogLevel(),
inputTracks="selectedTracks",
inputTracks="tracks",
inputDuplicateNN=onnxModelFile,
outputTracks="filteredTrajectoriesML",
**acts.examples.defaultKWArgs(
Expand Down Expand Up @@ -1386,7 +1388,7 @@ def addAmbiguityResolutionMLDBScan(

alg = AmbiguityResolutionMLDBScanAlgorithm(
level=customLogLevel(),
inputTracks="selectedTracks",
inputTracks="tracks",
inputDuplicateNN=onnxModelFile,
outputTracks="filteredTrajectoriesMLDBScan",
**acts.examples.defaultKWArgs(
Expand Down

0 comments on commit e702f16

Please sign in to comment.