Skip to content

Draft: TrkGlobalChi2Fitter: Fix handling of bad fits.

In GlobalChi2Fitter::calculateTrackParameters, we propagate track parameters along the track from one measurement on a track to another. The track parameters are also assocated with a surface. After the propagation we store the parameters in the GXFTrajectory along with a measurement. Later, there will be an assertion that the surface of the parameter matches the surface of the measurement.

There is, however, a maximum path length for the propagation, which is usually set to a hard-coded length of 10m. Once this length is reached, we stop and return a CurvilinearParameters object a dummy surface corresponding to the point at which the propagation stopped. But if we store this result in GXFTrajectory, then we can fail later with an assertion.

We can exceed the maximum path length in cases where the fit is unstable. Change to treat this case as a failed fit.

Fixes test failure seen in ActsConfig in the dbg build. While this generally takes an inordinate amount of time to run in the dbg build, the crash may also be observed in the opt build by enabling assertions in TrkTrack:

diff --git a/Tracking/TrkEvent/TrkTrack/CMakeLists.txt b/Tracking/TrkEvent/TrkTrack/CMakeLists.txt
index f1fd43ffa63..5c891a4f916 100644
--- a/Tracking/TrkEvent/TrkTrack/CMakeLists.txt
+++ b/Tracking/TrkEvent/TrkTrack/CMakeLists.txt
@@ -25,3 +25,10 @@ atlas_add_executable(TrkTrack_test
 #Tests
 atlas_add_test(ut_TrkTrack_test
          SCRIPT TrkTrack_test)
+
+if ( "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" )
+  set_source_files_properties(
+     ${CMAKE_CURRENT_SOURCE_DIR}/src/TrackStateOnSurface.cxx
+     PROPERTIES
+     COMPILE_FLAGS " -UNDEBUG " )
+endif()

Merge request reports