ATLAS Offline Software
MapperSTG.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef _MUON_NSW_STG_MAPPER_H_
5 #define _MUON_NSW_STG_MAPPER_H_
6 
7 #include <cstdint>
8 #include <map>
9 #include <vector>
10 
12 
13 namespace Muon
14 {
15  namespace nsw
16  {
17  class MapperSTG
18  {
19  public:
20  MapperSTG() {};
21  virtual ~MapperSTG () {};
22 
23  uint16_t nchannels (uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer) const;
24  uint16_t channel_number (uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer, uint16_t vmm, uint16_t vmm_chan) const;
25  bool vmm_info (uint8_t channel_type, uint8_t sector_type, uint8_t mod_radius, uint8_t layer, uint16_t channel_number, uint16_t& vmm, uint16_t& vmm_chan) const;
26  bool elink_info (uint8_t channel_type, uint8_t sector_type, uint8_t mod_radius, uint8_t layer, uint16_t channel_number, uint &elink) const;
27  uint16_t geoVmmToRocVmm(uint16_t geoVMM) const; // go from geometrical (as used offline) vmm number to roc capture vmm number, also works in opposite direction
28 
29  static uint16_t private_id (uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer);
30 
31  // Mappings to different numbering conventions
36  };
37 
38  static const std::map <uint16_t, std::vector<std::vector<uint8_t>>> s_stgc_channel_map =
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  };
196 
197  static const std::map <uint16_t, std::pair<uint16_t, uint16_t>> s_stgc_pad_grid =
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}
205  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 1), {17, 4}},
206  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 2), {18, 4}},
207  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 3), {18, 4}},
208  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 4), {17, 4}}, // QS1P
209  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 5), {17, 4}},
210  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 6), {17, 3}},
211  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 0, 7), {17, 3}},
212 
213  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 0), {16, 3}}, // QS2C
214  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 1), {16, 3}},
215  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 2), {15, 3}},
216  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 3), {15, 3}},
217  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 4), {15, 2}}, // QS2P
218  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 5), {15, 2}},
219  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 6), {15, 3}},
220  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 1, 7), {15, 3}},
221 
222  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 0), {13, 3}}, // QS3C
223  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 1), {13, 3}},
224  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 2), {14, 3}},
225  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 3), {14, 3}},
226  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 4), {12, 2}}, // QS3P
227  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 5), {12, 2}},
228  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 6), {13, 3}},
229  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 0, 2, 7), {13, 3}},
230 
231  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 0), {17, 6}}, // QL1P
232  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 1), {17, 6}},
233  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 2), {16, 7}},
234  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 3), {16, 7}},
235  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 4), {16, 6}}, // QL1C
236  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 5), {16, 6}},
237  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 6), {16, 6}},
238  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 0, 7), {16, 6}},
239 
240  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 0), {14, 4}}, // QL2P
241  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 1), {14, 4}},
242  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 2), {15, 5}},
243  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 3), {15, 5}},
244  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 4), {14, 4}}, // QL2C
245  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 5), {14, 4}},
246  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 6), {14, 4}},
247  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 1, 7), {14, 4}},
248 
249  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 0), {15, 4}}, // QL3P
250  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 1), {15, 4}},
251  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 2), {14, 5}},
252  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 3), {14, 5}},
253  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 4), {13, 4}}, // QL3C
254  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 5), {13, 4}},
255  {MapperSTG::private_id(OFFLINE_CHANNEL_TYPE_PAD, 1, 2, 6), {14, 4}},
257  };
258  }
259 }
260 
261 
262 //=====================================================================
264 {
265  // an internal unique ID for every VMM channel
266  return (channel_type & 0xf) << 12 | (sector_type & 0xf) << 8 | (feb_radius & 0xf) << 4 | (layer & 0xf);
267 }
268 
269 #endif // _MUON_NSW_STGC_MAPPER_H_
270 
271 
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
Muon::nsw::MapperSTG::vmm_info
bool vmm_info(uint8_t channel_type, uint8_t sector_type, uint8_t mod_radius, uint8_t layer, uint16_t channel_number, uint16_t &vmm, uint16_t &vmm_chan) const
Definition: MapperSTG.cxx:53
Muon::nsw::MapperSTG::NSWID_to_Athena_channel_number
uint16_t NSWID_to_Athena_channel_number(uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer, uint16_t channel_number, bool sideA) const
Definition: MapperSTG.cxx:188
Muon::nsw::MapperSTG::channel_number
uint16_t channel_number(uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer, uint16_t vmm, uint16_t vmm_chan) const
Definition: MapperSTG.cxx:9
Muon::nsw::MapperSTG::nchannels
uint16_t nchannels(uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer) const
Definition: MapperSTG.cxx:35
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::nsw::OFFLINE_CHANNEL_TYPE_PAD
@ OFFLINE_CHANNEL_TYPE_PAD
Definition: NSWDecodeHelper.h:22
Muon::nsw::MapperSTG::geoVmmToRocVmm
uint16_t geoVmmToRocVmm(uint16_t geoVMM) const
Definition: MapperSTG.cxx:112
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
Muon::nsw::MapperSTG::elink_info
bool elink_info(uint8_t channel_type, uint8_t sector_type, uint8_t mod_radius, uint8_t layer, uint16_t channel_number, uint &elink) const
Definition: MapperSTG.cxx:83
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Muon::nsw::MapperSTG::~MapperSTG
virtual ~MapperSTG()
Definition: MapperSTG.h:21
Muon::nsw::OFFLINE_CHANNEL_TYPE_WIRE
@ OFFLINE_CHANNEL_TYPE_WIRE
Definition: NSWDecodeHelper.h:24
RPDUtils::sideA
unsigned constexpr int sideA
Definition: RPDUtils.h:16
Muon::nsw::MapperSTG::AB_to_Athena_channel_number
uint16_t AB_to_Athena_channel_number(uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer, uint16_t channel_number) const
Definition: MapperSTG.cxx:119
NSWDecodeHelper.h
Muon::nsw::MapperSTG::Athena_to_AB_channel_number
uint16_t Athena_to_AB_channel_number(uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer, uint16_t channel_number) const
Definition: MapperSTG.cxx:153
Muon::nsw::channel_type
channel_type
Definition: NSWDecodeHelper.h:21
Muon::nsw::OFFLINE_CHANNEL_TYPE_STRIP
@ OFFLINE_CHANNEL_TYPE_STRIP
Definition: NSWDecodeHelper.h:23
Muon::nsw::MapperSTG::private_id
static uint16_t private_id(uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer)
Definition: MapperSTG.h:263
Muon::nsw::MapperSTG::MapperSTG
MapperSTG()
Definition: MapperSTG.h:20
Muon::nsw::MapperSTG::Athena_to_NSWID_channel_number
uint16_t Athena_to_NSWID_channel_number(uint8_t channel_type, uint8_t sector_type, uint8_t feb_radius, uint8_t layer, uint16_t channel_number, bool sideA) const
Definition: MapperSTG.cxx:222
Muon::nsw::MapperSTG
Definition: MapperSTG.h:18