DUT Alignment with GBL tracks
I would like to start a discussion on this if-else statement (labelled with a FIXME
Is there a reason for this to still be present?
What I observe is that the special case for GBL tracks ruins the DUT alignment within AlignmentDUTResidual
when using GBL tracks for detectors with a significant angle wrt the track. In this module, the alignment of the detector is changed and the intercept to the DUT is calculated. But as the state is calculated in the track fit and the track is not re-fitted, the state and thus the global intercept don't change (this is here), leaving the local intercept to be wrong if the detector is supposed to be rotated. It works well with straightline
tracks, and it works well with GBL if I remove the if-else condition.
In the latter case, however, other tests fail. So, before I'm diving into this I wanted to ask for your expertise, whether someone says "oops yep that if-else
shouldn't be there" or "this is much more complicated".