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

Namespaces

namespace  Constants
namespace  helper
namespace  MMART
namespace  MMTPL1A
namespace  MMTPMON
namespace  MMTRIG
namespace  STGTPL1A
namespace  STGTPMMData
namespace  STGTPPad
namespace  STGTPSegments
namespace  STGTPStrips

Classes

class  MapperMMG
class  MapperSTG
class  MMARTPacket
class  MMTrigPacket
class  NSWCommonDecoder
class  NSWPadTriggerL1a
class  NSWResourceId
class  NSWTriggerCommonDecoder
class  NSWTriggerException
class  STGTPMMPacket
class  STGTPPadPacket
class  STGTPSegmentPacket
class  STGTPStripPacket
class  VMMChannel

Enumerations

enum  EMaskRawData {
  eMaskFlxLENGTH = 0x0000ffff , eMaskFlxSTATUS = 0xffff0000 , eMaskFlxELINKID = 0xffffffff , eMaskSRocNullL1ID = 0x00ff0000 ,
  eMaskSRocNullID = 0x3f000000 , eMaskSRocL1ID = 0x0000ffff , eMaskSRocBCID = 0x0fff0000 , eMaskSRocORBIT = 0x30000000 ,
  eMaskSRocNULL = 0x40000000 , eMaskSRocNOTDC = 0x80000000 , eMaskVmmHitTDC = 0x000000ff , eMaskVmmHitADC = 0x0003ff00 ,
  eMaskVmmHitCHANNEL = 0x00fc0000 , eMaskVmmHitVMMID = 0x07000000 , eMaskVmmHitRELBCID = 0x38000000 , eMaskVmmHitN = 0x40000000 ,
  eMaskVmmHitP = 0x80000000 , eMaskTrailCHECKSUM = 0x000000ff , eMaskTrailLENGTH = 0x0003ff00 , eMaskTrailL0ID = 0x003c0000 ,
  eMaskTrailFLAGMISS = 0x3fc00000 , eMaskTrailTO = 0x40000000 , eMaskTrailEXTENDED = 0x80000000
}
enum  BitMaskRawData {
  bitMaskFlxLENGTH = 0xffff , bitMaskFlxSTATUS = 0xffff , bitMaskFlxELINKID = 0xffffffff , bitMaskSRocNullL1ID = 0xff ,
  bitMaskSRocNullID = 0x3f , bitMaskSRocL1ID = 0xffff , bitMaskSRocBCID = 0xfff , bitMaskSRocORBIT = 0x3 ,
  bitMaskSRocNULL = 0x1 , bitMaskSRocNOTDC = 0x1 , bitMaskVmmHitTDC = 0xff , bitMaskVmmHitADC = 0x3ff ,
  bitMaskVmmHitCHANNEL = 0x3f , bitMaskVmmHitVMMID = 0x7 , bitMaskVmmHitRELBCID = 0x7 , bitMaskVmmHitN = 0x1 ,
  bitMaskVmmHitP = 0x1 , bitMaskTrailCHECKSUM = 0xff , bitMaskTrailLENGTH = 0x3ff , bitMaskTrailL0ID = 0xf ,
  bitMaskTrailFLAGMISS = 0xff , bitMaskTrailTO = 0x1 , bitMaskTrailEXTENDED = 0x1
}
enum  BitPosRawData {
  bitPosFlxLENGTH = 0 , bitPosFlxSTATUS = 16 , bitPosFlxELINKID = 0 , bitPosSRocNullL1ID = 16 ,
  bitPosSRocNullID = 24 , bitPosSRocL1ID = 0 , bitPosSRocBCID = 16 , bitPosSRocORBIT = 28 ,
  bitPosSRocNULL = 30 , bitPosSRocNOTDC = 31 , bitPosVmmHitTDC = 0 , bitPosVmmHitADC = 8 ,
  bitPosVmmHitCHANNEL = 18 , bitPosVmmHitVMMID = 24 , bitPosVmmHitRELBCID = 27 , bitPosVmmHitN = 30 ,
  bitPosVmmHitP = 31 , bitPosTrailCHECKSUM = 0 , bitPosTrailLENGTH = 8 , bitPosTrailL0ID = 18 ,
  bitPosTrailFLAGMISS = 22 , bitPosTrailTO = 30 , bitPosTrailEXTENDED = 31
}
enum  EMaskDetectorResource {
  eMaskElink = 0x00000007 , eMaskRadius = 0x00000078 , eMaskLayer = 0x00000380 , eMaskSector = 0x00003c00 ,
  eMaskResType = 0x0001c000 , eMaskDataType = 0x000e0000 , eMaskRESERVED = 0x00100000 , eMaskVersion = 0x00e00000 ,
  eMaskDetId = 0xff000000 , eMaskObsEta = 0x00004000 , eMaskObsResType = 0x00078000 , eMaskObsTech = 0x00080000 ,
  eMaskObsDataType = 0x00700000
}
enum  BitMaskDetectorResource {
  bitMaskElink = 0x7 , bitMaskRadius = 0xf , bitMaskLayer = 0x7 , bitMaskSector = 0xf ,
  bitMaskResType = 0x7 , bitMaskDataType = 0x7 , bitMaskRESERVED = 0x1 , bitMaskVersion = 0x7 ,
  bitMaskDetId = 0xff , bitMaskObsEta = 0x1 , bitMaskObsResType = 0xf , bitMaskObsTech = 0x1 ,
  bitMaskObsDataType = 0x7
}
enum  BitPosDetectorResource {
  bitPosElink = 0 , bitPosRadius = 3 , bitPosLayer = 7 , bitPosSector = 10 ,
  bitPosResType = 14 , bitPosDataType = 17 , bitPosRESERVED = 20 , bitPosVersion = 21 ,
  bitPosDetId = 24 , bitPosObsEta = 14 , bitPosObsResType = 15 , bitPosObsTech = 19 ,
  bitPosObsDataType = 20
}
enum  channel_type { OFFLINE_CHANNEL_TYPE_PAD = 0 , OFFLINE_CHANNEL_TYPE_STRIP = 1 , OFFLINE_CHANNEL_TYPE_WIRE = 2 }
enum  vmm_channels { VMM_per_MMFE8 = 8 , VMM_per_sFEB = 3 , VMM_per_pFEB = 3 , VMM_channels = 64 }
enum  NSWResourceTypes {
  NSW_RESOURCE_PAD = 0 , NSW_RESOURCE_STRIP = 1 , NSW_RESOURCE_TRIG_PROC = 2 , NSW_RESOURCE_PAD_TRIG = 3 ,
  NSW_RESOURCE_L1DDC = 4 , NSW_RESOURCE_ADDC = 5 , NSW_RESOURCE_ROUTER = 6 , NSW_RESOURCE_RIM_L1DDC = 7
}
enum  NSWDataTypes {
  NSW_DATA_L1A = 0 , NSW_DATA_MONITOR = 1 , NSW_DATA_TO_SCA = 2 , NSW_DATA_FROM_SCA = 3 ,
  NSW_DATA_TTC = 4 , NSW_DATA_L1A_INFO = 5 , NSW_DATA_EXT = 6 , NSW_DATA_EXC = 7
}
enum  NSWTriggerExceptions {
  not_assigned = -999 , unknown = -1 , incomplete = 0 , too_short = 1 ,
  flx_status = 2 , flx_short = 3 , mmmon_inv_id = 4 , mml1a_inv_id = 5 ,
  mml1a_art_sz = 6 , mml1a_trg_sz = 7
}

