18 std::multimap<int, std::pair<int, std::vector<int>>>
22 std::multimap<int, std::pair<int, std::vector<int>>> trackMap;
24 for (
const auto& track : tracks) {
25 std::vector<int> hits;
26 int nbMeasurements = 0;
29 tracks.trackStateContainer().visitBackwards(
30 track.tipIndex(), [&](
const auto&
state) {
32 int indexHit =
state.getUncalibratedSourceLink()
33 .template get<ActsExamples::IndexSourceLink>()
35 hits.emplace_back(indexHit);
39 if (nbMeasurements < nMeasurementsMin) {
42 trackMap.emplace(nbMeasurements, std::make_pair(track.index(), hits));
50 std::vector<int>& goodTracks)
const {
51 std::shared_ptr<Acts::ConstVectorMultiTrajectory> trackStateContainer =
52 tracks.trackStateContainerHolder();
53 auto trackContainer = std::make_shared<Acts::VectorTrackContainer>();
54 trackContainer->reserve(goodTracks.size());
57 auto tempTrackStateContainer =
58 std::make_shared<Acts::VectorMultiTrajectory>();
60 TrackContainer solvedTracks{trackContainer, tempTrackStateContainer};
61 solvedTracks.ensureDynamicColumns(tracks);
63 for (
auto&& iTrack : goodTracks) {
64 auto destProxy = solvedTracks.getTrack(solvedTracks.addTrack());
65 auto srcProxy = tracks.getTrack(iTrack);
66 destProxy.copyFrom(srcProxy,
false);
67 destProxy.tipIndex() = srcProxy.tipIndex();
71 std::make_shared<Acts::ConstVectorTrackContainer>(