-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add derivative of track parameters to alignment parameters #125
Conversation
d6cf7ea
to
d106951
Compare
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
==========================================
- Coverage 44.94% 44.85% -0.10%
==========================================
Files 374 376 +2
Lines 18708 18866 +158
Branches 8859 8970 +111
==========================================
+ Hits 8409 8463 +54
+ Misses 4906 4904 -2
- Partials 5393 5499 +106
Continue to review full report at Codecov.
|
c90080a
to
0ddad9b
Compare
@asalzburger @FabianKlimpel , this PR is ready to be reviewed. It's part of the issue (#202) which I'd like to discuss at the workshop. If possible, could you help to start to take a look already these days? |
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.
Looks very good beside my comments. One general thing: From all these changes none are tested. Could you add some unit tests for them?
e982b81
to
d99ba53
Compare
@FabianKlimpel , thank you a lot for the review. I have made the necessary changes. One thing I'm not so sure is the calculation of derivative of path length w.r.t. alignment parameters (I think they're something similar to what's done in |
When I saw the comments to the 2 calculations I already figured out that you calculated the |
Great! Thank you! |
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.
Thanks @XiaocongAi for starting this work.
I think we should carefully consider how to add this additional functionality here. By adding the global covariance calculation to the existing Kalman filter, the same algorithm object can potentially have quite different runtime behaviour. One could even argue that adding the global covariance calculation makes this not a Kalman fitter anymore as it removes the defining quality of that algorithm, namely that it only considers neighboring information.
We should strongly consider splitting the functionality into a separate algorithm object, e.g. GlobalCovarianceGainMatrixSmoother
and GlobalCovarianceKalmanFilter
, to be clear about the different purpose.
It would also be nice to have a write-up that explains how the different Jacobians play together and how they are defined. I am still unsure about the necessity to have the separate path length dependence as it introduces a dependence on the track model into the geometry calculations (or it assumes linear tracks and thereby limits its validity). @XiaocongAi I will contact you later this week to try to put together a write-up.
735d124
to
b3d5d7f
Compare
Hi @msmk0 , I have manually rebased, thus should have no problem now. |
Thanks, I will override the coverage check. |
…ect#125) * Add bone structure for KF-based alignment implementation * Add calculation of global covariance matrix in KF * Add option to calcuate global track params covariance * Add enum for alignment parameters * Add alignment derivatives engine * Add derivative of bound parameters w.r.t. reference frame rotation * Add enum for cartesian coordinate indices * Move rotation derivatives into separate function * Add layer and volume alignment to bound parameters derivative * Change alignment frame to local frame * Break alignment to bound derivative calculation into separate functions * Fix the alignmentToPathDerivative return * Move alignment derivative calculations to surface method * Add static check of alignment parameters defintion * Implement local3D to bound 2D derivative with separte method * Re-implement calculation of alignment to path derivative for LineSurface * Re-implement the local3D to bound local derivative for DiscSurface * Re-implement the local3D to bound local derivative for LineSurface * Re-implement the local3D to bound local derivative for CylinderSurface * Re-implement the local3D to bound local derivative for ConeSurface * Make the local3D to bound local derivative method pure virtual * Add unit test for alignment helper * Pass pointer for global covariance matrix to smoother * Not use inline for alignment-related derivatives * Move function definitions in AlignmentHelper.hpp to cpp * Add derivative test for plane surface * Add test for line surface derivative calculation * Add derivative test for DiscSurface * Add derivative test for CylinderSurface * Add derivative test for ConeSurface * Add more Surface tests * Implement function to calculate global track parameters covariance * Remove the option to consider only measurement states
This PR implements the changes as below as part of preparations for implementing a KalmanFitter-based alignment algorithm prototype (#202)
KalmanFitter
to calculate the global covariance matrix, the covariance matrix for all parameters in the track model, in a Kalman filter track fitSurface
to calculate the derivative of track model (represented with bound track parameters) w.r.t. the alignment parameters of its reference surface