Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: make whiteboard alias for tracks configurable #3917

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Examples/Python/python/acts/examples/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,7 @@ def addKalmanTracks(
clusters: str = None,
calibrator: acts.examples.MeasurementCalibrator = acts.examples.makePassThroughCalibrator(),
logLevel: Optional[acts.logging.Level] = None,
whiteboardAliasTracks: str = "tracks",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm I don't see why this is necessary for #3889 - the alias is something that should not need dynamic names. It is the thing that replaces dynamic names.

Looking at #3889 I think you can just do KF first and have "tracks" point to KF tracks and then do GX2F and have "tracks" point to this. Or you explicitly point to the "kf_tracks"

and GX2F respectively

Copy link
Member

@benjaminhuth benjaminhuth Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, I didn't had in mind that we can reassign alieses, so it should be possible to first run+write the first fitter, and then run+write the second fitter.
Can you try that @AJPfleger? If this works, this change is not needed I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I am waiting for the physmon results. it worked locally :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andiwand thanks for the suggestion. I didn't think, we could skip the aliasing. This is now a lot cleaner :)

) -> None:
customLogLevel = acts.examples.defaultLogging(s, logLevel)

Expand Down Expand Up @@ -1319,7 +1320,7 @@ def addKalmanTracks(
calibrator=calibrator,
)
s.addAlgorithm(fitAlg)
s.addWhiteboardAlias("tracks", fitAlg.config.outputTracks)
s.addWhiteboardAlias(whiteboardAliasTracks, fitAlg.config.outputTracks)

matchAlg = acts.examples.TrackTruthMatcher(
level=customLogLevel(),
Expand Down Expand Up @@ -1418,6 +1419,7 @@ def addCKFTracks(
writePerformance: bool = True,
writeCovMat=False,
logLevel: Optional[acts.logging.Level] = None,
whiteboardAliasTracks: str = "tracks",
) -> None:
"""This function steers the seeding

Expand Down Expand Up @@ -1520,7 +1522,7 @@ def addCKFTracks(
),
)
s.addAlgorithm(trackFinder)
s.addWhiteboardAlias("tracks", trackFinder.config.outputTracks)
s.addWhiteboardAlias(whiteboardAliasTracks, trackFinder.config.outputTracks)

matchAlg = acts.examples.TrackTruthMatcher(
level=customLogLevel(),
Expand Down Expand Up @@ -1568,6 +1570,7 @@ def addGx2fTracks(
clusters: str = None,
calibrator: acts.examples.MeasurementCalibrator = acts.examples.makePassThroughCalibrator(),
logLevel: Optional[acts.logging.Level] = None,
whiteboardAliasTracks: str = "tracks",
) -> None:
customLogLevel = acts.examples.defaultLogging(s, logLevel)

Expand All @@ -1594,7 +1597,7 @@ def addGx2fTracks(
calibrator=calibrator,
)
s.addAlgorithm(fitAlg)
s.addWhiteboardAlias("tracks", fitAlg.config.outputTracks)
s.addWhiteboardAlias(whiteboardAliasTracks, fitAlg.config.outputTracks)

matchAlg = acts.examples.TrackTruthMatcher(
level=customLogLevel(),
Expand Down
Loading