From f3afc63127880c397839549e52c7877ffd518b52 Mon Sep 17 00:00:00 2001 From: swagata87 Date: Wed, 31 Aug 2022 04:30:52 +0200 Subject: [PATCH] add only meaningful states --- TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc b/TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc index c3958e7f0c48f..5e9e6b3138924 100644 --- a/TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc +++ b/TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc @@ -30,7 +30,10 @@ TrajectoryStateOnSurface GsfMultiStateUpdator::update(const TrajectoryStateOnSur int i = 0; for (auto const& tsosI : predictedComponents) { TrajectoryStateOnSurface updatedTSOS = KFUpdator().update(tsosI, aRecHit); - if (updatedTSOS.isValid() && updatedTSOS.localError().valid()) { + + double det = 0; + if (updatedTSOS.isValid() && updatedTSOS.localError().valid() && updatedTSOS.localError().posDef() && + (updatedTSOS.curvilinearError().matrix().Det2(det)) && det > 0) { result.addState(TrajectoryStateOnSurface(weights[i], updatedTSOS.localParameters(), updatedTSOS.localError(),