Skip to content

Commit ad1890f

Browse files
cbmswdavidrohr
authored andcommitted
TPC Splines: add backward compatibility
1 parent 4609ff4 commit ad1890f

File tree

8 files changed

+408
-170
lines changed

8 files changed

+408
-170
lines changed

Detectors/TPC/calibration/src/TPCFastSpaceChargeCorrectionHelper.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,15 @@ void TPCFastSpaceChargeCorrectionHelper::fillSpaceChargeCorrectionFromMap(TPCFas
180180
}
181181

182182
if (processingInverseCorrection) {
183-
float* splineX = correction.getSplineDataInvX(sector, row);
184-
float* splineYZ = correction.getSplineDataInvYZ(sector, row);
183+
float* splineX = correction.getCorrectionDataInvX(sector, row);
184+
float* splineYZ = correction.getCorrectionDataInvYZ(sector, row);
185185
for (int i = 0; i < spline.getNumberOfParameters() / 3; i++) {
186186
splineX[i] = splineParameters[3 * i + 0];
187187
splineYZ[2 * i + 0] = splineParameters[3 * i + 1];
188188
splineYZ[2 * i + 1] = splineParameters[3 * i + 2];
189189
}
190190
} else {
191-
float* splineXYZ = correction.getSplineData(sector, row);
191+
float* splineXYZ = correction.getCorrectionData(sector, row);
192192
for (int i = 0; i < spline.getNumberOfParameters(); i++) {
193193
splineXYZ[i] = splineParameters[i];
194194
}
@@ -1000,8 +1000,8 @@ void TPCFastSpaceChargeCorrectionHelper::initInverse(std::vector<o2::gpu::TPCFas
10001000
dataPointGridU.data(), dataPointGridV.data(),
10011001
dataPointF.data(), dataPointWeight.data(), nDataPoints);
10021002

1003-
float* splineX = correction.getSplineDataInvX(sector, row);
1004-
float* splineUV = correction.getSplineDataInvYZ(sector, row);
1003+
float* splineX = correction.getCorrectionDataInvX(sector, row);
1004+
float* splineUV = correction.getCorrectionDataInvYZ(sector, row);
10051005
for (int i = 0; i < spline.getNumberOfParameters() / 3; i++) {
10061006
splineX[i] = splineParameters[3 * i + 0];
10071007
splineUV[2 * i + 0] = splineParameters[3 * i + 1];
@@ -1044,9 +1044,9 @@ void TPCFastSpaceChargeCorrectionHelper::mergeCorrections(
10441044
for (int row = iThread; row < geo.getNumberOfRows(); row += mNthreads) {
10451045
const auto& spline = mainCorrection.getSpline(sector, row);
10461046

1047-
float* splineParameters = mainCorrection.getSplineData(sector, row);
1048-
float* splineParametersInvX = mainCorrection.getSplineDataInvX(sector, row);
1049-
float* splineParametersInvYZ = mainCorrection.getSplineDataInvYZ(sector, row);
1047+
float* splineParameters = mainCorrection.getCorrectionData(sector, row);
1048+
float* splineParametersInvX = mainCorrection.getCorrectionDataInvX(sector, row);
1049+
float* splineParametersInvYZ = mainCorrection.getCorrectionDataInvYZ(sector, row);
10501050

10511051
auto& secRowInfo = mainCorrection.getSectorRowInfo(sector, row);
10521052

@@ -1114,7 +1114,7 @@ void TPCFastSpaceChargeCorrectionHelper::mergeCorrections(
11141114
ls *= scale;
11151115
double parscale[4] = {ls, ls * scaleU, ls * scaleV, ls * ls * scaleU * scaleV};
11161116
const auto& spl = corr.getSpline(sector, row);
1117-
spl.interpolateParametersAtU(corr.getSplineData(sector, row), lu, lv, P);
1117+
spl.interpolateParametersAtU(corr.getCorrectionData(sector, row), lu, lv, P);
11181118
for (int ipar = 0, ind = 0; ipar < nKnotPar1d; ++ipar) {
11191119
for (int idim = 0; idim < 3; idim++, ind++) {
11201120
splineParameters[knotIndex * nKnotPar3d + ind] += parscale[ipar] * P[ind];
@@ -1129,7 +1129,7 @@ void TPCFastSpaceChargeCorrectionHelper::mergeCorrections(
11291129
double parscale[4] = {ls, ls * scaleRealU, ls * scaleRealV, ls * ls * scaleRealU * scaleRealV};
11301130

11311131
{ // inverse X correction
1132-
corr.getSplineInvX(sector, row).interpolateParametersAtU(corr.getSplineDataInvX(sector, row), lu, lv, P);
1132+
corr.getSplineInvX(sector, row).interpolateParametersAtU(corr.getCorrectionDataInvX(sector, row), lu, lv, P);
11331133
for (int ipar = 0, ind = 0; ipar < nKnotPar1d; ++ipar) {
11341134
for (int idim = 0; idim < 1; idim++, ind++) {
11351135
splineParametersInvX[knotIndex * nKnotPar1d + ind] += parscale[ipar] * P[ind];
@@ -1138,7 +1138,7 @@ void TPCFastSpaceChargeCorrectionHelper::mergeCorrections(
11381138
}
11391139

11401140
{ // inverse YZ correction
1141-
corr.getSplineInvYZ(sector, row).interpolateParametersAtU(corr.getSplineDataInvYZ(sector, row), lu, lv, P);
1141+
corr.getSplineInvYZ(sector, row).interpolateParametersAtU(corr.getCorrectionDataInvYZ(sector, row), lu, lv, P);
11421142
for (int ipar = 0, ind = 0; ipar < nKnotPar1d; ++ipar) {
11431143
for (int idim = 0; idim < 2; idim++, ind++) {
11441144
splineParametersInvYZ[knotIndex * nKnotPar2d + ind] += parscale[ipar] * P[ind];

0 commit comments

Comments
 (0)