24 #include <system_error>
30 : ActsExamples::
IAlgorithm(
"IterativeVertexFinder", level),
m_cfg(config) {
32 throw std::invalid_argument(
33 "You have to either provide track parameters or trajectories");
36 throw std::invalid_argument(
"Missing output proto vertices collection");
39 throw std::invalid_argument(
"Missing output vertices collection");
53 auto [inputTrackParameters, inputTrackPointers] =
56 if (inputTrackParameters.size() != inputTrackPointers.size()) {
57 ACTS_ERROR(
"Input track containers do not align: "
58 << inputTrackParameters.size()
59 <<
" != " << inputTrackPointers.size());
62 for (
const auto& trk : inputTrackParameters) {
63 if (trk.covariance() && trk.covariance()->determinant() <= 0) {
67 << trk.covariance()->determinant());
75 auto propagator = std::make_shared<Propagator>(
79 Fitter vertexFitter(vertexFitterCfg);
92 Finder finder(finderCfg,
logger().cloneWithSuffix(
"Finder"));
97 auto result = finder.
find(inputTrackPointers, finderOpts, state);
103 ACTS_ERROR(
"Error in vertex finder: " << result.error().message());
107 ACTS_INFO(
"Found " << vertices.size() <<
" vertices in event");
108 for (
const auto& vtx : vertices) {
109 ACTS_INFO(
"Found vertex at " << vtx.fullPosition().transpose() <<
" with "
110 << vtx.tracks().size() <<
" tracks.");
117 m_outputVertices(ctx,
std::move(vertices));