ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
Muon
L1MuonS1TGCFloatingTools
src
FloatingPtLut.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 L1MUONS1TGCFLOATINGTOOLS_FLOATINGPTLUT_H
5
#define L1MUONS1TGCFLOATINGTOOLS_FLOATINGPTLUT_H
6
7
#include <array>
8
#include <cstdint>
9
#include <memory>
10
#include <string>
11
#include <vector>
12
13
namespace
L1Muon::L1TGC
{
14
15
enum class
FloatingPtResponseMode
: std::uint8_t {
16
Invalid
= 0,
17
Linear
= 1,
18
FloatingMonotonicLut
= 2
19
};
20
21
enum class
FloatingThresholdCalibrationStatus
: 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
FloatingPtEvaluation
{
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
FloatingPtResponseMode
responseMode
{
45
FloatingPtResponseMode::Invalid
};
46
FloatingThresholdCalibrationStatus
thresholdCalibrationStatus
{
47
FloatingThresholdCalibrationStatus::None
};
48
};
49
55
class
FloatingPtLut
{
56
public
:
57
static
constexpr
float
s_maxEncodedPtGeV
= 127.5F;
58
60
static
std::unique_ptr<FloatingPtLut>
loadAscii
(
61
const
std::string& calibrationPath, std::string&
error
);
62
63
FloatingPtEvaluation
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
FloatingPtLut
() =
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<FloatingThresholdCalibrationStatus, 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 L1Muon::L1TGC
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
L1Muon::L1TGC::FloatingPtLut::absEtaMin
float absEtaMin() const
Definition
FloatingPtLut.h:70
L1Muon::L1TGC::FloatingPtLut::m_version
std::string m_version
Definition
FloatingPtLut.h:98
L1Muon::L1TGC::FloatingPtLut::version
const std::string & version() const
Definition
FloatingPtLut.h:66
L1Muon::L1TGC::FloatingPtLut::s_maxEncodedPtGeV
static constexpr float s_maxEncodedPtGeV
Definition
FloatingPtLut.h:57
L1Muon::L1TGC::FloatingPtLut::invertFloatingResponse
bool invertFloatingResponse(const Bin &bin, float responseMagnitudeRad, float &inversePtGeVInv) const
Definition
FloatingPtLut.cxx:314
L1Muon::L1TGC::FloatingPtLut::knotCount
std::size_t knotCount() const
Definition
FloatingPtLut.h:69
L1Muon::L1TGC::FloatingPtLut::m_absEtaMax
float m_absEtaMax
Definition
FloatingPtLut.h:102
L1Muon::L1TGC::FloatingPtLut::evaluate
FloatingPtEvaluation evaluate(float eta, float phi, float signedDTheta) const
Definition
FloatingPtLut.cxx:358
L1Muon::L1TGC::FloatingPtLut::m_etaBins
unsigned int m_etaBins
Definition
FloatingPtLut.h:99
L1Muon::L1TGC::FloatingPtLut::isDevelopmentPayload
bool isDevelopmentPayload() const
Definition
FloatingPtLut.h:72
L1Muon::L1TGC::FloatingPtLut::FloatingPtLut
FloatingPtLut()=default
L1Muon::L1TGC::FloatingPtLut::etaBins
unsigned int etaBins() const
Definition
FloatingPtLut.h:67
L1Muon::L1TGC::FloatingPtLut::m_knots
std::vector< Knot > m_knots
Definition
FloatingPtLut.h:104
L1Muon::L1TGC::FloatingPtLut::m_isDevelopmentPayload
bool m_isDevelopmentPayload
Definition
FloatingPtLut.h:105
L1Muon::L1TGC::FloatingPtLut::etaBin
int etaBin(float eta) const
Definition
FloatingPtLut.cxx:282
L1Muon::L1TGC::FloatingPtLut::absEtaMax
float absEtaMax() const
Definition
FloatingPtLut.h:71
L1Muon::L1TGC::FloatingPtLut::loadAscii
static std::unique_ptr< FloatingPtLut > loadAscii(const std::string &calibrationPath, std::string &error)
Load the human-readable calibration payload.
Definition
FloatingPtLut.cxx:63
L1Muon::L1TGC::FloatingPtLut::findBin
const Bin * findBin(int etaBin, int phiFoldBin) const
Definition
FloatingPtLut.cxx:305
L1Muon::L1TGC::FloatingPtLut::phiBinsPerFold
unsigned int phiBinsPerFold() const
Definition
FloatingPtLut.h:68
L1Muon::L1TGC::FloatingPtLut::m_absEtaMin
float m_absEtaMin
Definition
FloatingPtLut.h:101
L1Muon::L1TGC::FloatingPtLut::m_bins
std::vector< Bin > m_bins
Definition
FloatingPtLut.h:103
L1Muon::L1TGC::FloatingPtLut::phiFoldBin
int phiFoldBin(float phi) const
Definition
FloatingPtLut.cxx:293
L1Muon::L1TGC::FloatingPtLut::m_phiBinsPerFold
unsigned int m_phiBinsPerFold
Definition
FloatingPtLut.h:100
bin
Definition
BinsDiffFromStripMedian.h:43
L1Muon::L1TGC
Definition
SectorLogicWordEncoder.cxx:21
L1Muon::L1TGC::FloatingThresholdCalibrationStatus
FloatingThresholdCalibrationStatus
Definition
FloatingPtLut.h:21
L1Muon::L1TGC::FloatingThresholdCalibrationStatus::EtaNeighborFallback
@ EtaNeighborFallback
Definition
FloatingPtLut.h:25
L1Muon::L1TGC::FloatingThresholdCalibrationStatus::None
@ None
Definition
FloatingPtLut.h:22
L1Muon::L1TGC::FloatingThresholdCalibrationStatus::Provisional
@ Provisional
Definition
FloatingPtLut.h:27
L1Muon::L1TGC::FloatingThresholdCalibrationStatus::PhiMedianFallback
@ PhiMedianFallback
Definition
FloatingPtLut.h:24
L1Muon::L1TGC::FloatingThresholdCalibrationStatus::GlobalFallback
@ GlobalFallback
Definition
FloatingPtLut.h:26
L1Muon::L1TGC::FloatingThresholdCalibrationStatus::Direct
@ Direct
Definition
FloatingPtLut.h:23
L1Muon::L1TGC::FloatingPtResponseMode
FloatingPtResponseMode
Definition
FloatingPtLut.h:15
L1Muon::L1TGC::FloatingPtResponseMode::FloatingMonotonicLut
@ FloatingMonotonicLut
Definition
FloatingPtLut.h:18
L1Muon::L1TGC::FloatingPtResponseMode::Linear
@ Linear
Definition
FloatingPtLut.h:17
L1Muon::L1TGC::FloatingPtResponseMode::Invalid
@ Invalid
Definition
FloatingPtLut.h:16
error
Definition
IImpactPoint3dEstimator.h:72
L1Muon::L1TGC::FloatingPtEvaluation
Definition
FloatingPtLut.h:30
L1Muon::L1TGC::FloatingPtEvaluation::phiFoldBin
int phiFoldBin
Definition
FloatingPtLut.h:34
L1Muon::L1TGC::FloatingPtEvaluation::rawPtEstimateGeV
float rawPtEstimateGeV
Unbounded floating-point estimate retained for diagnostics only.
Definition
FloatingPtLut.h:36
L1Muon::L1TGC::FloatingPtEvaluation::ptEstimateValid
bool ptEstimateValid
Definition
FloatingPtLut.h:32
L1Muon::L1TGC::FloatingPtEvaluation::chargeEstimateValid
bool chargeEstimateValid
Definition
FloatingPtLut.h:40
L1Muon::L1TGC::FloatingPtEvaluation::thresholdCutGeV
float thresholdCutGeV
Definition
FloatingPtLut.h:43
L1Muon::L1TGC::FloatingPtEvaluation::modelValid
bool modelValid
Definition
FloatingPtLut.h:31
L1Muon::L1TGC::FloatingPtEvaluation::etaBin
int etaBin
Definition
FloatingPtLut.h:33
L1Muon::L1TGC::FloatingPtEvaluation::thresholdCalibrationStatus
FloatingThresholdCalibrationStatus thresholdCalibrationStatus
Definition
FloatingPtLut.h:46
L1Muon::L1TGC::FloatingPtEvaluation::responseMode
FloatingPtResponseMode responseMode
Definition
FloatingPtLut.h:44
L1Muon::L1TGC::FloatingPtEvaluation::estimatedCharge
std::int8_t estimatedCharge
Definition
FloatingPtLut.h:41
L1Muon::L1TGC::FloatingPtEvaluation::thresholdCode
std::uint8_t thresholdCode
Definition
FloatingPtLut.h:42
L1Muon::L1TGC::FloatingPtEvaluation::estimatedPtValueIndex
std::uint8_t estimatedPtValueIndex
Definition
FloatingPtLut.h:39
L1Muon::L1TGC::FloatingPtEvaluation::ptEstimateGeV
float ptEstimateGeV
Operational pT value, saturated to the downstream 8-bit range.
Definition
FloatingPtLut.h:38
L1Muon::L1TGC::FloatingPtLut::Bin
Definition
FloatingPtLut.h:82
L1Muon::L1TGC::FloatingPtLut::Bin::thresholdStatuses
std::array< FloatingThresholdCalibrationStatus, 16 > thresholdStatuses
Definition
FloatingPtLut.h:89
L1Muon::L1TGC::FloatingPtLut::Bin::transitionPtGeV
float transitionPtGeV
Definition
FloatingPtLut.h:84
L1Muon::L1TGC::FloatingPtLut::Bin::knotCount
std::uint32_t knotCount
Definition
FloatingPtLut.h:86
L1Muon::L1TGC::FloatingPtLut::Bin::linearSlopeMagnitudeRadGeV
float linearSlopeMagnitudeRadGeV
Definition
FloatingPtLut.h:83
L1Muon::L1TGC::FloatingPtLut::Bin::knotOffset
std::uint32_t knotOffset
Definition
FloatingPtLut.h:85
L1Muon::L1TGC::FloatingPtLut::Bin::thresholdCutsGeV
std::array< float, 16 > thresholdCutsGeV
Definition
FloatingPtLut.h:87
L1Muon::L1TGC::FloatingPtLut::Knot
Definition
FloatingPtLut.h:77
L1Muon::L1TGC::FloatingPtLut::Knot::responseMagnitudeRad
float responseMagnitudeRad
Definition
FloatingPtLut.h:79
L1Muon::L1TGC::FloatingPtLut::Knot::inversePtGeVInv
float inversePtGeVInv
Definition
FloatingPtLut.h:78
Generated on
for ATLAS Offline Software by
1.17.0