Skip to content

Commit

Permalink
proposal fix for Gsf Tracking segmentation fault when no states are p…
Browse files Browse the repository at this point in the history
…assing selection criteria in TsosGaussianStateConversions
  • Loading branch information
mmusich authored and swagata87 committed Nov 14, 2022
1 parent 3e63290 commit a6615ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions TrackingTools/GsfTracking/src/GsfTrajectoryFitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ Trajectory GsfTrajectoryFitter::fitOne(const TrajectorySeed& aSeed,
//update
assert((!(*ihit)->canImproveWithTrack()) | (nullptr != theHitCloner));
assert((!(*ihit)->canImproveWithTrack()) | (nullptr != dynamic_cast<BaseTrackerRecHit const*>((*ihit).get())));
if (!predTsos.isValid()) {
return Trajectory();
}
auto preciseHit = theHitCloner->makeShared(*ihit, predTsos);
dump(*preciseHit, hitcounter, "GsfTrackFitters");
currTsos = updator()->update(predTsos, *preciseHit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ namespace GaussianStateConversions {
side);
}
}
return TrajectoryStateOnSurface((BasicTrajectoryState*)new BasicMultiTrajectoryState(components));
return components.empty()
? TrajectoryStateOnSurface()
: TrajectoryStateOnSurface((BasicTrajectoryState*)new BasicMultiTrajectoryState(components));
}
} // namespace GaussianStateConversions

0 comments on commit a6615ef

Please sign in to comment.