ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
ElectronPhotonID
ElectronPhotonSelectorTools
ElectronPhotonSelectorTools
AsgForwardElectronCalibrationTool.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 ASGFORWARDELECTRONCALIBRATIONTOOL_H
6
#define ASGFORWARDELECTRONCALIBRATIONTOOL_H
7
25
26
27
#include "
AsgTools/PropertyWrapper.h
"
28
#include "
AsgTools/AsgTool.h
"
29
#include "
xAODEgamma/ElectronFwd.h
"
30
31
#include "
EgammaAnalysisInterfaces/IForwardElectronCalib.h
"
32
33
#include "lwtnn/LightweightGraph.hh"
34
35
#include <vector>
36
#include <string>
37
#include <memory>
38
39
40
class
EventContext;
41
42
43
class
AsgForwardElectronCalibrationTool
44
:
public
asg::AsgTool
45
,
virtual
public
IForwardElectronCalib
46
{
47
ASG_TOOL_CLASS1
(
AsgForwardElectronCalibrationTool
,
48
IForwardElectronCalib
)
49
50
51
52
public
:
53
55
AsgForwardElectronCalibrationTool
(
const
std::string& myname);
57
virtual
~AsgForwardElectronCalibrationTool
();
58
59
61
virtual
StatusCode
initialize
()
override
;
62
63
66
double
calibrate
(
const
EventContext& ctx,
67
const
xAOD::Electron
* eg)
const override
;
68
69
70
71
72
73
private
:
74
80
static
int
getEtaBin
(
double
absEta) ;
81
84
bool
getInputs
(
const
xAOD::Electron
* eg,
85
std::vector<float>& inputs)
const
;
86
88
static
double
softplus
(
double
x
) ;
89
91
double
unscalePt
(
double
x
)
const
;
92
93
94
96
Gaudi::Property<double>
m_pTMin
{
this
,
"pTMin"
, 10000,
"Lower bound of pT Min scaling [MeV]"
};
97
Gaudi::Property<double>
m_pTMax
{
this
,
"pTMax"
, 255000,
"Lower bound of pT Max scaling [MeV]"
};
98
100
Gaudi::Property<std::vector<std::string>>
m_modelFiles
{
this
,
"ModelFiles"
,{
""
,
""
,
""
} ,
"lwtnn JSON files, one per eta bin (in eta order)"
};
101
std::vector<std::unique_ptr<lwt::LightweightGraph>>
m_graphs
;
102
104
std::vector<std::string>
m_variables
;
105
106
};
107
108
#endif
ASG_TOOL_CLASS1
#define ASG_TOOL_CLASS1
Definition
AsgToolMacros.h:75
AsgTool.h
ElectronFwd.h
IForwardElectronCalib.h
PropertyWrapper.h
x
#define x
AsgForwardElectronCalibrationTool
Tool to apply DNN-based pT calibration to forward electrons for Run 4 using ITk and HGTD variables.
Definition
AsgForwardElectronCalibrationTool.h:46
AsgForwardElectronCalibrationTool::m_pTMax
Gaudi::Property< double > m_pTMax
Definition
AsgForwardElectronCalibrationTool.h:97
AsgForwardElectronCalibrationTool::unscalePt
double unscalePt(double x) const
Undo MinMax pT scaling used during training.
Definition
AsgForwardElectronCalibrationTool.cxx:302
AsgForwardElectronCalibrationTool::m_modelFiles
Gaudi::Property< std::vector< std::string > > m_modelFiles
One lwtnn JSON file / DNN per eta bin.
Definition
AsgForwardElectronCalibrationTool.h:100
AsgForwardElectronCalibrationTool::calibrate
double calibrate(const EventContext &ctx, const xAOD::Electron *eg) const override
Return the DNN-calibrated pT in MeV Returns -999 on error.
Definition
AsgForwardElectronCalibrationTool.cxx:129
AsgForwardElectronCalibrationTool::getInputs
bool getInputs(const xAOD::Electron *eg, std::vector< float > &inputs) const
Get 25 input variables Returns false on failure.
Definition
AsgForwardElectronCalibrationTool.cxx:194
AsgForwardElectronCalibrationTool::initialize
virtual StatusCode initialize() override
Gaudi Service Interface method implementations.
Definition
AsgForwardElectronCalibrationTool.cxx:59
AsgForwardElectronCalibrationTool::m_pTMin
Gaudi::Property< double > m_pTMin
pT scaling range used [MeV]
Definition
AsgForwardElectronCalibrationTool.h:96
AsgForwardElectronCalibrationTool::getEtaBin
static int getEtaBin(double absEta)
Select the eta bin index for |eta|, three eta bins: Bin 0: 2.5 < |eta| <= 2.7 Bin 1: 2....
Definition
AsgForwardElectronCalibrationTool.cxx:182
AsgForwardElectronCalibrationTool::m_variables
std::vector< std::string > m_variables
Input variable names.
Definition
AsgForwardElectronCalibrationTool.h:104
AsgForwardElectronCalibrationTool::~AsgForwardElectronCalibrationTool
virtual ASG_TOOL_CLASS1(AsgForwardElectronCalibrationTool, IForwardElectronCalib) public ~AsgForwardElectronCalibrationTool()
Standard constructor.
AsgForwardElectronCalibrationTool::softplus
static double softplus(double x)
Sftplus: log(1 + exp(x)).
Definition
AsgForwardElectronCalibrationTool.cxx:296
AsgForwardElectronCalibrationTool::m_graphs
std::vector< std::unique_ptr< lwt::LightweightGraph > > m_graphs
Definition
AsgForwardElectronCalibrationTool.h:101
IForwardElectronCalib
A tool used to Compute the pT Calibration.
Definition
IForwardElectronCalib.h:21
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition
AsgTool.h:47
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition
Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
Generated on
for ATLAS Offline Software by
1.17.0