Skip to content

KalmanFilter: Use source links

Paul Gessinger-Befurt requested to merge source_link_kf into master

The goal is getting rid of explicit FittableMeasurements as uncalibrated measurements, since they are in principle experiment specific, and most likely immutable. Copying them is potentially problematic. This MR does the following:

  • Complete (hopefully) the transition to SourceLink instead of Identifier template parameter in Measurements and related classes
  • Implement minimal SourceLinkConcept. It currently asserts:
    • Can be compared like A == B.
    • Is trivially copyable.
    • Has a method surface() that returns something convertible to const Surface&.
  • TrackState does not store a FittableMeasurement as uncalibrated, but a SourceLink directly.
  • The previous point breaks using VoidKalmanComponents as a calibrator, since it assumes that it can "calibrate" by copying. To fix this, there is now VoidMeasurementCalibrator, which unpacks a SourceLink as input. It asserts that SourceLink can be dereferenced like *sourcelink, yielding a FittableMeasurement. This is then copied as the "calibrated" measurement. This only applies if the user wants to use this default calibrator.
  • The KalmanFilter now takes a vector of SourceLinks as input. It creates a simple map from surface pointer to source link. Trackstates are not created ahead of the propagation anymore. At every encounter of a surface, a lookup on the map is performed to find a SourceLink. If available, it is "calibrated", and the track state is appended to the (now explicit) track state vector.
  • Remove the debugLog mechanism in the KF. It now uses a standard Logger, which it also shared with the internal Actor. This enables usage of the default output macros. The functionality of only printing verbose log output IF an error occurs will be reimplemented later on the logger-level.
  • Fixes a really weird bug that's sensitive to include ordering in boost::hana. This is really strange, but I got rid of it now. If it reappears, this will need a more thorough fix if possible.
Edited by Paul Gessinger-Befurt

Merge request reports