ATLAS Offline Software
Loading...
Searching...
No Matches
JetDNNCalibStep.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef JETCALIBTOOLS_JETDNNCALIBSTEP_H
5#define JETCALIBTOOLS_JETDNNCALIBSTEP_H
6
7#include "AsgTools/AsgTool.h"
12
16
19
21 : public asg::AsgTool,
22 virtual public IJetCalibStep {
23
25
26 public:
28
29 virtual StatusCode initialize() override;
30 virtual StatusCode calibrate(xAOD::JetContainer&) const override;
31
32 private:
33
34 Gaudi::Property<std::string> m_jetInScale {this, "InScale", "JetConstitScaleMomentum", "Starting jet scale"};
35 Gaudi::Property<std::string> m_jetOutScale {this, "OutScale", "JetDNNScaleMomentum", "Ending jet scale"};
36
37
38 Gaudi::Property<int> m_onnxInputShape {this, "onnxInputShape", -1}; //Value -1 is just a default value
39 Gaudi::Property<int> m_onnxOutputShape {this, "onnxOutputShape", -1};
40
41 //For accessing the YAML contents
42 ToolHandleArray<JetHelper::IVarTool> m_inputVariables {this, "InputVarTool", {}, "Instance of VarTool for accessing input variables"};
43 Gaudi::Property<std::vector<float>> m_eScales {this, "EScales", {}, "Vector of E scales for each input variable"};
44 Gaudi::Property<std::vector<float>> m_normOffsets {this, "NormOffsets", {}, "Vector of normalisation offsets for each input variable"};
45 Gaudi::Property<std::vector<float>> m_normScales {this, "NormScales", {}, "Vector of normalisation scales for each input variable"};
46
47 //For running the ONNX inference
48 ToolHandle<AthInfer::IAthInferenceTool> m_onnxTool {this, "ORTInferenceTool", "AthOnnx::OnnxRuntimeInferenceTool"};
49
50 //For accessing mu and NPV (from jet context)
51 //Note: JetCalibrationTool.cxx uses "actualInteractionsPerCrossing" (not "average...") specifically
52 //for the DNN calibration path (m_doDNNCal), so we match that here rather than Pileup1DResidualCalibStep's default.
53 SG::ReadDecorHandleKey<xAOD::EventInfo> m_muKey {this, "actualInteractionsPerCrossing", "EventInfo.actualInteractionsPerCrossing", "Decoration for Actual Number of Interactions Per Crossing"};
54 SG::ReadHandleKey<xAOD::VertexContainer> m_npvKey {this, "VertexContainer", "PrimaryVertices"};
55
56};
57#endif
58
59
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
SG::ReadDecorHandleKey< xAOD::EventInfo > m_muKey
ToolHandle< AthInfer::IAthInferenceTool > m_onnxTool
Gaudi::Property< int > m_onnxInputShape
virtual StatusCode calibrate(xAOD::JetContainer &) const override
Apply calibration to a jet container.
Gaudi::Property< int > m_onnxOutputShape
Gaudi::Property< std::vector< float > > m_eScales
Gaudi::Property< std::vector< float > > m_normOffsets
Gaudi::Property< std::string > m_jetOutScale
Gaudi::Property< std::vector< float > > m_normScales
Gaudi::Property< std::string > m_jetInScale
ToolHandleArray< JetHelper::IVarTool > m_inputVariables
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
SG::ReadHandleKey< xAOD::VertexContainer > m_npvKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition AsgTool.cxx:58
JetContainer_v1 JetContainer
Definition of the current "jet container version".