Skip to content

Rework GlobalChi2Fitter internal track representation and conversion

The GlobalChi2Fitter keeps an internal representation of tracks and track states, which is later converted to more standard formats like Trk::Track and Trk::TrackStateOnSurface. This commit modifies this internal representation to make the conversion to Trk::Track more natural and to allow us to operate on tracks with perigee parameters in the internal representation. Specifically, the following two changes are made:

  1. Use TrackStateOnSurface::TrackStateOnSurfaceType instead of TrackState::TrackStateType. The main problem is that TrackState::TrackStateType does not allow us to represent perigee states (see next point). As a minor additional point, the track state is converted to the TSOS type anyway at track creation time, so there is no good reason to have the internal representation store TrackState::TrackStateType instead of TrackStateOnSurface::TrackStateOnSurfaceType.
  2. Store the perigee state in the internal representation. Currently, we don't do this, and we first convert the GXFTrackState objects to TrackStateOnSurfaces, then we create a perigee TrackStateOnSurfaces and insert it into the existing list. With this change, we add the perigee to the internal track representation, and convert it to TrackStateOnSurfaces like any other state. This is a lot clearer, but it also allows us to operate on the entire track in the internal representation including the perigee state.

Merge request reports