-
Notifications
You must be signed in to change notification settings - Fork 173
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
fix: Output correct track objects in GSF refitting #3999
base: main
Are you sure you want to change the base?
fix: Output correct track objects in GSF refitting #3999
Conversation
WalkthroughModifications to track refitting scripts in the Python examples have been made. Two files, Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Examples/Scripts/Python/truth_tracking_gsf_refitting.py
(2 hunks)
🔇 Additional comments (2)
Examples/Scripts/Python/truth_tracking_gsf_refitting.py (2)
79-82
: Correct, this change is! Using GSF refit tracks instead of original tracks, we now are.
Wisdom in this modification I sense. Properly aligned with the GSF refitting output, the RootTrackSummaryWriter now is.
Line range hint 1-120
: Verify the flow of tracks through the Force, we must.
Through the sequence of operations, track flow we must validate. From KF tracks to GSF refit tracks, the path leads.
✅ Verification successful
Verified, the flow of tracks is. Consistent, the Force remains.
Through the codebase, a clear path I see:
- From "kf_tracks" to "gsf_refit_tracks" the transformation flows
- Proper track-particle matching maintained through "refit_track_particle_matching"
- Only in performance writer, "track_particle_matching" used as intended
Hmm, yes. In balance, the Force is. No disturbance in the tracking flow I sense.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the consistent usage of track references across the codebase
# Search for track reference patterns to ensure consistency
echo "=== Searching for track reference patterns ==="
rg -A 2 "inputTracks\s*=\s*['\"](?:kf_tracks|gsf_refit_tracks)['\"]"
# Search for track-particle matching patterns
echo "=== Searching for track-particle matching patterns ==="
rg -A 2 "TrackParticleMatching\s*=\s*['\"](?:track_particle_matching|refit_track_particle_matching)['\"]"
Length of output: 9852
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
This will most likely require a ref update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
Examples/Algorithms/TrackFitting/include/ActsExamples/TrackFitting/RefittingAlgorithm.hpp (1)
36-37
: Approve this change, I do. Yet documentation, it needs.Wise addition of
initialVarInflation
parameter, this is. But document its purpose and the meaning of each element in the array, we must.Add documentation like this, you should:
/// Inflate initial covariance. + /// @note Array elements correspond to [d0, z0, phi, theta, q/p, t] parameters std::array<double, 6> initialVarInflation = {1., 1., 1., 1., 1., 1.};
Examples/Python/src/TrackFitting.cpp (1)
43-45
: Consider documentation updates, you should.When Python bindings change, documentation in both realms - C++ and Python - update we must. For future Padawans, clear guidance provide.
Consider:
- Adding Python docstring examples
- Updating C++ documentation with parameter description
- Including usage examples in README
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
Examples/Algorithms/TrackFitting/include/ActsExamples/TrackFitting/RefittingAlgorithm.hpp
(1 hunks)Examples/Algorithms/TrackFitting/src/RefittingAlgorithm.cpp
(1 hunks)Examples/Python/src/TrackFitting.cpp
(1 hunks)Examples/Scripts/Python/truth_tracking_gsf_refitting.py
(3 hunks)Examples/Scripts/Python/truth_tracking_kalman_refitting.py
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- Examples/Scripts/Python/truth_tracking_gsf_refitting.py
🔇 Additional comments (3)
Examples/Scripts/Python/truth_tracking_kalman_refitting.py (1)
44-44
: Large inflation values, concerning they are. Verify their necessity, we must.
Setting all covariance inflation factors to 100.0, a significant impact on track fitting accuracy it may have. Consider different values for different parameters, you should.
Examples/Algorithms/TrackFitting/src/RefittingAlgorithm.cpp (1)
83-91
: Placement of covariance inflation, correct it is.
Good structure maintained, error handling preserved. Approve this part of implementation, I do.
Examples/Python/src/TrackFitting.cpp (1)
44-44
: Approve this change, I do. Yet verify its impact, we must.
Hmmmm. Wise addition of initialVarInflation
parameter, this is. With the PR's objective of fixing GSF refitting output, aligns well it does.
Run this verification script, we shall:
✅ Verification successful
Verified the change is, proper usage found it has.
Found evidence in the codebase, I have:
- In
truth_tracking_gsf_refitting.py
andtruth_tracking_kalman_refitting.py
, properly used the parameter is, with value[100.0] * 6
- In
RefittingAlgorithm.hpp
, default values defined correctly they are:{1., 1., 1., 1., 1., 1.}
- In
RefittingAlgorithm.cpp
, implementation handles the parameter appropriately it does
Matches the PR's objective of fixing GSF refitting output, this change does. Working as intended, the parameter is.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Search for usage patterns of initialVarInflation in Python scripts
# and related configuration files
# Search for Python scripts using RefittingAlgorithm
echo "=== Python usage patterns ==="
rg -A 5 "RefittingAlgorithm.*initialVarInflation" --type py
# Search for any documentation or configuration mentioning this parameter
echo "=== Documentation and configuration ==="
rg "initialVarInflation" --type md --type txt
Length of output: 265
Script:
#!/bin/bash
# Search for RefittingAlgorithm usage patterns more broadly
echo "=== RefittingAlgorithm usage patterns ==="
rg -A 10 "RefittingAlgorithm" --type py
# Search for initialVarInflation in C++ files
echo "=== C++ implementation details ==="
rg -A 5 "initialVarInflation" --type cpp
# Look for the algorithm declaration pattern
echo "=== Algorithm declaration patterns ==="
ast-grep --pattern 'ACTS_PYTHON_DECLARE_ALGORITHM($$$)'
Length of output: 31849
Quality Gate passedIssues Measures |
@andiwand @benjaminhuth the physmon failure is real, there's a new FPE in the KF refitting job:
Negatice covariance value? |
Puh... Seems to me like a 2025 problem :D |
Unfortunately, there where the KF tracks written to files so far.
--- END COMMIT MESSAGE ---
Any further description goes here, @-mentions are ok here!
feat
,fix
,refactor
,docs
,chore
andbuild
types.Summary by CodeRabbit
New Features
Bug Fixes
Tests