Skip to content

Commit

Permalink
Merge pull request #39682 from swagata87/125X_gsfHLTcrash
Browse files Browse the repository at this point in the history
[125X][GSF tracking] Add full Sylvester criterion for positive definite check
  • Loading branch information
cmsbuild authored Oct 10, 2022
2 parents 79225e0 + 2e6bea4 commit bb6e430
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ TrajectoryStateOnSurface GsfMultiStateUpdator::update(const TrajectoryStateOnSur
for (auto const& tsosI : predictedComponents) {
TrajectoryStateOnSurface updatedTSOS = KFUpdator().update(tsosI, aRecHit);

double det = 0;
if (updatedTSOS.isValid() && updatedTSOS.localError().valid() && updatedTSOS.localError().posDef() &&
(updatedTSOS.curvilinearError().matrix().Det2(det)) && det > 0) {
if (double det;
updatedTSOS.isValid() && updatedTSOS.localError().valid() && updatedTSOS.localError().posDef() &&
(det = 0., updatedTSOS.curvilinearError().matrix().Sub<AlgebraicSymMatrix22>(0, 0).Det(det) && det > 0) &&
(det = 0., updatedTSOS.curvilinearError().matrix().Sub<AlgebraicSymMatrix33>(0, 0).Det(det) && det > 0) &&
(det = 0., updatedTSOS.curvilinearError().matrix().Sub<AlgebraicSymMatrix44>(0, 0).Det(det) && det > 0) &&
(det = 0., updatedTSOS.curvilinearError().matrix().Det2(det) && det > 0)) {
result.addState(TrajectoryStateOnSurface(weights[i],
updatedTSOS.localParameters(),
updatedTSOS.localError(),
Expand Down

0 comments on commit bb6e430

Please sign in to comment.