From 25358ab9044244d8d6a0ac3ff76a8e0ce6ce4e8c Mon Sep 17 00:00:00 2001 From: shahoian Date: Wed, 29 Sep 2021 17:18:36 +0200 Subject: [PATCH] Change routine track propagation warnings to debug --- .../Reconstruction/src/TrackParametrization.cxx | 14 ++++++-------- .../src/TrackParametrizationWithError.cxx | 11 +++++------ Detectors/Base/src/Propagator.cxx | 16 ++++++---------- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/DataFormats/Reconstruction/src/TrackParametrization.cxx b/DataFormats/Reconstruction/src/TrackParametrization.cxx index 9da46e7948227..a7fd1a2ae8e29 100644 --- a/DataFormats/Reconstruction/src/TrackParametrization.cxx +++ b/DataFormats/Reconstruction/src/TrackParametrization.cxx @@ -71,7 +71,7 @@ GPUd() TrackParametrization::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(pxpypz[1], pxpypz[0]); if (sectorAlpha) { alp = math_utils::detail::angle2Alpha(alp); @@ -170,7 +170,7 @@ GPUd() bool TrackParametrization::rotateParam(value_t alpha) { // rotate to alpha frame if (math_utils::detail::abs(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; } // @@ -188,7 +188,7 @@ GPUd() bool TrackParametrization::rotateParam(value_t alpha) // value_t tmp = snp * ca - csp * sa; if (math_utils::detail::abs(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(); @@ -216,8 +216,7 @@ GPUd() bool TrackParametrization::propagateParamTo(value_t xk, const di } // Do not propagate tracks outside the ALICE detector if (math_utils::detail::abs(dx) > 1e5 || math_utils::detail::abs(getY()) > 1e5 || math_utils::detail::abs(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]); @@ -397,9 +396,8 @@ GPUd() bool TrackParametrization::propagateParamToDCA(const math_utils: auto tmpT(*this); // operate on the copy to recover after the failure alp += math_utils::detail::asin(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; diff --git a/DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx b/DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx index 7aad8590c61ac..90e3649f07951 100644 --- a/DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx +++ b/DataFormats/Reconstruction/src/TrackParametrizationWithError.cxx @@ -170,7 +170,7 @@ GPUd() bool TrackParametrizationWithError::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; } // @@ -189,7 +189,7 @@ GPUd() bool TrackParametrizationWithError::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(); @@ -199,7 +199,7 @@ GPUd() bool TrackParametrizationWithError::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; } @@ -248,8 +248,7 @@ GPUd() bool TrackParametrizationWithError::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; @@ -299,7 +298,7 @@ GPUd() void TrackParametrizationWithError::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(alp); diff --git a/Detectors/Base/src/Propagator.cxx b/Detectors/Base/src/Propagator.cxx index bd8383f5d2c8d..4e6aa318b7d53 100644 --- a/Detectors/Base/src/Propagator.cxx +++ b/Detectors/Base/src/Propagator.cxx @@ -387,8 +387,7 @@ GPUd() bool PropagatorImpl::propagateToDCA(const o2::dataformats::Verte auto tmpT(track); // operate on the copy to recover after the failure alp += math_utils::detail::asin(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; @@ -433,8 +432,7 @@ GPUd() bool PropagatorImpl::propagateToDCABxByBz(const o2::dataformats: auto tmpT(track); // operate on the copy to recover after the failure alp += math_utils::detail::asin(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; @@ -479,9 +477,8 @@ GPUd() bool PropagatorImpl::propagateToDCA(const math_utils::Point3D(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; @@ -524,9 +521,8 @@ GPUd() bool PropagatorImpl::propagateToDCABxByBz(const math_utils::Poin auto tmpT(track); // operate on the copy to recover after the failure alp += math_utils::detail::asin(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;