From 648a688ae5f6e536793d03329d1f785ed20ebf31 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Mon, 4 Mar 2024 16:26:19 +0100 Subject: [PATCH] refactor!: AMVF `do3dSplitting` -> `doFullSplitting` (#3004) Pulled this out of https://github.com/acts-project/acts/pull/2828 to encapsulate the breaking change credits @felix-russo --- .../Acts/Vertexing/AdaptiveMultiVertexFinder.hpp | 10 +++++++--- Core/src/Vertexing/AdaptiveMultiVertexFinder.cpp | 2 +- .../src/AdaptiveMultiVertexFinderAlgorithm.cpp | 3 +-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Core/include/Acts/Vertexing/AdaptiveMultiVertexFinder.hpp b/Core/include/Acts/Vertexing/AdaptiveMultiVertexFinder.hpp index 7dbc7d7783a..8c2ca780850 100644 --- a/Core/include/Acts/Vertexing/AdaptiveMultiVertexFinder.hpp +++ b/Core/include/Acts/Vertexing/AdaptiveMultiVertexFinder.hpp @@ -112,9 +112,13 @@ class AdaptiveMultiVertexFinder final : public IVertexFinder { // Include also single track vertices bool addSingleTrackVertices = false; - // Use 3d information for evaluating the vertex distance significance - // for vertex merging/splitting - bool do3dSplitting = false; + // If doFullSplitting == true, we check the 3D distance (if useTime == + // false) or the 4D distance (if useTime == true) of the vertices to + // determine whether they are merged. + // If doFullSplitting == false, we check the z distance (if useTime == + // false) or the z-t distance (if useTime == true) of the vertices to + // determine whether they are merged. + bool doFullSplitting = false; // Maximum vertex contamination value double maximumVertexContamination = 0.5; diff --git a/Core/src/Vertexing/AdaptiveMultiVertexFinder.cpp b/Core/src/Vertexing/AdaptiveMultiVertexFinder.cpp index 9e6ac04f36b..f2d3835a989 100644 --- a/Core/src/Vertexing/AdaptiveMultiVertexFinder.cpp +++ b/Core/src/Vertexing/AdaptiveMultiVertexFinder.cpp @@ -504,7 +504,7 @@ bool AdaptiveMultiVertexFinder::isMergedVertex( const SquareMatrix4& otherCov = otherVtx->fullCovariance(); double significance = 0; - if (!m_cfg.do3dSplitting) { + if (!m_cfg.doFullSplitting) { const double deltaZPos = otherPos[eZ] - candidatePos[eZ]; const double sumVarZ = otherCov(eZ, eZ) + candidateCov(eZ, eZ); if (sumVarZ <= 0) { diff --git a/Examples/Algorithms/Vertexing/src/AdaptiveMultiVertexFinderAlgorithm.cpp b/Examples/Algorithms/Vertexing/src/AdaptiveMultiVertexFinderAlgorithm.cpp index 38e003576db..bba33aa436c 100644 --- a/Examples/Algorithms/Vertexing/src/AdaptiveMultiVertexFinderAlgorithm.cpp +++ b/Examples/Algorithms/Vertexing/src/AdaptiveMultiVertexFinderAlgorithm.cpp @@ -139,8 +139,7 @@ auto ActsExamples::AdaptiveMultiVertexFinderAlgorithm::makeVertexFinder() const // maximum chi2 that a track can have to be associated with a vertex). finderConfig.tracksMaxSignificance = 7.5; // Check if vertices are merged in space and time - // TODO rename do3dSplitting -> doFullSplitting - finderConfig.do3dSplitting = true; + finderConfig.doFullSplitting = true; // Reset the maximum significance that two vertices can have before they // are considered as merged. The default value 3 is tuned for comparing // the vertices' z-coordinates. Since we consider 4 dimensions here, we