diff --git a/Detectors/TPC/calibration/src/CorrectionMapsLoader.cxx b/Detectors/TPC/calibration/src/CorrectionMapsLoader.cxx index c2f7a26ba32d1..e13f887cbdc21 100644 --- a/Detectors/TPC/calibration/src/CorrectionMapsLoader.cxx +++ b/Detectors/TPC/calibration/src/CorrectionMapsLoader.cxx @@ -126,7 +126,7 @@ void CorrectionMapsLoader::addOptions(std::vector& options) { // these are options which should be added at the level of device using TPC corrections // At the moment - nothing, all options are moved to configurable param CorrMapParam - addOption(options, ConfigParamSpec{"do-not-recalculate-inverse-correction", o2::framework::VariantType::Bool, false, {"Do NOT recalculate the inverse correction in case lumi mode 1 or 2 is used"}}); + addOption(options, ConfigParamSpec{"recalculate-inverse-correction", o2::framework::VariantType::Bool, false, {"recalculate the inverse correction in case lumi mode 1 or 2 is used"}}); addOption(options, ConfigParamSpec{"nthreads-inverse-correction", o2::framework::VariantType::Int, 4, {"Number of threads used for calculating the inverse correction (-1=all threads)"}}); } @@ -251,7 +251,7 @@ void CorrectionMapsLoader::init(o2::framework::InitContext& ic) } if ((getLumiScaleMode() == 1) || (getLumiScaleMode() == 2)) { - mScaleInverse = ic.options().get("do-not-recalculate-inverse-correction"); + mScaleInverse = !(ic.options().get("recalculate-inverse-correction")); } else { mScaleInverse = true; } diff --git a/GPU/TPCFastTransformation/TPCFastTransform.h b/GPU/TPCFastTransformation/TPCFastTransform.h index c048b9319f421..fe52bffe14acc 100644 --- a/GPU/TPCFastTransformation/TPCFastTransform.h +++ b/GPU/TPCFastTransformation/TPCFastTransform.h @@ -484,7 +484,7 @@ GPUdi() void TPCFastTransform::TransformInternal(int slice, int row, float& u, f dv = dvRef * scale + dv; } } - if (ref2) { + if (ref2 && (scale2 != 0)) { float dxRef, duRef, dvRef; ref2->mCorrection.getCorrection(slice, row, u, v, dxRef, duRef, dvRef); dx = dxRef * scale2 + dx; @@ -795,7 +795,7 @@ GPUdi() void TPCFastTransform::InverseTransformYZtoX(int slice, int row, float y if (ref2 && (scale2 != 0)) { float xr; ref2->mCorrection.getCorrectionInvCorrectedX(slice, row, u, v, xr); - x = (xr - getGeometry().getRowInfo(row).x) * scale + x; // xr=mGeo.getRowInfo(row).x + dx; + x = (xr - getGeometry().getRowInfo(row).x) * scale2 + x; // xr=mGeo.getRowInfo(row).x + dx; } } else { x = mCorrection.getGeometry().getRowInfo(row).x; // corrections are disabled @@ -833,11 +833,11 @@ GPUdi() void TPCFastTransform::InverseTransformYZtoNominalYZ(int slice, int row, un = (unr - u) * scale + un; // unr = u - duv[0]; vn = (vnr - v) * scale + vn; } - if (ref2 && (scale != 0)) { + if (ref2 && (scale2 != 0)) { float unr = 0, vnr = 0; ref2->mCorrection.getCorrectionInvUV(slice, row, u, v, unr, vnr); - un = (unr - u) * scale + un; // unr = u - duv[0]; - vn = (vnr - v) * scale + vn; + un = (unr - u) * scale2 + un; // unr = u - duv[0]; + vn = (vnr - v) * scale2 + vn; } } } else {