ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
Jet
JetCalibTools
JetCalibTools
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
"
8
#include "
AsgTools/AsgToolMacros.h
"
9
#include "
AsgTools/ToolHandle.h
"
10
#include "
AsgTools/ToolHandleArray.h
"
11
#include <
AsgTools/PropertyWrapper.h
>
12
13
#include "
JetAnalysisInterfaces/IJetCalibStep.h
"
14
#include "
JetAnalysisInterfaces/IVarTool.h
"
15
#include "
AthOnnxInterfaces/IAthInferenceTool.h
"
16
17
#include "
xAODTracking/VertexContainer.h
"
18
#include "
xAODEventInfo/EventInfo.h
"
19
20
class
JetDNNCalibStep
21
:
public
asg::AsgTool
,
22
virtual
public
IJetCalibStep
{
23
24
ASG_TOOL_CLASS
(
JetDNNCalibStep
,
IJetCalibStep
)
25
26
public
:
27
using
asg::AsgTool::AsgTool
;
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
AsgToolMacros.h
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition
AsgToolMacros.h:68
AsgTool.h
IAthInferenceTool.h
IJetCalibStep.h
IVarTool.h
PropertyWrapper.h
ToolHandleArray.h
ToolHandle.h
VertexContainer.h
IJetCalibStep
Definition
IJetCalibStep.h:27
JetDNNCalibStep
Definition
JetDNNCalibStep.h:22
JetDNNCalibStep::m_muKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_muKey
Definition
JetDNNCalibStep.h:53
JetDNNCalibStep::m_onnxTool
ToolHandle< AthInfer::IAthInferenceTool > m_onnxTool
Definition
JetDNNCalibStep.h:48
JetDNNCalibStep::m_onnxInputShape
Gaudi::Property< int > m_onnxInputShape
Definition
JetDNNCalibStep.h:38
JetDNNCalibStep::calibrate
virtual StatusCode calibrate(xAOD::JetContainer &) const override
Apply calibration to a jet container.
Definition
JetDNNCalibStep.cxx:28
JetDNNCalibStep::m_onnxOutputShape
Gaudi::Property< int > m_onnxOutputShape
Definition
JetDNNCalibStep.h:39
JetDNNCalibStep::m_eScales
Gaudi::Property< std::vector< float > > m_eScales
Definition
JetDNNCalibStep.h:43
JetDNNCalibStep::m_normOffsets
Gaudi::Property< std::vector< float > > m_normOffsets
Definition
JetDNNCalibStep.h:44
JetDNNCalibStep::m_jetOutScale
Gaudi::Property< std::string > m_jetOutScale
Definition
JetDNNCalibStep.h:35
JetDNNCalibStep::m_normScales
Gaudi::Property< std::vector< float > > m_normScales
Definition
JetDNNCalibStep.h:45
JetDNNCalibStep::m_jetInScale
Gaudi::Property< std::string > m_jetInScale
Definition
JetDNNCalibStep.h:34
JetDNNCalibStep::m_inputVariables
ToolHandleArray< JetHelper::IVarTool > m_inputVariables
Definition
JetDNNCalibStep.h:42
JetDNNCalibStep::initialize
virtual StatusCode initialize() override
Dummy implementation of the initialisation function.
Definition
JetDNNCalibStep.cxx:13
JetDNNCalibStep::m_npvKey
SG::ReadHandleKey< xAOD::VertexContainer > m_npvKey
Definition
JetDNNCalibStep.h:54
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition
StoreGate/StoreGate/ReadDecorHandleKey.h:86
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition
JetContainer.h:17
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0