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
29
30#include "GaudiKernel/ITHistSvc.h"
31#include "TTree.h"
32
34{
35 public:
36
38 // AthAlgTool
39
40 FPGATrackSimGNNRootOutputTool(const std::string&, const std::string&, const IInterface*);
41
42 virtual StatusCode initialize() override;
43
45 // Functions
46
47 StatusCode fillTree(const std::vector<std::shared_ptr<const FPGATrackSimHit>> & hits,
48 const std::vector<std::shared_ptr<FPGATrackSimGNNHit>> & gnn_hits,
49 const std::vector<std::shared_ptr<FPGATrackSimGNNEdge>> & edges,
50 const std::vector<std::shared_ptr<const FPGATrackSimRoad>> & roads);
51
52 private:
53
55 // Helpers
56
57 StatusCode bookTree();
58 void resetVectors();
59
61 // Handles
62
63 ServiceHandle<ITHistSvc> m_tHistSvc {this, "THistSvc", "THistSvc"};
64 Gaudi::Property <std::string> m_region { this, "OutputRegion", "", "region ID"};
65
67 // Convenience
68
69 TTree *m_hit_tree = nullptr; // output FPGATrackSimHit tree
70 std::vector<unsigned int> m_hit_id{};
71 std::vector<unsigned int> m_hit_module_id{};
72 std::vector<float> m_hit_x{};
73 std::vector<float> m_hit_y{};
74 std::vector<float> m_hit_z{};
75 std::vector<float> m_hit_r{};
76 std::vector<float> m_hit_phi{};
77 std::vector<bool> m_hit_isPixel{};
78 std::vector<bool> m_hit_isStrip{};
79 std::vector<int> m_hit_hitType{};
80 std::vector<HepMcParticleLink::barcode_type> m_hit_uniqueID{};
81 std::vector<long> m_hit_eventIndex{};
82 std::vector<float> m_hit_cluster_x{};
83 std::vector<float> m_hit_cluster_y{};
84 std::vector<float> m_hit_cluster_z{};
85
86 TTree *m_GNNHit_tree = nullptr; // output FPGATrackSimGNNHit tree
87 std::vector<unsigned int> m_GNNHit_id{};
88 std::vector<unsigned int> m_GNNHit_module_id{};
89 std::vector<int> m_GNNHit_road_id{};
90 std::vector<float> m_GNNHit_x{};
91 std::vector<float> m_GNNHit_y{};
92 std::vector<float> m_GNNHit_z{};
93 std::vector<float> m_GNNHit_r{};
94 std::vector<float> m_GNNHit_phi{};
95 std::vector<float> m_GNNHit_eta{};
96 std::vector<float> m_GNNHit_cluster_x_1{};
97 std::vector<float> m_GNNHit_cluster_y_1{};
98 std::vector<float> m_GNNHit_cluster_z_1{};
99 std::vector<float> m_GNNHit_cluster_r_1{};
100 std::vector<float> m_GNNHit_cluster_phi_1{};
101 std::vector<float> m_GNNHit_cluster_eta_1{};
102 std::vector<float> m_GNNHit_cluster_x_2{};
103 std::vector<float> m_GNNHit_cluster_y_2{};
104 std::vector<float> m_GNNHit_cluster_z_2{};
105 std::vector<float> m_GNNHit_cluster_r_2{};
106 std::vector<float> m_GNNHit_cluster_phi_2{};
107 std::vector<float> m_GNNHit_cluster_eta_2{};
108
109 TTree *m_GNNEdge_tree = nullptr; // output FPGATrackSimGNNEdge tree
110 std::vector<unsigned int> m_GNNEdge_index_1{};
111 std::vector<unsigned int> m_GNNEdge_index_2{};
112 std::vector<float> m_GNNEdge_dR{};
113 std::vector<float> m_GNNEdge_dPhi{};
114 std::vector<float> m_GNNEdge_dZ{};
115 std::vector<float> m_GNNEdge_dEta{};
116 std::vector<float> m_GNNEdge_phiSlope{};
117 std::vector<float> m_GNNEdge_rPhiSlope{};
118 std::vector<float> m_GNNEdge_score{};
119
120 TTree *m_road_tree = nullptr; // output FPGATrackSimRoad tree
121 std::vector<int> m_road_id{};
122 std::vector<size_t> m_road_nHits{};
123 std::vector<std::vector<size_t>> m_road_nHits_layer{};
124 std::vector<size_t> m_road_nLayers{};
125 std::vector<std::vector<std::vector<HepMcParticleLink::barcode_type>>> m_road_hit_uniqueID{};
126 std::vector<std::vector<std::vector<HepMcParticleLink::barcode_type>>> m_road_hit_barcode{};
127 std::vector<std::vector<std::vector<long>>> m_road_hit_eventIndex{};
128 std::vector<std::vector<std::vector<float>>> m_road_hit_z{};
129 std::vector<std::vector<std::vector<float>>> m_road_hit_r{};
130};
131
132#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
std::vector< unsigned int > m_GNNEdge_index_2
Gaudi::Property< std::string > m_region
std::vector< std::vector< std::vector< long > > > m_road_hit_eventIndex
std::vector< std::vector< size_t > > m_road_nHits_layer
std::vector< unsigned int > m_GNNHit_module_id
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
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< std::shared_ptr< const FPGATrackSimRoad > > &roads)
FPGATrackSimGNNRootOutputTool(const std::string &, const std::string &, const IInterface *)
std::vector< unsigned int > m_hit_module_id