Repository navigation
TrackParametrization: use double math functions for TrackParD - #15990
Merged
shahor02 merged 1 commit intoOct 21, 2026
Merged
Conversation
Follow-up to AliceO2Group#15986. TrackParametrization, TrackParametrizationWithError and TrackUtils call the float-only gpu::CAMath functions (Sqrt, ASin, ATan2, ...), so TrackParD / PropagatorD is effectively float. Compared with a std:: double reference, propagateParamTo(x, b[3]) from x = 85 to 250 cm in 100 steps is off by 0.4 to 74 µm, depending on pt and the field (toy fields with a transverse component, no material), and finite-difference derivatives through it are noisy. This affects the barrel alignment (Detectors/Align) and the ITS3 alignment; no reconstruction workflow uses the double types. Call math_utils::detail::{sqrt, asin, ...}<value_t> instead, as Propagator.cxx already does: for double these dispatch to the double functions, for float to the same functions as before. Add GPUCommonMath::Expd and math_utils::detail::exp for the remaining Exp calls. This restores the math_utils::detail calls of cd9835a (switched back to CAMath in bf65d3c) and extends them to TrackParametrizationWithError and TrackUtils. Float results are bit-identical; TrackParD now agrees exactly with the double reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shahor02
approved these changes
Oct 20, 2026
shahor02
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for spotting and fixing!
davidrohr
approved these changes
Oct 21, 2026
davidrohr
left a comment
Collaborator
There was a problem hiding this comment.
ok for GPUCommonMath changes
Collaborator
|
Error while checking build/O2/fullCI_slc9 for 98bcd15 at 2026-10-21 12:37: Full log here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #15986. TrackParametrization, TrackParametrizationWithError and TrackUtils call the float-only gpu::CAMath functions (Sqrt, ASin, ATan2, ...), so TrackParD / PropagatorD is effectively float. Compared with a std:: double reference, propagateParamTo(x, b[3]) from x = 85 to 250 cm in 100 steps is off by 0.4 to 74 µm, depending on pt and the field (toy fields with a transverse component, no material), and finite-difference derivatives through it are noisy. This affects the barrel alignment (Detectors/Align) and the ITS3 alignment; no reconstruction workflow uses the double types.
Call math_utils::detail::{sqrt, asin, ...}<value_t> instead, as Propagator.cxx already does: for double these dispatch to the double functions, for float to the same functions as before. Add GPUCommonMath::Expd and math_utils::detail::exp for the remaining Exp calls. This restores the math_utils::detail calls of cd9835a (switched back to CAMath in bf65d3c) and extends them to TrackParametrizationWithError and TrackUtils.
Float results are bit-identical; TrackParD now agrees exactly with the double reference.