diff --git a/Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx b/Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx index 3773f07ccd1ab..424657ac19426 100644 --- a/Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx +++ b/Detectors/TRD/workflow/src/TRDGlobalTrackingSpec.cxx @@ -615,7 +615,6 @@ bool TRDGlobalTracking::refitITSTPCTRDTrack(TrackTRD& trk, float timeTRD, o2::gl LOG(debug) << "TRD refit outwards failed"; return false; } - // refit ITS-TPC-TRD track inwards to innermost ITS cluster // here we also calculate the LT integral for matching to TOF float chi2In = 0.f; @@ -629,6 +628,12 @@ bool TRDGlobalTracking::refitITSTPCTRDTrack(TrackTRD& trk, float timeTRD, o2::gl LOG(debug) << "TPC refit inwards failed"; return false; } + // if for some reason the track was overshoot over the inner field cage, bring it back w/o material correction and LTintegral update + if (trk.getX() < o2::constants::geom::XTPCInnerRef && + !propagator->PropagateToXBxByBz(trk, o2::constants::geom::XTPCInnerRef, o2::base::Propagator::MAX_SIN_PHI, o2::base::Propagator::MAX_STEP, o2::base::Propagator::MatCorrType::USEMatCorrNONE)) { + LOG(debug) << "BACK-Propagationto inner boundary failed"; + return false; + } auto posEnd = trk.getXYZGlo(); auto lInt = propagator->estimateLTIncrement(trk, posStart, posEnd); trk.getLTIntegralOut().addStep(lInt, trk.getP2Inv()); @@ -718,7 +723,12 @@ bool TRDGlobalTracking::refitTPCTRDTrack(TrackTRD& trk, float timeTRD, o2::globa if (pileUpOn) { // account pileup time uncertainty in Z errors trk.updateCov(timeZErr, o2::track::CovLabels::kSigZ2); } - + // if for some reason the track was overshoot over the inner field cage, bring it back w/o material correction and LTintegral update + if (trk.getX() < o2::constants::geom::XTPCInnerRef && + !propagator->PropagateToXBxByBz(trk, o2::constants::geom::XTPCInnerRef, o2::base::Propagator::MAX_SIN_PHI, o2::base::Propagator::MAX_STEP, o2::base::Propagator::MatCorrType::USEMatCorrNONE)) { + LOG(debug) << "BACK-Propagationto inner boundary failed"; + return false; + } auto posEnd = trk.getXYZGlo(); auto lInt = propagator->estimateLTIncrement(trk, posStart, posEnd); trk.getLTIntegralOut().addStep(lInt, trk.getP2Inv());