Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix AMVF finding with negative cov #2374

Merged
merged 4 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified CI/physmon/reference/performance_amvf_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_truth_estimated_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_truth_smeared_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_amvf_ttbar_hist.root
Binary file not shown.
19 changes: 10 additions & 9 deletions Core/include/Acts/Vertexing/AdaptiveMultiVertexFinder.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -522,20 +522,21 @@ auto Acts::AdaptiveMultiVertexFinder<vfitter_t, sfinder_t>::isMergedVertex(

double significance = 0;
if (not m_cfg.do3dSplitting) {
// Use only z significance
if (sumCovZ > 0.) {
significance = std::abs(deltaZPos) / std::sqrt(sumCovZ);
} else {
return true;
if (sumCovZ <= 0) {
// TODO FIXME this should never happen
continue;
}
// Use only z significance
significance = std::abs(deltaZPos) / std::sqrt(sumCovZ);
} else {
// Use full 3d information for significance
SymMatrix4 sumCov = candidateCov + otherCov;
if (auto sumCovInverse = safeInverse(sumCov); sumCovInverse) {
significance = std::sqrt(deltaPos.dot(*sumCovInverse * deltaPos));
} else {
return true;
auto sumCovInverse = safeInverse(sumCov);
if (!sumCovInverse) {
// TODO FIXME this should never happen
continue;
}
significance = std::sqrt(deltaPos.dot(*sumCovInverse * deltaPos));
}
if (significance < m_cfg.maxMergeVertexSignificance) {
return true;
Expand Down
Loading