ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloClusterCorrection
src
CaloClusterTritonTool.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 CALOCLUSTERCORRECTION_CALOCLUSTERTRITONTOOL_H
6
#define CALOCLUSTERCORRECTION_CALOCLUSTERTRITONTOOL_H
7
8
#include "
AthenaBaseComps/AthAlgTool.h
"
9
#include "
CaloInterface/ICaloClusterTritonTool.h
"
10
#include "
xAODCaloEvent/CaloClusterContainer.h
"
11
#include "
AthOnnxInterfaces/IAthInferenceTool.h
"
12
#include "GaudiKernel/ToolHandle.h"
13
14
#include <cstddef>
15
#include <string>
16
#include <vector>
17
34
class
CaloClusterTritonTool
:
public
extends<AthAlgTool, ICaloClusterTritonTool>
35
{
36
public
:
37
CaloClusterTritonTool
(
const
std::string &
type
,
const
std::string &name,
const
IInterface *parent);
38
virtual
~CaloClusterTritonTool
() =
default
;
39
40
virtual
StatusCode
initialize
()
override
;
41
42
virtual
StatusCode
inference
(
const
xAOD::CaloClusterContainer
&clusters,
43
std::vector<double> &clusterE_GNN_vec)
const override
;
44
45
private
:
48
StatusCode
buildInputs
(
const
xAOD::CaloCluster
&cluster,
49
AthInfer::InputDataMap
&inputData,
50
std::size_t &nCells)
const
;
51
53
StatusCode
inferCluster
(
const
xAOD::CaloCluster
&cluster,
54
double
&energyGeV,
55
bool
&valid)
const
;
56
57
Gaudi::Property<float>
m_cellEThreshold
{
58
this
,
"CellEnergyThreshold"
, 0.005f,
59
"Minimum weighted cell energy [GeV] for a cell to enter the graph"
};
60
61
Gaudi::Property<std::string>
m_cellIdsName
{
62
this
,
"CellIdsInputName"
,
"CELL_IDS"
,
"Name of the cell-ID input tensor"
};
63
Gaudi::Property<std::string>
m_cellFeaturesName
{
64
this
,
"CellFeaturesInputName"
,
"CELL_FEATURES"
,
"Name of the cell-feature input tensor"
};
65
Gaudi::Property<std::string>
m_globalFeaturesName
{
66
this
,
"GlobalFeaturesInputName"
,
"GLOBAL_FEATURES"
,
"Name of the global-feature input tensor"
};
67
Gaudi::Property<std::string>
m_outputName
{
68
this
,
"OutputName"
,
"OUTPUT"
,
"Name of the output tensor"
};
69
70
ToolHandle<AthInfer::IAthInferenceTool>
m_tritonTool
{
71
this
,
"TritonInferenceTool"
,
"AthInfer::TritonTool"
,
72
"Inference tool forwarding requests to the Triton server"
};
73
};
74
75
#endif
// CALOCLUSTERCORRECTION_CALOCLUSTERTRITONTOOL_H
AthAlgTool.h
CaloClusterContainer.h
IAthInferenceTool.h
ICaloClusterTritonTool.h
CaloClusterTritonTool::initialize
virtual StatusCode initialize() override
Definition
CaloClusterTritonTool.cxx:20
CaloClusterTritonTool::m_cellIdsName
Gaudi::Property< std::string > m_cellIdsName
Definition
CaloClusterTritonTool.h:61
CaloClusterTritonTool::~CaloClusterTritonTool
virtual ~CaloClusterTritonTool()=default
CaloClusterTritonTool::m_outputName
Gaudi::Property< std::string > m_outputName
Definition
CaloClusterTritonTool.h:67
CaloClusterTritonTool::buildInputs
StatusCode buildInputs(const xAOD::CaloCluster &cluster, AthInfer::InputDataMap &inputData, std::size_t &nCells) const
Fill the input tensor map for one cluster; nCells is the number of cells retained after the energy th...
Definition
CaloClusterTritonTool.cxx:28
CaloClusterTritonTool::inference
virtual StatusCode inference(const xAOD::CaloClusterContainer &clusters, std::vector< double > &clusterE_GNN_vec) const override
Definition
CaloClusterTritonTool.cxx:115
CaloClusterTritonTool::m_globalFeaturesName
Gaudi::Property< std::string > m_globalFeaturesName
Definition
CaloClusterTritonTool.h:65
CaloClusterTritonTool::CaloClusterTritonTool
CaloClusterTritonTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition
CaloClusterTritonTool.cxx:17
CaloClusterTritonTool::m_tritonTool
ToolHandle< AthInfer::IAthInferenceTool > m_tritonTool
Definition
CaloClusterTritonTool.h:70
CaloClusterTritonTool::inferCluster
StatusCode inferCluster(const xAOD::CaloCluster &cluster, double &energyGeV, bool &valid) const
Run inference for one cluster. energyGeV is meaningful only if valid.
Definition
CaloClusterTritonTool.cxx:79
CaloClusterTritonTool::m_cellEThreshold
Gaudi::Property< float > m_cellEThreshold
Definition
CaloClusterTritonTool.h:57
CaloClusterTritonTool::m_cellFeaturesName
Gaudi::Property< std::string > m_cellFeaturesName
Definition
CaloClusterTritonTool.h:63
AthInfer::InputDataMap
std::map< std::string, InferenceData > InputDataMap
Definition
IAthInferenceTool.h:17
xAOD::CaloCluster
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloCluster.h:19
xAOD::CaloClusterContainer
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloClusterContainer.h:17
type
Generated on
for ATLAS Offline Software by
1.17.0