76 std::vector<AResult>& results)
80 const AHit* currentHit = path.back();
82 TrackFindingCDC::asRange(std::equal_range(relations.begin(), relations.end(), currentHit));
84 std::vector<TrackFindingCDC::WithWeight<AHit*>> childHits;
86 AHit* childHit = continuation.getTo();
87 TrackFindingCDC::Weight weight = continuation.getWeight();
90 if (std::count(path.begin(), path.end(), childHit)) {
93 B2FATAL(
"Cycle detected!");
96 childHits.emplace_back(childHit, weight);
100 const std::vector<TrackFindingCDC::WithWeight<const AHit*>>& constPath = path;
105 if (childHits.empty()) {
106 B2DEBUG(29,
"Terminating this route, as there are no possible child states.");
107 if (path.size() >= 3) {
108 results.emplace_back(path);
114 std::sort(childHits.begin(), childHits.end(), TrackFindingCDC::GreaterOf<TrackFindingCDC::GetWeight>());
116 B2DEBUG(29,
"Having found " << childHits.size() <<
" child states.");
119 path.emplace_back(childHit, childHit.getWeight());