diff --git a/Detectors/TPC/simulation/src/Digitizer.cxx b/Detectors/TPC/simulation/src/Digitizer.cxx index 4848dfe1fb948..290cd84df9a6b 100644 --- a/Detectors/TPC/simulation/src/Digitizer.cxx +++ b/Detectors/TPC/simulation/src/Digitizer.cxx @@ -240,7 +240,7 @@ void Digitizer::setMeanLumiDistortionsDerivative(float meanLumi) void Digitizer::recalculateDistortions() { - if (!mSpaceCharge || !mSpaceCharge) { + if (!mSpaceCharge || !mSpaceChargeDer) { LOGP(info, "Average or derivative distortions not set"); return; } diff --git a/Detectors/TPC/spacecharge/src/SpaceCharge.cxx b/Detectors/TPC/spacecharge/src/SpaceCharge.cxx index 045931f805453..6748de7ae9916 100644 --- a/Detectors/TPC/spacecharge/src/SpaceCharge.cxx +++ b/Detectors/TPC/spacecharge/src/SpaceCharge.cxx @@ -748,7 +748,7 @@ void SpaceCharge::calcGlobalDistCorrIterative(const DistCorrInterpolator< initContainer(mGlobalCorrdRPhi[side], true); } - const auto& scScale = (type == Type::Distortions) ? scSCale->mInterpolatorGlobalCorr[side] : scSCale->mInterpolatorGlobalDist[side]; + const auto& scSCaleInterpolator = (type == Type::Distortions) ? scSCale->mInterpolatorGlobalCorr[side] : scSCale->mInterpolatorGlobalDist[side]; #pragma omp parallel for num_threads(sNThreads) for (unsigned int iPhi = 0; iPhi < mParamGrid.NPhiVertices; ++iPhi) { @@ -802,13 +802,13 @@ void SpaceCharge::calcGlobalDistCorrIterative(const DistCorrInterpolator< // interpolate global correction at new point and calculate position of global correction corrdR = globCorr.evaldR(zCurrPos, rCurrPos, phiCurrPos); if (scSCale && scale != 0) { - corrdR += scale * scScale.evaldR(zCurrPos, rCurrPos, phiCurrPos); + corrdR += scale * scSCaleInterpolator.evaldR(zCurrPos, rCurrPos, phiCurrPos); } const DataT rNewPos = rCurrPos + corrdR; DataT corrPhi = 0; if (scSCale && scale != 0) { - corrPhi = scale * scScale.evaldRPhi(zCurrPos, rCurrPos, phiCurrPos); + corrPhi = scale * scSCaleInterpolator.evaldRPhi(zCurrPos, rCurrPos, phiCurrPos); } corrPhi += globCorr.evaldRPhi(zCurrPos, rCurrPos, phiCurrPos); corrPhi /= rCurrPos; @@ -818,7 +818,7 @@ void SpaceCharge::calcGlobalDistCorrIterative(const DistCorrInterpolator< corrdZ = globCorr.evaldZ(zCurrPos, rCurrPos, phiCurrPos); if (scSCale && scale != 0) { - corrdZ += scale * scScale.evaldZ(zCurrPos, rCurrPos, phiCurrPos); + corrdZ += scale * scSCaleInterpolator.evaldZ(zCurrPos, rCurrPos, phiCurrPos); } const DataT zNewPos = zCurrPos + corrdZ;