24 #include <boost/container/flat_map.hpp>
25 #include <boost/container/flat_set.hpp>
39 return static_cast<std::size_t
>(
54 : ActsExamples::
IAlgorithm(
"GreedyAmbiguityResolutionAlgorithm", lvl),
56 m_core(transformConfig(cfg),
logger().clone()) {
58 throw std::invalid_argument(
"Missing trajectories input collection");
61 throw std::invalid_argument(
"Missing trajectories output collection");
70 const auto&
tracks = m_inputTracks(ctx);
75 m_core.computeInitialState(
tracks, state, &sourceLinkHash,
80 m_core.resolve(state);
82 ACTS_INFO(
"Resolved to " << state.selectedTracks.size() <<
" tracks from "
85 TrackContainer solvedTracks{std::make_shared<Acts::VectorTrackContainer>(),
86 std::make_shared<Acts::VectorMultiTrajectory>()};
87 solvedTracks.ensureDynamicColumns(
tracks);
89 for (
auto iTrack : state.selectedTracks) {
90 auto destProxy = solvedTracks.getTrack(solvedTracks.addTrack());
91 auto srcProxy =
tracks.getTrack(state.trackTips.at(iTrack));
92 destProxy.copyFrom(srcProxy,
false);
93 destProxy.tipIndex() = srcProxy.tipIndex();
97 std::make_shared<Acts::ConstVectorTrackContainer>(
99 tracks.trackStateContainerHolder()};