From 3737b552a5fda54b563dc246b51869466132b07c Mon Sep 17 00:00:00 2001 From: swagata87 Date: Wed, 16 Nov 2022 13:52:39 +0100 Subject: [PATCH] improve unprotected areas of gsf code --- TrackingTools/GsfTracking/src/GsfTrajectorySmoother.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TrackingTools/GsfTracking/src/GsfTrajectorySmoother.cc b/TrackingTools/GsfTracking/src/GsfTrajectorySmoother.cc index 3317a57c3fd63..990403c6a2a25 100644 --- a/TrackingTools/GsfTracking/src/GsfTrajectorySmoother.cc +++ b/TrackingTools/GsfTracking/src/GsfTrajectorySmoother.cc @@ -129,6 +129,10 @@ Trajectory GsfTrajectorySmoother::trajectory(const Trajectory& aTraj) const { if (theMerger) predTsos = theMerger->merge(predTsos); + if (!predTsos.isValid()) { + return Trajectory(); + } + if ((*itm).recHit()->isValid()) { //update currTsos = updator()->update(predTsos, *(*itm).recHit()); @@ -204,6 +208,9 @@ Trajectory GsfTrajectorySmoother::trajectory(const Trajectory& aTraj) const { if (theMerger) currTsos = theMerger->merge(currTsos); + if (!currTsos.isValid()) { + return Trajectory(); + } dump(currTsos, "currTsos", "GsfTrackFitters"); }