ATLAS Offline Software
Loading...
Searching...
No Matches
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
13namespace L0Muon {
14
15enum class TgcL0FloatingPtResponseMode : std::uint8_t {
17 Linear = 1,
19};
20
29
49
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
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; }
73
74 private:
75 TgcL0FloatingPtLut() = default;
76
77 struct Knot {
78 float inversePtGeVInv{0.F};
80 };
81
82 struct Bin {
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>
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{};
106};
107
108} // namespace L0Muon
109
110#endif
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
@ None
static std::unique_ptr< TgcL0FloatingPtLut > loadAscii(const std::string &calibrationPath, std::string &error)
Load the human-readable calibration payload.
const Bin * findBin(int etaBin, int phiFoldBin) const
const std::string & version() const
static constexpr float s_maxEncodedPtGeV
TgcL0FloatingPtEvaluation evaluate(float eta, float phi, float signedDTheta) const
unsigned int etaBins() const
bool invertFloatingResponse(const Bin &bin, float responseMagnitudeRad, float &inversePtGeVInv) const
std::size_t knotCount() const
unsigned int phiBinsPerFold() const
TgcL0FloatingThresholdCalibrationStatus
TgcL0FloatingThresholdCalibrationStatus thresholdCalibrationStatus
float ptEstimateGeV
Operational pT value, saturated to the downstream 8-bit range.
TgcL0FloatingPtResponseMode responseMode
float rawPtEstimateGeV
Unbounded floating-point estimate retained for diagnostics only.
std::array< float, 16 > thresholdCutsGeV
std::array< TgcL0FloatingThresholdCalibrationStatus, 16 > thresholdStatuses