ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimGNNRootOutputTool.h
Go to the documentation of this file.
1// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3#ifndef FPGATRACKSIMGNNROOTOUTPUTTOOL_H
4#define FPGATRACKSIMGNNROOTOUTPUTTOOL_H
5
20
21#include "GaudiKernel/ServiceHandle.h"
23
30
31#include "GaudiKernel/ITHistSvc.h"
32#include "TTree.h"
33
35{
36 public:
37
39 // AthAlgTool
40
41 FPGATrackSimGNNRootOutputTool(const std::string&, const std::string&, const IInterface*);
42
43 virtual StatusCode initialize() override;
44
46 // Functions
47
48 StatusCode fillTree(const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits,
49 const std::vector<std::shared_ptr<FPGATrackSimGNNHit>> & gnn_hits,
50 const std::vector<std::shared_ptr<FPGATrackSimGNNEdge>> & edges,
51 const std::vector<FPGATrackSimRoad> & roads);
52
53 private:
54
56 // Helpers
57
58 StatusCode bookTree();
59 void resetVectors();
60
62 // Handles
63
64 ServiceHandle<ITHistSvc> m_tHistSvc {this, "THistSvc", "THistSvc"};
65 Gaudi::Property <std::string> m_region { this, "OutputRegion", "", "region ID"};
66 ToolHandle<ITrigL2LayerNumberTool> m_layerNumberTool{this, "LayerNumberTool", "TrigL2LayerNumberToolITk"};
67
69 // Convenience
70
71 const std::vector<short>* m_pix_h2l{nullptr};
72 const std::vector<TrigInDetSiLayer>* m_layerGeometry{nullptr};
73
74 TTree *m_hit_tree = nullptr; // output FPGATrackSimHit tree
75 std::vector<unsigned> m_hit_id{};
76 std::vector<unsigned> m_hit_module_id{};
77 std::vector<float> m_hit_x{};
78 std::vector<float> m_hit_y{};
79 std::vector<float> m_hit_z{};
80 std::vector<float> m_hit_r{};
81 std::vector<float> m_hit_phi{};
82 std::vector<bool> m_hit_isPixel{};
83 std::vector<bool> m_hit_isStrip{};
84 std::vector<int> m_hit_hitType{};
85 std::vector<HepMcParticleLink::barcode_type> m_hit_uniqueID{};
86 std::vector<long> m_hit_eventIndex{};
87 std::vector<float> m_hit_cluster_x{};
88 std::vector<float> m_hit_cluster_y{};
89 std::vector<float> m_hit_cluster_z{};
90 std::vector<int> m_hit_globalLayerID{};
91
92 TTree *m_GNNHit_tree = nullptr; // output FPGATrackSimGNNHit tree
93 std::vector<unsigned> m_GNNHit_id{};
94 std::vector<unsigned> m_GNNHit_module_id{};
95 std::vector<HepMcParticleLink::barcode_type> m_GNNHit_uniqueID{};
96 std::vector<long> m_GNNHit_eventIndex{};
97 std::vector<int> m_GNNHit_road_id{};
98 std::vector<float> m_GNNHit_x{};
99 std::vector<float> m_GNNHit_y{};
100 std::vector<float> m_GNNHit_z{};
101 std::vector<float> m_GNNHit_r{};
102 std::vector<float> m_GNNHit_phi{};
103 std::vector<float> m_GNNHit_eta{};
104 std::vector<float> m_GNNHit_cluster_x_1{};
105 std::vector<float> m_GNNHit_cluster_y_1{};
106 std::vector<float> m_GNNHit_cluster_z_1{};
107 std::vector<float> m_GNNHit_cluster_r_1{};
108 std::vector<float> m_GNNHit_cluster_phi_1{};
109 std::vector<float> m_GNNHit_cluster_eta_1{};
110 std::vector<float> m_GNNHit_cluster_x_2{};
111 std::vector<float> m_GNNHit_cluster_y_2{};
112 std::vector<float> m_GNNHit_cluster_z_2{};
113 std::vector<float> m_GNNHit_cluster_r_2{};
114 std::vector<float> m_GNNHit_cluster_phi_2{};
115 std::vector<float> m_GNNHit_cluster_eta_2{};
116
117 TTree *m_GNNEdge_tree = nullptr; // output FPGATrackSimGNNEdge tree
118 std::vector<unsigned int> m_GNNEdge_index_1{};
119 std::vector<unsigned int> m_GNNEdge_index_2{};
120 std::vector<float> m_GNNEdge_dR{};
121 std::vector<float> m_GNNEdge_dPhi{};
122 std::vector<float> m_GNNEdge_dZ{};
123 std::vector<float> m_GNNEdge_dEta{};
124 std::vector<float> m_GNNEdge_phiSlope{};
125 std::vector<float> m_GNNEdge_rPhiSlope{};
126 std::vector<float> m_GNNEdge_score{};
127
128 TTree *m_road_tree = nullptr; // output FPGATrackSimRoad tree
129 std::vector<int> m_road_id{};
130 std::vector<size_t> m_road_nHits{};
131 std::vector<std::vector<size_t>> m_road_nHits_layer{};
132 std::vector<size_t> m_road_nLayers{};
133 std::vector<std::vector<std::vector<HepMcParticleLink::barcode_type>>> m_road_hit_uniqueID{};
134 std::vector<std::vector<std::vector<HepMcParticleLink::barcode_type>>> m_road_hit_barcode{};
135 std::vector<std::vector<std::vector<long>>> m_road_hit_eventIndex{};
136 std::vector<std::vector<std::vector<float>>> m_road_hit_z{};
137 std::vector<std::vector<std::vector<float>>> m_road_hit_r{};
138};
139
140#endif // FPGARACKSIMGNNROOTOUTPUTTOOL_H
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.
: FPGATrackSim-specific class to represent an hit in the detector.
Defines a class for roads.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
std::vector< unsigned int > m_GNNEdge_index_1
std::vector< std::vector< std::vector< float > > > m_road_hit_r
std::vector< HepMcParticleLink::barcode_type > m_hit_uniqueID
std::vector< std::vector< std::vector< float > > > m_road_hit_z
const std::vector< TrigInDetSiLayer > * m_layerGeometry
std::vector< unsigned int > m_GNNEdge_index_2
ToolHandle< ITrigL2LayerNumberTool > m_layerNumberTool
Gaudi::Property< std::string > m_region
std::vector< HepMcParticleLink::barcode_type > m_GNNHit_uniqueID
std::vector< std::vector< std::vector< long > > > m_road_hit_eventIndex
std::vector< std::vector< size_t > > m_road_nHits_layer
StatusCode fillTree(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, const std::vector< FPGATrackSimRoad > &roads)
std::vector< std::vector< std::vector< HepMcParticleLink::barcode_type > > > m_road_hit_uniqueID
std::vector< std::vector< std::vector< HepMcParticleLink::barcode_type > > > m_road_hit_barcode
FPGATrackSimGNNRootOutputTool(const std::string &, const std::string &, const IInterface *)