Skip to content

Commit 591181a

Browse files
committed
GPU TPC: Track time constrain must consider TPCFastTransform::getT0()
1 parent 9ddc990 commit 591181a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

GPU/GPUTracking/Merger/GPUTPCGMO2Output.cxx

+4-3
Original file line numberDiff line numberDiff line change
@@ -234,20 +234,21 @@ GPUdii() void GPUTPCGMO2Output::Thread<GPUTPCGMO2Output::output>(int nBlocks, in
234234
// estimate max/min time increments which still keep track in the physical limits of the TPC
235235
const float tmin = CAMath::Min(t1, t2);
236236
const float maxDriftTime = merger.GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->getMaxDriftTime(t1 > t2 ? sector1 : sector2);
237+
const float clusterT0 = merger.GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->getT0();
237238
const float tmax = CAMath::Min(tmin + maxDriftTime, CAMath::Max(t1, t2));
238239
float delta = 0.f;
239240
if (time0 + maxDriftTime < tmax) {
240241
delta = tmax - time0 - maxDriftTime;
241242
}
242-
if (tmin < time0 + delta) {
243-
delta = tmin - time0;
243+
if (tmin - clusterT0 < time0 + delta) {
244+
delta = tmin - clusterT0 - time0;
244245
}
245246
if (delta != 0.f) {
246247
time0 += delta;
247248
const float deltaZ = merger.GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convDeltaTimeToDeltaZinTimeFrame(sector2, delta);
248249
oTrack.setZ(oTrack.getZ() + deltaZ);
249250
}
250-
tFwd = tmin - time0;
251+
tFwd = tmin - clusterT0 - time0;
251252
tBwd = time0 - tmax + maxDriftTime;
252253
}
253254
}

GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ GPUd() void GPUTPCGMTrackParam::ShiftZ(const GPUTPCGMMerger* GPUrestrict() merge
10151015
float deltaT = merger->GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convDeltaZtoDeltaTimeInTimeFrame(slice, deltaZ);
10161016
mTZOffset += deltaT;
10171017
mP[1] -= deltaZ;
1018-
const float maxT = CAMath::Min(tz1, tz2);
1018+
const float maxT = CAMath::Min(tz1, tz2) - merger->GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->getT0();
10191019
const float minT = CAMath::Max(tz1, tz2) - merger->GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->getMaxDriftTime(slice);
10201020
// printf("T Check: Clusters %f %f, min %f max %f vtx %f\n", tz1, tz2, minT, maxT, mTZOffset);
10211021
deltaT = 0.f;

0 commit comments

Comments
 (0)