TrackParameters updateParameters allow in place update of the covariance
Have seen in places this pattern
AmgSymMatrix(5)* covariance = new AmgSymMatrix(5);
//Calculate
foo.updateParameters(mean, covariance);
where foo is TrackParameters
This leads to a new / delete cycle for the existing method, new matrix to pass, internally delete the one that is hold by the TrackParameters
object.
Add another interface, which allows to pass by ref and if the m_covariance
is there allows to be updated in place (no new/delete). If m_covariance
is not there a new
is created with the passed values.
Edited by Christos Anastopoulos