Skip to content

Fix aliasing bug in newCovarianceMatrix method

The PatternTrackParameters class conains a method by the name of newCovarianceMatrix which updates the covariance matrix of the object it is called on according to the covariance matrix in a second set of parameters and a Jacobian matrix. The calculation performed is JCJ^T. In many cases where this method is called, the object on which it is called is the same as the object given as the right hand side of the operation. This means that the covariance matrices alias, leading to possibly incorrect results. It also invites behaviour where the calculations are done using invalid covariance matrices.

This commit fixes these issues by changing the signature of the method to accept a covariance matrix directly instead of a second set of track parameters. This makes it harder, albeit not impossible, to alias the covariance matrices as described earlier. It also solves the invalid covariance matrix problem described in !37151 (merged).

Merge request reports

Loading