refactor!: Decouple navigation and stepping
This is a proposal to decouple navigation from stepping by
- changing the navigator interface to only consume its state and not the propagation state
- providing position and direction as an input to the navigation
- putting the
Propagatorin charge of communicating the target and estimated distance to the stepper
Originally I wanted the navigator to return the next step size but that clashes with the multi stepper. The current solution allows the stepper to judge on the step size given a surface. This allows the stepper to tweak the step size or to just take what the navigator proposed. In case of the multi stepper we will still just run intersections with the individual components.
The navigator is reduced to providing surface candidates and the surface status will be purely determined by the stepper. The propagator passes the information so the navigator knows when to switch surface / layer / volume.
Ultimately this removes all the templating from the navigator and the interface captures well what the navigator is supposed to do by having dedicated and visible I/O paths.
I only did this for Navigator, VoidNavigator, DirectNavigator for now to show case the changes and to see how this performs.
In case this is where we want to go I would like to do something similar to the steppers.
📊: Physics performance monitoring for 1288d9ff725d1a71d345066eb3d1a5cd6e3356ef
physmon summary
- ✅ Particles fatras
- ✅ Particles geant4
- ✅ Particles ttbar
- ✅ Vertices ttbar
- ✅ Truth tracking (KF)
- ✅ Truth tracking (GSF)
- ✅ Truth tracking (GX2F)
- ✅ Truth tracking (KF refit)
- ✅ Truth tracking (GSF refit)
- ✅ CKF finding performance | trackfinding | single muon | truth smeared seeding
- ✅ CKF fitting performance | trackfinding | single muon | truth smeared seeding
- ✅ CKF track summary | trackfinding | single muon | truth smeared seeding
- ✅ Seeding trackfinding | single muon | truth estimated seeding
- ✅ CKF finding performance | trackfinding | single muon | truth estimated seeding
- ✅ CKF fitting performance | trackfinding | single muon | truth estimated seeding
- ✅ CKF track summary | trackfinding | single muon | truth estimated seeding
- ✅ Seeding trackfinding | single muon | default seeding
- ✅ CKF finding performance | trackfinding | single muon | default seeding
- ✅ CKF fitting performance | trackfinding | single muon | default seeding
- ✅ CKF track summary | trackfinding | single muon | default seeding
- ✅ Seeding trackfinding | single muon | orthogonal seeding
- ✅ CKF finding performance | trackfinding | single muon | orthogonal seeding
- ✅ CKF fitting performance | trackfinding | single muon | orthogonal seeding
- ✅ CKF track summary | trackfinding | single muon | orthogonal seeding
- ✅ Seeding trackfinding | 4 muon x 50 vertices | default seeding
- ✅ CKF finding performance | trackfinding | 4 muon x 50 vertices | default seeding
- ✅ CKF fitting performance | trackfinding | 4 muon x 50 vertices | default seeding
- ✅ CKF track summary | trackfinding | 4 muon x 50 vertices | default seeding
- ✅ Ambisolver finding performance | trackfinding | 4 muon x 50 vertices | default seeding
- ✅ IVF notime | trackfinding | 4 muon x 50 vertices | default seeding
- ✅ AMVF gauss notime | trackfinding | 4 muon x 50 vertices | default seeding
- ✅ AMVF grid time | trackfinding | 4 muon x 50 vertices | default seeding
- ✅ Seeding trackfinding | ttbar with 200 pileup | default seeding
- ✅ CKF finding performance | trackfinding | ttbar with 200 pileup | default seeding
- ✅ CKF fitting performance | trackfinding | ttbar with 200 pileup | default seeding
- ✅ CKF track summary | trackfinding | ttbar with 200 pileup | default seeding
- ✅ Ambisolver finding performance | trackfinding | ttbar with 200 pileup | default seeding
- ✅ ML Ambisolver | trackfinding | ttbar with 200 pileup | default seeding
- ✅ AMVF gauss notime | trackfinding | ttbar with 200 pileup | default seeding
- ✅ AMVF grid time | trackfinding | ttbar with 200 pileup | default seeding
The current version avoids double intersection while approaching the target which result in CPU performance improvements. Interestingly this is only pronounced for Fatras and quite suppressed for the CKF
Quality Gate passed
Issues
20 New issues
0 Accepted issues
Measures
0 Security Hotspots
49.4% Coverage on New Code
0.6% Duplication on New Code
Walkthrough
Significant changes to navigation and propagation systems in ACTS, there are. Restructuring of navigator classes, method signatures, and state management, we observe. Removal of redundant variables, addition of new methods for target resolution, and streamlining of initialization processes, the modifications encompass. A comprehensive refactoring of navigation logic across multiple components, this represents.
Changes
| File | Change Summary |
|---|---|
Core/include/Acts/Navigation/... |
Navigator classes updated with new initialization, state management, and target resolution methods |
Core/include/Acts/Propagator/... |
Stepper and navigator interfaces modified, new NavigationTarget struct introduced |
Core/src/Propagator/... |
Error handling and category updates to reflect new navigation logic |
Tests/... |
Test cases adjusted to align with new navigation and propagation interfaces |
Possibly related PRs
- #3986: The changes in this PR involve modifications to the
DetectorNavigatorclass, specifically in the handling of step sizes and surface status updates, which are relevant to the changes made in theDetectorNavigatorclass in the main PR. - #3987: This PR refactors the
AtlasStepperclass, including changes to theStatestruct and its initialization, which aligns with the modifications made to theStatestruct in the main PR. - #3984: The removal of the
NavigationBreakAborterand its associated functionality in this PR simplifies the actor list, which may relate to the overall navigation logic being streamlined in the main PR.
Suggested Labels
automerge
Suggested Reviewers
- paulgessinger
Poem
Navigators dance, steppers glide,
Through volumes vast, with physics pride.
Targets found, paths refined,
ACTS refactors, code intertwined! 🚀🧭
Finishing Touches
- [ ] 📝 Generate Docstrings (Beta)
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?
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
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)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR. (Beta)@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.
Probably makes my life easier implementing a Gen3 navigator
:white_check_mark: Athena integration test results [f060123b034411791d6c94a419acb2799f85297a]
:white_check_mark: All tests successful
After discussion with @andiwand:
- Change the
-1sentinelintto anstd::optional<std::size_t> Stage::noTarget->Stage::initial- Disambiguate NavigationTarget::invalid and checkTargetValid: valid does not mean the same thing currently.
The stepper options changes escalated a bit and I failed to put this in a different commit. The changes could be factorized into the following
- [x] GSF actor / aborter https://github.com/acts-project/acts/pull/3984
- [x] Stepper update signature and constrained step rename https://github.com/acts-project/acts/pull/3986
- [x] Stepper option handling https://github.com/acts-project/acts/pull/3987
- [x] CKF / KF path length aborter https://github.com/acts-project/acts/pull/3985
- [x] Actual navigator refactor https://github.com/acts-project/acts/pull/3449
Add navigator concept
GSF is producing some new errors after this change https://github.com/acts-project/acts/actions/runs/12711434053/job/35435102207?pr=3449
needs some investigation
With https://github.com/acts-project/acts/pull/3449/commits/cf2b28aa8f0cec124833d3b2184cca6fe367fd22 I am trying to work around an FPE that popped up in the GSF.
We already checked for std::isfinite which might come from a previous treatment of the FPE without monitoring. So I thought I can just prevent it by checking directly on detR.
What do you think about that handling @benjaminhuth @paulgessinger?
Let's go 🚀
Quality Gate passed
Issues
9 New issues
0 Accepted issues
Measures
0 Security Hotspots
25.8% Coverage on New Code
2.7% Duplication on New Code