Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DataFormats/Detectors/TRD/include/DataFormatsTRD/CalGain.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Detectors/TRD/calibration/src/CalibratorGain.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);
}
}

Expand Down
8 changes: 4 additions & 4 deletions Detectors/TRD/calibration/src/CalibratorVdExB.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);
}
}

Expand Down
Loading