ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
FPGATrackSimGNNPatternRecoTool Class Reference

#include <FPGATrackSimGNNPatternRecoTool.h>

Inheritance diagram for FPGATrackSimGNNPatternRecoTool:
Collaboration diagram for FPGATrackSimGNNPatternRecoTool:

Public Member Functions

virtual StatusCode initialize () override
 
virtual StatusCode getRoads (const std::vector< std::shared_ptr< const FPGATrackSimHit >> &hits, std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads) override
 
virtual int getSubRegion () const override
 

Private Attributes

Gaudi::Property< bool > m_doGNNRootOutput { this, "doGNNRootOutput", false, "Flag for GNN Root Output Tool" }
 
Gaudi::Property< int > m_regionNum { this, "regionNum", -1, "region number"}
 
ToolHandle< FPGATrackSimGNNGraphHitSelectorToolm_GNNGraphHitSelectorTool {this, "GNNGraphHitSelector", "FPGATrackSimGNNGraphHitSelectorTool", "Graph HitSelector Tool"}
 
ToolHandle< FPGATrackSimGNNGraphConstructionToolm_GNNGraphConstructionTool {this, "GNNGraphConstruction", "FPGATrackSimGNNGraphConstructionTool", "Graph Construction Tool"}
 
ToolHandleArray< FPGATrackSimGNNEdgeClassifierToolm_GNNEdgeClassifierTools {this, "GNNEdgeClassifiers", {}, "One GNNEdgeClassifierTool per region"}
 
ToolHandle< FPGATrackSimGNNEdgeClassifierToolm_selectedGNNEdgeClassifierTool
 
ToolHandle< FPGATrackSimGNNRoadMakerToolm_GNNRoadMakerTool {this, "GNNRoadMaker", "FPGATrackSimGNNRoadMakerTool", "Road Maker Tool"}
 
ToolHandle< FPGATrackSimGNNRootOutputToolm_GNNRootOutputTool {this, "GNNRootOutput", "FPGATrackSimGNNRootOutputTool", "GNN ROOT Output Tool"}
 

Detailed Description

Definition at line 38 of file FPGATrackSimGNNPatternRecoTool.h.

Member Function Documentation

◆ getRoads()

StatusCode FPGATrackSimGNNPatternRecoTool::getRoads ( const std::vector< std::shared_ptr< const FPGATrackSimHit >> &  hits,
std::vector< std::shared_ptr< const FPGATrackSimRoad >> &  roads 
)
overridevirtual

Definition at line 29 of file FPGATrackSimGNNPatternRecoTool.cxx.

30 {
31  std::vector<std::shared_ptr<FPGATrackSimGNNHit>> graph_hits;
32  std::vector<std::shared_ptr<FPGATrackSimGNNEdge>> graph_edges;
33 
34  ATH_CHECK(m_GNNGraphHitSelectorTool->selectHits(hits, graph_hits)); // Go from FPGATrackSimHits to FPGATrackSimGNNHit -> get information needed for GNNPipeline
35  ATH_CHECK(m_GNNGraphConstructionTool->getEdges(graph_hits, graph_edges)); // Build edges using module map (or metric learning)
36  ATH_CHECK(m_selectedGNNEdgeClassifierTool->scoreEdges(graph_hits, graph_edges)); // Score edges using IN GNN
37  ATH_CHECK(m_GNNRoadMakerTool->makeRoads(hits, graph_hits, graph_edges, roads)); // Build road candidates using connected components (need to make a C++ version of it)
38  if(m_doGNNRootOutput) ATH_CHECK(m_GNNRootOutputTool->fillTree(hits, graph_hits, graph_edges, roads)); // Output the hit/edge/road information into a ROOT file
39 
40  graph_hits.clear();
41  graph_edges.clear();
42  return StatusCode::SUCCESS;
43 }

◆ getSubRegion()

virtual int FPGATrackSimGNNPatternRecoTool::getSubRegion ( ) const
inlineoverridevirtual

Definition at line 50 of file FPGATrackSimGNNPatternRecoTool.h.

50 { return 0; }

◆ initialize()

StatusCode FPGATrackSimGNNPatternRecoTool::initialize ( )
overridevirtual

Definition at line 6 of file FPGATrackSimGNNPatternRecoTool.cxx.

7 {
11  ATH_CHECK(m_GNNRoadMakerTool.retrieve());
12  ATH_CHECK(m_GNNRootOutputTool.retrieve());
13 
14  // Need to selected the right tool based on region
15  for (auto& tool : m_GNNEdgeClassifierTools) {
16  if (tool->regionNum() == m_regionNum) {
18  break;
19  }
20  }
21  if (!m_selectedGNNEdgeClassifierTool.isValid()) {
22  ATH_MSG_ERROR("No GNNEdgeClassifierTool found for region " << m_regionNum);
23  return StatusCode::FAILURE;
24  }
25 
26  return StatusCode::SUCCESS;
27 }

Member Data Documentation

◆ m_doGNNRootOutput

