ATLAS Offline Software
Loading...
Searching...
No Matches
HyPERTtbarDiLeptonParser.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef HYPERANALYSISALGORITHMS_HYPERTTBARDILEPTONPARSER_H
6#define HYPERANALYSISALGORITHMS_HYPERTTBARDILEPTONPARSER_H
7
8#include <string>
9#include <vector>
10
13
14namespace EventReco {
16 public:
19
20 void buildONNXInputs(const HyPERGraph& hyperGraph,
21 HyPERModel& hyperModel) override;
22
23 void getONNXOutputs(HyPERModel& hyperModel) override;
24
25 void reconstructOutputs(const HyPERGraph& hyperGraph) override;
26
27 std::vector<std::string> getLabels() override { return m_reco_labels_out; }
28 std::vector<float> getScores() override { return m_reco_scores_out; }
29 std::vector<std::vector<int>> getIndices() override {
30
32 }
33 std::vector<std::vector<int>> getIds() override {
35 }
36
37 void clear() override;
38 virtual void printOutputsForValidation() const override;
39
41
42 public:
43 // Outputs
44 std::vector<int64_t> m_edge_out_shape{};
45 std::vector<int64_t> m_hyperedge_out_shape{};
46 std::vector<int64_t> m_classification_out_shape{
47 1, 1}; // This is just a single number.
48 std::vector<std::vector<float>> m_edge_out{};
49 std::vector<std::vector<float>> m_hyperedge_out{};
50 std::vector<std::vector<float>> m_classification_out{};
51
52 std::vector<std::vector<int64_t>> m_reco_indices_out = {};
53 std::vector<float> m_reco_scores_out = {};
54 std::vector<std::string> m_reco_labels_out = {};
55 std::vector<std::vector<int64_t>> m_reco_ids_out = {};
57
58 private:
59 // Input tensors for the ONNX model including shapes and names.
60 std::vector<int64_t> m_l_edge_index_ = {{}, {}};
61 std::vector<int64_t> m_l_edge_index_shape;
62 const std::string m_l_edge_index_name = "edge_index";
63 std::vector<float> m_l_edge_attr_s_ = {};
64 std::vector<int64_t> m_l_edge_attr_s_shape;
65 const std::string m_l_edge_attr_s_name = "edge_attr_s";
66 std::vector<float> m_l_x_s_ = {};
67 std::vector<int64_t> m_l_x_s_shape;
68 const std::string m_l_x_s_name = "x_s";
69 std::vector<int64_t> m_l_batch_ = {};
70 std::vector<int64_t> m_l_batch_shape;
71 const std::string m_l_batch_name = "batch";
72 std::vector<int64_t> m_l_edge_index_h_ = {};
73 std::vector<int64_t> m_l_edge_index_h_shape;
74 const std::string m_l_edge_index_h_name = "edge_index_h";
75 std::vector<int64_t> m_l_edge_index_h_batch_ = {};
76 std::vector<int64_t> m_l_edge_index_h_batch_shape;
77 const std::string m_l_edge_index_h_batch_name = "batch_hyperedge";
78 std::vector<float> m_l_u_s_;
79 std::vector<int64_t> m_l_u_s_shape;
80 const std::string m_l_u_s_name = "u_s";
81};
82
83} // namespace EventReco
84
85#endif // HYPERANALYSISALGORITHMS_HYPERTTBARDILEPTONPARSER_H
virtual void printOutputsForValidation() const override
std::vector< std::string > getLabels() override
The following methods return the reconstruction labels, scores and related indices from the parser ob...
std::vector< std::vector< int64_t > > m_reco_ids_out
std::vector< std::vector< int > > getIds() override
std::vector< std::vector< int64_t > > m_reco_indices_out
void clear() override
This method clears the parser object.
void buildONNXInputs(const HyPERGraph &hyperGraph, HyPERModel &hyperModel) override
This method takes the information from the graph object and builds the inputs for the onnxruntime obj...
void reconstructOutputs(const HyPERGraph &hyperGraph) override
This method implements the reconstruction of the outputs from the parser object into physcally meanin...
void getONNXOutputs(HyPERModel &hyperModel) override
This method takes the information from the onnxruntime object and builds the outputs on the parser ob...
std::vector< std::vector< int > > getIndices() override
std::vector< float > getScores() override
std::vector< std::vector< float > > m_classification_out
std::vector< std::vector< float > > m_hyperedge_out
std::vector< std::vector< float > > m_edge_out
std::vector< std::vector< T > > vector2DTypeConverter(const std::vector< std::vector< V > > &input)
Definition HyPERUtils.h:70