diff --git a/DataFormats/Detectors/TRD/include/DataFormatsTRD/CalGain.h b/DataFormats/Detectors/TRD/include/DataFormatsTRD/CalGain.h index b4e64db094a5c..97b3a73a86c03 100644 --- a/DataFormats/Detectors/TRD/include/DataFormatsTRD/CalGain.h +++ b/DataFormats/Detectors/TRD/include/DataFormatsTRD/CalGain.h @@ -40,7 +40,7 @@ class CalGain if (!defaultAvg || isGoodGain(iDet)) return mMPVdEdx[iDet]; else { - if (TMath::Abs(mMeanGain + 999.) < 1e-6) + if (std::fabs(mMeanGain + 999.) < 1e-6) mMeanGain = getAverageGain(); return mMeanGain; } @@ -68,7 +68,7 @@ class CalGain bool isGoodGain(int iDet) const { - if (TMath::Abs(mMPVdEdx[iDet] - constants::MPVDEDXDEFAULT) > 1e-6) + if (std::fabs(mMPVdEdx[iDet] - constants::MPVDEDXDEFAULT) > 1e-6) return true; else return false; diff --git a/DataFormats/Detectors/TRD/include/DataFormatsTRD/CalVdriftExB.h b/DataFormats/Detectors/TRD/include/DataFormatsTRD/CalVdriftExB.h index 65981e928fb39..280f9d0d4b8a9 100644 --- a/DataFormats/Detectors/TRD/include/DataFormatsTRD/CalVdriftExB.h +++ b/DataFormats/Detectors/TRD/include/DataFormatsTRD/CalVdriftExB.h @@ -41,7 +41,7 @@ class CalVdriftExB if (!defaultAvg || (isGoodExB(iDet) && isGoodVdrift(iDet))) return mVdrift[iDet]; else { - if (TMath::Abs(mMeanVdrift + 999.) < 1e-6) + if (std::fabs(mMeanVdrift + 999.) < 1e-6) mMeanVdrift = getAverageVdrift(); return mMeanVdrift; } @@ -51,7 +51,7 @@ class CalVdriftExB if (!defaultAvg || (isGoodExB(iDet) && isGoodVdrift(iDet))) return mExB[iDet]; else { - if (TMath::Abs(mMeanExB + 999.) < 1e-6) + if (std::fabs(mMeanExB + 999.) < 1e-6) mMeanExB = getAverageExB(); return mMeanExB; } @@ -102,9 +102,9 @@ class CalVdriftExB // check if value is well calibrated or not // default calibration if not enough entries // close to boundaries indicate a failed fit - if (TMath::Abs(mExB[iDet] - constants::EXBDEFAULT) > 1e-6 && - TMath::Abs(mExB[iDet] - constants::EXBMIN) > 0.01 && - TMath::Abs(mExB[iDet] - constants::EXBMAX) > 0.01) + if (std::fabs(mExB[iDet] - constants::EXBDEFAULT) > 1e-6 && + std::fabs(mExB[iDet] - constants::EXBMIN) > 0.01 && + std::fabs(mExB[iDet] - constants::EXBMAX) > 0.01) return true; else return false; @@ -115,9 +115,9 @@ class CalVdriftExB // check if value is well calibrated or not // default calibration if not enough entries // close to boundaries indicate a failed fit - if (TMath::Abs(mVdrift[iDet] - constants::VDRIFTDEFAULT) > 1e-6 && - TMath::Abs(mVdrift[iDet] - constants::VDRIFTMIN) > 0.1 && - TMath::Abs(mVdrift[iDet] - constants::VDRIFTMAX) > 0.1) + if (std::fabs(mVdrift[iDet] - constants::VDRIFTDEFAULT) > 1e-6 && + std::fabs(mVdrift[iDet] - constants::VDRIFTMIN) > 0.1 && + std::fabs(mVdrift[iDet] - constants::VDRIFTMAX) > 0.1) return true; else return false; diff --git a/Detectors/TRD/calibration/src/CalibratorGain.cxx b/Detectors/TRD/calibration/src/CalibratorGain.cxx index 77efeaeb36f1e..c276563cac5fb 100644 --- a/Detectors/TRD/calibration/src/CalibratorGain.cxx +++ b/Detectors/TRD/calibration/src/CalibratorGain.cxx @@ -89,7 +89,7 @@ void CalibratorGain::retrievePrev(o2::framework::ProcessingContext& pc) std::string msg = "Default Object"; // We check if the object we got is the default one by comparing it to the defaults. for (int iDet = 0; iDet < MAXCHAMBER; ++iDet) { - if (dataCalGain->getMPVdEdx(iDet) != constants::MPVDEDXDEFAULT) { + if (dataCalGain->getMPVdEdx(iDet, false) != constants::MPVDEDXDEFAULT) { msg = "Previous Object"; break; } @@ -98,7 +98,7 @@ void CalibratorGain::retrievePrev(o2::framework::ProcessingContext& pc) // Here we set each entry regardless if it is the default or not. for (int iDet = 0; iDet < MAXCHAMBER; ++iDet) { - mFitResults[iDet] = dataCalGain->getMPVdEdx(iDet); + mFitResults[iDet] = dataCalGain->getMPVdEdx(iDet, false); } } diff --git a/Detectors/TRD/calibration/src/CalibratorVdExB.cxx b/Detectors/TRD/calibration/src/CalibratorVdExB.cxx index fef7bdecef38c..961a74eefbe0f 100644 --- a/Detectors/TRD/calibration/src/CalibratorVdExB.cxx +++ b/Detectors/TRD/calibration/src/CalibratorVdExB.cxx @@ -166,8 +166,8 @@ void CalibratorVdExB::retrievePrev(o2::framework::ProcessingContext& pc) std::string msg = "Default Object"; // We check if the object we got is the default one by comparing it to the defaults. for (int iDet = 0; iDet < MAXCHAMBER; ++iDet) { - if (dataCalVdriftExB->getVdrift(iDet) != VDRIFTDEFAULT || - dataCalVdriftExB->getExB(iDet) != EXBDEFAULT) { + if (dataCalVdriftExB->getVdrift(iDet, false) != VDRIFTDEFAULT || + dataCalVdriftExB->getExB(iDet, false) != EXBDEFAULT) { msg = "Previous Object"; break; } @@ -176,8 +176,8 @@ void CalibratorVdExB::retrievePrev(o2::framework::ProcessingContext& pc) // Here we set each entry regardless if it is the default or not. for (int iDet = 0; iDet < MAXCHAMBER; ++iDet) { - mFitFunctor.laPreCorr[iDet] = dataCalVdriftExB->getExB(iDet); - mFitFunctor.vdPreCorr[iDet] = dataCalVdriftExB->getVdrift(iDet); + mFitFunctor.laPreCorr[iDet] = dataCalVdriftExB->getExB(iDet, false); + mFitFunctor.vdPreCorr[iDet] = dataCalVdriftExB->getVdrift(iDet, false); } }