Functions

 ERS_DECLARE_ISSUE_BASE (MuonNSWCommonDecoder, NSWElinkFelixHeaderException, MuonNSWCommonDecoder::NSWElinkException, ""<< name,,((std::string) name)) ERS_DECLARE_ISSUE_BASE(MuonNSWCommonDecoder
template<typename T>
std::string format (const std::string &str, const T &arg)
template<typename T, typename... Args>
std::string format (const std::string &str, const T &arg, const Args &... args)
template<typename Target, typename Source>
Target bit_slice (const std::span< const Source > words, const std::size_t start, const std::size_t end)
 Decode bits from data of words.
template<typename Target, typename Source>
constexpr Target decode_and_advance (const std::span< const Source > words, std::size_t &start, const std::size_t size)
 Decode bits from data of words and advance the read pointer.
template<typename Target, typename Source>
constexpr Target decode_at_loc (const std::span< const Source > words, std::size_t &start, const int offset, const std::size_t size)
 Decode bits from data of words at read pointer + offset and NOT advance the read pointer.
template<class T>
constexpr int8_t max_bit (const T number)
 Returns the most left hand bit which is set in a number.
template<class T>
constexpr int8_t min_bit (const T number)
 Returns the most right hand bit which is set in a number.
template<class Out>
constexpr Out fill_bitmask (const uint8_t first_bit, const uint8_t num_bits)
uint16_t get_16bxor_crc (const uint32_t *dataPointer, uint32_t dataSize)

Variables

static const std::map< uint16_t, std::vector< std::vector< uint8_t > > > s_stgc_channel_map
static const std::map< uint16_t, std::pair< uint16_t, uint16_t > > s_stgc_pad_grid
 NSWElinkROCHeaderException

Enumeration Type Documentation

◆ BitMaskDetectorResource

Enumerator
bitMaskElink 
bitMaskRadius 
bitMaskLayer 
bitMaskSector 
bitMaskResType 
bitMaskDataType 
bitMaskRESERVED 
bitMaskVersion 
bitMaskDetId 
bitMaskObsEta 
bitMaskObsResType 
bitMaskObsTech 
bitMaskObsDataType 

Definition at line 133 of file NSWDecodeBitmaps.h.

134 {
135 bitMaskElink = 0x7,
136 bitMaskRadius = 0xf,
137 bitMaskLayer = 0x7,
138 bitMaskSector = 0xf,
139 bitMaskResType = 0x7,
140 bitMaskDataType = 0x7,
141 bitMaskRESERVED = 0x1,
142 bitMaskVersion = 0x7,
143 bitMaskDetId = 0xff,
144
145 // For pre-versioned format used during commissioning
146
147 bitMaskObsEta = 0x1,
148 bitMaskObsResType = 0xf,
149 bitMaskObsTech = 0x1,
151 };

◆ BitMaskRawData

Enumerator
bitMaskFlxLENGTH 
bitMaskFlxSTATUS 
bitMaskFlxELINKID 
bitMaskSRocNullL1ID 
bitMaskSRocNullID 
bitMaskSRocL1ID 
bitMaskSRocBCID 
bitMaskSRocORBIT 
bitMaskSRocNULL 
bitMaskSRocNOTDC 
bitMaskVmmHitTDC 
bitMaskVmmHitADC 
bitMaskVmmHitCHANNEL 
bitMaskVmmHitVMMID 
bitMaskVmmHitRELBCID 
bitMaskVmmHitN 
bitMaskVmmHitP 
bitMaskTrailCHECKSUM 
bitMaskTrailLENGTH 
bitMaskTrailL0ID 
bitMaskTrailFLAGMISS 
bitMaskTrailTO 
bitMaskTrailEXTENDED 

Definition at line 45 of file NSWDecodeBitmaps.h.

46 {
47 // Felix Header (2 words)
48 bitMaskFlxLENGTH = 0xffff,
49 bitMaskFlxSTATUS = 0xffff,
50 bitMaskFlxELINKID = 0xffffffff,
51
52 // sROC Header (1 word)
54 bitMaskSRocNullID = 0x3f,
55 bitMaskSRocL1ID = 0xffff,
56 bitMaskSRocBCID = 0xfff,
57 bitMaskSRocORBIT = 0x3,
58 bitMaskSRocNULL = 0x1,
59 bitMaskSRocNOTDC = 0x1,
60
61 // VMM Hit Data
62 bitMaskVmmHitTDC = 0xff,
63 bitMaskVmmHitADC = 0x3ff,
67 bitMaskVmmHitN = 0x1, // neighbor
68 bitMaskVmmHitP = 0x1, // parity bit
69
70 // ROC Trailer (1 word)
72 bitMaskTrailLENGTH = 0x3ff,
73 bitMaskTrailL0ID = 0xf,
75 bitMaskTrailTO = 0x1, // true if VMMs ignored due to timeouts
76 bitMaskTrailEXTENDED = 0x1 // "extended-trailer" bit, not used
77 };

◆ BitPosDetectorResource

Enumerator
bitPosElink 
bitPosRadius 
bitPosLayer 
bitPosSector 
bitPosResType 
bitPosDataType 
bitPosRESERVED 
bitPosVersion 
bitPosDetId 
bitPosObsEta 
bitPosObsResType 
bitPosObsTech 
bitPosObsDataType 

Definition at line 153 of file NSWDecodeBitmaps.h.

154 {
155 bitPosElink = 0,
156 bitPosRadius = 3,
157 bitPosLayer = 7,
158 bitPosSector = 10,
159 bitPosResType = 14,
160 bitPosDataType = 17,
161 bitPosRESERVED = 20,
162 bitPosVersion = 21,
163 bitPosDetId = 24,
164
165 // For pre-versioned format used during commissioning
166
167 bitPosObsEta = 14,
168 bitPosObsResType = 15,
169 bitPosObsTech = 19,
171 };

◆ BitPosRawData

Enumerator
bitPosFlxLENGTH 
bitPosFlxSTATUS 
bitPosFlxELINKID 
bitPosSRocNullL1ID 
bitPosSRocNullID 
bitPosSRocL1ID 
bitPosSRocBCID 
bitPosSRocORBIT 
bitPosSRocNULL 
bitPosSRocNOTDC 
bitPosVmmHitTDC 
bitPosVmmHitADC 
bitPosVmmHitCHANNEL 
bitPosVmmHitVMMID 
bitPosVmmHitRELBCID 
bitPosVmmHitN 
bitPosVmmHitP 
bitPosTrailCHECKSUM 
bitPosTrailLENGTH 
bitPosTrailL0ID 
bitPosTrailFLAGMISS 
bitPosTrailTO 
bitPosTrailEXTENDED 

Definition at line 79 of file NSWDecodeBitmaps.h.

80 {
81 // Felix Header (2 words)
83 bitPosFlxSTATUS = 16,
85
86 // sROC Header (1 word)
90 bitPosSRocBCID = 16,
91 bitPosSRocORBIT = 28,
92 bitPosSRocNULL = 30,
93 bitPosSRocNOTDC = 31,
94
95 // VMM Hit Data
101 bitPosVmmHitN = 30, // neighbor
102 bitPosVmmHitP = 31, // parity bit
103
104 // ROC Trailer (1 word)
107 bitPosTrailL0ID = 18,
109 bitPosTrailTO = 30, // true if VMMs ignored due to timeouts
110 bitPosTrailEXTENDED = 31 // "extended-trailer" bit, not used
111 };

◆ channel_type

Enumerator
OFFLINE_CHANNEL_TYPE_PAD 
OFFLINE_CHANNEL_TYPE_STRIP 
OFFLINE_CHANNEL_TYPE_WIRE 

Definition at line 20 of file NSWDecodeHelper.h.

◆ EMaskDetectorResource

Enumerator
eMaskElink 
eMaskRadius 
eMaskLayer 
eMaskSector 
eMaskResType 
eMaskDataType 
eMaskRESERVED 
eMaskVersion 
eMaskDetId 
eMaskObsEta 
eMaskObsResType 
eMaskObsTech 
eMaskObsDataType 

Definition at line 113 of file NSWDecodeBitmaps.h.

114 {
115 eMaskElink = 0x00000007,
116 eMaskRadius = 0x00000078,
117 eMaskLayer = 0x00000380,
118 eMaskSector = 0x00003c00,
119 eMaskResType = 0x0001c000,
120 eMaskDataType = 0x000e0000,
121 eMaskRESERVED = 0x00100000,
122 eMaskVersion = 0x00e00000,
123 eMaskDetId = 0xff000000,
124
125 // For pre-versioned format used during commissioning
126
127 eMaskObsEta = 0x00004000,
128 eMaskObsResType = 0x00078000,
129 eMaskObsTech = 0x00080000,
130 eMaskObsDataType = 0x00700000
131 };

◆ EMaskRawData

Enumerator
eMaskFlxLENGTH 
eMaskFlxSTATUS 
eMaskFlxELINKID 
eMaskSRocNullL1ID 
eMaskSRocNullID 
eMaskSRocL1ID 
eMaskSRocBCID 
eMaskSRocORBIT 
eMaskSRocNULL 
eMaskSRocNOTDC 
eMaskVmmHitTDC 
eMaskVmmHitADC 
eMaskVmmHitCHANNEL 
eMaskVmmHitVMMID 
eMaskVmmHitRELBCID 
eMaskVmmHitN 
eMaskVmmHitP 
eMaskTrailCHECKSUM 
eMaskTrailLENGTH 
eMaskTrailL0ID 
eMaskTrailFLAGMISS 
eMaskTrailTO 
eMaskTrailEXTENDED 

Definition at line 11 of file NSWDecodeBitmaps.h.

12 {
13 // Felix Header (2 words)
14 eMaskFlxLENGTH = 0x0000ffff,
15 eMaskFlxSTATUS = 0xffff0000,
16 eMaskFlxELINKID = 0xffffffff,
17
18 // sROC Header (1 word)
19 eMaskSRocNullL1ID = 0x00ff0000,
20 eMaskSRocNullID = 0x3f000000,
21 eMaskSRocL1ID = 0x0000ffff,
22 eMaskSRocBCID = 0x0fff0000,
23 eMaskSRocORBIT = 0x30000000,
24 eMaskSRocNULL = 0x40000000,
25 eMaskSRocNOTDC = 0x80000000,
26
27 // VMM Hit Data
28 eMaskVmmHitTDC = 0x000000ff,
29 eMaskVmmHitADC = 0x0003ff00,
30 eMaskVmmHitCHANNEL = 0x00fc0000,
31 eMaskVmmHitVMMID = 0x07000000,
32 eMaskVmmHitRELBCID = 0x38000000,
33 eMaskVmmHitN = 0x40000000, // neighbor
34 eMaskVmmHitP = 0x80000000, // parity bit
35
36 // ROC Trailer (1 word)
37 eMaskTrailCHECKSUM = 0x000000ff,
38 eMaskTrailLENGTH = 0x0003ff00,
39 eMaskTrailL0ID = 0x003c0000,
40 eMaskTrailFLAGMISS = 0x3fc00000,
41 eMaskTrailTO = 0x40000000, // true if VMMs ignored due to timeouts
42 eMaskTrailEXTENDED = 0x80000000 // "extended-trailer" bit, not used
43 };

◆ NSWDataTypes

Enumerator
NSW_DATA_L1A 
NSW_DATA_MONITOR 
NSW_DATA_TO_SCA 
NSW_DATA_FROM_SCA 
NSW_DATA_TTC 
NSW_DATA_L1A_INFO 
NSW_DATA_EXT 
NSW_DATA_EXC 

Definition at line 29 of file NSWResourceId.h.

30 {
31 NSW_DATA_L1A = 0,
35 NSW_DATA_TTC = 4,
37 NSW_DATA_EXT = 6,
38 NSW_DATA_EXC = 7
39 };

◆ NSWResourceTypes

Enumerator
NSW_RESOURCE_PAD 
NSW_RESOURCE_STRIP 
NSW_RESOURCE_TRIG_PROC 
NSW_RESOURCE_PAD_TRIG 
NSW_RESOURCE_L1DDC 
NSW_RESOURCE_ADDC 
NSW_RESOURCE_ROUTER 
NSW_RESOURCE_RIM_L1DDC 

Definition at line 17 of file NSWResourceId.h.

◆ NSWTriggerExceptions

Enumerator
not_assigned 
unknown 
incomplete 
too_short 
flx_status 
flx_short 
mmmon_inv_id 
mml1a_inv_id 
mml1a_art_sz 
mml1a_trg_sz 

Definition at line 34 of file NSWTriggerElink.h.

34 {
35 not_assigned = -999, //default constructor valued for NSWTriggerException
36 unknown = -1, //unknown exception
37 incomplete = 0, //incomplete decoding for ROBFrag
38 too_short = 1, //shorter than minimum (2)
39 flx_status = 2, //felix status different from 0
40 flx_short = 3, //flx length shorter than bystream available
41 mmmon_inv_id = 4, //MMTP Mon elink invalid streamID
42 mml1a_inv_id = 5, //MMTP L1A elink invalid streamID
43 mml1a_art_sz = 6, //MMTP L1A ART stream data size invalid
44 mml1a_trg_sz = 7 //MMTP L1A Trigger stream data size invalid
45 };

◆ vmm_channels

Enumerator
VMM_per_MMFE8 
VMM_per_sFEB 
VMM_per_pFEB 
VMM_channels 

Definition at line 27 of file NSWDecodeHelper.h.

28 {
29 VMM_per_MMFE8 = 8,
30 VMM_per_sFEB = 3,
31 VMM_per_pFEB = 3,
32 VMM_channels = 64
33 };

Function Documentation

◆ bit_slice()

template<typename Target, typename Source>
Target Muon::nsw::bit_slice ( const std::span< const Source > words,
const std::size_t start,
const std::size_t end )

Decode bits from data of words.

Start and end included

Template Parameters
TargetType of the value that is decoded
SourceType of the words in the data
Parameters
wordsData
startStart of value in bits
endStop of value in bits
Returns
Target Decoded value

Definition at line 80 of file NSWDecodeHelper.h.

80 {
81 // start and end are the positions in the entire stream
82 // start and end included;
83 const auto wordSize = sizeof(Source) * 8;
84 auto s = Target{};
85 const auto n = end / wordSize;
86 const auto m = start / wordSize;
87
88 if (end < start) {
89 throw std::runtime_error(format("End must be larger than start ({} vs {})", start, end));
90 }
91 if (n >= std::size(words)) {
92 throw std::runtime_error(format("End index ({}) out of range (number of words: {}, maximum allowed index: {})", n, std::size(words), std::size(words) - 1));
93 }
94 if (sizeof(Target) < sizeof(Source) * (n - m + 1)) {
95 throw std::runtime_error(format("Target type (size {}) too small to fit result of bit_slice given start {} and end {} and source size {}", sizeof(Target), start, end, sizeof(Source)));
96 }
97
98 for (auto i = m; i <= n; ++i) {
99 s = (s << wordSize) + words[i];
100 }
101 s >>= (n + 1) * wordSize - (end + 1);
102 // len = end - start + 1
103 const Target mask = ((Target{1}) << (end - start + 1)) - 1;
104 s &= mask;
105 return s;
106 }
std::string format(const std::string &str, const T &arg)

◆ decode_and_advance()

template<typename Target, typename Source>
Target Muon::nsw::decode_and_advance ( const std::span< const Source > words,
std::size_t & start,
const std::size_t size )
constexpr

Decode bits from data of words and advance the read pointer.

Template Parameters
TargetType of the value that is decoded
SourceType of the words in the data
Parameters
wordsData
startRead pointer (start of value in bits), increased by function
sizeNumber of bits to be decoded
Returns
Target Decoded value

Definition at line 119 of file NSWDecodeHelper.h.

119 {
120 const auto res = bit_slice<Target, Source>(words, start, start + size - 1);
121 start += size;
122 return res;
123 }
std::pair< std::vector< unsigned int >, bool > res
Target bit_slice(const std::span< const Source > words, const std::size_t start, const std::size_t end)
Decode bits from data of words.

◆ decode_at_loc()

template<typename Target, typename Source>
Target Muon::nsw::decode_at_loc ( const std::span< const Source > words,
std::size_t & start,
const int offset,
const std::size_t size )
constexpr

Decode bits from data of words at read pointer + offset and NOT advance the read pointer.

Template Parameters
TargetType of the value that is decoded
SourceType of the words in the data
Parameters
wordsData
startRead pointer (start of value in bits)
offsetdecoding begins at read pointer + offset
sizeNumber of bits to be decoded
Returns
Target Decoded value

Definition at line 137 of file NSWDecodeHelper.h.

137 {
138 const auto res = bit_slice<Target, Source>(words, start + offset, start + size + offset - 1);
139 return res;
140 }

◆ ERS_DECLARE_ISSUE_BASE()

Muon::nsw::ERS_DECLARE_ISSUE_BASE ( MuonNSWCommonDecoder ,
NSWElinkFelixHeaderException ,
MuonNSWCommonDecoder::NSWElinkException ,
""<< name,
((std::string) name)  )

◆ fill_bitmask()

template<class Out>
Out Muon::nsw::fill_bitmask ( const uint8_t first_bit,
const uint8_t num_bits )
constexpr

Definition at line 161 of file NSWDecodeHelper.h.

161 {
162 return CxxUtils::ones<Out> (num_bits) << first_bit;
163 }
constexpr T ones(unsigned int n)
Return a bit mask with the lower n bits set.
Definition ones.h:25

◆ format() [1/2]

template<typename T>
std::string Muon::nsw::format ( const std::string & str,
const T & arg )

Definition at line 43 of file NSWDecodeHelper.h.

43 {
44 std::stringstream ss;
45 std::size_t pos = str.find("{}");
46 if (pos == std::string::npos) {
47 ss << str;
48 } else {
49 ss << str.substr(0, pos) << arg << str.substr(pos + 2);
50 }
51 return ss.str();
52 }
static Double_t ss

◆ format() [2/2]

template<typename T, typename... Args>
std::string Muon::nsw::format ( const std::string & str,
const T & arg,
const Args &... args )

Definition at line 56 of file NSWDecodeHelper.h.

56 {
57 std::stringstream ss;
58 std::size_t pos = str.find("{}");
59 if (pos == std::string::npos) {
60 ss << str;
61 } else {
62 ss << str.substr(0, pos) << arg << format(str.substr(pos + 2), args...);
63 }
64 return ss.str();
65 }

◆ get_16bxor_crc()

uint16_t Muon::nsw::get_16bxor_crc ( const uint32_t * dataPointer,
uint32_t dataSize )
inline

Definition at line 178 of file NSWDecodeHelper.h.

178 {
179
180 uint16_t crc = 0;
181 // checking if last 16b are 0 padding (possibly added by swROD)
182 bool hasPadding = (dataPointer[dataSize-1] & 0xFFFF)==0; // unsafe if the CRC can be 0x0000 but it should never be the case
183 // one could simply cast the (std::uint32_t*) to a (std::uint16_t*)
184 // but then we might need to handle the word swap (system dependent)
185 for (uint32_t i = 0; i<dataSize-1; ++i) {
186 crc = crc ^ ((dataPointer[i] >> 16) & 0xFFFF);
187 crc = crc ^ ((dataPointer[i] >> 0) & 0xFFFF);
188 }
189 // last word can be: 1) 16b CRC + 16b 0padding 2) 16b of valida data + 16b CRC
190 // need to handle case 2)
191 if (!hasPadding) {crc = crc ^ ((dataPointer[dataSize-1] >> 16) & 0xFFFF);}
192
193 return crc;
194}

◆ max_bit()

template<class T>
int8_t Muon::nsw::max_bit ( const T number)
constexpr

Returns the most left hand bit which is set in a number.

Template Parameters
TAny built-in data type
Parameters
numbervalue
Returns
Set bit. -1 if no bit is set

Definition at line 147 of file NSWDecodeHelper.h.

147 {
148 return std::bit_width(static_cast<std::make_unsigned_t<T> >(number)) - 1;
149 }
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186

◆ min_bit()

template<class T>
int8_t Muon::nsw::min_bit ( const T number)
constexpr

Returns the most right hand bit which is set in a number.

Template Parameters
TAny built-in data type
Parameters
numbervalue
Returns
Position of the bit. -1 if no bit is set

Definition at line 155 of file NSWDecodeHelper.h.

155 {
156 if (number == 0) return -1;
157 return
158 std::countr_zero(static_cast<std::make_unsigned_t<T> >(number));
159 }

Variable Documentation

◆ NSWElinkROCHeaderException

Muon::nsw::NSWElinkROCHeaderException

Definition at line 21 of file NSWDecodeExceptions.h.

◆ s_stgc_channel_map

const std::map<uint16_t, std::vector<std::vector<uint8_t> > > Muon::nsw::s_stgc_channel_map
static

Definition at line 38 of file MapperSTG.h.

39 {
40 // channel range: {vmm0, vmm0_channel, vmm1, vmm1_channel}
41 // as a function of channel_type, sector_type [1=large 0=small], feb_radius [0->2], layer [0->7]
42
43 // This mapping reflects the spreadsheet Adapter-Board-level numbering in sTGC_AB_Mapping_WithPadTDSChannels.xlsx,
44 // where vmm ids are the nominal ones (as on the FEB).
45
46 //**** PADS
47 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 0), { {2, 39, 1, 36} }}, // QS1C
48 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 1), { {1, 24, 2, 27} }},
49 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 2), { {1, 24, 2, 31} }},
50 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 3), { {2, 39, 1, 32} }},
51 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 4), { {2, 39, 1, 36} }}, // QS1P
52 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 5), { {1, 24, 2, 27} }},
53 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 6), { {1, 24, 2, 10} }},
54 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 7), { {2, 39, 1, 53} }},
55 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 0), { {2, 23, 1, 40} }}, // QS2C
56 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 1), { {1, 40, 2, 23} }},
57 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 2), { {1, 42, 2, 22} }},
58 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 3), { {2, 21, 1, 41} }},
59 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 4), { {2, 14, 1, 49} }}, // QS2P
60 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 5), { {1, 49, 2, 14} }},
61 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 6), { {1, 42, 2, 22} }},
62 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 7), { {2, 21, 1, 41} }},
63 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 0), { {2, 40, 2, 2} }}, // QS3C
64 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 1), { {1, 1, 1, 39} }},
65 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 2), { {1, 0, 1, 41} }},
66 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 3), { {2, 41, 2, 0} }},
67 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 4), { {2, 32, 2, 9} }}, // QS3P
68 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 5), { {2, 9, 2, 32} }},
69 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 6), { {2, 2, 2, 40} }},
70 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 7), { {2, 39, 2, 1} }},
71 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 0), { {2, 39, 1, 2} }}, // QL1P
72 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 1), { {1, 8, 2, 45} }},
73 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 2), { {1, 8, 2, 55} }},
74 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 3), { {2, 39, 1, 0}, {2, 40, 2, 47} }},
75 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 4), { {2, 39, 1, 8} }}, // QL1C
76 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 5), { {1, 8, 2, 39} }},
77 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 6), { {1, 13, 2, 44} }},
78 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 7), { {2, 34, 1, 3} }},
79 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 0), { {2, 29, 1, 38} }}, // QL2P
80 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 1), { {1, 34, 2, 25} }},
81 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 2), { {1, 24, 2, 34} }},
82 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 3), { {2, 39, 1, 29} }},
83 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 4), { {2, 29, 1, 38} }}, // QL2C
84 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 5), { {1, 34, 2, 25} }},
85 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 6), { {1, 34, 2, 25} }},
86 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 7), { {2, 29, 1, 38} }},
87 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 0), { {2, 21, 1, 26} }}, // QL3P
88 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 1), { {1, 44, 2, 39} }},
89 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 2), { {1, 34, 2, 39} }},
90 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 3), { {2, 31, 1, 26} }},
91 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 4), { {2, 13, 1, 26} }}, // QL3C
92 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 5), { {1, 52, 2, 39} }},
93 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 6), { {1, 48, 2, 39} }},
94 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 7), { {2, 17, 1, 26} }},
95
96 //**** STRIPS
97 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 0, 0), { {7, 21, 6, 48}, {6, 15, 5, 48}, {5, 15, 0, 0} }},
98 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 0, 1), { {0, 42, 1, 15}, {1, 48, 2, 15}, {2, 48, 7, 63} }},
99 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 0, 2), { {0, 42, 1, 15}, {1, 48, 2, 15}, {2, 48, 7, 63} }},
100 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 0, 3), { {7, 21, 6, 48}, {6, 15, 5, 48}, {5, 15, 0, 0} }},
101 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 0, 4), { {7, 21, 6, 48}, {6, 15, 5, 48}, {5, 15, 0, 0} }},
102 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 0, 5), { {0, 42, 1, 15}, {1, 48, 2, 15}, {2, 48, 7, 63} }},
103 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 0, 6), { {0, 42, 1, 15}, {1, 48, 2, 15}, {2, 48, 7, 63} }},
104 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 0, 7), { {7, 21, 6, 48}, {6, 15, 5, 48}, {5, 15, 0, 0} }},
105 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 1, 0), { {7, 63, 2, 19} }},
106 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 1, 1), { {2, 19, 7, 63} }},
107 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 1, 2), { {2, 19, 7, 63} }},
108 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 1, 3), { {7, 63, 2, 19} }},
109 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 1, 4), { {7, 63, 2, 19} }},
110 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 1, 5), { {2, 19, 7, 63} }},
111 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 1, 6), { {2, 19, 7, 63} }},
112 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 1, 7), { {7, 63, 2, 19} }},
113 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 2, 0), { {7, 63, 3, 13} }},
114 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 2, 1), { {3, 13, 7, 63} }},
115 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 2, 2), { {3, 13, 7, 63} }},
116 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 2, 3), { {7, 63, 3, 13} }},
117 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 2, 4), { {7, 63, 3, 13} }},
118 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 2, 5), { {3, 13, 7, 63} }},
119 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 2, 6), { {3, 13, 7, 63} }},
120 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 0, 2, 7), { {7, 63, 3, 13} }},
121 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 0, 0), { {7, 23, 6, 48}, {6, 15, 5, 48}, {5, 15, 0, 0} }},
122 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 0, 1), { {0, 40, 1, 15}, {1, 48, 2, 15}, {2, 48, 7, 63} }},
123 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 0, 2), { {0, 40, 1, 15}, {1, 48, 2, 15}, {2, 48, 7, 63} }},
124 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 0, 3), { {7, 23, 6, 48}, {6, 15, 5, 48}, {5, 15, 0, 0} }},
125 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 0, 4), { {7, 23, 6, 48}, {6, 15, 5, 48}, {5, 15, 0, 0} }},
126 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 0, 5), { {0, 40, 1, 15}, {1, 48, 2, 15}, {2, 48, 7, 63} }},
127 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 0, 6), { {0, 40, 1, 15}, {1, 48, 2, 15}, {2, 48, 7, 63} }},
128 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 0, 7), { {7, 23, 6, 48}, {6, 15, 5, 48}, {5, 15, 0, 0} }},
129 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 1, 0), { {7, 63, 2, 18} }},
130 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 1, 1), { {2, 18, 7, 63} }},
131 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 1, 2), { {2, 18, 7, 63} }},
132 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 1, 3), { {7, 63, 2, 18} }},
133 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 1, 4), { {7, 63, 2, 18} }},
134 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 1, 5), { {2, 18, 7, 63} }},
135 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 1, 6), { {2, 18, 7, 63} }},
136 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 1, 7), { {7, 63, 2, 18} }},
137 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 2, 0), { {7, 63, 2, 31} }},
138 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 2, 1), { {2, 31, 7, 63} }},
139 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 2, 2), { {2, 31, 7, 63} }},
140 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 2, 3), { {7, 63, 2, 31} }},
141 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 2, 4), { {7, 63, 2, 31} }},
142 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 2, 5), { {2, 31, 7, 63} }},
143 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 2, 6), { {2, 31, 7, 63} }},
144 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_STRIP, 1, 2, 7), { {7, 63, 2, 31} }},
145
146 //**** WIRES
147 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 0, 0), { {0, 57, 0, 39} }}, // QS1C
148 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 0, 1), { {0, 57, 0, 39} }},
149 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 0, 2), { {0, 57, 0, 38} }},
150 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 0, 3), { {0, 57, 0, 39} }},
151 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 0, 4), { {0, 57, 0, 39} }}, // QS1P
152 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 0, 5), { {0, 57, 0, 38} }},
153 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 0, 6), { {0, 57, 0, 39} }},
154 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 0, 7), { {0, 57, 0, 39} }},
155 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 1, 0), { {0, 57, 0, 29} }}, // QS2C
156 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 1, 1), { {0, 57, 0, 29} }},
157 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 1, 2), { {0, 57, 0, 28} }},
158 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 1, 3), { {0, 57, 0, 29} }},
159 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 1, 4), { {0, 57, 0, 29} }}, // QS2P
160 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 1, 5), { {0, 57, 0, 28} }},
161 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 1, 6), { {0, 57, 0, 29} }},
162 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 1, 7), { {0, 57, 0, 29} }},
163 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 2, 0), { {0, 57, 0, 20} }}, // QS3C
164 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 2, 1), { {0, 57, 0, 20} }},
165 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 2, 2), { {0, 57, 0, 20} }},
166 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 2, 3), { {0, 57, 0, 21} }},
167 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 2, 4), { {0, 57, 0, 21} }}, // QS3P
168 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 2, 5), { {0, 57, 0, 20} }},
169 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 2, 6), { {0, 57, 0, 20} }},
170 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 0, 2, 7), { {0, 57, 0, 20} }},
171 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 0, 0), { {0, 57, 0, 26} }}, // QL1P
172 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 0, 1), { {0, 57, 0, 26} }},
173 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 0, 2), { {0, 57, 0, 26} }},
174 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 0, 3), { {0, 57, 0, 26} }},
175 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 0, 4), { {0, 57, 0, 26} }}, // QL1C
176 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 0, 5), { {0, 57, 0, 26} }},
177 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 0, 6), { {0, 57, 0, 26} }},
178 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 0, 7), { {0, 57, 0, 26} }},
179 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 1, 0), { {0, 57, 0, 10} }}, // QL2P
180 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 1, 1), { {0, 57, 0, 9} }},
181 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 1, 2), { {0, 57, 0, 9} }},
182 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 1, 3), { {0, 57, 0, 10} }},
183 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 1, 4), { {0, 57, 0, 10} }}, // QL2C
184 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 1, 5), { {0, 57, 0, 9} }},
185 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 1, 6), { {0, 57, 0, 9} }},
186 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 1, 7), { {0, 57, 0, 10} }},
187 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 2, 0), { {0, 57, 0, 1} }}, // QL3P
188 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 2, 1), { {0, 57, 0, 0} }},
189 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 2, 2), { {0, 57, 0, 0} }},
190 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 2, 3), { {0, 57, 0, 1} }},
191 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 2, 4), { {0, 57, 0, 1} }}, // QL3C
192 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 2, 5), { {0, 57, 0, 0} }},
193 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 2, 6), { {0, 57, 0, 0} }},
194 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_WIRE, 1, 2, 7), { {0, 57, 0, 1} }}
195 };
static uint16_t private_id(uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer)
Definition MapperSTG.h:263

◆ s_stgc_pad_grid

const std::map<uint16_t, std::pair<uint16_t, uint16_t> > Muon::nsw::s_stgc_pad_grid
static

Definition at line 197 of file MapperSTG.h.

198 {
199 // Number of pad eta-rows and phi-columns
200 // as a function of channel_type, sector_type [1=large 0=small], feb_radius [0->2], layer [0->7].
201
202 // This is used to convert the AB channel number to the pad index that ATHENA understands
203
204 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 0), {17, 4}}, // QS1C, Layer 0 {nEtaRows, nPhiColumns}
208 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 4), {17, 4}}, // QS1P
212
213 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 0), {16, 3}}, // QS2C
217 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 4), {15, 2}}, // QS2P
221
222 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 0), {13, 3}}, // QS3C
226 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 4), {12, 2}}, // QS3P
230
231 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 0), {17, 6}}, // QL1P
235 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 4), {16, 6}}, // QL1C
239
240 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 0), {14, 4}}, // QL2P
244 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 4), {14, 4}}, // QL2C
248
249 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 0), {15, 4}}, // QL3P
253 {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 4), {13, 4}}, // QL3C
257 };