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

refactor: Move large parts of Vertexing to .cpp files #2953

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,3 @@ class AdaptiveGridDensityVertexFinder final : public IVertexFinder {
};

} // namespace Acts

#include "AdaptiveGridDensityVertexFinder.ipp"
2 changes: 0 additions & 2 deletions Core/include/Acts/Vertexing/AdaptiveMultiVertexFinder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,5 +382,3 @@ class AdaptiveMultiVertexFinder final : public IVertexFinder {
};

} // namespace Acts

#include "Acts/Vertexing/AdaptiveMultiVertexFinder.ipp"
2 changes: 0 additions & 2 deletions Core/include/Acts/Vertexing/AdaptiveMultiVertexFitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,3 @@ class AdaptiveMultiVertexFitter {
};

} // namespace Acts

#include "Acts/Vertexing/AdaptiveMultiVertexFitter.ipp"
2 changes: 0 additions & 2 deletions Core/include/Acts/Vertexing/FullBilloirVertexFitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,3 @@ class FullBilloirVertexFitter {
};

} // namespace Acts

#include "FullBilloirVertexFitter.ipp"
2 changes: 0 additions & 2 deletions Core/include/Acts/Vertexing/GaussianTrackDensity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,3 @@ class GaussianTrackDensity {
};

} // namespace Acts

#include "Acts/Vertexing/GaussianTrackDensity.ipp"
2 changes: 0 additions & 2 deletions Core/include/Acts/Vertexing/HelicalTrackLinearizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,3 @@ class HelicalTrackLinearizer {
};

} // namespace Acts

#include "HelicalTrackLinearizer.ipp"
30 changes: 1 addition & 29 deletions Core/include/Acts/Vertexing/IterativeVertexFinder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,33 +138,7 @@ class IterativeVertexFinder final : public IVertexFinder {
/// @param logger The logging instance
IterativeVertexFinder(Config cfg,
std::unique_ptr<const Logger> logger = getDefaultLogger(
"IterativeVertexFinder", Logging::INFO))
: m_cfg(std::move(cfg)), m_logger(std::move(logger)) {
if (!m_cfg.extractParameters.connected()) {
throw std::invalid_argument(
"IterativeVertexFinder: "
"No function to extract parameters "
"provided.");
}

if (!m_cfg.trackLinearizer.connected()) {
throw std::invalid_argument(
"IterativeVertexFinder: "
"No track linearizer provided.");
}

if (!m_cfg.seedFinder) {
throw std::invalid_argument(
"IterativeVertexFinder: "
"No seed finder provided.");
}

if (!m_cfg.field) {
throw std::invalid_argument(
"IterativeVertexFinder: "
"No magnetic field provider provided.");
}
}
"IterativeVertexFinder", Logging::INFO));

/// @brief Finds vertices corresponding to input trackVector
///
Expand Down Expand Up @@ -286,5 +260,3 @@ class IterativeVertexFinder final : public IVertexFinder {
};

} // namespace Acts

#include "IterativeVertexFinder.ipp"
2 changes: 0 additions & 2 deletions Core/include/Acts/Vertexing/NumericalTrackLinearizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,3 @@ class NumericalTrackLinearizer {
};

} // namespace Acts

#include "NumericalTrackLinearizer.ipp"
2 changes: 0 additions & 2 deletions Core/include/Acts/Vertexing/TrackDensityVertexFinder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,3 @@ class TrackDensityVertexFinder final : public IVertexFinder {
};

} // namespace Acts

#include "TrackDensityVertexFinder.ipp"
2 changes: 0 additions & 2 deletions Core/include/Acts/Vertexing/Vertex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,3 @@ class Vertex {
};

} // namespace Acts

#include "Vertex.ipp"
107 changes: 0 additions & 107 deletions Core/include/Acts/Vertexing/Vertex.ipp

This file was deleted.

11 changes: 1 addition & 10 deletions Core/include/Acts/Vertexing/ZScanVertexFinder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,7 @@ class ZScanVertexFinder final : public IVertexFinder {
/// @param logger Logging instance
ZScanVertexFinder(const Config& cfg,
std::unique_ptr<const Logger> logger =
getDefaultLogger("ZScanVertexFinder", Logging::INFO))
: m_cfg(cfg), m_logger(std::move(logger)) {
if (!m_cfg.extractParameters.connected()) {
throw std::invalid_argument(
"ZScanVertexFinder: "
"No track parameter extractor provided.");
}
}
getDefaultLogger("ZScanVertexFinder", Logging::INFO));

/// @brief Function that determines single vertex,
/// based on z0 values of input tracks,
Expand Down Expand Up @@ -119,5 +112,3 @@ class ZScanVertexFinder final : public IVertexFinder {
};

} // namespace Acts

#include "ZScanVertexFinder.ipp"
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

inline auto Acts::AdaptiveGridDensityVertexFinder::find(
#include "Acts/Vertexing/AdaptiveGridDensityVertexFinder.hpp"

Acts::Result<std::vector<Acts::Vertex>>
Acts::AdaptiveGridDensityVertexFinder::find(
const std::vector<InputTrack>& trackVector,
const VertexingOptions& vertexingOptions,
IVertexFinder::State& anyState) const -> Result<std::vector<Vertex>> {
IVertexFinder::State& anyState) const {
auto& state = anyState.as<State>();
// Remove density contributions from tracks removed from track collection
if (m_cfg.cacheGridStateForTrackRemoval && state.isInitialized &&
Expand Down Expand Up @@ -92,8 +95,8 @@ inline auto Acts::AdaptiveGridDensityVertexFinder::find(
return std::vector<Vertex>{returnVertex};
}

inline auto Acts::AdaptiveGridDensityVertexFinder::doesPassTrackSelection(
const BoundTrackParameters& trk) const -> bool {
bool Acts::AdaptiveGridDensityVertexFinder::doesPassTrackSelection(
const BoundTrackParameters& trk) const {
// Get required track parameters
const double d0 = trk.parameters()[BoundIndices::eBoundLoc0];
const double z0 = trk.parameters()[BoundIndices::eBoundLoc1];
Expand Down
Loading
Loading