Skip to content

Commit df5e021

Browse files
cbmswdavidrohr
authored andcommitted
TPC Splines: replace std::tuple by std::array
1 parent 7dd7c39 commit df5e021

File tree

7 files changed

+78
-57
lines changed

7 files changed

+78
-57
lines changed

Detectors/TPC/calibration/src/TPCFastSpaceChargeCorrectionHelper.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -668,22 +668,22 @@ std::unique_ptr<o2::gpu::TPCFastSpaceChargeCorrection> TPCFastSpaceChargeCorrect
668668
// correct the mean position if it is outside the voxel
669669
std::stringstream msg;
670670
if (fabs(x - data.mX) > mVoxelMeanValidityRange * dx / 2.) {
671-
msg << "\n x: center " << x << " dx " << data.mX - x << " half bin size: " << dx / 2;
671+
msg << "\n x: center " << x << " dx " << data.mX - x << " half bin size " << dx / 2;
672672
}
673673

674674
if (fabs(vox.mY - data.mY) > mVoxelMeanValidityRange * vox.mDy / 2.) {
675-
msg << "\n y: center " << vox.mY << " dy " << data.mY - vox.mY << " half bin size: " << vox.mDy / 2;
675+
msg << "\n y: center " << vox.mY << " dy " << data.mY - vox.mY << " half bin size " << vox.mDy / 2;
676676
data.mY = vox.mY;
677677
}
678678

679679
if (fabs(vox.mZ - data.mZ) > mVoxelMeanValidityRange * vox.mDz / 2.) {
680-
msg << "\n z: center " << vox.mZ << " dz " << data.mZ - vox.mZ << " half bin size: " << vox.mDz / 2;
680+
msg << "\n z: center " << vox.mZ << " dz " << data.mZ - vox.mZ << " half bin size " << vox.mDz / 2;
681681
data.mZ = vox.mZ;
682682
}
683683

684684
if (!msg.str().empty()) {
685685
LOG(warning) << directionName << " correction: fitted voxel position is outside the voxel: "
686-
<< " sector " << iSector << " row " << iRow << " bin: " << iy << " " << iz
686+
<< " sector " << iSector << " row " << iRow << " bin y " << iy << " bin z " << iz
687687
<< msg.str();
688688
}
689689

GPU/TPCFastTransformation/Spline1DSpec.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class Spline1DSpec<DataT, YdimT, 0> : public Spline1DContainer<DataT>
342342
}
343343

344344
template <typename T>
345-
GPUd() std::tuple<T, T, T, T> getSderivativesOverParsAtU(const Knot& knotL, DataT u) const
345+
GPUd() std::array<T, 4> getSderivativesOverParsAtU(const Knot& knotL, DataT u) const
346346
{
347347
/// Get derivatives of the interpolated value {S(u): 1D -> nYdim} at the segment [knotL, next knotR]
348348
/// over the spline parameters Sl(eft), Sr(ight) and the slopes Dl, Dr
@@ -364,11 +364,11 @@ class Spline1DSpec<DataT, YdimT, 0> : public Spline1DContainer<DataT>
364364
T dSdDl = vm1 * a;
365365
T dSdDr = v * a;
366366
// S(u) = dSdSl * Sl + dSdSr * Sr + dSdDl * Dl + dSdDr * Dr;
367-
return std::make_tuple(dSdSl, dSdDl, dSdSr, dSdDr);
367+
return {dSdSl, dSdDl, dSdSr, dSdDr};
368368
}
369369

370370
template <typename T>
371-
GPUd() std::tuple<T, T, T, T, T, T, T, T> getSDderivativesOverParsAtU(const Knot& knotL, DataT u) const
371+
GPUd() std::array<T, 8> getSDderivativesOverParsAtU(const Knot& knotL, DataT u) const
372372
{
373373
/// Get derivatives of the interpolated value {S(u): 1D -> nYdim} at the segment [knotL, next knotR]
374374
/// over the spline values Sl, Sr and the slopes Dl, Dr
@@ -397,7 +397,7 @@ class Spline1DSpec<DataT, YdimT, 0> : public Spline1DContainer<DataT>
397397
T dDdDr = v * (v + vm1 + vm1);
398398
// S(u) = dSdSl * Sl + dSdSr * Sr + dSdDl * Dl + dSdDr * Dr;
399399
// D(u) = dS(u)/du = dDdSl * Sl + dDdSr * Sr + dDdDl * Dl + dDdDr * Dr;
400-
return std::make_tuple(dSdSl, dSdDl, dSdSr, dSdDr, dDdSl, dDdDl, dDdSr, dDdDr);
400+
return {dSdSl, dSdDl, dSdSr, dSdDr, dDdSl, dDdDl, dDdSr, dDdDr};
401401
}
402402

