ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::nsw::STGTPSegments Namespace Reference

Namespaces

namespace  moduleIDBits

Enumerations

enum class  MergedSegmentProperty {
  Monitor = fill_bitmask<uint32_t>(0, size_output_segment_monitor) , Spare = fill_bitmask<uint32_t>(max_bit(Monitor) + 1, size_output_segment_spare) , lowRes = fill_bitmask<uint32_t>(max_bit(Spare) + 1, size_output_segment_lowRes) , phiRes = fill_bitmask<uint32_t>(max_bit(lowRes) + 1 , size_output_segment_phiRes) ,
  dTheta = fill_bitmask<uint32_t>(max_bit(phiRes)+ 1, size_output_segment_dTheta) , phiID = fill_bitmask<uint32_t>(max_bit(dTheta)+1 , size_output_segment_phiID) , rIndex = fill_bitmask<uint32_t>(max_bit(phiID)+1, size_output_segment_rIndex)
}
enum class  ModuleIDProperty { stationID = fill_bitmask<uint32_t>(0, moduleIDBits::stationID) , detectorSite = fill_bitmask<uint32_t>(max_bit(stationID) +1, moduleIDBits::detectorSite) , stationEta = fill_bitmask<uint32_t>(max_bit(detectorSite) + 1, moduleIDBits::stationEta) , stationPhi = fill_bitmask<uint32_t>(max_bit(stationEta) + 1, moduleIDBits::stationPhi) }

Functions

constexpr uint32_t getSegmentProperty (const uint32_t mask, const MergedSegmentProperty prop)
constexpr void encodeSegmentProperty (const MergedSegmentProperty prop, const uint32_t word, uint32_t &buffer)
constexpr uint32_t getIdentifierProperty (const uint32_t mask, const ModuleIDProperty prop)
constexpr void encodeIdentifierProperty (const ModuleIDProperty prop, const uint32_t word, uint32_t &buffer)

Variables

constexpr std::size_t num_segments = 8
constexpr int merge_stream_header = 0xAEE0
constexpr int n_words = 32
constexpr int size_lut_choice_selection = 24
constexpr int size_nsw_segment_selector = 12
constexpr int size_valid_segment_selector = 12
constexpr int size_output_segment_monitor = 1
constexpr int size_output_segment_spare = 2
constexpr int size_output_segment_lowRes = 1
constexpr int size_output_segment_phiRes = 1
constexpr int size_output_segment_dTheta = 5
constexpr int size_output_segment_phiID = 6
constexpr int size_output_segment_rIndex = 8
constexpr int size_bcid = 12
constexpr int size_sectorID = 4
constexpr int size_v3_padding = 28
constexpr std::size_t size_v1 = 256
constexpr std::size_t size_v2 = 256
constexpr std::size_t size_v3 = 256
constexpr std::size_t size_valid_segment_v3 = 8
constexpr int merge_stream_invalid_dTheta = 16

Enumeration Type Documentation

◆ MergedSegmentProperty

Enumerator
Monitor 
Spare 
lowRes 
phiRes 
dTheta 
phiID 
rIndex 

Definition at line 126 of file NSWSTGTPDecodeBitmaps.h.

126 {
127 Monitor = fill_bitmask<uint32_t>(0, size_output_segment_monitor),
128 Spare = fill_bitmask<uint32_t>(max_bit(Monitor) + 1, size_output_segment_spare),
129 lowRes = fill_bitmask<uint32_t>(max_bit(Spare) + 1, size_output_segment_lowRes),
130 phiRes = fill_bitmask<uint32_t>(max_bit(lowRes) + 1 , size_output_segment_phiRes),
131 dTheta = fill_bitmask<uint32_t>(max_bit(phiRes)+ 1, size_output_segment_dTheta),
132 phiID = fill_bitmask<uint32_t>(max_bit(dTheta)+1 , size_output_segment_phiID),
133 rIndex = fill_bitmask<uint32_t>(max_bit(phiID)+1, size_output_segment_rIndex)
134 };
constexpr int8_t max_bit(const T number)
Returns the most left hand bit which is set in a number.

