ATLAS Offline Software
STGTPPackets.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONNSWCOMMONDECODE_STGTPPACKETS_H
5 #define MUONNSWCOMMONDECODE_STGTPPACKETS_H
6 
7 #include <array>
8 #include <cstddef>
9 #include <cstdint>
10 #include <exception>
11 #include <vector>
12 
14 
15 namespace Muon::nsw {
16 
17 
19  public:
20 
21  struct MMSegmentData {
29  };
30 
31  explicit STGTPMMPacket(const std::vector<std::uint32_t>& payload, const int ver);
32  virtual ~STGTPMMPacket() = default;
33  size_t Size(const int ver);
34 
35  [[nodiscard]] const std::array<MMSegmentData, STGTPMMData::num_mm>& Segments() const { return m_segmentData; }
36  [[nodiscard]] const MMSegmentData& Segment(std::size_t segment) const;
37 
38  [[nodiscard]] std::uint32_t BCID() const { return m_BCID; };
39 
40  private:
41  std::array<MMSegmentData, STGTPMMData::num_mm> m_segmentData{};
44 };
45 
47  public:
48  explicit STGTPPadPacket(const std::vector<std::uint32_t>& payload, const int ver);
49  virtual ~STGTPPadPacket() = default;
50  [[nodiscard]] std::uint32_t BCID() const { return m_BCID; };
51  [[nodiscard]] std::uint32_t BandID(const std::size_t num) const { return m_bandIDs.at(num); };
52  [[nodiscard]] std::uint32_t PhiID(const std::size_t num) const { return m_phiIDs.at(num); };
53  [[nodiscard]] std::uint32_t PadIdleFlag() const { return m_idleFlag; };
54  [[nodiscard]] std::uint32_t CoincidenceWedge() const { return m_coincWedge; };
55 
56  private:
58  std::array<std::uint32_t, STGTPPad::num_pads> m_bandIDs{};
59  std::array<std::uint32_t, STGTPPad::num_pads> m_phiIDs{};
62  size_t Size(const int version);
63 
64 };
65 
67  public:
68  struct SegmentData {
76  };
77 
78  explicit STGTPSegmentPacket(const std::vector<std::uint32_t>& payload, const int ver);
79 
80  virtual ~STGTPSegmentPacket() = default;
81  [[nodiscard]] std::uint32_t LUT_ChoiceSelection() const { return m_lut_choice; }
82  [[nodiscard]] std::uint32_t NSW_SegmentSelector() const { return m_nsw_segment_selector; }
84 
85  [[nodiscard]] const std::array<SegmentData, STGTPSegments::num_segments>& Segments() const { return m_segmentData; }
86  [[nodiscard]] const SegmentData& Segment(std::size_t segment) const;
87 
88  [[nodiscard]] std::uint32_t BCID() const { return m_BCID; };
89  [[nodiscard]] std::uint32_t SectorID() const { return m_sectorID; }
90 
91  private:
95 
96  std::array<SegmentData, STGTPSegments::num_segments> m_segmentData{};
97 
100  size_t Size(const int ver);
101 };
102 
103 } // namespace Muon::nsw
104 
105 #endif // MUONNSWCOMMONDECODE_STGTPPACKETS_H
Muon::nsw::STGTPPadPacket::STGTPPadPacket
STGTPPadPacket(const std::vector< std::uint32_t > &payload, const int ver)
Definition: STGTPPackets.cxx:115
Muon::nsw::STGTPPadPacket::m_coincWedge
std::uint32_t m_coincWedge
Definition: STGTPPackets.h:61
Muon::nsw::STGTPMMPacket::MMSegmentData::dTheta
std::uint32_t dTheta
Definition: STGTPPackets.h:26
Muon::nsw::STGTPPadPacket::BCID
std::uint32_t BCID() const
Definition: STGTPPackets.h:50
Muon::nsw::STGTPMMPacket::Segment
const MMSegmentData & Segment(std::size_t segment) const
Definition: STGTPPackets.cxx:87
Muon::nsw::STGTPMMPacket::~STGTPMMPacket
virtual ~STGTPMMPacket()=default
Muon::nsw::STGTPMMPacket::MMSegmentData::spare
std::uint32_t spare
Definition: STGTPPackets.h:23
Muon::nsw::STGTPMMPacket::MMSegmentData::rIndex
std::uint32_t rIndex
Definition: STGTPPackets.h:28
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
Muon::nsw::STGTPSegmentPacket::SegmentData::dTheta
std::uint32_t dTheta
Definition: STGTPPackets.h:73
Muon::nsw::STGTPPadPacket::~STGTPPadPacket
virtual ~STGTPPadPacket()=default
Muon::nsw::STGTPPadPacket::m_idleFlag
std::uint32_t m_idleFlag
Definition: STGTPPackets.h:60
Muon::nsw::STGTPSegmentPacket::m_lut_choice
std::uint32_t m_lut_choice
Definition: STGTPPackets.h:92
Muon::nsw::STGTPSegmentPacket::SectorID
std::uint32_t SectorID() const
Definition: STGTPPackets.h:89
NSWSTGTPDecodeBitmaps.h
Muon::nsw::STGTPMMPacket::m_valids
std::uint32_t m_valids
Definition: STGTPPackets.h:43
Muon::nsw::STGTPSegmentPacket::m_BCID
std::uint32_t m_BCID
Definition: STGTPPackets.h:98
Pythia8_A14_NNPDF23LO_Var1Down_Common.ver
ver
Definition: Pythia8_A14_NNPDF23LO_Var1Down_Common.py:26
Muon::nsw::STGTPSegmentPacket::m_valid_segment_selector
std::uint32_t m_valid_segment_selector
Definition: STGTPPackets.h:94
Muon::nsw::STGTPMMPacket::BCID
std::uint32_t BCID() const
Definition: STGTPPackets.h:38
Muon::nsw::STGTPSegmentPacket::ValidSegmentSelector
std::uint32_t ValidSegmentSelector() const
Definition: STGTPPackets.h:83
Muon::nsw::STGTPPadPacket::m_phiIDs
std::array< std::uint32_t, STGTPPad::num_pads > m_phiIDs
Definition: STGTPPackets.h:59
Muon::nsw::STGTPPadPacket::BandID
std::uint32_t BandID(const std::size_t num) const
Definition: STGTPPackets.h:51
Muon::SegmentData
Definition: MuonHoughPatternFinderTool.cxx:32
Muon::nsw::STGTPPadPacket::CoincidenceWedge
std::uint32_t CoincidenceWedge() const
Definition: STGTPPackets.h:54
Muon::nsw::STGTPSegmentPacket::BCID
std::uint32_t BCID() const
Definition: STGTPPackets.h:88
Muon::nsw::STGTPMMPacket::Segments
const std::array< MMSegmentData, STGTPMMData::num_mm > & Segments() const
Definition: STGTPPackets.h:35
Muon::nsw::STGTPMMPacket::MMSegmentData
Definition: STGTPPackets.h:21
Muon::nsw::STGTPSegmentPacket::m_segmentData
std::array< SegmentData, STGTPSegments::num_segments > m_segmentData
Definition: STGTPPackets.h:96
Muon::nsw::STGTPSegmentPacket::NSW_SegmentSelector
std::uint32_t NSW_SegmentSelector() const
Definition: STGTPPackets.h:82
Muon::nsw::STGTPSegmentPacket::Segments
const std::array< SegmentData, STGTPSegments::num_segments > & Segments() const
Definition: STGTPPackets.h:85
Muon::nsw
Definition: MapperMMG.h:13
Muon::nsw::STGTPPadPacket::m_bandIDs
std::array< std::uint32_t, STGTPPad::num_pads > m_bandIDs
Definition: STGTPPackets.h:58
Muon::nsw::STGTPSegmentPacket::Segment
const SegmentData & Segment(std::size_t segment) const
Definition: STGTPPackets.cxx:216
Muon::nsw::STGTPMMPacket
Definition: STGTPPackets.h:18
Muon::nsw::STGTPSegmentPacket::SegmentData::phiRes
std::uint32_t phiRes
Definition: STGTPPackets.h:72
Muon::nsw::STGTPMMPacket::Size
size_t Size(const int ver)
Definition: STGTPPackets.cxx:19
Muon::nsw::STGTPSegmentPacket::~STGTPSegmentPacket
virtual ~STGTPSegmentPacket()=default
Muon::nsw::STGTPPadPacket::PadIdleFlag
std::uint32_t PadIdleFlag() const
Definition: STGTPPackets.h:53
Muon::nsw::STGTPSegmentPacket::m_nsw_segment_selector
std::uint32_t m_nsw_segment_selector
Definition: STGTPPackets.h:93
Muon::nsw::STGTPMMPacket::MMSegmentData::lowRes
std::uint32_t lowRes
Definition: STGTPPackets.h:24
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
Muon::nsw::STGTPSegmentPacket::SegmentData::monitor
std::uint32_t monitor
Definition: STGTPPackets.h:69
Muon::nsw::STGTPSegmentPacket::SegmentData::lowRes
std::uint32_t lowRes
Definition: STGTPPackets.h:71
Muon::nsw::STGTPMMPacket::MMSegmentData::monitor
std::uint32_t monitor
Definition: STGTPPackets.h:22
Muon::nsw::STGTPSegmentPacket::m_sectorID
std::uint32_t m_sectorID
Definition: STGTPPackets.h:99
Muon::nsw::STGTPMMPacket::STGTPMMPacket
STGTPMMPacket(const std::vector< std::uint32_t > &payload, const int ver)
Definition: STGTPPackets.cxx:38
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
Muon::nsw::STGTPPadPacket::m_BCID
std::uint32_t m_BCID
Definition: STGTPPackets.h:57
Muon::nsw::STGTPSegmentPacket::SegmentData::spare
std::uint32_t spare
Definition: STGTPPackets.h:70
get_generator_info.version
version
Definition: get_generator_info.py:33
Muon::nsw::STGTPMMPacket::MMSegmentData::phiRes
std::uint32_t phiRes
Definition: STGTPPackets.h:25
Muon::nsw::STGTPPadPacket::PhiID
std::uint32_t PhiID(const std::size_t num) const
Definition: STGTPPackets.h:52
Muon::nsw::STGTPMMPacket::m_BCID
std::uint32_t m_BCID
Definition: STGTPPackets.h:42
Muon::nsw::STGTPPadPacket::Size
size_t Size(const int version)
Definition: STGTPPackets.cxx:96
Muon::nsw::STGTPSegmentPacket::LUT_ChoiceSelection
std::uint32_t LUT_ChoiceSelection() const
Definition: STGTPPackets.h:81
Muon::nsw::STGTPSegmentPacket::SegmentData::rIndex
std::uint32_t rIndex
Definition: STGTPPackets.h:75
Muon::nsw::STGTPSegmentPacket::STGTPSegmentPacket
STGTPSegmentPacket(const std::vector< std::uint32_t > &payload, const int ver)
Definition: STGTPPackets.cxx:169
Muon::nsw::STGTPSegmentPacket::SegmentData
Definition: STGTPPackets.h:68
Muon::nsw::STGTPPadPacket
Definition: STGTPPackets.h:46
Muon::nsw::STGTPSegmentPacket::SegmentData::phiID
std::uint32_t phiID
Definition: STGTPPackets.h:74
Muon::nsw::STGTPSegmentPacket::Size
size_t Size(const int ver)
Definition: STGTPPackets.cxx:149
Muon::nsw::STGTPMMPacket::MMSegmentData::phiID
std::uint32_t phiID
Definition: STGTPPackets.h:27
Muon::nsw::STGTPSegmentPacket
Definition: STGTPPackets.h:66
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
Muon::nsw::STGTPMMPacket::m_segmentData
std::array< MMSegmentData, STGTPMMData::num_mm > m_segmentData
Definition: STGTPPackets.h:41