Skip to content

Commit 1ed6e7e

Browse files
committed
GPU TPC: Track with eta ~ 0 with clusters removed can increase the time range between first and last cluster, thus reconstrain time0 when storing
1 parent 49736e1 commit 1ed6e7e

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

GPU/GPUTracking/Merger/GPUTPCGMO2Output.cxx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,18 @@ GPUdii() void GPUTPCGMO2Output::Thread<GPUTPCGMO2Output::output>(int nBlocks, in
198198
const float tmin = CAMath::Min(t1, t2);
199199
const float maxDriftTime = merger.GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->getMaxDriftTime(t1 > t2 ? sector1 : sector2);
200200
const float tmax = CAMath::Min(tmin + maxDriftTime, CAMath::Max(t1, t2));
201+
float delta = 0.f;
202+
if (time0 < tmax + maxDriftTime) {
203+
delta = tmax + maxDriftTime - time0;
204+
}
205+
if (tmin < time0 + delta) {
206+
delta = tmin - time0;
207+
}
208+
if (delta != 0.f) {
209+
time0 += delta;
210+
const float deltaZ = merger.GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convDeltaTimeToDeltaZinTimeFrame(sector2, delta);
211+
oTrack.setZ(oTrack.getZ() + deltaZ);
212+
}
201213
tFwd = tmin - time0;
202214
tBwd = time0 - tmax + maxDriftTime;
203215
}

GPU/GPUTracking/Merger/GPUTPCGMTrackParam.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ GPUd() void GPUTPCGMTrackParam::ShiftZ(const GPUTPCGMMerger* GPUrestrict() merge
964964
}
965965
if (deltaT != 0.f) {
966966
deltaZ = merger->GetConstantMem()->calibObjects.fastTransformHelper->getCorrMap()->convDeltaTimeToDeltaZinTimeFrame(slice, deltaT);
967-
// printf("Moving clusters to TPC Range: Shift %f in Z: %f to %f --> %f to %f in T\n", deltaZ, tz2 - mTZOffset, tz1 - mTZOffset, tz2 - mTZOffset - deltaT, tz1 - mTZOffset - deltaT);
967+
// printf("Moving clusters to TPC Range: QPt %f, New mTZOffset %f, t1 %f, t2 %f, Shift %f in Z: %f to %f --> %f to %f in T\n", mP[4], mTZOffset + deltaT, tz1, tz2, deltaZ, tz2 - mTZOffset, tz1 - mTZOffset, tz2 - mTZOffset - deltaT, tz1 - mTZOffset - deltaT);
968968
mTZOffset += deltaT;
969969
mP[1] -= deltaZ;
970970
}

0 commit comments

Comments
 (0)