Skip to content

Commit

Permalink
Merge branch 'main' into refactor-ckf-pathlimit-and-error-handling
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand authored Oct 18, 2023
2 parents 19fb2c6 + 9a27c85 commit 3bbeb5b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
3 changes: 3 additions & 0 deletions Core/include/Acts/Vertexing/AdaptiveMultiVertexFitter.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Acts::AdaptiveMultiVertexFitter<input_track_t, linearizer_t>::fitImpl(
} else if (currentVtx->fullCovariance() == SquareMatrix4::Zero()) {
return VertexingError::NoCovariance;
}
double weight =
1. / m_cfg.annealingTool.getWeight(state.annealingState, 1.);
currentVtx->setFullCovariance(currentVtx->fullCovariance() * weight);

// Set vertexCompatibility for all TrackAtVertex objects
// at current vertex
Expand Down
28 changes: 10 additions & 18 deletions Tests/UnitTests/Core/Vertexing/AdaptiveMultiVertexFinderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,19 +189,15 @@ BOOST_AUTO_TEST_CASE(adaptive_multi_vertex_finder_test) {

BOOST_CHECK_EQUAL(allVertices.size(), expNRecoVertices);

double relTol = 1e-2;
double small = 1e-3;
for (int i = 0; i < expNRecoVertices; i++) {
auto recoVtx = allVertices[i];
auto expVtx = verticesInfo[i];
CHECK_CLOSE_OR_SMALL(recoVtx.position(), expVtx.position, relTol, small);
CHECK_CLOSE_OR_SMALL(recoVtx.covariance(), expVtx.covariance, relTol,
small);
CHECK_CLOSE_ABS(recoVtx.position(), expVtx.position, 0.001_mm);
CHECK_CLOSE_ABS(recoVtx.covariance(), expVtx.covariance, 0.001_mm);
BOOST_CHECK_EQUAL(recoVtx.tracks().size(), expVtx.nTracks);
CHECK_CLOSE_OR_SMALL(recoVtx.tracks()[0].trackWeight, expVtx.trk1Weight,
relTol, small);
CHECK_CLOSE_OR_SMALL(recoVtx.tracks()[0].vertexCompatibility,
expVtx.trk1Comp, relTol, small);
CHECK_CLOSE_ABS(recoVtx.tracks()[0].trackWeight, expVtx.trk1Weight, 0.003);
CHECK_CLOSE_ABS(recoVtx.tracks()[0].vertexCompatibility, expVtx.trk1Comp,
0.003);
}
}

Expand Down Expand Up @@ -351,19 +347,15 @@ BOOST_AUTO_TEST_CASE(adaptive_multi_vertex_finder_usertype_test) {

BOOST_CHECK_EQUAL(allVertices.size(), expNRecoVertices);

double relTol = 1e-2;
double small = 1e-3;
for (int i = 0; i < expNRecoVertices; i++) {
auto recoVtx = allVertices[i];
auto expVtx = verticesInfo[i];
CHECK_CLOSE_OR_SMALL(recoVtx.position(), expVtx.position, relTol, small);
CHECK_CLOSE_OR_SMALL(recoVtx.covariance(), expVtx.covariance, relTol,
small);
CHECK_CLOSE_ABS(recoVtx.position(), expVtx.position, 0.001_mm);
CHECK_CLOSE_ABS(recoVtx.covariance(), expVtx.covariance, 0.001_mm);
BOOST_CHECK_EQUAL(recoVtx.tracks().size(), expVtx.nTracks);
CHECK_CLOSE_OR_SMALL(recoVtx.tracks()[0].trackWeight, expVtx.trk1Weight,
relTol, small);
CHECK_CLOSE_OR_SMALL(recoVtx.tracks()[0].vertexCompatibility,
expVtx.trk1Comp, relTol, small);
CHECK_CLOSE_ABS(recoVtx.tracks()[0].trackWeight, expVtx.trk1Weight, 0.003);
CHECK_CLOSE_ABS(recoVtx.tracks()[0].vertexCompatibility, expVtx.trk1Comp,
0.003);
}
}

Expand Down

0 comments on commit 3bbeb5b

Please sign in to comment.