online: Fix float precision issues in time calculations in STS hit finder
Fix cluster and hit finding in the STS detector when using 32-bit floating-point precision. The issue occurs when calculating time differences between digis or clusters with large timestamps - 32-bit floats lack sufficient precision for representing nanosecond timestamps in the mCBM setup with 128ms timeframes.
Add helper methods GetTimeDiff() that first convert timestamps to int before calculating the difference, preserving precision and sign. Replace direct floating-point timestamp subtractions throughout the code with calls to these helper methods.
This resolves hit count discrepancies between 32-bit and 64-bit float versions, reducing the difference from ~2.6% to ~0.04%.
This bug was discovered by our student Simon Schütt, who loooked at the differences between the 32 bit and 64 bit versions. I put him as commit author.
Merge request reports
Activity
requested review from @v.friese
assigned to @v.friese
Dear @v.friese,
you have been identified as code owner of at least one file which was changed with this merge request.
Please check the changes and approve them or request changes.
added CodeOwners label
added 12 commits
-
2e1f42ee...6aa036a5 - 11 commits from branch
computing:master
- 10a8de1d - online: Fix float precision issues in time calculations STS hit finder
-
2e1f42ee...6aa036a5 - 11 commits from branch