70 {
72 {
75 WiredOR* wor = (*found).second;
78
82
83 int first_ch_cabled = 32;
84 int last_ch_cabled = -1;
85
86 std::vector<int> multiplicity(max_st);
87
92 int local_strip =
start - (max_st - rpc_st);
93 int final_strip =
stop - (max_st - rpc_st);
94
96 chs += (local_strip >= 0) ? 0 : abs(local_strip) + 1;
99 return false;
100 }
101 if (chs <= first_ch_cabled) first_ch_cabled = chs;
102
103 if (local_strip <= 0) local_strip = 1;
104 do {
107 return false;
108 }
109 if (local_strip > 0 && local_strip <= rpc_st) {
111 m_pivot[
i][0][chs] = cham * 100 + local_strip - 1;
112 m_pivot[
i][1][chs] = 10000 + cham * 100 + local_strip - 1;
113 } else {
114 m_pivot[
i][1][chs] = cham * 100 + local_strip - 1;
115 m_pivot[
i][0][chs] = 10000 + cham * 100 + local_strip - 1;
116 }
117 multiplicity[local_strip - 1 + (max_st - rpc_st)] = 1;
118 }
119 ++chs;
120 } while (++local_strip <= final_strip);
121
122 if (chs - 1 >= last_ch_cabled) last_ch_cabled = chs - 1;
124 }
126
127
130
131
132
133
134
136 std::ostringstream disp;
137 disp << "EvenPhiCMA::cable_CMA_channels - out of bound array indices (m_pivot)! Values:"
138 << first_ch_cabled << ", " << last_ch_cabled
139 << " at " << __FILE__ << ":" << __LINE__ ;
140 throw std::runtime_error(disp.str());
141 }
142
144 if (
m_pivot[ch][0][first_ch_cabled] >= 0)
break;
147
149 if (
m_pivot[ch][0][last_ch_cabled] >= 0)
break;
152 }
153
159 }
160
162
166
167 int first_ch_cabled = 64;
168 int last_ch_cabled = -1;
169
171
175 WiredOR* wor = (*found).second;
177
180
183 int local_strip =
start - (max_st - rpc_st);
184 int final_strip =
stop - (max_st - rpc_st);
185
186 int chs = (
id().
Ixx_index() == 0) ? 40 - max_st / 2 : 0;
187
188 bool isBME = false;
190
191 if (E == 'E') isBME = true;
192
193 if (isBME && id().Ixx_index() == 1) {
194
195 chs = 8;
196 local_strip = 1;
197 final_strip = 32;
198 }
199 if (isBME && id().Ixx_index() == 0) {
200
201 chs = 24;
202 local_strip = 1;
203 final_strip = 32;
204 }
205
206 chs += (local_strip >= 0) ? 0 : abs(local_strip) + 1;
207
210 return false;
211 }
212 if (chs <= first_ch_cabled) first_ch_cabled = chs;
213
214 if (local_strip <= 0) local_strip = 1;
215 do {
218 return false;
219 }
220 if (local_strip > 0 && local_strip <= rpc_st) {
222 m_lowPt[
r][0][chs] = cham * 100 + local_strip - 1;
223 m_lowPt[
r][1][chs] = 10000 + cham * 100 + local_strip - 1;
224 } else {
225 m_lowPt[
r][1][chs] = cham * 100 + local_strip - 1;
226 m_lowPt[
r][0][chs] = 10000 + cham * 100 + local_strip - 1;
227 }
229 multiplicity[local_strip - 1] = 1;
230 } else {
231 multiplicity[local_strip - 1 + (max_st - rpc_st)] = 1;
232 }
233 }
234 ++chs;
235 } while (++local_strip <= final_strip);
236
238 if (chs - 1 >= last_ch_cabled) last_ch_cabled = chs - 1;
240 }
241
243
244
247
248
249
250
251
253 std::ostringstream disp;
254 disp << "EvenPhiCMA::cable_CMA_channels - out of bound array indices (m_lowPt)! Values:"
255 << first_ch_cabled << ", " << last_ch_cabled
256 << " at " << __FILE__ << ":" << __LINE__ ;
257 throw std::runtime_error(disp.str());
258 }
259
261 if (
m_lowPt[ch][0][first_ch_cabled] >= 0)
break;
264
266 if (
m_lowPt[ch][0][last_ch_cabled] >= 0)
break;
269 }
270 }
271
277 }
278
280
284
285 int first_ch_cabled = 64;
286 int last_ch_cabled = -1;
287
289
293 WiredOR* wor = (*found).second;
295
296
299
302 int local_strip =
start - (max_st - rpc_st);
303 int final_strip =
stop - (max_st - rpc_st);
304
305 int chs = (
id().
Ixx_index() == 0) ? 40 - max_st / 2 : 0;
306
309
310 bool isBOE = false;
311 if (abs(sEta) == 8 && L == 'L') isBOE = true;
312 if (isBOE && id().Ixx_index() == 1) {
313 chs = 0;
314 local_strip = 13;
315 final_strip = 64;
316 }
317
318 if (isBOE && id().Ixx_index() == 0) {
319 chs = 4;
320 final_strip = 52;
321 local_strip = 1;
322 }
323
324 chs += (local_strip >= 0) ? 0 : abs(local_strip) + 1;
327 return false;
328 }
329 if (chs <= first_ch_cabled) first_ch_cabled = chs;
330
331 if (local_strip <= 0) local_strip = 1;
332 do {
335 return false;
336 }
337 bool skipChannel = false;
338 if (isBOE && id().Ixx_index() == 1 && ((chs > 3 && chs < 8) || (chs > 39 && chs < 44))) skipChannel = true;
339 if (isBOE && id().Ixx_index() == 0 && ((chs > 19 && chs < 24) || (chs > 55 && chs < 60))) skipChannel = true;
340 if (skipChannel) {
341 --local_strip;
342 } else {
343 if (local_strip > 0 && local_strip <= rpc_st) {
345 m_highPt[
r][0][chs] = cham * 100 + local_strip - 1;
346 m_highPt[
r][1][chs] = 10000 + cham * 100 + local_strip - 1;
347 } else {
348 m_highPt[
r][1][chs] = cham * 100 + local_strip - 1;
349 m_highPt[
r][0][chs] = 10000 + cham * 100 + local_strip - 1;
350 }
351 }
353 multiplicity[local_strip - 1] = 1;
354 } else {
355 multiplicity[local_strip - 1 + (max_st - rpc_st)] = 1;
356 }
357 }
358 ++chs;
359 } while (++local_strip <= final_strip);
360
362 if (chs - 1 >= last_ch_cabled) last_ch_cabled = chs - 1;
364 }
365
367
368
371
372
373
374
375
377 std::ostringstream disp;
378 disp << "EvenPhiCMA::cable_CMA_channels - out of bound array indices (m_highPt)! Values:"
379 << first_ch_cabled << ", " << last_ch_cabled
380 << " at " << __FILE__ << ":" << __LINE__ ;
381 throw std::runtime_error(disp.str());
382 }
383
385 if (
m_highPt[ch][0][first_ch_cabled] >= 0)
break;
388
390 if (
m_highPt[ch][0][last_ch_cabled] >= 0)
break;
393 }
394 }
395
396 return true;
397}
#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