Skip to content

Commit

Permalink
Merge pull request #39681 from swagata87/124X_gsfHLTcrash
Browse files Browse the repository at this point in the history
[124X][GSF tracking] Add full Sylvester criterion for positive definite check
  • Loading branch information
cmsbuild committed Oct 10, 2022
2 parents 4f14d7c + 6e15227 commit c44311c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions TrackingTools/GsfTracking/src/GsfMultiStateUpdator.cc
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 c44311c

Please sign in to comment.