-
Notifications
You must be signed in to change notification settings - Fork 174
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 reflection of track parameters #3682
feat: Allow reflection of track parameters #3682
Conversation
I think the API is a great addition. The implementation seems to do a lot of copying around. Would it be better to have the helper functions do the in-place update, and use that in the track parameters' methods? |
True I thought it might be fine because of inlining but it is a source implementation. I am a bit in the middle of moving it to the header or providing a mutable reference. I am not a big fan of mutating input and use that as an output and I think the optimizer should achieve the same performance if it sees the implementation |
Wow! I just checked with godbolt and it can indeed optimise it all away - as long as it is in a header. So I think putting the helper in a header is the best option. |
c7bb907
to
1b695e2
Compare
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.
otherwise lgtm
Co-authored-by: Tim Adye <T.J.Adye@rl.ac.uk>
Quality Gate passedIssues Measures |
Add helper functions to reflect track parameters. This is useful when seed parameters are estimated for the spacepoints in reverse direction which is necessary for strip seeds. --- This pull request introduces functionality to reflect track parameters for both bound and free track parameters in the Acts framework. The key changes include adding new methods to reflect parameters and the corresponding implementation to handle the reflection logic. ### New Methods for Reflecting Track Parameters: * [`Core/include/Acts/EventData/GenericBoundTrackParameters.hpp`](diffhunk://#diff-b3a2aaa0a0f138a1b44e7e6494aae4f8b905ad83716a4253bbea6446623f0eb1R253-R263): Added `reflectInplace` and `reflect` methods to `GenericBoundTrackParameters` to enable in-place reflection and returning reflected parameters. * [`Core/include/Acts/EventData/GenericFreeTrackParameters.hpp`](diffhunk://#diff-35a3d07a1eb05110c620e3cdbc38968456e66270c9f9460472f49e65d8b43acdR177-R187): Added `reflectInplace` and `reflect` methods to `GenericFreeTrackParameters` to enable in-place reflection and returning reflected parameters. ### Helper Functions for Reflection: * [`Core/include/Acts/EventData/TransformationHelpers.hpp`](diffhunk://#diff-73d04b62535d54171256def2e580c39602c9a2ab36db1689ebd74d84b79c127dR21-R32): Introduced `reflectBoundParameters` and `reflectFreeParameters` functions to handle the reflection logic for bound and free track parameters. * [`Core/src/EventData/TransformationHelpers.cpp`](diffhunk://#diff-59ee8d8625a58700aca8eae78a6655d0162483f2644cdd2c77c668493d7d8b87R16-R40): Implemented the `reflectBoundParameters` and `reflectFreeParameters` functions to perform the actual reflection calculations.
Add helper functions to reflect track parameters. This is useful when seed parameters are estimated for the spacepoints in reverse direction which is necessary for strip seeds.
This pull request introduces functionality to reflect track parameters for both bound and free track parameters in the Acts framework. The key changes include adding new methods to reflect parameters and the corresponding implementation to handle the reflection logic.
New Methods for Reflecting Track Parameters:
Core/include/Acts/EventData/GenericBoundTrackParameters.hpp
: AddedreflectInplace
andreflect
methods toGenericBoundTrackParameters
to enable in-place reflection and returning reflected parameters.Core/include/Acts/EventData/GenericFreeTrackParameters.hpp
: AddedreflectInplace
andreflect
methods toGenericFreeTrackParameters
to enable in-place reflection and returning reflected parameters.Helper Functions for Reflection:
Core/include/Acts/EventData/TransformationHelpers.hpp
: IntroducedreflectBoundParameters
andreflectFreeParameters
functions to handle the reflection logic for bound and free track parameters.Core/src/EventData/TransformationHelpers.cpp
: Implemented thereflectBoundParameters
andreflectFreeParameters
functions to perform the actual reflection calculations.