-
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
feat!: Allow trimming other non measurement track states #3993
base: main
Are you sure you want to change the base?
Conversation
@pbutti discovered this after adding edge holes |
WalkthroughEnhancements to track state manipulation, yes! A new optional parameter Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
🔇 Additional comments (9)Examples/Algorithms/TrackFinding/src/TrackFindingAlgorithm.cpp (1)
Tests/UnitTests/Core/Utilities/TrackHelpersTests.cpp (8)Line range hint
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.
CI bridge is failing, but to me the idea to add this feature looks ok.
@pbutti it just didn't run because the PR is still on draft. |
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)
Core/include/Acts/Utilities/TrackHelpers.hpp
(5 hunks)
🔇 Additional comments (3)
Core/include/Acts/Utilities/TrackHelpers.hpp (3)
415-415
: Documentation clarity, improved it has been.
Clear and consistent documentation for the new parameter across all three functions, hmm yes. Well-documented changes, these are.
Also applies to: 457-457, 499-499
418-418
: Backward compatibility, maintained it is.
Wise choice, making trimOther
optional with default value false
. Breaking changes, this prevents. Consistent parameter ordering across all functions, observed it is.
Also applies to: 460-460, 502-502
439-441
: Implementation consistency, achieved it has been.
Identical logic for handling trimOther
in both front and back trimming functions, implemented it is. Clear and concise condition !typeFlags.test(TrackStateFlag::MeasurementFlag)
, used it is.
Also applies to: 481-483
Invalidated by push of be47d9e
Quality Gate passedIssues Measures |
template <TrackProxyConcept track_proxy_t> | ||
void trimTrackFront(track_proxy_t track, bool trimHoles, bool trimOutliers, | ||
bool trimMaterial) | ||
bool trimMaterial, bool trimOther) |
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.
bool trimMaterial, bool trimOther) | |
bool trimMaterial, bool trimNonMeasurement) |
?
Sounds a bit weird, but might be a bit clearer than other.
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.
I am also unhappy with the name. trimNonMeasurement
sounds also a bit like it would to what the other flags do? which might actually be the case right now, I have to double check the logic. I think it would be good if they are all exclusive. So potentially trimOtherNoneMeasurement
?
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.
I guess the problem is that it's not obvious from the signature what the remaining possibilities are.
I'm wondering: couldn't we pass in a TrackStateType
object that we use as a mask instead of the named arguments?
Adding new track state flags requires changing the trimming. Here I add an
other
case which should catch anything else which is not a measurement.Non breaking if we keep the default.
Summary by CodeRabbit
New Features
trimOther
to enhance track trimming functions, allowing for more granular control over track states.Bug Fixes
TrackFindingAlgorithm
for better performance and robustness.Documentation
Tests