GSF: Introduce/ and use KalmanParameterUpdator. Updating rather than allocating new parameters
Mentioning @amorley .
The idea is to introduce a simple class now named KalmanParameterUpdator
e.g an Updator
that actually updates
parameters rather than allocating new ...
The major difference is that this does in-place update of TrackParameters so no allocations.
Then use this instead from the GSF
(which saves as ~1000 allocs per fit ...)
Note that GSF being a collection of kalman-filters running in paraller
represents that state with ~12 TrackParametes (or 6x12 = 72 after a material convolution)
so this can be called >> 1 per measurement update per measurement surface per fit which adds quite a lot of malloc/new.
One issue is that we already have 4 or so Updators in ATLAS, but all seem to do allocations not updating in place. Furthermore each one uses a sligtly different matrix representation "back-end".
The other issue is that this duplicates some code from the Amg
updator ,currently used by GSF
, i.e the Eigen
based one.
This is not 100% ideal so we might want to partially re-factor it back in some way after a bit of cleanup and furhter tuning. ie an updator that returns clones parameters probably can be expressed as clone and update in place or so .... But probably this will need to go through on which of the implementations are actually used.
Also splitting the core math from the rest could help see if there is something there to improve next.