403403
using TBase::convXtoU;

GPU/TPCFastTransformation/Spline2DSpec.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
#include "Riostream.h"
3030
#include "TMath.h"
3131
#include "Spline2DHelper.h"
32-
#include "TCanvas.h"
33-
#include "TNtuple.h"
3432
#include "TFile.h"
3533
#include "GPUCommonMath.h"
3634

GPU/TPCFastTransformation/TPCFastSpaceChargeCorrection.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ class TPCFastSpaceChargeCorrection : public FlatObject
7878
}
7979

8080
/// convert local y, z to internal grid coordinates u,v, and spline scale
81-
std::tuple<float, float, float> convLocalToGridUntruncated(float y, float z) const
81+
std::array<float, 3> convLocalToGridUntruncated(float y, float z) const
8282
{
8383
return {(y - y0) * yScale, (z - z0) * zScale, getSpineScaleForZ(z)};
8484
}
8585

8686
/// convert internal grid coordinates u,v to local y, z
87-
std::tuple<float, float> convGridToLocal(float gridU, float gridV) const
87+
std::array<float, 2> convGridToLocal(float gridU, float gridV) const
8888
{
8989
return {y0 + gridU / yScale, z0 + gridV / zScale};
9090
}
@@ -123,22 +123,22 @@ class TPCFastSpaceChargeCorrection : public FlatObject
123123
maxCorr[2] = GPUCommonMath::Max(maxCorr[2], dv);
124124
}
125125

126-
void updateMaxValues(std::tuple<float, float, float> dxdudv, float scale)
126+
void updateMaxValues(std::array<float, 3> dxdudv, float scale)
127127
{
128-
float dx = std::get<0>(dxdudv) * scale;
129-
float du = std::get<1>(dxdudv) * scale;
130-
float dv = std::get<2>(dxdudv) * scale;
128+
float dx = dxdudv[0] * scale;
129+
float du = dxdudv[1] * scale;
130+
float dv = dxdudv[2] * scale;
131131
updateMaxValues(dx, du, dv);
132132
}
133133

134-
std::tuple<float, float, float> getMaxValues() const
134+
std::array<float, 3> getMaxValues() const
135135
{
136-
return std::make_tuple(maxCorr[0], maxCorr[1], maxCorr[2]);
136+
return {maxCorr[0], maxCorr[1], maxCorr[2]};
137137
}
138138

139-
std::tuple<float, float, float> getMinValues() const
139+
std::array<float, 3> getMinValues() const
140140
{
141-
return std::make_tuple(minCorr[0], minCorr[1], minCorr[2]);
141+
return {minCorr[0], minCorr[1], minCorr[2]};
142142
}
143143

144144
ClassDefNV(SectorRowInfo, 2);
@@ -259,31 +259,31 @@ class TPCFastSpaceChargeCorrection : public FlatObject
259259
///
260260
// GPUd() int32_t getCorrectionInternal(int32_t sector, int32_t row, float u, float v, float& dx, float& du, float& dv) const;
261261

262-
GPUdi() std::tuple<float, float, float> getCorrectionLocal(int32_t sector, int32_t row, float y, float z) const;
262+
GPUdi() std::array<float, 3> getCorrectionLocal(int32_t sector, int32_t row, float y, float z) const;
263263

264264
/// inverse correction: Real Y and Z -> Real X
265265
GPUd() float getCorrectionXatRealYZ(int32_t sector, int32_t row, float realY, float realZ) const;
266266

267267
/// inverse correction: Real Y and Z -> measred Y and Z
268-
GPUd() std::tuple<float, float> getCorrectionYZatRealYZ(int32_t sector, int32_t row, float realY, float realZ) const;
268+
GPUd() std::array<float, 2> getCorrectionYZatRealYZ(int32_t sector, int32_t row, float realY, float realZ) const;
269269

270270
/// _______________ Utilities _______________________________________________
271271

