31 : FW::BareAlgorithm(
"VertexFit", level), m_cfg(cfg) {}
48 MagneticField
bField(m_cfg.bField);
50 auto propagator = std::make_shared<Propagator>(
Stepper(bField));
59 const auto& input = ctx.
eventStore.
get<std::vector<FW::VertexAndTracks>>(
60 m_cfg.trackCollection);
61 for (
auto& vertexAndTracks : input) {
62 const auto& inputTrackCollection = vertexAndTracks.tracks;
64 std::vector<const Acts::BoundParameters*> inputTrackPtrCollection;
65 for (
const auto& trk : inputTrackCollection) {
66 inputTrackPtrCollection.push_back(&trk);
70 if (!m_cfg.doConstrainedFit) {
71 if (inputTrackCollection.size() < 2) {
78 vertexFitter.fit(inputTrackPtrCollection, linearizer, vfOptions);
80 fittedVertex = *fitRes;
95 auto fitRes = vertexFitter.fit(inputTrackPtrCollection, linearizer,
98 fittedVertex = *fitRes;
105 <<
"(" << fittedVertex.
position().x() <<
","
106 << fittedVertex.
position().y() <<
","
107 << fittedVertex.
position().z() <<
")");
109 <<
"(" << vertexAndTracks.vertex.position().x() <<
","
110 << vertexAndTracks.vertex.position().y() <<
","
111 << vertexAndTracks.vertex.position().z() <<
")");