ATLAS Offline Software
Loading...
Searching...
No Matches
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//
13#include "CaloClusterMLCalibFeatureTransform.h"// for CaloClusterMLCalib::TransformFunc
14#include "GaudiKernel/ToolHandle.h"
15#include <vector>
16#include <string>
17
23
24class CaloClusterMLCalibToolLite : public extends<AthAlgTool, ICaloClusterMLCalibToolLite>
25{
26
27public:
28 CaloClusterMLCalibToolLite(const std::string &type, const std::string &name, const IInterface *parent);
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
41private:
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
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
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
Gaudi::Property< std::vector< std::vector< double > > > m_preprocessingTransformParams
ToolHandle< AthInfer::IAthInferenceTool > m_onnxTool
virtual StatusCode initialize() override
CaloClusterMLCalibToolLite(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< std::vector< std::string > > m_preprocessingTransformNames
virtual StatusCode finalize() override
std::vector< PreprocessTransform > m_featurePreprocessingTransforms
std::function< float(float, const std::vector< float > &)> TransformFunc
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
std::vector< float > parameters
CaloClusterMLCalib::TransformFunc processor