Skip to content

Commit

Permalink
Merge pull request #39904 from mmusich/gsfCrashFixT0_12_5_X
Browse files Browse the repository at this point in the history
[12.5.X] `TsosGaussianStateConversions` Require GSF states to be positive definite
  • Loading branch information
cmsbuild authored Nov 1, 2022
2 parents 262ba3b + 9c423fc commit 705115d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions TrackingTools/GsfTracking/src/TsosGaussianStateConversions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ namespace GaussianStateConversions {
std::vector<TrajectoryStateOnSurface> components;
components.reserve(singleStates.size());
for (auto const& ic : singleStates) {
components.emplace_back((*ic).weight(),
LocalTrajectoryParameters((*ic).mean(), pzSign, charged),
LocalTrajectoryError((*ic).covariance()),
surface,
field,
side);
//require states to be positive-definite
if (double det = 0; (*ic).covariance().Det2(det) && det > 0) {
components.emplace_back((*ic).weight(),
LocalTrajectoryParameters((*ic).mean(), pzSign, charged),
LocalTrajectoryError((*ic).covariance()),
surface,
field,
side);
}
}
return TrajectoryStateOnSurface((BasicTrajectoryState*)new BasicMultiTrajectoryState(components));
}
Expand Down

0 comments on commit 705115d

Please sign in to comment.