272272
/// convert local y, z to internal grid coordinates u,v
273273
/// return values: u, v, scaling factor
274-
GPUd() std::tuple<float, float, float> convLocalToGrid(int32_t sector, int32_t row, float y, float z) const;
274+
GPUd() std::array<float, 3> convLocalToGrid(int32_t sector, int32_t row, float y, float z) const;
275275

276276
/// convert internal grid coordinates u,v to local y, z
277277
/// return values: y, z, scaling factor
278-
GPUd() std::tuple<float, float> convGridToLocal(int32_t sector, int32_t row, float u, float v) const;
278+
GPUd() std::array<float, 2> convGridToLocal(int32_t sector, int32_t row, float u, float v) const;
279279

280280
/// convert real Y, Z to the internal grid coordinates
281281
/// return values: u, v, scaling factor
282-
GPUd() std::tuple<float, float, float> convRealLocalToGrid(int32_t sector, int32_t row, float y, float z) const;
282+
GPUd() std::array<float, 3> convRealLocalToGrid(int32_t sector, int32_t row, float y, float z) const;
283283

284284
/// convert internal grid coordinates to the real Y, Z
285285
/// return values: y, z
286-
GPUd() std::tuple<float, float> convGridToRealLocal(int32_t sector, int32_t row, float u, float v) const;
286+
GPUd() std::array<float, 2> convGridToRealLocal(int32_t sector, int32_t row, float u, float v) const;
287287

288288
GPUd() bool isLocalInsideGrid(int32_t sector, int32_t row, float y, float z) const;
289289
GPUd() bool isRealLocalInsideGrid(int32_t sector, int32_t row, float y, float z) const;
@@ -453,7 +453,7 @@ GPUdi() const float* TPCFastSpaceChargeCorrection::getSplineDataInvYZ(int32_t se
453453
return getSplineData(sector, row, 2);
454454
}
455455

