Skip to content

Reset TrackStateProvider cache in TrackMasterFitter and make TrackStateProvider thread safe

The cache in TrackStateProvider becomes invalid if a track is (re)fitted. In normal Brunel/Moore processing this is not a problem. However, when refitting tracks on a DST it is possible to order algorithms such that the an invalid cache is used. An example is described in this issue

Alignment#8

but I expect it can also go unnoticed in analyses that attempt to refit tracks.

The solution chosen in this merge request is to invalidate the cache explicitly from TrackMasterFitter.

That's how it all started, but we got a bit side tracked. In the end we also changed TrackStateProvider itself to make it thread safe: the cache is stored on the event store. As it is automatically cleared at the end of each event, TrackStateProvider also no longer uses the incident service.

Note Stripping!1409 (merged) must be applied before this MR is.

Brunel reference updates are in Brunel!1034 (merged)

Note: decision taken to merge to master first (!2118 (merged)), and then replace this version by the one in master (with the small adaptation needed to make it compile in run2-patches, which means either replace fitResult(track) by track.fitResult() or add TrackKernel/TrackKernel/TrackFunctors.h to run2-patches).

Edited by Christopher Rob Jones

Merge request reports

Loading