Gaudi::Property<bool> FPGATrackSimGNNPatternRecoTool::m_doGNNRootOutput { this, "doGNNRootOutput", false, "Flag for GNN Root Output Tool" }
private

Definition at line 57 of file FPGATrackSimGNNPatternRecoTool.h.

◆ m_GNNEdgeClassifierTools

ToolHandleArray<FPGATrackSimGNNEdgeClassifierTool> FPGATrackSimGNNPatternRecoTool::m_GNNEdgeClassifierTools {this, "GNNEdgeClassifiers", {}, "One GNNEdgeClassifierTool per region"}
private

Definition at line 64 of file FPGATrackSimGNNPatternRecoTool.h.

◆ m_GNNGraphConstructionTool

ToolHandle<FPGATrackSimGNNGraphConstructionTool> FPGATrackSimGNNPatternRecoTool::m_GNNGraphConstructionTool {this, "GNNGraphConstruction", "FPGATrackSimGNNGraphConstructionTool", "Graph Construction Tool"}
private

Definition at line 63 of file FPGATrackSimGNNPatternRecoTool.h.

◆ m_GNNGraphHitSelectorTool

ToolHandle<FPGATrackSimGNNGraphHitSelectorTool> FPGATrackSimGNNPatternRecoTool::m_GNNGraphHitSelectorTool {this, "GNNGraphHitSelector", "FPGATrackSimGNNGraphHitSelectorTool", "Graph HitSelector Tool"}
private

Definition at line 62 of file FPGATrackSimGNNPatternRecoTool.h.

◆ m_GNNRoadMakerTool

ToolHandle<FPGATrackSimGNNRoadMakerTool> FPGATrackSimGNNPatternRecoTool::m_GNNRoadMakerTool {this, "GNNRoadMaker", "FPGATrackSimGNNRoadMakerTool", "Road Maker Tool"}
private

Definition at line 66 of file FPGATrackSimGNNPatternRecoTool.h.

◆ m_GNNRootOutputTool

ToolHandle<FPGATrackSimGNNRootOutputTool> FPGATrackSimGNNPatternRecoTool::m_GNNRootOutputTool {this, "GNNRootOutput", "FPGATrackSimGNNRootOutputTool", "GNN ROOT Output Tool"}
private

Definition at line 67 of file FPGATrackSimGNNPatternRecoTool.h.

◆ m_regionNum

Gaudi::Property<int> FPGATrackSimGNNPatternRecoTool::m_regionNum { this, "regionNum", -1, "region number"}
private

Definition at line 58 of file FPGATrackSimGNNPatternRecoTool.h.

◆ m_selectedGNNEdgeClassifierTool

ToolHandle<FPGATrackSimGNNEdgeClassifierTool> FPGATrackSimGNNPatternRecoTool::m_selectedGNNEdgeClassifierTool
private

Definition at line 65 of file FPGATrackSimGNNPatternRecoTool.h.


The documentation for this class was generated from the following files:
FPGATrackSimGNNPatternRecoTool::m_GNNEdgeClassifierTools
ToolHandleArray< FPGATrackSimGNNEdgeClassifierTool > m_GNNEdgeClassifierTools
Definition: FPGATrackSimGNNPatternRecoTool.h:64
FPGATrackSimGNNPatternRecoTool::m_doGNNRootOutput
Gaudi::Property< bool > m_doGNNRootOutput
Definition: FPGATrackSimGNNPatternRecoTool.h:57
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimGNNPatternRecoTool::m_regionNum
Gaudi::Property< int > m_regionNum
Definition: FPGATrackSimGNNPatternRecoTool.h:58
FPGATrackSimGNNPatternRecoTool::m_GNNGraphHitSelectorTool
ToolHandle< FPGATrackSimGNNGraphHitSelectorTool > m_GNNGraphHitSelectorTool
Definition: FPGATrackSimGNNPatternRecoTool.h:62
FPGATrackSimGNNPatternRecoTool::m_selectedGNNEdgeClassifierTool
ToolHandle< FPGATrackSimGNNEdgeClassifierTool > m_selectedGNNEdgeClassifierTool
Definition: FPGATrackSimGNNPatternRecoTool.h:65
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:452
FPGATrackSimGNNPatternRecoTool::m_GNNGraphConstructionTool
ToolHandle< FPGATrackSimGNNGraphConstructionTool > m_GNNGraphConstructionTool
Definition: FPGATrackSimGNNPatternRecoTool.h:63
FPGATrackSimGNNPatternRecoTool::m_GNNRoadMakerTool
ToolHandle< FPGATrackSimGNNRoadMakerTool > m_GNNRoadMakerTool
Definition: FPGATrackSimGNNPatternRecoTool.h:66
FPGATrackSimGNNPatternRecoTool::m_GNNRootOutputTool
ToolHandle< FPGATrackSimGNNRootOutputTool > m_GNNRootOutputTool
Definition: FPGATrackSimGNNPatternRecoTool.h:67