ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
HyPERAnalysisAlgorithms
HyPERAnalysisAlgorithms
HyPERTtbarAllHadronicParser.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_HYPERTTBARALLHADRONICPARSER_H
6
#define HYPERANALYSISALGORITHMS_HYPERTTBARALLHADRONICPARSER_H
7
8
#include <string>
9
#include <vector>
10
11
#include "
HyPERAnalysisAlgorithms/HyPERParser.h
"
12
#include "
HyPERAnalysisAlgorithms/HyPERUtils.h
"
13
14
namespace
EventReco
{
15
class
HyPERTtbarAllHadronicParser
:
public
HyPERParser
{
16
public
:
17
HyPERTtbarAllHadronicParser
() =
default
;
18
~HyPERTtbarAllHadronicParser
() =
default
;
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
return
vector2DTypeConverter<int>
(
m_reco_indices_out
);
31
}
32
std::vector<std::vector<int>>
getIds
()
override
{
33
return
{{1, 1, 1}, {1, 1, 1}};
34
}
35
36
float
getClassificationScore
()
override
{
37
throw
std::runtime_error(
38
"HyPERTtbarAllHadronicModel:: There is no classification score for "
39
"the ttbar all-hadronic topology."
);
40
}
41
42
void
clear
()
override
;
43
virtual
void
printOutputsForValidation
()
const override
;
44
45
public
:
46
// Outputs
47
std::vector<int64_t>
m_edge_out_shape
{};
48
std::vector<int64_t>
m_hyperedge_out_shape
{};
49
std::vector<std::vector<float>>
m_edge_out
{};
50
std::vector<std::vector<float>>
m_hyperedge_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
56
private
:
57
// Input tensors for the ONNX model including shapes and names.
58
std::vector<int64_t>
m_l_edge_index_
= {{}, {}};
59
std::vector<int64_t>
m_l_edge_index_shape
;
60
const
std::string
m_l_edge_index_name
=
"edge_index"
;
61
std::vector<float>
m_l_edge_attr_s_
= {};
62
std::vector<int64_t>
m_l_edge_attr_s_shape
;
63
const
std::string
m_l_edge_attr_s_name
=
"edge_attr_s"
;
64
std::vector<float>
m_l_x_s_
= {};
65
std::vector<int64_t>
m_l_x_s_shape
;
66
const
std::string
m_l_x_s_name
=
"x_s"
;
67
std::vector<int64_t>
m_l_batch_
= {};
68
std::vector<int64_t>
m_l_batch_shape
;
69
const
std::string
m_l_batch_name
=
"batch"
;
70
std::vector<int64_t>
m_l_edge_index_h_
= {};
71
std::vector<int64_t>
m_l_edge_index_h_shape
;
72
const
std::string
m_l_edge_index_h_name
=
"edge_index_h"
;
73
std::vector<int64_t>
m_l_edge_index_h_batch_
= {};
74
std::vector<int64_t>
m_l_edge_index_h_batch_shape
;
75
const
std::string
m_l_edge_index_h_batch_name
=
"edge_index_h_batch"
;
76
std::vector<float>
m_l_u_s_
;
77
std::vector<int64_t>
m_l_u_s_shape
;
78
const
std::string
m_l_u_s_name
=
"u_s"
;
79
};
80
81
}
// namespace EventReco
82
83
#endif
// HYPERANALYSISALGORITHMS_HYPERTTBARALLHADRONICPARSER_H
HyPERParser.h
HyPERUtils.h
EventReco::HyPERGraph
Definition
HyPERGraph.h:21
EventReco::HyPERModel
Definition
HyPERModel.h:60
EventReco::HyPERParser::HyPERParser
HyPERParser()=default
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_index_h_batch_shape
std::vector< int64_t > m_l_edge_index_h_batch_shape
Definition
HyPERTtbarAllHadronicParser.h:74
EventReco::HyPERTtbarAllHadronicParser::m_hyperedge_out_shape
std::vector< int64_t > m_hyperedge_out_shape
Definition
HyPERTtbarAllHadronicParser.h:48
EventReco::HyPERTtbarAllHadronicParser::HyPERTtbarAllHadronicParser
HyPERTtbarAllHadronicParser()=default
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_index_shape
std::vector< int64_t > m_l_edge_index_shape
Definition
HyPERTtbarAllHadronicParser.h:59
EventReco::HyPERTtbarAllHadronicParser::m_reco_indices_out
std::vector< std::vector< int64_t > > m_reco_indices_out
Definition
HyPERTtbarAllHadronicParser.h:52
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_index_h_name
const std::string m_l_edge_index_h_name
Definition
HyPERTtbarAllHadronicParser.h:72
EventReco::HyPERTtbarAllHadronicParser::getLabels
std::vector< std::string > getLabels() override
The following methods return the reconstruction labels, scores and related indices from the parser ob...
Definition
HyPERTtbarAllHadronicParser.h:27
EventReco::HyPERTtbarAllHadronicParser::getIds
std::vector< std::vector< int > > getIds() override
Definition
HyPERTtbarAllHadronicParser.h:32
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_index_name
const std::string m_l_edge_index_name
Definition
HyPERTtbarAllHadronicParser.h:60
EventReco::HyPERTtbarAllHadronicParser::m_l_batch_name
const std::string m_l_batch_name
Definition
HyPERTtbarAllHadronicParser.h:69
EventReco::HyPERTtbarAllHadronicParser::getClassificationScore
float getClassificationScore() override
Definition
HyPERTtbarAllHadronicParser.h:36
EventReco::HyPERTtbarAllHadronicParser::m_hyperedge_out
std::vector< std::vector< float > > m_hyperedge_out
Definition
HyPERTtbarAllHadronicParser.h:50
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_attr_s_shape
std::vector< int64_t > m_l_edge_attr_s_shape
Definition
HyPERTtbarAllHadronicParser.h:62
EventReco::HyPERTtbarAllHadronicParser::getONNXOutputs
void getONNXOutputs(HyPERModel &hyperModel) override
This method takes the information from the onnxruntime object and builds the outputs on the parser ob...
Definition
HyPERTtbarAllHadronicParser.cxx:102
EventReco::HyPERTtbarAllHadronicParser::m_l_batch_
std::vector< int64_t > m_l_batch_
Definition
HyPERTtbarAllHadronicParser.h:67
EventReco::HyPERTtbarAllHadronicParser::m_l_u_s_
std::vector< float > m_l_u_s_
Definition
HyPERTtbarAllHadronicParser.h:76
EventReco::HyPERTtbarAllHadronicParser::m_l_x_s_shape
std::vector< int64_t > m_l_x_s_shape
Definition
HyPERTtbarAllHadronicParser.h:65
EventReco::HyPERTtbarAllHadronicParser::m_edge_out
std::vector< std::vector< float > > m_edge_out
Definition
HyPERTtbarAllHadronicParser.h:49
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_index_h_batch_name
const std::string m_l_edge_index_h_batch_name
Definition
HyPERTtbarAllHadronicParser.h:75
EventReco::HyPERTtbarAllHadronicParser::printOutputsForValidation
virtual void printOutputsForValidation() const override
Definition
HyPERTtbarAllHadronicParser.cxx:116
EventReco::HyPERTtbarAllHadronicParser::buildONNXInputs
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...
Definition
HyPERTtbarAllHadronicParser.cxx:13
EventReco::HyPERTtbarAllHadronicParser::m_l_u_s_name
const std::string m_l_u_s_name
Definition
HyPERTtbarAllHadronicParser.h:78
EventReco::HyPERTtbarAllHadronicParser::m_l_x_s_
std::vector< float > m_l_x_s_
Definition
HyPERTtbarAllHadronicParser.h:64
EventReco::HyPERTtbarAllHadronicParser::m_reco_labels_out
std::vector< std::string > m_reco_labels_out
Definition
HyPERTtbarAllHadronicParser.h:54
EventReco::HyPERTtbarAllHadronicParser::m_l_batch_shape
std::vector< int64_t > m_l_batch_shape
Definition
HyPERTtbarAllHadronicParser.h:68
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_index_h_batch_
std::vector< int64_t > m_l_edge_index_h_batch_
Definition
HyPERTtbarAllHadronicParser.h:73
EventReco::HyPERTtbarAllHadronicParser::m_l_u_s_shape
std::vector< int64_t > m_l_u_s_shape
Definition
HyPERTtbarAllHadronicParser.h:77
EventReco::HyPERTtbarAllHadronicParser::getScores
std::vector< float > getScores() override
Definition
HyPERTtbarAllHadronicParser.h:28
EventReco::HyPERTtbarAllHadronicParser::~HyPERTtbarAllHadronicParser
~HyPERTtbarAllHadronicParser()=default
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_index_
std::vector< int64_t > m_l_edge_index_
Definition
HyPERTtbarAllHadronicParser.h:58
EventReco::HyPERTtbarAllHadronicParser::m_edge_out_shape
std::vector< int64_t > m_edge_out_shape
Definition
HyPERTtbarAllHadronicParser.h:47
EventReco::HyPERTtbarAllHadronicParser::clear
void clear() override
This method clears the parser object.
Definition
HyPERTtbarAllHadronicParser.cxx:149
EventReco::HyPERTtbarAllHadronicParser::getIndices
std::vector< std::vector< int > > getIndices() override
Definition
HyPERTtbarAllHadronicParser.h:29
EventReco::HyPERTtbarAllHadronicParser::m_l_x_s_name
const std::string m_l_x_s_name
Definition
HyPERTtbarAllHadronicParser.h:66
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_index_h_shape
std::vector< int64_t > m_l_edge_index_h_shape
Definition
HyPERTtbarAllHadronicParser.h:71
EventReco::HyPERTtbarAllHadronicParser::reconstructOutputs
void reconstructOutputs(const HyPERGraph &hyperGraph) override
This method implements the reconstruction of the outputs from the parser object into physcally meanin...
Definition
HyPERTtbarAllHadronicParser.cxx:141
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_attr_s_name
const std::string m_l_edge_attr_s_name
Definition
HyPERTtbarAllHadronicParser.h:63
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_attr_s_
std::vector< float > m_l_edge_attr_s_
Definition
HyPERTtbarAllHadronicParser.h:61
EventReco::HyPERTtbarAllHadronicParser::m_l_edge_index_h_
std::vector< int64_t > m_l_edge_index_h_
Definition
HyPERTtbarAllHadronicParser.h:70
EventReco::HyPERTtbarAllHadronicParser::m_reco_scores_out
std::vector< float > m_reco_scores_out
Definition
HyPERTtbarAllHadronicParser.h:53
EventReco
Definition
GraphBase.h:14
EventReco::vector2DTypeConverter
std::vector< std::vector< T > > vector2DTypeConverter(const std::vector< std::vector< V > > &input)
Definition
HyPERUtils.h:70
Generated on
for ATLAS Offline Software by
1.17.0