diff --git a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx index 3bbe33b76ff6a30f4e57baa8a6b550ed70f907fc..41f46ebc1dbfdd67d43c8c9558b664e253ed8f41 100644 --- a/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx +++ b/Tracking/TrkFitter/TrkGlobalChi2Fitter/src/GlobalChi2Fitter.cxx @@ -7267,12 +7267,20 @@ namespace Trk { */ double dist = (beg.trackParameters()->position() - end.trackParameters()->position()).norm(); + bool zStartValid = std::abs(beg.trackParameters()->position().z())<10000.; + if(!zStartValid){ + ATH_MSG_DEBUG("Pathological track parameter well outside of detector"); + ATH_MSG_DEBUG("Propagator might have issue with this, skipping"); + ATH_MSG_VERBOSE("dumping track parameters " << *(beg.trackParameters())); + } + /* * Only proceed to count holes if we have seen a measurement before (this * may include the starting track state, if it is a measurement) and the - * distance between start and end is at least 2.5 millimeters. + * distance between start and end is at least 2.5 millimeters + * and the z position is valid */ - if (seen_meas && dist >= 2.5) { + if (seen_meas && dist >= 2.5 && zStartValid) { /* * First, we retrieve the hole data stored in the beginning state. Note * that this may very well be non-extant, but it is possible for the