ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Muon
L0MuonS1TGCFloatingTools
src
TgcL0FloatingPtLut.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 L0MUONS1TGCFLOATINGTOOLS_TGCL0FLOATINGPTLUT_H
5
#define L0MUONS1TGCFLOATINGTOOLS_TGCL0FLOATINGPTLUT_H
6
7
#include <array>
8
#include <cstdint>
9
#include <memory>
10
#include <string>
11
#include <vector>
12
13
namespace
L0Muon
{
14
15
enum class
TgcL0FloatingPtResponseMode
: std::uint8_t {
16
Invalid
= 0,
17
Linear
= 1,
18
FloatingMonotonicLut
= 2
19
};
20
21
enum class
TgcL0FloatingThresholdCalibrationStatus
: std::uint8_t {
22
None
= 0,
23
Direct
= 1,
24
PhiMedianFallback
= 2,
25
EtaNeighborFallback
= 3,
26
GlobalFallback
= 4,
27
Provisional
= 5
28
};
29
30
struct
TgcL0FloatingPtEvaluation
{
31
bool
modelValid
{
false
};
32
bool
ptEstimateValid
{
false
};
33
int
etaBin
{-1};
34
int
phiFoldBin
{-1};
36
float
rawPtEstimateGeV
{0.F};
38
float
ptEstimateGeV
{0.F};
39
std::uint8_t
estimatedPtValueIndex
{0};
40
bool
chargeEstimateValid
{
false
};
41
std::int8_t
estimatedCharge
{0};
42
std::uint8_t
thresholdCode
{0};
43
float
thresholdCutGeV
{0.F};
44
TgcL0FloatingPtResponseMode
responseMode
{
45
TgcL0FloatingPtResponseMode::Invalid
};
46
TgcL0FloatingThresholdCalibrationStatus
thresholdCalibrationStatus
{
47
TgcL0FloatingThresholdCalibrationStatus::None
};
48
};
49
55
class
TgcL0FloatingPtLut
{
56
public
:
57
static
constexpr
float
s_maxEncodedPtGeV
= 127.5F;
58
60
static
std::unique_ptr<TgcL0FloatingPtLut>
loadAscii
(
61
const
std::string& calibrationPath, std::string&
error
);
62
63
TgcL0FloatingPtEvaluation
evaluate
(
float
eta
,
float
phi
,
64
float
signedDTheta)
const
;
65
66
const
std::string&
version
()
const
{
return
m_version
; }
67
unsigned
int
etaBins
()
const
{
return
m_etaBins
; }
68
unsigned
int
phiBinsPerFold
()
const
{
return
m_phiBinsPerFold
; }
69
std::size_t
knotCount
()
const
{
return
m_knots
.size(); }
70
float
absEtaMin
()
const
{
return
m_absEtaMin
; }
71
float
absEtaMax
()
const
{
return
m_absEtaMax
; }
72
bool
isDevelopmentPayload
()
const
{
return
m_isDevelopmentPayload
; }
73
74
private
:
75
TgcL0FloatingPtLut
() =
default
;
76
77
struct
Knot
{
78
float
inversePtGeVInv
{0.F};
79
float
responseMagnitudeRad
{0.F};
80
};
81
82
struct
Bin
{
83
float
linearSlopeMagnitudeRadGeV
{0.F};
84
float
transitionPtGeV
{0.F};
85
std::uint32_t
knotOffset
{0U};
86
std::uint32_t
knotCount
{0U};
87
std::array<float, 16>
thresholdCutsGeV
{};
88
std::array<TgcL0FloatingThresholdCalibrationStatus, 16>
89
thresholdStatuses
{};
90
};
91
92
int
etaBin
(
float
eta
)
const
;
93
int
phiFoldBin
(
float
phi
)
const
;
94
const
Bin*
findBin
(
int
etaBin
,
int
phiFoldBin
)
const
;
95
bool
invertFloatingResponse
(
const
Bin&
bin
,
float
responseMagnitudeRad,
96
float
& inversePtGeVInv)
const
;
97
98
std::string
m_version
{};
99
unsigned
int
m_etaBins
{0U};
100
unsigned
int
m_phiBinsPerFold
{0U};
101
float
m_absEtaMin
{0.F};
102
float
m_absEtaMax
{0.F};
103
std::vector<Bin>
m_bins
{};
104
std::vector<Knot>
m_knots
{};
105
bool
m_isDevelopmentPayload
{
false
};
106
};
107
108
}
// namespace L0Muon
109
110
#endif
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
None
@ None
Definition
TRIGGERidentity.h:17
L0Muon::TgcL0FloatingPtLut::loadAscii
static std::unique_ptr< TgcL0FloatingPtLut > loadAscii(const std::string &calibrationPath, std::string &error)
Load the human-readable calibration payload.
Definition
TgcL0FloatingPtLut.cxx:71
L0Muon::TgcL0FloatingPtLut::findBin
const Bin * findBin(int etaBin, int phiFoldBin) const
Definition
TgcL0FloatingPtLut.cxx:298
L0Muon::TgcL0FloatingPtLut::m_bins
std::vector< Bin > m_bins
Definition
TgcL0FloatingPtLut.h:103
L0Muon::TgcL0FloatingPtLut::version
const std::string & version() const
Definition
TgcL0FloatingPtLut.h:66
L0Muon::TgcL0FloatingPtLut::m_phiBinsPerFold
unsigned int m_phiBinsPerFold
Definition
TgcL0FloatingPtLut.h:100
L0Muon::TgcL0FloatingPtLut::m_absEtaMin
float m_absEtaMin
Definition
TgcL0FloatingPtLut.h:101
L0Muon::TgcL0FloatingPtLut::m_isDevelopmentPayload
bool m_isDevelopmentPayload
Definition
TgcL0FloatingPtLut.h:105
L0Muon::TgcL0FloatingPtLut::m_etaBins
unsigned int m_etaBins
Definition
TgcL0FloatingPtLut.h:99
L0Muon::TgcL0FloatingPtLut::s_maxEncodedPtGeV
static constexpr float s_maxEncodedPtGeV
Definition
TgcL0FloatingPtLut.h:57
L0Muon::TgcL0FloatingPtLut::evaluate
TgcL0FloatingPtEvaluation evaluate(float eta, float phi, float signedDTheta) const
Definition
TgcL0FloatingPtLut.cxx:351
L0Muon::TgcL0FloatingPtLut::etaBins
unsigned int etaBins() const
Definition
TgcL0FloatingPtLut.h:67
L0Muon::TgcL0FloatingPtLut::invertFloatingResponse
bool invertFloatingResponse(const Bin &bin, float responseMagnitudeRad, float &inversePtGeVInv) const
Definition
TgcL0FloatingPtLut.cxx:307
L0Muon::TgcL0FloatingPtLut::etaBin
int etaBin(float eta) const
Definition
TgcL0FloatingPtLut.cxx:275
L0Muon::TgcL0FloatingPtLut::m_knots
std::vector< Knot > m_knots
Definition
TgcL0FloatingPtLut.h:104
L0Muon::TgcL0FloatingPtLut::m_absEtaMax
float m_absEtaMax
Definition
TgcL0FloatingPtLut.h:102
L0Muon::TgcL0FloatingPtLut::knotCount
std::size_t knotCount() const
Definition
TgcL0FloatingPtLut.h:69
L0Muon::TgcL0FloatingPtLut::m_version
std::string m_version
Definition
TgcL0FloatingPtLut.h:98
L0Muon::TgcL0FloatingPtLut::phiFoldBin
int phiFoldBin(float phi) const
Definition
TgcL0FloatingPtLut.cxx:286
L0Muon::TgcL0FloatingPtLut::absEtaMax
float absEtaMax() const
Definition
TgcL0FloatingPtLut.h:71
L0Muon::TgcL0FloatingPtLut::TgcL0FloatingPtLut
TgcL0FloatingPtLut()=default
L0Muon::TgcL0FloatingPtLut::isDevelopmentPayload
bool isDevelopmentPayload() const
Definition
TgcL0FloatingPtLut.h:72
L0Muon::TgcL0FloatingPtLut::phiBinsPerFold
unsigned int phiBinsPerFold() const
Definition
TgcL0FloatingPtLut.h:68
L0Muon::TgcL0FloatingPtLut::absEtaMin
float absEtaMin() const
Definition
TgcL0FloatingPtLut.h:70
bin
Definition
BinsDiffFromStripMedian.h:43
L0Muon
Definition
NSWTPBits.h:7
L0Muon::TgcL0FloatingThresholdCalibrationStatus
TgcL0FloatingThresholdCalibrationStatus
Definition
TgcL0FloatingPtLut.h:21
L0Muon::TgcL0FloatingThresholdCalibrationStatus::EtaNeighborFallback
@ EtaNeighborFallback
Definition
TgcL0FloatingPtLut.h:25
L0Muon::TgcL0FloatingThresholdCalibrationStatus::None
@ None
Definition
TgcL0FloatingPtLut.h:22
L0Muon::TgcL0FloatingThresholdCalibrationStatus::Provisional
@ Provisional
Definition
TgcL0FloatingPtLut.h:27
L0Muon::TgcL0FloatingThresholdCalibrationStatus::PhiMedianFallback
@ PhiMedianFallback
Definition
TgcL0FloatingPtLut.h:24
L0Muon::TgcL0FloatingThresholdCalibrationStatus::GlobalFallback
@ GlobalFallback
Definition
TgcL0FloatingPtLut.h:26
L0Muon::TgcL0FloatingThresholdCalibrationStatus::Direct
@ Direct
Definition
TgcL0FloatingPtLut.h:23
L0Muon::TgcL0FloatingPtResponseMode
TgcL0FloatingPtResponseMode
Definition
TgcL0FloatingPtLut.h:15
L0Muon::TgcL0FloatingPtResponseMode::FloatingMonotonicLut
@ FloatingMonotonicLut
Definition
TgcL0FloatingPtLut.h:18
L0Muon::TgcL0FloatingPtResponseMode::Linear
@ Linear
Definition
TgcL0FloatingPtLut.h:17
L0Muon::TgcL0FloatingPtResponseMode::Invalid
@ Invalid
Definition
TgcL0FloatingPtLut.h:16
error
Definition
IImpactPoint3dEstimator.h:72
L0Muon::TgcL0FloatingPtEvaluation
Definition
TgcL0FloatingPtLut.h:30
L0Muon::TgcL0FloatingPtEvaluation::chargeEstimateValid
bool chargeEstimateValid
Definition
TgcL0FloatingPtLut.h:40
L0Muon::TgcL0FloatingPtEvaluation::modelValid
bool modelValid
Definition
TgcL0FloatingPtLut.h:31
L0Muon::TgcL0FloatingPtEvaluation::thresholdCalibrationStatus
TgcL0FloatingThresholdCalibrationStatus thresholdCalibrationStatus
Definition
TgcL0FloatingPtLut.h:46
L0Muon::TgcL0FloatingPtEvaluation::estimatedPtValueIndex
std::uint8_t estimatedPtValueIndex
Definition
TgcL0FloatingPtLut.h:39
L0Muon::TgcL0FloatingPtEvaluation::ptEstimateValid
bool ptEstimateValid
Definition
TgcL0FloatingPtLut.h:32
L0Muon::TgcL0FloatingPtEvaluation::thresholdCutGeV
float thresholdCutGeV
Definition
TgcL0FloatingPtLut.h:43
L0Muon::TgcL0FloatingPtEvaluation::thresholdCode
std::uint8_t thresholdCode
Definition
TgcL0FloatingPtLut.h:42
L0Muon::TgcL0FloatingPtEvaluation::ptEstimateGeV
float ptEstimateGeV
Operational pT value, saturated to the downstream 8-bit range.
Definition
TgcL0FloatingPtLut.h:38
L0Muon::TgcL0FloatingPtEvaluation::responseMode
TgcL0FloatingPtResponseMode responseMode
Definition
TgcL0FloatingPtLut.h:44
L0Muon::TgcL0FloatingPtEvaluation::phiFoldBin
int phiFoldBin
Definition
TgcL0FloatingPtLut.h:34
L0Muon::TgcL0FloatingPtEvaluation::estimatedCharge
std::int8_t estimatedCharge
Definition
TgcL0FloatingPtLut.h:41
L0Muon::TgcL0FloatingPtEvaluation::etaBin
int etaBin
Definition
TgcL0FloatingPtLut.h:33
L0Muon::TgcL0FloatingPtEvaluation::rawPtEstimateGeV
float rawPtEstimateGeV
Unbounded floating-point estimate retained for diagnostics only.
Definition
TgcL0FloatingPtLut.h:36
L0Muon::TgcL0FloatingPtLut::Bin
Definition
TgcL0FloatingPtLut.h:82
L0Muon::TgcL0FloatingPtLut::Bin::knotCount
std::uint32_t knotCount
Definition
TgcL0FloatingPtLut.h:86
L0Muon::TgcL0FloatingPtLut::Bin::thresholdCutsGeV
std::array< float, 16 > thresholdCutsGeV
Definition
TgcL0FloatingPtLut.h:87
L0Muon::TgcL0FloatingPtLut::Bin::thresholdStatuses
std::array< TgcL0FloatingThresholdCalibrationStatus, 16 > thresholdStatuses
Definition
TgcL0FloatingPtLut.h:89
L0Muon::TgcL0FloatingPtLut::Bin::linearSlopeMagnitudeRadGeV
float linearSlopeMagnitudeRadGeV
Definition
TgcL0FloatingPtLut.h:83
L0Muon::TgcL0FloatingPtLut::Bin::knotOffset
std::uint32_t knotOffset
Definition
TgcL0FloatingPtLut.h:85
L0Muon::TgcL0FloatingPtLut::Bin::transitionPtGeV
float transitionPtGeV
Definition
TgcL0FloatingPtLut.h:84
L0Muon::TgcL0FloatingPtLut::Knot
Definition
TgcL0FloatingPtLut.h:77
L0Muon::TgcL0FloatingPtLut::Knot::inversePtGeVInv
float inversePtGeVInv
Definition
TgcL0FloatingPtLut.h:78
L0Muon::TgcL0FloatingPtLut::Knot::responseMagnitudeRad
float responseMagnitudeRad
Definition
TgcL0FloatingPtLut.h:79
Generated on
for ATLAS Offline Software by
1.17.0