32 throw std::invalid_argument(
"Missing input track parameters collection");
35 throw std::invalid_argument(
"Missing input proto vertices collection");
48 using VertexFitterOptions =
52 MagneticField
bField(m_cfg.bField);
54 auto propagator = std::make_shared<Propagator>(
Stepper(bField));
65 const auto& trackParameters =
67 const auto& protoVertices =
69 std::vector<const Acts::BoundTrackParameters*> inputTrackPtrCollection;
71 for (
const auto& protoVertex : protoVertices) {
73 if ((not m_cfg.doConstrainedFit) and (protoVertex.size() < 2)) {
75 "Skip un-constrained vertex fit on proto-vertex with less than two "
81 inputTrackPtrCollection.clear();
82 inputTrackPtrCollection.reserve(protoVertex.size());
83 for (
const auto& trackIdx : protoVertex) {
84 inputTrackPtrCollection.push_back(&trackParameters[trackIdx]);
88 if (!m_cfg.doConstrainedFit) {
91 auto fitRes = vertexFitter.fit(inputTrackPtrCollection, linearizer,
94 fittedVertex = *fitRes;
110 auto fitRes = vertexFitter.fit(inputTrackPtrCollection, linearizer,
111 vfOptionsConstr, state);
113 fittedVertex = *fitRes;
115 ACTS_ERROR(
"Error in vertex fit with constraint.");