-
Notifications
You must be signed in to change notification settings - Fork 172
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: External surfaces for GSF #3970
base: main
Are you sure you want to change the base?
feat: External surfaces for GSF #3970
Conversation
WalkthroughChanges made to the Changes
Poem
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.
Code looks good 👍
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: 0
🧹 Outside diff range and nitpick comments (2)
Core/include/Acts/TrackFitting/GaussianSumFitter.hpp (2)
174-186
: Symmetry in the Force, I feel. Backward propagation mirrors forward, it does.Similar changes in backward propagation, maintain balance they do. But careful with memory access patterns, we must be.
Consider this improvement, you should:
- for (auto it = begin; it != end; ++it) { - propOptions.navigation.insertExternalSurface( - options.extensions.surfaceAccessor(SourceLink{*it})->geometryId()); - } + // Cache surface IDs from forward pass, we could + std::vector<GeometryIdentifier> surfaceIds; + surfaceIds.reserve(std::distance(begin, end)); + for (auto it = begin; it != end; ++it) { + surfaceIds.push_back( + options.extensions.surfaceAccessor(SourceLink{*it})->geometryId()); + } + for (const auto& id : surfaceIds) { + propOptions.navigation.insertExternalSurface(id); + }
Line range hint
153-186
: Architecture wisdom, share I must.External surfaces in navigation, reduce holes they may. But measure their impact, we should.
Consider these architectural improvements:
- Add telemetry to track number of holes before and after external surfaces
- Consider caching mechanism for frequently accessed surfaces
- Implement fallback strategy when surface access fails
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
Core/include/Acts/TrackFitting/GaussianSumFitter.hpp
(2 hunks)
🔇 Additional comments (1)
Core/include/Acts/TrackFitting/GaussianSumFitter.hpp (1)
Line range hint 153-166
: Hmmmm, wise changes in forward propagation, I sense.
Capture by reference and external surfaces insertion, good practices these are. But verify the surface accessor's behavior, we must.
✅ Verification successful
Safe and proper, the surface accessor usage is, young padawan.
Through the Force, I sense that:
- A default void implementation exists that throws if accidentally used, preventing silent failures it does
- In production code, proper implementations connected they are, before any usage occurs
- The geometryId() access protected it is, by the non-null surface pointer the accessor provides
- In test code, proper surface accessors with geometry backing them, implemented they are
No danger in the changes I sense. The path of the code, clear and safe it is.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for surfaceAccessor implementations to verify null checks
ast-grep --pattern 'surfaceAccessor($_) {
$$$
}'
# Check for potential null surface returns
rg -A 5 'surfaceAccessor'
Length of output: 30501
Script:
#!/bin/bash
# Search for surfaceAccessor implementations and null checks
ast-grep --pattern 'const Surface* $_ = $$.surfaceAccessor($_);
if ($_ == nullptr) {
$$$
}'
# Search for voidSurfaceAccessor implementation
rg -A 5 'voidSurfaceAccessor'
Length of output: 2225
Quality Gate passedIssues Measures |
Try external surfaces for standard navigation in GSF. Might reduce number of holes?
--- 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