◆ ModuleIDProperty

Enumerator
stationID 
detectorSite 
stationEta 
stationPhi 

Definition at line 163 of file NSWSTGTPDecodeBitmaps.h.

163 {
164 stationID = fill_bitmask<uint32_t>(0, moduleIDBits::stationID),
165 detectorSite = fill_bitmask<uint32_t>(max_bit(stationID) +1, moduleIDBits::detectorSite),
166 stationEta = fill_bitmask<uint32_t>(max_bit(detectorSite) + 1, moduleIDBits::stationEta),
167 stationPhi = fill_bitmask<uint32_t>(max_bit(stationEta) + 1, moduleIDBits::stationPhi),
168 };
constexpr uint8_t detectorSite
Side 0 for A / 1 for C.
constexpr uint8_t stationID
Large or Small wedge.
constexpr uint8_t stationPhi
station Phi 1 to 8

Function Documentation

◆ encodeIdentifierProperty()

void Muon::nsw::STGTPSegments::encodeIdentifierProperty ( const ModuleIDProperty prop,
const uint32_t word,
uint32_t & buffer )
constexpr

Definition at line 177 of file NSWSTGTPDecodeBitmaps.h.

177 {
178 const auto shift = min_bit(static_cast<uint32_t>(prop));
179 if (shift < 0) {
180 throw std::runtime_error("bitshift is negative in NSWSTGTPDecodeBitmaps encodeIdentifierProperty");
181 }
182 uint32_t shifted_word = (word << shift);
183 buffer = (buffer) | (shifted_word & static_cast<uint32_t>(prop));
184 }
constexpr int8_t min_bit(const T number)
Returns the most right hand bit which is set in a number.

◆ encodeSegmentProperty()

void Muon::nsw::STGTPSegments::encodeSegmentProperty ( const MergedSegmentProperty prop,
const uint32_t word,
uint32_t & buffer )
constexpr

Definition at line 144 of file NSWSTGTPDecodeBitmaps.h.

144 {
145 const auto shift = min_bit(static_cast<uint32_t>(prop));
146 if (shift < 0) {
147 throw std::runtime_error("bitshift is negative in NSWSTGTPDecodeBitmaps encodeSegmentProperty");
148 }
149 uint32_t shifted_word = (word << shift);
150 buffer = (buffer) | (shifted_word & static_cast<uint32_t>(prop));
151 }

◆ getIdentifierProperty()

uint32_t Muon::nsw::STGTPSegments::getIdentifierProperty ( const uint32_t mask,
const ModuleIDProperty prop )
constexpr

Definition at line 169 of file NSWSTGTPDecodeBitmaps.h.

169 {
170 const auto shift = min_bit(static_cast<uint32_t>(prop));
171 if (shift < 0) {
172 throw std::runtime_error("bitshift is negative in NSWSTGTPDecodeBitmaps getIdentifierProperty");
173 }
174 return (mask & static_cast<uint32_t>(prop)) >> shift;
175
176 }

◆ getSegmentProperty()

uint32_t Muon::nsw::STGTPSegments::getSegmentProperty ( const uint32_t mask,
const MergedSegmentProperty prop )
constexpr

Definition at line 136 of file NSWSTGTPDecodeBitmaps.h.

136 {
137 const auto shift = min_bit(static_cast<uint32_t>(prop));
138 if (shift < 0) {
139 throw std::runtime_error("bitshift is negative in NSWSTGTPDecodeBitmaps getSegmentProperty");
140 }
141 return (mask & static_cast<uint32_t>(prop) ) >> shift;
142 }

Variable Documentation

◆ merge_stream_header

int Muon::nsw::STGTPSegments::merge_stream_header = 0xAEE0
constexpr

Definition at line 103 of file NSWSTGTPDecodeBitmaps.h.

