Skip to content

Commit 84cc96c

Browse files
committed
TPC Track Model Decoding: Better cuts to distinguish underflow / overflow
1 parent 234720c commit 84cc96c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

GPU/GPUTracking/DataCompression/TPCClusterDecompressor.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ inline void TPCClusterDecompressor::decompressTrack(const CompressedClusters* cl
9393
time = time & 0xFFFFFF;
9494
pad = (unsigned short)pad;
9595
if (pad >= param.tpcGeometry.NPads(row) * ClusterNative::scalePadPacked) {
96-
if ((signed short)pad >= (signed short)(-2 * ClusterNative::scalePadPacked)) {
96+
if (pad >= 0xFFFF - 11968) { // Constant 11968 = (2^15 - MAX_PADS(138) * scalePadPacked(64)) / 2
9797
pad = 0;
9898
} else {
9999
pad = param.tpcGeometry.NPads(row) * ClusterNative::scalePadPacked - 1;
100100
}
101101
}
102102
if (param.par.continuousMaxTimeBin > 0 && time >= maxTime) {
103-
if (time >= 0xFFFFFF - 2 * ClusterNative::scaleTimePacked) {
103+
if (time >= 0xFFFFFF - 544768) { // Constant 544768 = (2^23 - LHCMAXBUNCHES(3564) * MAXORBITS(256) * scaleTimePacked(64) / BCPERTIMEBIN(8)) / 2)
104104
time = 0;
105105
} else {
106106
time = maxTime;

0 commit comments

Comments
 (0)