18 return StatusCode::SUCCESS;
24 StatusCode FPGATrackSimGNNRoadMakerTool::makeRoads(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> &
hits,
const std::vector<std::shared_ptr<FPGATrackSimGNNHit>> & gnn_hits,
const std::vector<std::shared_ptr<FPGATrackSimGNNEdge>> & edges, std::vector<std::shared_ptr<const FPGATrackSimRoad>> & roads)
36 return StatusCode::SUCCESS;
41 for (
const auto& edge : edges) {
83 const std::vector<std::shared_ptr<FPGATrackSimGNNHit>> & gnn_hits,
84 std::vector<std::shared_ptr<const FPGATrackSimRoad>> & roads)
98 if (hit_list.size() < 20) {
110 std::vector<std::shared_ptr<const FPGATrackSimHit>> mapped_road_hits;
114 for (
const auto& hitID : road_hitIDs) {
115 if(hitID+1 <
static_cast<int>(
hits.size()) &&
hits[hitID]->isStrip() &&
hits[hitID+1]->isStrip() &&
117 hits[hitID]->getX() ==
hits[hitID+1]->getX()) {
118 auto &hit1 =
hits[hitID];
119 std::shared_ptr<FPGATrackSimHit> hitCopy1 = std::make_shared<FPGATrackSimHit>(*hit1);
120 pmap->
map(*hitCopy1);
121 hitLayers |= 1 << hitCopy1->
getLayer();
122 mapped_road_hits.push_back(std::move(hitCopy1));
124 auto &hit2 =
hits[hitID+1];
125 std::shared_ptr<FPGATrackSimHit> hitCopy2 = std::make_shared<FPGATrackSimHit>(*hit2);
126 pmap->
map(*hitCopy2);
127 hitLayers |= 1 << hitCopy2->
getLayer();
128 mapped_road_hits.push_back(std::move(hitCopy2));
131 auto &hit =
hits[hitID];
132 std::shared_ptr<FPGATrackSimHit> hitCopy = std::make_shared<FPGATrackSimHit>(*hit);
134 hitLayers |= 1 << hitCopy->
getLayer();
135 mapped_road_hits.push_back(std::move(hitCopy));
144 r.setHitLayers(hitLayers);
145 r.setHits(std::vector<std::vector<std::shared_ptr<const FPGATrackSimHit>>>(std::move(sorted_hits)));