3#ifndef FPGATrackSimGNNRoadMakerTool_H
4#define FPGATrackSimGNNRoadMakerTool_H
17#include "GaudiKernel/ServiceHandle.h"
24#include <boost/graph/adjacency_list.hpp>
25#include <boost/graph/connected_components.hpp>
26#include <boost/graph/breadth_first_search.hpp>
32#include <unordered_map>
35typedef boost::graph_traits<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS>>::vertex_descriptor
Vertex;
51 virtual StatusCode
makeRoads(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits,
52 const std::vector<std::shared_ptr<FPGATrackSimGNNHit>> & gnn_hits,
53 const std::vector<std::shared_ptr<FPGATrackSimGNNEdge>> & edges,
54 std::vector<std::shared_ptr<const FPGATrackSimRoad>> & roads);
62 ToolHandle<ITrigL2LayerNumberTool>
m_layerNumberTool{
this,
"LayerNumberTool",
"TrigL2LayerNumberToolITk"};
67 Gaudi::Property<float>
m_edgeScoreCut {
this,
"edgeScoreCut", 0.0,
"Cut value for edge scores to pass for road making algorithm" };
68 Gaudi::Property<std::string>
m_roadMakerTool {
this,
"roadMakerTool",
"",
"Algorithm to perform graph segmentation into roads"};
69 Gaudi::Property<bool>
m_doGNNPixelSeeding {
this,
"doGNNPixelSeeding",
false,
"Flag to configure for GNN Pixel Seeding" };
92 void doScoreCut(
const std::vector<std::shared_ptr<FPGATrackSimGNNEdge>> & edges);
95 void addRoads(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits,
96 const std::vector<std::shared_ptr<FPGATrackSimGNNHit>> & gnn_hits,
97 std::vector<std::shared_ptr<const FPGATrackSimRoad>> & roads);
98 void addRoad(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits,
const std::vector<int>& road_hitIDs);
99 void addRoadForPixelSeed(
const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits,
const std::vector<int>& road_hitIDs);
113 std::vector<boost::default_color_type>::iterator,
114 boost::property_map<boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS>, boost::vertex_index_t>
::type>;
119 JunctionAwareVisitor(
int& current, std::vector<int>& in_control_vars, std::vector<std::vector<int>>& in_comps,
120 std::unordered_map<
Vertex, std::vector<Vertex>>& in_pred_map,
ColorMap in_cmap);
122 template <
typename VertexT,
typename GraphT>
125 template <
typename EdgeT,
typename GraphT>
128 template <
typename VertexT,
typename GraphT>
129 void process_edges(VertexT src, VertexT tar,
const GraphT& g);
FPGATrackSim-specific class to represent an edge as a connection between two hits in the detector use...
FPGATrackSim-specific class to represent an hit in the detector used for GNN pattern recognition.
Defines a class for roads.
std::unordered_map< Vertex, std::vector< Vertex > > & m_pred_map
void discover_vertex(VertexT v, const GraphT &g)
void examine_edge(EdgeT e, const GraphT &g)
std::vector< std::vector< int > > & m_components
void process_edges(VertexT src, VertexT tar, const GraphT &g)
JunctionAwareVisitor(int ¤t, std::vector< int > &in_control_vars, std::vector< std::vector< int > > &in_comps, std::unordered_map< Vertex, std::vector< Vertex > > &in_pred_map, ColorMap in_cmap)
std::vector< int > & m_control_vars