Skip to content

Commit

Permalink
Merge pull request #39873 from swagata87/gsfCrashFixT0
Browse files Browse the repository at this point in the history
[TsosGaussianStateConversions] Require GSF states to be positive definite [12_6_X]
  • Loading branch information
cmsbuild authored Oct 31, 2022
2 parents 5932f9b + 57a8f0a commit d624d70
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 d624d70

Please sign in to comment.