mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-02-18 15:28:40 +01:00
Changed rounding in the cluster finder to use lround to ensure the result is an integer
This commit is contained in:
@@ -163,7 +163,7 @@ class ClusterFinder {
|
||||
|
||||
// If the cluster type is an integral type, then we need to round the value before storing it
|
||||
if constexpr(std::is_integral<CT>::value) {
|
||||
auto tmp = std::round(frame(iy + ir, ix + ic) - m_pedestal.mean(iy + ir, ix + ic));
|
||||
auto tmp = std::lround(frame(iy + ir, ix + ic) - m_pedestal.mean(iy + ir, ix + ic));
|
||||
cluster.data[i] = static_cast<CT>(tmp);
|
||||
}
|
||||
// On the other hand if it's a floating point type we can just static cast directly
|
||||
|
||||
Reference in New Issue
Block a user