Skip to content

Commit

Permalink
Change routine track propagation warnings to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
shahor02 committed Sep 29, 2021
1 parent 9cf91a0 commit 25358ab
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 24 deletions.
14 changes: 6 additions & 8 deletions DataFormats/Reconstruction/src/TrackParametrization.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ GPUd() TrackParametrization<value_T>::TrackParametrization(const dim3_t& xyz, co
math_utils::detail::sincos(alp, sn, cs);
// protection against cosp<0
if (cs * pxpypz[0] + sn * pxpypz[1] < 0) {
LOG(WARNING) << "alpha from phiPos() will invalidate this track parameters, overriding to alpha from phi()";
LOG(debug) << "alpha from phiPos() will invalidate this track parameters, overriding to alpha from phi()";
alp = math_utils::detail::atan2<value_T>(pxpypz[1], pxpypz[0]);
if (sectorAlpha) {
alp = math_utils::detail::angle2Alpha<value_t>(alp);
Expand Down Expand Up @@ -170,7 +170,7 @@ GPUd() bool TrackParametrization<value_T>::rotateParam(value_t alpha)
{
// rotate to alpha frame
if (math_utils::detail::abs<value_T>(getSnp()) > constants::math::Almost1) {
LOGP(WARNING, "Precondition is not satisfied: |sin(phi)|>1 ! {:f}", getSnp());
LOGP(debug, "Precondition is not satisfied: |sin(phi)|>1 ! {:f}", getSnp());
return false;
}
//
Expand All @@ -188,7 +188,7 @@ GPUd() bool TrackParametrization<value_T>::rotateParam(value_t alpha)
//
value_t tmp = snp * ca - csp * sa;
if (math_utils::detail::abs<value_T>(tmp) > constants::math::Almost1) {
LOGP(WARNING, "Rotation failed: new snp {:.2f}", tmp);
LOGP(debug, "Rotation failed: new snp {:.2f}", tmp);
return false;
}
value_t xold = getX(), yold = getY();
Expand Down Expand Up @@ -216,8 +216,7 @@ GPUd() bool TrackParametrization<value_T>::propagateParamTo(value_t xk, const di
}
// Do not propagate tracks outside the ALICE detector
if (math_utils::detail::abs<value_T>(dx) > 1e5 || math_utils::detail::abs<value_T>(getY()) > 1e5 || math_utils::detail::abs<value_T>(getZ()) > 1e5) {
LOGP(WARNING, "Anomalous track, target X:{:f}", xk);
// print();
LOGP(warning, "Anomalous track, target X:{:f}", xk);
return false;
}
value_t crv = getCurvature(b[2]);
Expand Down Expand Up @@ -397,9 +396,8 @@ GPUd() bool TrackParametrization<value_T>::propagateParamToDCA(const math_utils:
auto tmpT(*this); // operate on the copy to recover after the failure
alp += math_utils::detail::asin<value_T>(sn);
if (!tmpT.rotateParam(alp) || !tmpT.propagateParamTo(xv, b)) {
LOG(WARNING) << "failed to propagate to alpha=" << alp << " X=" << xv << " for vertex "
<< vtx.X() << ' ' << vtx.Y() << ' ' << vtx.Z() << " | Track is: ";
tmpT.printParam();
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << " for vertex "
<< vtx.X() << ' ' << vtx.Y() << ' ' << vtx.Z() << " | Track is: " << tmpT.asString();
return false;
}
*this = tmpT;
Expand Down
11 changes: 5 additions & 6 deletions DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ GPUd() bool TrackParametrizationWithError<value_T>::rotate(value_t alpha)
{
// rotate to alpha frame
if (gpu::CAMath::Abs(this->getSnp()) > constants::math::Almost1) {
LOGP(WARNING, "Precondition is not satisfied: |sin(phi)|>1 ! {:f}", this->getSnp());
LOGP(debug, "Precondition is not satisfied: |sin(phi)|>1 ! {:f}", this->getSnp());
return false;
}
//
Expand All @@ -189,7 +189,7 @@ GPUd() bool TrackParametrizationWithError<value_T>::rotate(value_t alpha)

value_t updSnp = snp * ca - csp * sa;
if (gpu::CAMath::Abs(updSnp) > constants::math::Almost1) {
LOGP(WARNING, "Rotation failed: new snp {:.2f}", updSnp);
LOGP(debug, "Rotation failed: new snp {:.2f}", updSnp);
return false;
}
value_t xold = this->getX(), yold = this->getY();
Expand All @@ -199,7 +199,7 @@ GPUd() bool TrackParametrizationWithError<value_T>::rotate(value_t alpha)
this->setSnp(updSnp);

if (gpu::CAMath::Abs(csp) < constants::math::Almost0) {
LOGP(WARNING, "Too small cosine value {:f}", csp);
LOGP(debug, "Too small cosine value {:f}", csp);
csp = constants::math::Almost0;
}

Expand Down Expand Up @@ -248,8 +248,7 @@ GPUd() bool TrackParametrizationWithError<value_T>::propagateToDCA(const o2::dat
auto tmpT(*this); // operate on the copy to recover after the failure
alp += gpu::CAMath::ASin(sn);
if (!tmpT.rotate(alp) || !tmpT.propagateTo(xv, b)) {
LOG(WARNING) << "failed to propagate to alpha=" << alp << " X=" << xv << vtx << " | Track is: ";
tmpT.print();
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << vtx << " | Track is: " << tmpT.asString();
return false;
}
*this = tmpT;
Expand Down Expand Up @@ -299,7 +298,7 @@ GPUd() void TrackParametrizationWithError<value_T>::set(const dim3_t& xyz, const
math_utils::detail::sincos(alp, sn, cs);
// protection against cosp<0
if (cs * pxpypz[0] + sn * pxpypz[1] < 0) {
LOG(WARNING) << "alpha from phiPos() will invalidate this track parameters, overriding to alpha from phi()";
LOG(debug) << "alpha from phiPos() will invalidate this track parameters, overriding to alpha from phi()";
alp = gpu::CAMath::ATan2(pxpypz[1], pxpypz[0]);
if (sectorAlpha) {
alp = math_utils::detail::angle2Alpha<value_t>(alp);
Expand Down
16 changes: 6 additions & 10 deletions Detectors/Base/src/Propagator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,7 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCA(const o2::dataformats::Verte
auto tmpT(track); // operate on the copy to recover after the failure
alp += math_utils::detail::asin<value_type>(sn);
if (!tmpT.rotate(alp) || !propagateToX(tmpT, xv, bZ, 0.85, maxStep, matCorr, tofInfo, signCorr)) {
LOG(WARNING) << "failed to propagate to alpha=" << alp << " X=" << xv << vtx << " | Track is: ";
tmpT.print();
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << vtx << " | Track is: " << tmpT.asString();
return false;
}
track = tmpT;
Expand Down Expand Up @@ -433,8 +432,7 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCABxByBz(const o2::dataformats:
auto tmpT(track); // operate on the copy to recover after the failure
alp += math_utils::detail::asin<value_type>(sn);
if (!tmpT.rotate(alp) || !PropagateToXBxByBz(tmpT, xv, 0.85, maxStep, matCorr, tofInfo, signCorr)) {
LOG(WARNING) << "failed to propagate to alpha=" << alp << " X=" << xv << vtx << " | Track is: ";
tmpT.print();
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << vtx << " | Track is: " << tmpT.asString();
return false;
}
track = tmpT;
Expand Down Expand Up @@ -479,9 +477,8 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCA(const math_utils::Point3D<va
auto tmpT(track); // operate on the copy to recover after the failure
alp += math_utils::detail::asin<value_type>(sn);
if (!tmpT.rotateParam(alp) || !propagateToX(tmpT, xv, bZ, 0.85, maxStep, matCorr, tofInfo, signCorr)) {
LOG(WARNING) << "failed to propagate to alpha=" << alp << " X=" << xv << " for vertex "
<< vtx.X() << ' ' << vtx.Y() << ' ' << vtx.Z() << " | Track is: ";
tmpT.printParam();
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << " for vertex "
<< vtx.X() << ' ' << vtx.Y() << ' ' << vtx.Z() << " | Track is: " << tmpT.asString();
return false;
}
track = tmpT;
Expand Down Expand Up @@ -524,9 +521,8 @@ GPUd() bool PropagatorImpl<value_T>::propagateToDCABxByBz(const math_utils::Poin
auto tmpT(track); // operate on the copy to recover after the failure
alp += math_utils::detail::asin<value_type>(sn);
if (!tmpT.rotateParam(alp) || !PropagateToXBxByBz(tmpT, xv, 0.85, maxStep, matCorr, tofInfo, signCorr)) {
LOG(WARNING) << "failed to propagate to alpha=" << alp << " X=" << xv << " for vertex "
<< vtx.X() << ' ' << vtx.Y() << ' ' << vtx.Z() << " | Track is: ";
tmpT.printParam();
LOG(debug) << "failed to propagate to alpha=" << alp << " X=" << xv << " for vertex "
<< vtx.X() << ' ' << vtx.Y() << ' ' << vtx.Z() << " | Track is: " << tmpT.asString();
return false;
}
track = tmpT;
Expand Down

0 comments on commit 25358ab

Please sign in to comment.