Skip to content

ActsTrackReconstruction: Fix construction of keys in HitSummaryDataUtils.

The keys used in HitSummaryDataUtils assign 5 bits plus 1 sign bit to store eta_mod. But SIGNED_ETA_MOD_BITS did not include the sign bit, meaning that we were tripping the assertion in makeKey() for negative values of eta_mod. However, even that's not enough. Six bits is enough to represent -32..31. However, in main, eta_mod can actually be in the range -56..56, so even if the above-mentioned error is fixed, we still trip the assertion.

So give another bit to eta_mod by taking one away from the layer field.

Was resulting in test failures in ActsConfig in the dbg build. That takes excessively long to run, but can be seen in the opt build by adding this to the end of CMakeLists.txt for ActsTrackReconstruction:

if ( "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" )
  set_source_files_properties(
     ${CMAKE_CURRENT_SOURCE_DIR}/src/HitSummaryDataUtils.cxx
     PROPERTIES
     COMPILE_FLAGS " -UNDEBUG " )
endif()

(Warning: do not use -UNDEBUG for all files in ActsTrackReconstruction. In some cases involving lambda closures, the NDEBUG flag affects the ABI.)

Then ActsCheckObjectCounts fails with

/afs/cern.ch/user/s/ssnyder/atlas-work3/Tracking/Acts/ActsTrackReconstruction/src/HitSummaryDataUtils.h:75: static constexpr short unsigned int ActsTrk::HitSummaryData::makeKey(short unsigned int, short unsigned int, int): Assertion `std::abs(eta_mod) < (1<<(SIGNED_ETA_MOD_BITS-1))' failed.

Merge request reports