@@ -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);
0 commit comments