456-
GPUdi() std::tuple<float, float, float> TPCFastSpaceChargeCorrection::convLocalToGrid(int32_t sector, int32_t row, float y, float z) const
456+
GPUdi() std::array<float, 3> TPCFastSpaceChargeCorrection::convLocalToGrid(int32_t sector, int32_t row, float y, float z) const
457457
{
458458
/// convert local y, z to internal grid coordinates u,v
459459
/// return values: u, v, scaling factor
@@ -491,13 +491,13 @@ GPUdi() bool TPCFastSpaceChargeCorrection::isRealLocalInsideGrid(int32_t sector,
491491
return true;
492492
}
493493

494-
GPUdi() std::tuple<float, float> TPCFastSpaceChargeCorrection::convGridToLocal(int32_t sector, int32_t row, float gridU, float gridV) const
494+
GPUdi() std::array<float, 2> TPCFastSpaceChargeCorrection::convGridToLocal(int32_t sector, int32_t row, float gridU, float gridV) const
495495
{
496496
/// convert internal grid coordinates u,v to local y, z
497497
return getSectorRowInfo(sector, row).gridMeasured.convGridToLocal(gridU, gridV);
498498
}
499499

500-
GPUdi() std::tuple<float, float, float> TPCFastSpaceChargeCorrection::convRealLocalToGrid(int32_t sector, int32_t row, float y, float z) const
500+
GPUdi() std::array<float, 3> TPCFastSpaceChargeCorrection::convRealLocalToGrid(int32_t sector, int32_t row, float y, float z) const
501501
{
502502
/// convert real y, z to the internal grid coordinates + scale
503503
const SplineType& spline = getSpline(sector, row);
@@ -508,13 +508,13 @@ GPUdi() std::tuple<float, float, float> TPCFastSpaceChargeCorrection::convRealLo
508508
return {gridU, gridV, scale};
509509
}
510510

511-
GPUdi() std::tuple<float, float> TPCFastSpaceChargeCorrection::convGridToRealLocal(int32_t sector, int32_t row, float gridU, float gridV) const
511+
GPUdi() std::array<float, 2> TPCFastSpaceChargeCorrection::convGridToRealLocal(int32_t sector, int32_t row, float gridU, float gridV) const
512512
{
513513
/// convert internal grid coordinates u,v to the real y, z
514514
return getSectorRowInfo(sector, row).gridReal.convGridToLocal(gridU, gridV);
515515
}
516516

517-
GPUdi() std::tuple<float, float, float> TPCFastSpaceChargeCorrection::getCorrectionLocal(int32_t sector, int32_t row, float y, float z) const
517+
GPUdi() std::array<float, 3> TPCFastSpaceChargeCorrection::getCorrectionLocal(int32_t sector, int32_t row, float y, float z) const
518518
{
519519
const auto& info = getSectorRowInfo(sector, row);
520520
const SplineType& spline = getSpline(sector, row);
@@ -541,7 +541,7 @@ GPUdi() float TPCFastSpaceChargeCorrection::getCorrectionXatRealYZ(int32_t secto
541541
return dx;
542542
}
543543

544-
GPUdi() std::tuple<float, float> TPCFastSpaceChargeCorrection::getCorrectionYZatRealYZ(int32_t sector, int32_t row, float realY, float realZ) const
544+
GPUdi() std::array<float, 2> TPCFastSpaceChargeCorrection::getCorrectionYZatRealYZ(int32_t sector, int32_t row, float realY, float realZ) const
545545
{
546546
auto [gridU, gridV, scale] = convRealLocalToGrid(sector, row, realY, realZ);
547547
const auto& info = getSectorRowInfo(sector, row);

GPU/TPCFastTransformation/TPCFastTransform.h

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,17 @@ class TPCFastTransform : public FlatObject
349349
GPUdi() void TPCFastTransform::convPadTimeToLocal(int32_t sector, int32_t row, float pad, float time, float& y, float& z, float vertexTime) const
350350
{
351351
float l = (time - mT0 - vertexTime) * mVdrift; // drift length [cm]
352-
std::tie(y, z) = getGeometry().convPadDriftLengthToLocal(sector, row, pad, l);
352+
const auto local = getGeometry().convPadDriftLengthToLocal(sector, row, pad, l);
353+
y = local[0];
354+
z = local[1];
353355
}
354356

355357
GPUdi() void TPCFastTransform::convPadTimeToLocalInTimeFrame(int32_t sector, int32_t row, float pad, float time, float& y, float& z, float maxTimeBin) const
356358
{
357359
float l = (time - mT0 - maxTimeBin) * mVdrift; // drift length [cm]
358-
std::tie(y, z) = getGeometry().convPadDriftLengthToLocal(sector, row, pad, l);
360+
const auto local = getGeometry().convPadDriftLengthToLocal(sector, row, pad, l);
361+
y = local[0];
362+
z = local[1];
359363
}
360364

361365
// ----------------------------------------------------------------------
@@ -379,16 +383,16 @@ GPUdi() float TPCFastTransform::convDriftLengthToTime(float driftLength, float v
379383

380384
GPUdi() void TPCFastTransform::convLocalToPadTime(int32_t sector, int32_t row, float y, float z, float& pad, float& time, float vertexTime) const
381385
{
382-
float l;
383-
std::tie(pad, l) = getGeometry().convLocalToPadDriftLength(sector, row, y, z);
384-
time = convDriftLengthToTime(l, vertexTime);
386+
const auto padLength = getGeometry().convLocalToPadDriftLength(sector, row, y, z);
387+
pad = padLength[0];
388+
time = convDriftLengthToTime(padLength[1], vertexTime);
385389
}
386390

387391
GPUdi() void TPCFastTransform::convLocalToPadTimeInTimeFrame(int32_t sector, int32_t row, float y, float z, float& pad, float& time, float maxTimeBin) const
388392
{
389-
float l;
390-
std::tie(pad, l) = getGeometry().convLocalToPadDriftLength(sector, row, y, z);
391-
time = convDriftLengthToTime(l, maxTimeBin);
393+
const auto padLength = getGeometry().convLocalToPadDriftLength(sector, row, y, z);
394+
pad = padLength[0];
395+
time = convDriftLengthToTime(padLength[1], maxTimeBin);
392396
}
393397

394398
// ----------------------------------------------------------------------
@@ -414,7 +418,10 @@ GPUdi() void TPCFastTransform::TransformLocal(int32_t sector, int32_t row, float
414418
} else
415419
#endif // GPUCA_GPUCODE
416420
{
417-
std::tie(dx, dy, dz) = mCorrection.getCorrectionLocal(sector, row, y, z);
421+
const auto corrLocal = mCorrection.getCorrectionLocal(sector, row, y, z);
422+
dx = corrLocal[0];
423+
dy = corrLocal[1];
424+
dz = corrLocal[2];
418425
if (ref) {
419426
if ((scale > 0.f) && (scaleMode == 0)) { // scaling was requested
420427
auto [dxRef, dyRef, dzRef] = ref->mCorrection.getCorrectionLocal(sector, row, y, z);
@@ -463,12 +470,18 @@ GPUdi() void TPCFastTransform::TransformLocal(int32_t sector, int32_t row, float
463470

464471
float dxRef = 0.f, dyRef = 0.f, dzRef = 0.f;
465472
if (ref) {
466-
std::tie(dxRef, dyRef, dzRef) = ref->mCorrection.getCorrectionLocal(sector, row, y, z);
473+
const auto corr = ref->mCorrection.getCorrectionLocal(sector, row, y, z);
474+
dxRef = corr[0];
475+
dyRef = corr[1];
476+
dzRef = corr[2];
467477
}
468478

469479
float dxRef2 = 0.f, dyRef2 = 0.f, dzRef2 = 0.f;
470480
if (ref2) {
471-
std::tie(dxRef2, dyRef2, dzRef2) = ref2->mCorrection.getCorrectionLocal(sector, row, y, z);
481+
const auto corr = ref2->mCorrection.getCorrectionLocal(sector, row, y, z);
482+
dxRef2 = corr[0];
483+
dyRef2 = corr[1];
484+
dzRef2 = corr[2];
472485
}
473486

474487
auto [dxOrig, dyOrig, dzOrig] = mCorrection.getCorrectionLocal(sector, row, y, z);
@@ -596,7 +609,9 @@ GPUdi() void TPCFastTransform::TransformIdeal(int32_t sector, int32_t row, float
596609

597610
x = getGeometry().getRowInfo(row).x;
598611
float driftLength = (time - mT0 - vertexTime) * mVdrift; // drift length cm
599-
std::tie(y, z) = getGeometry().convPadDriftLengthToLocal(sector, row, pad, driftLength);
612+
const auto local = getGeometry().convPadDriftLengthToLocal(sector, row, pad, driftLength);
613+
y = local[0];
614+
z = local[1];
600615
}
601616

602617
GPUdi() float TPCFastTransform::convTimeToZinTimeFrame(int32_t sector, float time, float maxTimeBin) const
@@ -703,20 +718,22 @@ GPUdi() void TPCFastTransform::InverseTransformYZtoNominalYZ(int32_t sector, int
703718
float dz = 0;
704719

705720
if ((scale >= 0.f) || (scaleMode == 1) || (scaleMode == 2)) {
706-
std::tie(dy, dz) = mCorrection.getCorrectionYZatRealYZ(sector, row, realY, realZ);
721+
const auto corrYZ = mCorrection.getCorrectionYZatRealYZ(sector, row, realY, realZ);
722+
dy = corrYZ[0];
723+
dz = corrYZ[1];
707724

708725
if (ref) { // scaling was requested
709726
if (scaleMode == 0 && scale > 0.f) {
710-
auto [dyRef, dzRef] = ref->mCorrection.getCorrectionYZatRealYZ(sector, row, realY, realZ);
727+
const auto [dyRef, dzRef] = ref->mCorrection.getCorrectionYZatRealYZ(sector, row, realY, realZ);
711728
dy = (dy - dyRef) * scale + dyRef;
712729
dz = (dz - dzRef) * scale + dzRef;
713730
} else if ((scale != 0) && ((scaleMode == 1) || (scaleMode == 2))) {
714-
auto [dyRef, dzRef] = ref->mCorrection.getCorrectionYZatRealYZ(sector, row, realY, realZ);
731+
const auto [dyRef, dzRef] = ref->mCorrection.getCorrectionYZatRealYZ(sector, row, realY, realZ);
715732
dy = dyRef * scale + dy;
716733
dz = dzRef * scale + dz;
717734
}
718735
if (ref2 && (scale2 != 0)) {
719-
auto [dyRef, dzRef] = ref2->mCorrection.getCorrectionYZatRealYZ(sector, row, realY, realZ);
736+
const auto [dyRef, dzRef] = ref2->mCorrection.getCorrectionYZatRealYZ(sector, row, realY, realZ);
720737
dy = dyRef * scale2 + dy;
721738
dz = dzRef * scale2 + dz;
722739
}

GPU/TPCFastTransformation/TPCFastTransformGeo.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#define ALICEO2_GPUCOMMON_TPCFASTTRANSFORMATION_TPCFASTTRANSFORMGEO_H
1919

2020
#include "GPUCommonDef.h"
21+
#include "GPUCommonArray.h"
2122
#ifndef GPUCA_GPUCODE_DEVICE
2223
#include <memory>
2324
#include "GPUCommonRtypes.h"
@@ -55,7 +56,7 @@ class TPCFastTransformGeo
5556
GPUd() float getYmax() const { return -yMin; }
5657

5758
/// get Y range
58-
GPUd() std::tuple<float, float> getYrange() const { return {getYmin(), getYmax()}; }
59+
GPUd() std::array<float, 2> getYrange() const { return {getYmin(), getYmax()}; }
5960

6061
/// get width in Y
6162
GPUd() float getYwidth() const { return -2.f * yMin; }
@@ -125,7 +126,7 @@ class TPCFastTransformGeo
125126
GPUd() float getTPCzLength() const { return mTPCzLength; }
126127

127128
/// Gives Z range for the corresponding TPC side
128-
GPUd() std::tuple<float, float> getZrange(int32_t sector) const;
129+
GPUd() std::array<float, 2> getZrange(int32_t sector) const;
129130
GPUd() float getZmin(int32_t sector) const;
130131
GPUd() float getZmax(int32_t sector) const;
131132
GPUd() float getZreadout(int32_t sector) const;
@@ -139,7 +140,7 @@ class TPCFastTransformGeo
139140
GPUd() void convGlobalToLocal(int32_t sector, float gx, float gy, float gz, float& lx, float& ly, float& lz) const;
140141

141142
/// convert Pad, DriftLength -> Local c.s.
142-
GPUd() std::tuple<float, float> convPadDriftLengthToLocal(int32_t sector, int32_t row, float pad, float driftLength) const;
143+
GPUd() std::array<float, 2> convPadDriftLengthToLocal(int32_t sector, int32_t row, float pad, float driftLength) const;
143144

144145
/// convert DriftLength -> Local c.s.
145146
GPUd() float convDriftLengthToZ1(int32_t sector, float driftLength) const;
@@ -148,7 +149,7 @@ class TPCFastTransformGeo
148149
GPUd() float convZtoDriftLength1(int32_t sector, float z) const;
149150

150151
/// convert Local c.s. -> Pad, DriftLength
151-
GPUd() std::tuple<float, float> convLocalToPadDriftLength(int32_t sector, int32_t row, float y, float z) const;
152+
GPUd() std::array<float, 2> convLocalToPadDriftLength(int32_t sector, int32_t row, float y, float z) const;
152153

153154
/// Print method
154155
void print() const;
@@ -229,7 +230,7 @@ GPUdi() void TPCFastTransformGeo::convGlobalToLocal(int32_t sector, float gx, fl
229230
lz = gz;
230231
}
231232

232-
GPUdi() std::tuple<float, float> TPCFastTransformGeo::convPadDriftLengthToLocal(int32_t sector, int32_t row, float pad, float driftLength) const
233+
GPUdi() std::array<float, 2> TPCFastTransformGeo::convPadDriftLengthToLocal(int32_t sector, int32_t row, float pad, float driftLength) const
233234
{
234235
/// convert Pad, DriftLength -> Local c.s.
235236
const RowInfo& rowInfo = getRowInfo(row);
@@ -257,7 +258,7 @@ GPUdi() float TPCFastTransformGeo::convZtoDriftLength1(int32_t sector, float z)
257258
return (sector < NumberOfSectorsA) ? (mTPCzLength - z) : (z + mTPCzLength);
258259
}
259260

260-
GPUdi() std::tuple<float, float> TPCFastTransformGeo::getZrange(int32_t sector) const
261+
GPUdi() std::array<float, 2> TPCFastTransformGeo::getZrange(int32_t sector) const
261262
{
262263
/// z range for the sector
263264
if (sector < NumberOfSectorsA) { // TPC side A
@@ -297,7 +298,7 @@ GPUdi() float TPCFastTransformGeo::getZreadout(int32_t sector) const
297298
}
298299
}
299300

300-
GPUdi() std::tuple<float, float> TPCFastTransformGeo::convLocalToPadDriftLength(int32_t sector, int32_t row, float y, float z) const
301+
GPUdi() std::array<float, 2> TPCFastTransformGeo::convLocalToPadDriftLength(int32_t sector, int32_t row, float y, float z) const
301302
{
302303
/// convert Local c.s. -> Pad, DriftLength
303304
float u, l;

0 commit comments

Comments
 (0)