37 : FW::BareAlgorithm(
"VertexFinding", level), m_cfg(cfg) {}
51 using ImpactPointEstimator =
57 static_assert(Acts::VertexFinderConcept<VertexSeeder>,
58 "VertexSeeder does not fulfill vertex finder concept.");
59 static_assert(Acts::VertexFinderConcept<VertexFinder>,
60 "VertexFinder does not fulfill vertex finder concept.");
63 MagneticField
bField(m_cfg.bField);
65 auto propagator = std::make_shared<Propagator>(
Stepper(bField));
72 Linearizer linearizer(std::move(linearizerCfg));
75 ImpactPointEstimator ipEst(std::move(ipEstCfg));
77 VertexSeeder seeder(std::move(seederCfg));
80 std::move(seeder), ipEst);
81 finderCfg.maxVertices = 200;
82 finderCfg.reassignTracksAfterFirstFit =
true;
87 const auto& input = ctx.
eventStore.
get<std::vector<FW::VertexAndTracks>>(
88 m_cfg.trackCollection);
89 std::vector<Acts::BoundParameters> inputTrackCollection;
92 for (
auto& bla : input) {
93 counte += bla.tracks.size();
96 ACTS_INFO(
"Truth vertices in event: " << input.size());
98 for (
auto& vertexAndTracks : input) {
100 << vertexAndTracks.vertex.position().x() <<
","
101 << vertexAndTracks.vertex.position().y() <<
","
102 << vertexAndTracks.vertex.position().z() <<
") with "
103 << vertexAndTracks.tracks.size() <<
" tracks.");
104 inputTrackCollection.insert(inputTrackCollection.end(),
105 vertexAndTracks.tracks.begin(),
106 vertexAndTracks.tracks.end());
109 std::vector<const Acts::BoundParameters*> inputTrackPtrCollection;
110 for (
const auto& trk : inputTrackCollection) {
111 inputTrackPtrCollection.push_back(&trk);
115 auto res = finder.find(inputTrackPtrCollection, finderOpts);
119 auto vertexCollection = *res;
121 ACTS_INFO(
"Found " << vertexCollection.size() <<
" vertices in event.");
123 unsigned int count = 0;
124 for (
const auto& vtx : vertexCollection) {
125 ACTS_INFO(
"\t" << ++count <<
". vertex at "
126 <<
"(" << vtx.position().x() <<
"," << vtx.position().y()
127 <<
"," << vtx.position().z() <<
") with "
128 << vtx.tracks().size() <<
" tracks.");