69 {
71 {
74 WiredOR* wor = (*found).second;
77
81
82 int first_ch_cabled = 32;
83 int last_ch_cabled = -1;
84
85 std::vector<int> multiplicity(max_st);
86
91 int local_strip =
start - (max_st - rpc_st);
92 int final_strip =
stop - (max_st - rpc_st);
93
95 chs += (local_strip >= 0) ? 0 : abs(local_strip) + 1;
98 return false;
99 }
100 if (chs <= first_ch_cabled) first_ch_cabled = chs;
101
102 if (local_strip <= 0) local_strip = 1;
103 do {
106 return false;
107 }
108 if (local_strip > 0 && local_strip <= rpc_st) {
110 m_pivot[
i][0][chs] = cham * 100 + local_strip - 1;
111 m_pivot[
i][1][chs] = 10000 + cham * 100 + local_strip - 1;
112 } else {
113 m_pivot[
i][1][chs] = cham * 100 + local_strip - 1;
114 m_pivot[
i][0][chs] = 10000 + cham * 100 + local_strip - 1;
115 }
116 multiplicity[local_strip - 1 + (max_st - rpc_st)] = 1;
117 }
118 ++chs;
119 } while (++local_strip <= final_strip);
120
121 if (chs - 1 >= last_ch_cabled) last_ch_cabled = chs - 1;
123 }
125
126
129
130
131
132
133
135 std::ostringstream disp;
136 disp << "EvenPhiCMA::cable_CMA_channels - out of bound array indices (m_pivot)! Values:"
137 << first_ch_cabled << ", " << last_ch_cabled
138 << " at " << __FILE__ << ":" << __LINE__ ;
139 throw std::runtime_error(disp.str());
140 }
141
143 if (
m_pivot[ch][0][first_ch_cabled] >= 0)
break;
146
148 if (
m_pivot[ch][0][last_ch_cabled] >= 0)
break;
151 }
152
158 }
159
161
165
166 int first_ch_cabled = 64;
167 int last_ch_cabled = -1;
168
170
174 WiredOR* wor = (*found).second;
176
179
182 int local_strip =
start - (max_st - rpc_st);
183 int final_strip =
stop - (max_st - rpc_st);
184
185 int chs = (
id().
Ixx_index() == 0) ? 40 - max_st / 2 : 0;
186
187 bool isBME = false;
189
190 if (E == 'E') isBME = true;
191
192 if (isBME && id().Ixx_index() == 1) {
193
194 chs = 8;
195 local_strip = 1;
196 final_strip = 32;
197 }
198 if (isBME && id().Ixx_index() == 0) {
199
200 chs = 24;
201 local_strip = 1;
202 final_strip = 32;
203 }
204
205 chs += (local_strip >= 0) ? 0 : abs(local_strip) + 1;
206
209 return false;
210 }
211 if (chs <= first_ch_cabled) first_ch_cabled = chs;
212
213 if (local_strip <= 0) local_strip = 1;
214 do {
217 return false;
218 }
219 if (local_strip > 0 && local_strip <= rpc_st) {
221 m_lowPt[
r][0][chs] = cham * 100 + local_strip - 1;
222 m_lowPt[
r][1][chs] = 10000 + cham * 100 + local_strip - 1;
223 } else {
224 m_lowPt[
r][1][chs] = cham * 100 + local_strip - 1;
225 m_lowPt[
r][0][chs] = 10000 + cham * 100 + local_strip - 1;
226 }
228 multiplicity[local_strip - 1] = 1;
229 } else {
230 multiplicity[local_strip - 1 + (max_st - rpc_st)] = 1;
231 }
232 }
233 ++chs;
234 } while (++local_strip <= final_strip);
235
237 if (chs - 1 >= last_ch_cabled) last_ch_cabled = chs - 1;
239 }
240
242
243
246
247
248
249
250
252 std::ostringstream disp;
253 disp << "EvenPhiCMA::cable_CMA_channels - out of bound array indices (m_lowPt)! Values:"
254 << first_ch_cabled << ", " << last_ch_cabled
255 << " at " << __FILE__ << ":" << __LINE__ ;
256 throw std::runtime_error(disp.str());
257 }
258
260 if (
m_lowPt[ch][0][first_ch_cabled] >= 0)
break;
263
265 if (
m_lowPt[ch][0][last_ch_cabled] >= 0)
break;
268 }
269 }
270
276 }
277
279
283
284 int first_ch_cabled = 64;
285 int last_ch_cabled = -1;
286
288
292 WiredOR* wor = (*found).second;
294
295
298
301 int local_strip =
start - (max_st - rpc_st);
302 int final_strip =
stop - (max_st - rpc_st);
303
304 int chs = (
id().
Ixx_index() == 0) ? 40 - max_st / 2 : 0;
305
308
309 bool isBOE = false;
310 if (abs(sEta) == 8 && L == 'L') isBOE = true;
311 if (isBOE && id().Ixx_index() == 1) {
312 chs = 0;
313 local_strip = 13;
314 final_strip = 64;
315 }
316
317 if (isBOE && id().Ixx_index() == 0) {
318 chs = 4;
319 final_strip = 52;
320 local_strip = 1;
321 }
322
323 chs += (local_strip >= 0) ? 0 : abs(local_strip) + 1;
326 return false;
327 }
328 if (chs <= first_ch_cabled) first_ch_cabled = chs;
329
330 if (local_strip <= 0) local_strip = 1;
331 do {
334 return false;
335 }
336 bool skipChannel = false;
337 if (isBOE && id().Ixx_index() == 1 && ((chs > 3 && chs < 8) || (chs > 39 && chs < 44))) skipChannel = true;
338 if (isBOE && id().Ixx_index() == 0 && ((chs > 19 && chs < 24) || (chs > 55 && chs < 60))) skipChannel = true;
339 if (skipChannel) {
340 --local_strip;
341 } else {
342 if (local_strip > 0 && local_strip <= rpc_st) {
344 m_highPt[
r][0][chs] = cham * 100 + local_strip - 1;
345 m_highPt[
r][1][chs] = 10000 + cham * 100 + local_strip - 1;
346 } else {
347 m_highPt[
r][1][chs] = cham * 100 + local_strip - 1;
348 m_highPt[
r][0][chs] = 10000 + cham * 100 + local_strip - 1;
349 }
350 }
352 multiplicity[local_strip - 1] = 1;
353 } else {
354 multiplicity[local_strip - 1 + (max_st - rpc_st)] = 1;
355 }
356 }
357 ++chs;
358 } while (++local_strip <= final_strip);
359
361 if (chs - 1 >= last_ch_cabled) last_ch_cabled = chs - 1;
363 }
364
366
367
370
371
372
373
374
376 std::ostringstream disp;
377 disp << "EvenPhiCMA::cable_CMA_channels - out of bound array indices (m_highPt)! Values:"
378 << first_ch_cabled << ", " << last_ch_cabled
379 << " at " << __FILE__ << ":" << __LINE__ ;
380 throw std::runtime_error(disp.str());
381 }
382
384 if (
m_highPt[ch][0][first_ch_cabled] >= 0)
break;
387
389 if (
m_highPt[ch][0][last_ch_cabled] >= 0)
break;
392 }
393 }
394
395 return true;
396}
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
int pivot_stop_st() const
int highPt_stop_st() const
static constexpr int confirm_channels
int(* m_lowPt)[2][confirm_channels]
int(* m_pivot)[2][pivot_channels]
int pivot_start_st() const
int highPt_start_st() const
unsigned int m_last_pivot_code
unsigned int m_last_lowPt_code
int lowPt_stop_st() const
const CMAidentity & id() const
int lowPt_start_st() const
unsigned int m_first_pivot_code
int lowPt_stop_ch() const
std::string noMoreChannels(const std::string &stat)
unsigned int m_first_highPt_code
int highPt_stop_ch() const
int highPt_start_ch() const
unsigned int m_last_highPt_code
int lowPt_start_ch() const
unsigned int m_first_lowPt_code
int(* m_highPt)[2][confirm_channels]
int pivot_start_ch() const
static constexpr int pivot_channels
int get_max_strip_readout(int)
int ijk_phiReadout() const
const std::string & chamber_name() const
void add_even_read_mul(ReadoutCh &)
const RPCchamber * connected_rpc(int) const
int give_max_phi_strips() const