Skip to content

Commit 6082ff8

Browse files
committed
TPCTransform: Reduce loads from GridRowInfo
1 parent 1e03bd8 commit 6082ff8

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

GPU/TPCFastTransformation/TPCFastTransformPOD.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,9 @@ GPUdi() void TPCFastTransformPOD::getCorrectionLocal(int32_t sector, int32_t row
320320
s = 0.f; // TODO: DR: Protect from FPEs, fix upstream and remove once guaranteed that it is fixed
321321
}
322322

323-
dx = s * GPUCommonMath::Clamp(dxyz[0], info.minCorr[0], info.maxCorr[0]);
324-
dy = s * GPUCommonMath::Clamp(dxyz[1], info.minCorr[1], info.maxCorr[1]);
325-
dz = s * GPUCommonMath::Clamp(dxyz[2], info.minCorr[2], info.maxCorr[2]);
323+
dx = s * GPUCommonMath::Clamp(dxyz[0], -10.f, 10.f);
324+
dy = s * GPUCommonMath::Clamp(dxyz[1], -10.f, 10.f);
325+
dz = s * GPUCommonMath::Clamp(dxyz[2], -10.f, 10.f);
326326
}
327327

328328
GPUdi() float TPCFastTransformPOD::getCorrectionXatRealYZ(int32_t sector, int32_t row, float realY, float realZ) const
@@ -341,7 +341,7 @@ GPUdi() float TPCFastTransformPOD::getCorrectionXatRealYZ(int32_t sector, int32_
341341
if (CAMath::Abs(dx) > 100.f) {
342342
s = 0.f; // TODO: DR: Protect from FPEs, fix upstream and remove once guaranteed that it is fixed
343343
}
344-
dx = s * GPUCommonMath::Clamp(dx, info.minCorr[0], info.maxCorr[0]);
344+
dx = s * GPUCommonMath::Clamp(dx, -10.f, 10.f);
345345
return dx;
346346
}
347347

@@ -360,16 +360,16 @@ GPUdi() void TPCFastTransformPOD::getCorrectionYZatRealYZ(int32_t sector, int32_
360360
if (CAMath::Abs(dyz[0]) > 100.f || CAMath::Abs(dyz[1]) > 100.f) {
361361
s = 0.f; // TODO: DR: Protect from FPEs, fix upstream and remove once guaranteed that it is fixed
362362
}
363-
y = s * GPUCommonMath::Clamp(dyz[0], info.minCorr[1], info.maxCorr[1]);
364-
z = s * GPUCommonMath::Clamp(dyz[1], info.minCorr[2], info.maxCorr[2]);
363+
y = s * GPUCommonMath::Clamp(dyz[0], -10.f, 10.f);
364+
z = s * GPUCommonMath::Clamp(dyz[1], -10.f, 10.f);
365365
}
366366

367367
GPUdi() void TPCFastTransformPOD::convLocalToGrid(int32_t sector, int32_t row, float y, float z, float& u, float& v, float& s) const
368368
{
369369
/// convert local y, z to internal grid coordinates u,v
370370
/// return values: u, v, scaling factor
371371
const SplineType& spline = getSpline(sector, row);
372-
getSectorRowInfo(sector, row).gridMeasured.convLocalToGridUntruncated(y, z, u, v, s);
372+
getSectorRowInfo(sector >= 18 ? 18 : 0, row).gridMeasured.convLocalToGridUntruncated(y, z, u, v, s);
373373
// shrink to the grid
374374
u = GPUCommonMath::Clamp(u, 0.f, (float)spline.getGridX1().getUmax());
375375
v = GPUCommonMath::Clamp(v, 0.f, (float)spline.getGridX2().getUmax());
@@ -378,7 +378,7 @@ GPUdi() void TPCFastTransformPOD::convLocalToGrid(int32_t sector, int32_t row, f
378378
GPUdi() void TPCFastTransformPOD::convGridToLocal(int32_t sector, int32_t row, float gridU, float gridV, float& y, float& z) const
379379
{
380380
/// convert internal grid coordinates u,v to local y, z
381-
getSectorRowInfo(sector, row).gridMeasured.convGridToLocal(gridU, gridV, y, z);
381+
getSectorRowInfo(sector >= 18 ? 18 : 0, row).gridMeasured.convGridToLocal(gridU, gridV, y, z);
382382
}
383383

384384
GPUdi() void TPCFastTransformPOD::convRealLocalToGrid(int32_t sector, int32_t row, float y, float z, float& u, float& v, float& s) const
@@ -401,7 +401,7 @@ GPUdi() bool TPCFastTransformPOD::isLocalInsideGrid(int32_t sector, int32_t row,
401401
{
402402
/// check if local y, z are inside the grid
403403
float u, v, s;
404-
getSectorRowInfo(sector, row).gridMeasured.convLocalToGridUntruncated(y, z, u, v, s);
404+
getSectorRowInfo(sector >= 18 ? 18 : 0, row).gridMeasured.convLocalToGridUntruncated(y, z, u, v, s);
405405
const auto& spline = getSpline(sector, row);
406406
// shrink to the grid
407407
if (u < 0.f || u > (float)spline.getGridX1().getUmax() || //

0 commit comments

Comments
 (0)