From 87833393a026a665f60dc45eabe8124e5f479ff0 Mon Sep 17 00:00:00 2001 From: Ernst Hellbar Date: Thu, 2 Oct 2025 12:15:10 +0200 Subject: [PATCH] GPU TPC dEdx: fixing bug in padPos calculation --- GPU/GPUTracking/dEdx/GPUdEdx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/GPUTracking/dEdx/GPUdEdx.h b/GPU/GPUTracking/dEdx/GPUdEdx.h index 9e1727d4988ad..b711f1a685a4c 100644 --- a/GPU/GPUTracking/dEdx/GPUdEdx.h +++ b/GPU/GPUTracking/dEdx/GPUdEdx.h @@ -118,7 +118,7 @@ GPUdnii() void GPUdEdx::fillCluster(float qtot, float qmax, int32_t padRow, uint const float tanTheta = CAMath::Sqrt(tgl2 * sec2); // getting the topology correction - const uint32_t padPos = CAMath::Max(GPUTPCGeometry::NPads(padRow) - 1, CAMath::Float2UIntRn(pad)); // position of the pad is shifted half a pad ( pad=3 -> centre position of third pad) + const uint32_t padPos = CAMath::Min(GPUTPCGeometry::NPads(padRow) - 1, CAMath::Float2UIntRn(pad)); // position of the pad is shifted half a pad ( pad=3 -> centre position of third pad) const float absRelPad = CAMath::Abs(pad - padPos); const int32_t region = geo.GetRegion(padRow); z = CAMath::Abs(z);