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 J*C*J^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.
Showing
- InnerDetector/InDetRecEvent/SiSPSeededTrackFinderData/src/SiTrajectoryElement_xk.cxx 76 additions, 72 deletions.../SiSPSeededTrackFinderData/src/SiTrajectoryElement_xk.cxx
- Tracking/TrkEvent/TrkPatternParameters/TrkPatternParameters/PatternTrackParameters.h 15 additions, 2 deletions...nParameters/TrkPatternParameters/PatternTrackParameters.h
- Tracking/TrkEvent/TrkPatternParameters/src/PatternTrackParameters.cxx 56 additions, 53 deletions...Event/TrkPatternParameters/src/PatternTrackParameters.cxx
- Tracking/TrkExtrapolation/TrkExRungeKuttaPropagator/src/RungeKuttaPropagator.cxx 4 additions, 2 deletions...on/TrkExRungeKuttaPropagator/src/RungeKuttaPropagator.cxx
Loading
Please register or sign in to comment