Skip to content

Fix bug in SV covariance calculation

Thomas Boettcher requested to merge thboettc_sv_d2chi2_fix into master

Fixes a bug found in the SV covariance matrix calculation while trying to find the cause of negative FD chi2 values.

This fix has been tested on 1000 minimum bias events, and there are still 16 SVs with negative FD chi2s, all with cos(opening angle)>0.9999. These SVs are likely made up of tracks that share a VELO segment, or have VELO segments with shared hits.

In addition, this MR includes a new DOCA calculation. The previous calculation calculated the DOCA as 2*(IP w.r.t. SV) of one of the constituent tracks. Due to the numerical precision of the calculation, this results in slightly different DOCA values depending on the order of the tracks in the SV, sometimes leading to nondeterministic selection results. The new calculation does not depend on the order of the tracks. The POCA calculation was also modified so that the numerical results do not depend on the order of tracks passed due to non-associative floating point addition.

Edited by Thomas Boettcher

Merge request reports