Skip to content

Commit 49736e1

Browse files
committed
GPU TPC: Constrain time window to compute deltaFwd / deltaBwd to the TPC drift time
1 parent 002dacc commit 49736e1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

GPU/GPUTracking/Merger/GPUTPCGMO2Output.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ GPUdii() void GPUTPCGMO2Output::Thread<GPUTPCGMO2Output::output>(int nBlocks, in
166166
t1 = clusters->clustersLinear[clusterIdGlobal].getTime();
167167
sector1 = sector;
168168
}
169-
nOutCl2++;
170-
if (nOutCl2 == nOutCl) {
169+
if (++nOutCl2 == nOutCl) {
171170
t2 = clusters->clustersLinear[clusterIdGlobal].getTime();
172171
sector2 = sector;
173172
}
@@ -196,10 +195,11 @@ GPUdii() void GPUTPCGMO2Output::Thread<GPUTPCGMO2Output::output>(int nBlocks, in
196195
tFwd = tBwd = delta;
197196
} else {
198197
// estimate max/min time increments which still keep track in the physical limits of the TPC
199-
float tmin = CAMath::Min(t1, t2);
200-
float tmax = CAMath::Max(t1, t2);
198+
const float tmin = CAMath::Min(t1, t2);
199+
const float maxDriftTime = merger.GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->getMaxDriftTime(t1 > t2 ? sector1 : sector2);
200+
const float tmax = CAMath::Min(tmin + maxDriftTime, CAMath::Max(t1, t2));
201201
tFwd = tmin - time0;
202-
tBwd = time0 - tmax + merger.GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->getMaxDriftTime(t1 > t2 ? sector1 : sector2);
202+
tBwd = time0 - tmax + maxDriftTime;
203203
}
204204
}
205205
oTrack.setTime0(time0);

0 commit comments

Comments
 (0)