Skip to content
Snippets Groups Projects
Commit 10a8de1d authored by Simon Schuett's avatar Simon Schuett Committed by Volker Friese
Browse files

online: Fix float precision issues in time calculations 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.

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%.
parent 6aa036a5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment