Skip to content

Commit 002dacc

Browse files
committed
GPU TPC: Fix constraining of TPC track time0
1 parent 7980c62 commit 002dacc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -940,9 +940,9 @@ GPUd() void GPUTPCGMTrackParam::ShiftZ(const GPUTPCGMMerger* GPUrestrict() merge
940940
} else if (zMax > 0 && zMax - mTZOffset > 250) {
941941
deltaZ = zMax - mTZOffset - 250;
942942
}
943-
if (zMin < 0 && zMax - mTZOffset > 0) {
943+
if (zMin < 0 && zMax - (mTZOffset + deltaZ) > 0) {
944944
deltaZ = zMax - mTZOffset;
945-
} else if (zMax > 0 && zMin - mTZOffset < 0) {
945+
} else if (zMax > 0 && zMin - (mTZOffset + deltaZ) < 0) {
946946
deltaZ = zMin - mTZOffset;
947947
}
948948
// if (deltaZ != 0) printf("Moving clusters to TPC Range: Shift %f in Z: %f to %f --> %f to %f in Z\n", deltaZ, tz2 - mTZOffset, tz1 - mTZOffset, tz2 - mTZOffset - deltaZ, tz1 - mTZOffset - deltaZ);
@@ -959,7 +959,7 @@ GPUd() void GPUTPCGMTrackParam::ShiftZ(const GPUTPCGMMerger* GPUrestrict() merge
959959
if (mTZOffset < minT) {
960960
deltaT = minT - mTZOffset;
961961
}
962-
if (mTZOffset > maxT) {
962+
if (mTZOffset + deltaT > maxT) {
963963
deltaT = maxT - mTZOffset;
964964
}
965965
if (deltaT != 0.f) {

0 commit comments

Comments
 (0)