◆ merge_stream_invalid_dTheta

int Muon::nsw::STGTPSegments::merge_stream_invalid_dTheta = 16
constexpr

Definition at line 124 of file NSWSTGTPDecodeBitmaps.h.

◆ n_words

int Muon::nsw::STGTPSegments::n_words = 32
constexpr

Definition at line 104 of file NSWSTGTPDecodeBitmaps.h.

◆ num_segments

std::size_t Muon::nsw::STGTPSegments::num_segments = 8
constexpr

Definition at line 101 of file NSWSTGTPDecodeBitmaps.h.

◆ size_bcid

int Muon::nsw::STGTPSegments::size_bcid = 12
constexpr

Definition at line 117 of file NSWSTGTPDecodeBitmaps.h.

◆ size_lut_choice_selection

int Muon::nsw::STGTPSegments::size_lut_choice_selection = 24
constexpr

Definition at line 105 of file NSWSTGTPDecodeBitmaps.h.

◆ size_nsw_segment_selector

int Muon::nsw::STGTPSegments::size_nsw_segment_selector = 12
constexpr

Definition at line 106 of file NSWSTGTPDecodeBitmaps.h.

◆ size_output_segment_dTheta

int Muon::nsw::STGTPSegments::size_output_segment_dTheta = 5
constexpr

Definition at line 113 of file NSWSTGTPDecodeBitmaps.h.

◆ size_output_segment_lowRes

int Muon::nsw::STGTPSegments::size_output_segment_lowRes = 1
constexpr

Definition at line 111 of file NSWSTGTPDecodeBitmaps.h.

◆ size_output_segment_monitor

int Muon::nsw::STGTPSegments::size_output_segment_monitor = 1
constexpr

Definition at line 109 of file NSWSTGTPDecodeBitmaps.h.

◆ size_output_segment_phiID

int Muon::nsw::STGTPSegments::size_output_segment_phiID = 6
constexpr

Definition at line 114 of file NSWSTGTPDecodeBitmaps.h.

◆ size_output_segment_phiRes

int Muon::nsw::STGTPSegments::size_output_segment_phiRes = 1
constexpr

Definition at line 112 of file NSWSTGTPDecodeBitmaps.h.

◆ size_output_segment_rIndex

int Muon::nsw::STGTPSegments::size_output_segment_rIndex = 8
constexpr

Definition at line 115 of file NSWSTGTPDecodeBitmaps.h.

◆ size_output_segment_spare

int Muon::nsw::STGTPSegments::size_output_segment_spare = 2
constexpr

Definition at line 110 of file NSWSTGTPDecodeBitmaps.h.

◆ size_sectorID

int Muon::nsw::STGTPSegments::size_sectorID = 4
constexpr

Definition at line 118 of file NSWSTGTPDecodeBitmaps.h.

◆ size_v1

std::size_t Muon::nsw::STGTPSegments::size_v1 = 256
constexpr

Definition at line 120 of file NSWSTGTPDecodeBitmaps.h.

◆ size_v2

std::size_t Muon::nsw::STGTPSegments::size_v2 = 256
constexpr

Definition at line 121 of file NSWSTGTPDecodeBitmaps.h.

◆ size_v3

std::size_t Muon::nsw::STGTPSegments::size_v3 = 256
constexpr

Definition at line 122 of file NSWSTGTPDecodeBitmaps.h.

◆ size_v3_padding

int Muon::nsw::STGTPSegments::size_v3_padding = 28
constexpr

Definition at line 119 of file NSWSTGTPDecodeBitmaps.h.

◆ size_valid_segment_selector

int Muon::nsw::STGTPSegments::size_valid_segment_selector = 12
constexpr

Definition at line 107 of file NSWSTGTPDecodeBitmaps.h.

◆ size_valid_segment_v3

std::size_t Muon::nsw::STGTPSegments::size_valid_segment_v3 = 8
constexpr

Definition at line 123 of file NSWSTGTPDecodeBitmaps.h.