-
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
fix(gx2f): propagate final covariance for trackstates #2949
Conversation
I think it would be good to have some physmon for gx2f like we have it for KF and GSF. otherwise it will be very hard to judge for someone how these changes behave |
Good point, on the other hand, the gx2f is still in |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2949 +/- ##
==========================================
- Coverage 48.74% 48.73% -0.01%
==========================================
Files 493 493
Lines 28926 28943 +17
Branches 13765 13776 +11
==========================================
+ Hits 14099 14106 +7
Misses 4924 4924
- Partials 9903 9913 +10 ☔ View full report in Codecov by Sentry. |
📊: Physics performance monitoring for ef55e41physmon summary
|
Discussion in meeting 19.02.2024Pros:
Cons:
Outcome:We want to implement it soon, but no preference before or after this PR. Implement in the next 2 weeks. |
## What? Lets the `RootTrackStatesWriter.cpp` write unbiased states, even if there are no `smoothed` states. ## Why? The states we are writing are based upon the Kalman Filter formalism. There, we would expect `predicted`, `filtered`, and `smoothed` states. The `smoothed` states should be the final states. Other fitters, like the GX2F, do not take this path. Therefore, the final estimate is written to `predicted`. Until now, the `unbiased` states could only be computed from `smoothed` states. However, it is also for interest for other fitters to investigate the `unbiased` pulls and residuals. The idea for this PR evolved while investigating the track states for the GX2F (PR #2949). Seems to be useful to have this in. ## Notes We need to check for `state.hasCalibrated()`, since the physmon tests for the GSF were crashing. It seems, the GSF creates states without measurements. There, the programme aborted with ``` state.calibratedSize(): 4294967295 template_switch<Fn, 6, 6>(v=4294967295) is not valid (v > NMAX) ```
…ct#2999) ## What? Lets the `RootTrackStatesWriter.cpp` write unbiased states, even if there are no `smoothed` states. ## Why? The states we are writing are based upon the Kalman Filter formalism. There, we would expect `predicted`, `filtered`, and `smoothed` states. The `smoothed` states should be the final states. Other fitters, like the GX2F, do not take this path. Therefore, the final estimate is written to `predicted`. Until now, the `unbiased` states could only be computed from `smoothed` states. However, it is also for interest for other fitters to investigate the `unbiased` pulls and residuals. The idea for this PR evolved while investigating the track states for the GX2F (PR acts-project#2949). Seems to be useful to have this in. ## Notes We need to check for `state.hasCalibrated()`, since the physmon tests for the GSF were crashing. It seems, the GSF creates states without measurements. There, the programme aborted with ``` state.calibratedSize(): 4294967295 template_switch<Fn, 6, 6>(v=4294967295) is not valid (v > NMAX) ```
) ## Issue I figured out, that the trackstates in the final track contain the wrong covariance. This occurred, while investigating the unbiased pulls. There, some dimensions had a negative covariance. https://github.com/acts-project/acts/blob/19464fa0d24f031083ef3ad3108b74f2b5fa5454/Examples/Io/Root/src/RootTrackStatesWriter.cpp#L456 ## Reason After the last update we calculate the covariance of the initial parameters and add this covariance to the final track. However, the last propagation was done with the initial guess for the covariance. Therefore, the wrong covariance got propagated and assigned to each trackstate. ## Solution Propagate an additional time, with the final parameters+covariance. ## Future Plans Since an additional propagation is quite expensive, we should look into the following two ideas: - calculate covariance after each update (matrix inverse) - toggle the re-propagation if we are not interested in the propagated covariance ## Notes This also removes `nUpdate` from the Actor since it wasn't needed anymore. ## Blocked by - acts-project#2972 - acts-project#2966
…ct#2999) ## What? Lets the `RootTrackStatesWriter.cpp` write unbiased states, even if there are no `smoothed` states. ## Why? The states we are writing are based upon the Kalman Filter formalism. There, we would expect `predicted`, `filtered`, and `smoothed` states. The `smoothed` states should be the final states. Other fitters, like the GX2F, do not take this path. Therefore, the final estimate is written to `predicted`. Until now, the `unbiased` states could only be computed from `smoothed` states. However, it is also for interest for other fitters to investigate the `unbiased` pulls and residuals. The idea for this PR evolved while investigating the track states for the GX2F (PR acts-project#2949). Seems to be useful to have this in. ## Notes We need to check for `state.hasCalibrated()`, since the physmon tests for the GSF were crashing. It seems, the GSF creates states without measurements. There, the programme aborted with ``` state.calibratedSize(): 4294967295 template_switch<Fn, 6, 6>(v=4294967295) is not valid (v > NMAX) ```
) ## Issue I figured out, that the trackstates in the final track contain the wrong covariance. This occurred, while investigating the unbiased pulls. There, some dimensions had a negative covariance. https://github.com/acts-project/acts/blob/19464fa0d24f031083ef3ad3108b74f2b5fa5454/Examples/Io/Root/src/RootTrackStatesWriter.cpp#L456 ## Reason After the last update we calculate the covariance of the initial parameters and add this covariance to the final track. However, the last propagation was done with the initial guess for the covariance. Therefore, the wrong covariance got propagated and assigned to each trackstate. ## Solution Propagate an additional time, with the final parameters+covariance. ## Future Plans Since an additional propagation is quite expensive, we should look into the following two ideas: - calculate covariance after each update (matrix inverse) - toggle the re-propagation if we are not interested in the propagated covariance ## Notes This also removes `nUpdate` from the Actor since it wasn't needed anymore. ## Blocked by - acts-project#2972 - acts-project#2966
…ct#2999) ## What? Lets the `RootTrackStatesWriter.cpp` write unbiased states, even if there are no `smoothed` states. ## Why? The states we are writing are based upon the Kalman Filter formalism. There, we would expect `predicted`, `filtered`, and `smoothed` states. The `smoothed` states should be the final states. Other fitters, like the GX2F, do not take this path. Therefore, the final estimate is written to `predicted`. Until now, the `unbiased` states could only be computed from `smoothed` states. However, it is also for interest for other fitters to investigate the `unbiased` pulls and residuals. The idea for this PR evolved while investigating the track states for the GX2F (PR acts-project#2949). Seems to be useful to have this in. ## Notes We need to check for `state.hasCalibrated()`, since the physmon tests for the GSF were crashing. It seems, the GSF creates states without measurements. There, the programme aborted with ``` state.calibratedSize(): 4294967295 template_switch<Fn, 6, 6>(v=4294967295) is not valid (v > NMAX) ```
Issue
I figured out, that the trackstates in the final track contain the wrong covariance. This occurred, while investigating the unbiased pulls. There, some dimensions had a negative covariance.
acts/Examples/Io/Root/src/RootTrackStatesWriter.cpp
Line 456 in 19464fa
Reason
After the last update we calculate the covariance of the initial parameters and add this covariance to the final track. However, the last propagation was done with the initial guess for the covariance. Therefore, the wrong covariance got propagated and assigned to each trackstate.
Solution
Propagate an additional time, with the final parameters+covariance.
Future Plans
Since an additional propagation is quite expensive, we should look into the following two ideas:
Notes
This also removes
nUpdate
from the Actor since it wasn't needed anymore.Blocked by