Skip to content

Fix undefined behavior in interpolated magnetic field

When querying field values on the edge of a magnetic field map constructed by BFieldMapUtils, the InterpolatedBFieldMap used to do computations based on uninitialized BField data ("underflow" and "overflow" grid bins).

By the standards of modern C++ compilers, uninitialized data has random and system-dependent semantics. In my particular case, it contained infinities or NaNs, leading edge field values to be "interpolated" to NaN.

This MR fixes that by initializing the edge field values to zero.

Fixes ACTS-530 .

Edited by Hadrien Benjamin Grasland

Merge request reports