ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloClusterCorrection
src
CaloClusterMLCalibToolLite.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef CALOCLUSTERCORRECTION_CALOCLUSTERMLCALIBTOOLLITE_H
6
#define CALOCLUSTERCORRECTION_CALOCLUSTERMLCALIBTOOLLITE_H
7
8
//
9
#include "
AthenaBaseComps/AthAlgTool.h
"
10
#include "
CaloInterface/ICaloClusterMLCalibToolLite.h
"
11
#include "
xAODCaloEvent/CaloClusterContainer.h
"
12
#include "
AthOnnxInterfaces/IAthInferenceTool.h
"
13
#include "
CaloClusterMLCalibFeatureTransform.h
"
// for CaloClusterMLCalib::TransformFunc
14
#include "GaudiKernel/ToolHandle.h"
15
#include <vector>
16
#include <string>
17
18
struct
PreprocessTransform
19
{
20
CaloClusterMLCalib::TransformFunc
processor
;
21
std::vector<float>
parameters
;
22
};
23
24
class
CaloClusterMLCalibToolLite
:
public
extends<AthAlgTool, ICaloClusterMLCalibToolLite>
25
{
26
27
public
:
28
CaloClusterMLCalibToolLite
(
const
std::string &
type
,
const
std::string &name,
const
IInterface *parent);
29
~CaloClusterMLCalibToolLite
();
30
31
virtual
StatusCode
initialize
()
override
;
32
virtual
StatusCode
finalize
()
override
;
33
34
// Perform batch-inference for a CaloClusterContainer
35
virtual
StatusCode
inference
(
const
xAOD::CaloClusterContainer
&clusters,
36
int
nPrimVtx,
37
float
avgMu,
38
std::vector<double> &clusterE_ML_vec,
39
std::vector<double> &clusterE_ML_Unc_vec)
const override
;
40
41
private
:
42
Gaudi::Property<std::vector<std::string>>
m_preprocessingTransformNames
{
this
,
"PreprocessingTransformNames"
, {},
"Names of preprocessing transforms"
};
43
Gaudi::Property<std::vector<std::vector<double>>>
m_preprocessingTransformParams
{
this
,
"PreprocessingTransformParams"
, {},
"Parameters for preprocessing transforms"
};
44
45
int
m_numFeatures
= 0;
46
std::vector<PreprocessTransform>
m_featurePreprocessingTransforms
;
47
48
ToolHandle<AthInfer::IAthInferenceTool>
m_onnxTool
{
49
this
,
"ORTInferenceTool"
,
"AthOnnx::OnnxRuntimeInferenceTool"
};
50
};
51
52
#endif
// CALOCLUSTERCORRECTION_CALOCLUSTERMLCALIBTOOLLITE_H
AthAlgTool.h
CaloClusterMLCalibFeatureTransform.h
CaloClusterContainer.h
IAthInferenceTool.h
ICaloClusterMLCalibToolLite.h
CaloClusterMLCalibToolLite::inference
virtual StatusCode inference(const xAOD::CaloClusterContainer &clusters, int nPrimVtx, float avgMu, std::vector< double > &clusterE_ML_vec, std::vector< double > &clusterE_ML_Unc_vec) const override
Definition
CaloClusterMLCalibToolLite.cxx:46
CaloClusterMLCalibToolLite::m_preprocessingTransformParams
Gaudi::Property< std::vector< std::vector< double > > > m_preprocessingTransformParams
Definition
CaloClusterMLCalibToolLite.h:43
CaloClusterMLCalibToolLite::~CaloClusterMLCalibToolLite
~CaloClusterMLCalibToolLite()
Definition
CaloClusterMLCalibToolLite.cxx:14
CaloClusterMLCalibToolLite::m_onnxTool
ToolHandle< AthInfer::IAthInferenceTool > m_onnxTool
Definition
CaloClusterMLCalibToolLite.h:48
CaloClusterMLCalibToolLite::initialize
virtual StatusCode initialize() override
Definition
CaloClusterMLCalibToolLite.cxx:16
CaloClusterMLCalibToolLite::m_numFeatures
int m_numFeatures
Definition
CaloClusterMLCalibToolLite.h:45
CaloClusterMLCalibToolLite::CaloClusterMLCalibToolLite
CaloClusterMLCalibToolLite(const std::string &type, const std::string &name, const IInterface *parent)
Definition
CaloClusterMLCalibToolLite.cxx:12
CaloClusterMLCalibToolLite::m_preprocessingTransformNames
Gaudi::Property< std::vector< std::string > > m_preprocessingTransformNames
Definition
CaloClusterMLCalibToolLite.h:42
CaloClusterMLCalibToolLite::finalize
virtual StatusCode finalize() override
Definition
CaloClusterMLCalibToolLite.cxx:222
CaloClusterMLCalibToolLite::m_featurePreprocessingTransforms
std::vector< PreprocessTransform > m_featurePreprocessingTransforms
Definition
CaloClusterMLCalibToolLite.h:46
CaloClusterMLCalib::TransformFunc
std::function< float(float, const std::vector< float > &)> TransformFunc
Definition
CaloClusterMLCalibFeatureTransform.h:79
xAOD::CaloClusterContainer
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
Definition
Event/xAOD/xAODCaloEvent/xAODCaloEvent/CaloClusterContainer.h:17
type
PreprocessTransform
Definition
CaloClusterMLCalibToolLite.h:19
PreprocessTransform::parameters
std::vector< float > parameters
Definition
CaloClusterMLCalibToolLite.h:21
PreprocessTransform::processor
CaloClusterMLCalib::TransformFunc processor
Definition
CaloClusterMLCalibToolLite.h:20
Generated on
for ATLAS Offline Software by
1.17.0