#include <RPCchamber.h>
|
| | RPCchamber (const RPCchamber::chamberParameters ¶ms) |
| | Helper struct to reduce the number of arguments in the constructor.
|
| | RPCchamber (const RPCchamber &)=default |
| virtual | ~RPCchamber () |
| RPCchamber & | operator= (const RPCchamber &)=default |
| void | set_eta_st_global (int) |
| void | set_eta_co_global (int) |
| int | eta_strips () const |
| int | eta_connectors () const |
| int | eta_strip_global () const |
| int | eta_conn_global () const |
| int | phi_strips () const |
| int | phi_connectors () const |
| int | ijk_etaReadout () const |
| int | ijk_phiReadout () const |
| const std::string & | chamber_name () const |
| std::string | stationName () const |
| int | stationEta () const |
| int | doubletR () const |
| int | doubletZ () const |
| int | phiReadoutPannels () const |
| int | strips_in_Eta_Conn () const |
| int | strips_in_Phi_Conn () const |
| const ReadoutCh & | eta_read_mul () const |
| const CMAlist & | readoutCMAs () const |
| const WORlist & | readoutWORs () const |
| std::string | extendedName (int) const |
| bool | inversion (int) const |
| bool | local_strip (ViewType, int, int &) const |
| bool | global_strip (ViewType, HalfType, int, int &) const |
| bool | local_connector (ViewType, int, int &, int &, int &) const |
| bool | global_connector (ViewType, HalfType, int, int &, int &, int &) const |
| bool | Gstrip_2_Lnumber (ViewType, int, int &) const |
| bool | Gconn_2_Lnumber (ViewType, int, int &, int &) const |
| void | Print (std::ostream &, bool) const |
| bool | check () |
| bool | setup (SectorLogicSetup &) |
| void | add_cma (const EtaCMA *) |
| void | add_wor (const WiredOR *) |
| void | add_eta_channel (int) |
| int | number () const |
| int | station () const |
| int | sector_type () const |
| std::string | error_header () const |
| std::string | no_connection_error (const std::string &, int) const |
| ObjectType | tag () const |
| const std::string & | name () const |
Definition at line 23 of file RPCchamber.h.
◆ CMAlist
◆ ReadoutCh
◆ WORlist
◆ RPCchamber() [1/2]
Helper struct to reduce the number of arguments in the constructor.
Definition at line 16 of file RPCchamber.cxx.
18}
CablingObject(const cablingParameters &, const std::string &)
chamberDefineParams m_params
◆ RPCchamber() [2/2]
| RPC_CondCabling::RPCchamber::RPCchamber |
( |
const RPCchamber & | | ) |
|
|
default |
◆ ~RPCchamber()
| RPCchamber::~RPCchamber |
( |
| ) |
|
|
virtualdefault |
◆ add_cma()
| void RPCchamber::add_cma |
( |
const EtaCMA * | cma | ) |
|
◆ add_eta_channel()
| void RPCchamber::add_eta_channel |
( |
int | channel | ) |
|
◆ add_wor()
| void RPCchamber::add_wor |
( |
const WiredOR * | wor | ) |
|
◆ chamber_name()
| const std::string & RPCchamber::chamber_name |
( |
| ) |
const |
◆ check()
| bool RPCchamber::check |
( |
| ) |
|
Definition at line 68 of file RPCchamber.cxx.
68 {
71 <<
error(
"==> No readout coverage for this chamber!");
72 return false;
73 }
74
75 RPCchamber::CMAlist::const_iterator cma =
m_readoutCMAs.begin();
77
82 <<
error(
"==> No readout coverage for the full set of ETA strip!");
83 return false;
84 }
87 <<
error(
"==> Pivot plane ETA strips must be read only once!");
88 return false;
89 }
92 <<
error(
"==> Confirm plane ETA strips can be read only twice!");
93 return false;
94 }
95 }
96
99 <<
error(
"==> Gives input to more than 1 Wired OR pannel!");
100 return false;
101 }
102 return true;
103}
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
std::string error(const std::string &) const
◆ doubletR()
| int RPCchamber::doubletR |
( |
| ) |
const |
◆ doubletZ()
| int RPCchamber::doubletZ |
( |
| ) |
const |
◆ error()
| std::string RPCchamber::error |
( |
const std::string & | mess | ) |
const |
|
nodiscardprivate |
Definition at line 105 of file RPCchamber.cxx.
105 {
106 std::ostringstream disp;
108 << mess << std::endl << *this;
109 return disp.str();
110}
std::string error_header() const
◆ error_header()
| std::string CablingObject::error_header |
( |
| ) |
const |
|
nodiscardinherited |
Definition at line 22 of file CablingObject.cxx.
22 {
23 std::ostringstream disp;
26 disp << ":" << std::endl;
27 return disp.str();
28}
◆ eta_conn_global()
| int RPCchamber::eta_conn_global |
( |
| ) |
const |
◆ eta_connectors()
| int RPCchamber::eta_connectors |
( |
| ) |
const |
◆ eta_read_mul()
◆ eta_strip_global()
| int RPCchamber::eta_strip_global |
( |
| ) |
const |
◆ eta_strips()
| int RPCchamber::eta_strips |
( |
| ) |
const |
◆ extendedName()
| std::string RPCchamber::extendedName |
( |
int | sector | ) |
const |
Definition at line 299 of file RPCchamber.cxx.
299 {
301 if (sector <= 31)
303 else
305
307
309 case 'L':
sd = (sector % 2) ?
"HV" :
"RO";
break;
310
311 case 'E':
sd = (sector % 2) ?
"HV" :
"RO";
break;
312
313 case 'R':
sd = (sector % 2) ?
"HV" :
"RO";
break;
314
315 case 'M':
sd = (sector % 2) ?
"HV" :
"RO";
break;
316
317 case 'S':
sd = (sector % 2) ?
"RO" :
"HV";
break;
318
319 case 'F':
sd = (sector % 2) ?
"RO" :
"HV";
break;
320
321 case 'G':
sd = (sector % 2) ?
"RO" :
"HV";
break;
322
323 default: return "";
324 }
325
326 std::ostringstream
out;
327
328 int physicsSector = (((sector + 1) % 32) / 2 + 1) % 16;
329 if (!physicsSector) physicsSector = 16;
330
333
335 } else {
338 }
339
340 std::string outstr;
342
343 return outstr;
344}
std::string stationName() const
◆ Gconn_2_Lnumber()
| bool RPCchamber::Gconn_2_Lnumber |
( |
ViewType | side, |
|
|
int | global_address, |
|
|
int & | local_address, |
|
|
int & | strip_number ) const |
Definition at line 223 of file RPCchamber.cxx.
223 {
227 if (local_address <=
m_params.etaConnectors - 1) {
228 strip_number = local_address *
m_params.stripsInEtaCon;
229 return true;
230 }
231 } else {
232 local_address =
233 (global_address > 0) ? global_address +
m_params.etaConnectors / 2 - 1 : global_address +
m_params.etaConnectors / 2;
234 if (local_address <= m_params.etaConnectors - 1 && local_address >= 0) {
235 strip_number = local_address *
m_params.stripsInEtaCon;
236 return true;
237 }
238 }
239 }
240
241 if (side ==
Phi) {
return false; }
242
243 return false;
244}
◆ global_connector()
| bool RPCchamber::global_connector |
( |
ViewType | side, |
|
|
HalfType | h_barrel, |
|
|
int | strip_number, |
|
|
int & | global_address, |
|
|
int & | left_strips, |
|
|
int & | right_strips ) const |
Definition at line 188 of file RPCchamber.cxx.
189 {
190 int l_address;
191 if (
local_connector(side, strip_number, l_address, left_strips, right_strips)) {
195 if (h_barrel ==
Negative) global_address = -global_address;
196 } else {
197 if (h_barrel ==
Negative && global_address > 0)
return false;
198 if (h_barrel ==
Positive && global_address < 0)
return false;
199 }
200 return true;
201 }
202 if (side ==
Phi) {
return false; }
203 }
204
205 return false;
206}
bool local_connector(ViewType, int, int &, int &, int &) const
◆ global_strip()
| bool RPCchamber::global_strip |
( |
ViewType | side, |
|
|
HalfType | h_barrel, |
|
|
int | strip_number, |
|
|
int & | global_address ) const |
Definition at line 133 of file RPCchamber.cxx.
133 {
134 int local_address;
135 if (
local_strip(side, strip_number, local_address)) {
139 if (h_barrel ==
Negative) global_address = -global_address;
140 } else {
141 if (h_barrel ==
Negative && global_address > 0)
return false;
142 if (h_barrel ==
Positive && global_address < 0)
return false;
143 }
144 return true;
145 }
146
147 if (side ==
Phi) {
return false; }
148 }
149
150 return false;
151}
bool local_strip(ViewType, int, int &) const
◆ Gstrip_2_Lnumber()
| bool RPCchamber::Gstrip_2_Lnumber |
( |
ViewType | side, |
|
|
int | global_address, |
|
|
int & | strip_number ) const |
Definition at line 208 of file RPCchamber.cxx.
208 {
212 if (strip_number <=
m_params.etaStrips - 1)
return true;
213 } else {
214 strip_number = (global_address > 0) ? global_address +
m_params.etaStrips / 2 - 1 : global_address +
m_params.etaStrips / 2;
215 if (strip_number <= m_params.etaStrips - 1 && strip_number >= 0) return true;
216 }
217 }
218 if (side ==
Phi) {
return false; }
219
220 return false;
221}
◆ ijk_etaReadout()
| int RPCchamber::ijk_etaReadout |
( |
| ) |
const |
◆ ijk_phiReadout()
| int RPCchamber::ijk_phiReadout |
( |
| ) |
const |
◆ inversion()
| bool RPCchamber::inversion |
( |
int | sector | ) |
const |
Definition at line 346 of file RPCchamber.cxx.
346 {
348 case 'L':
349 if (sector % 2)
350 return sector <= 31;
351 else
352 return sector > 31;
353 break;
354
355 case 'E':
356 if (sector % 2)
357 return sector <= 31;
358 else
359 return sector > 31;
360 break;
361
362 case 'R':
363 if (sector % 2)
364 return (sector <= 31) ? false : false;
365 else
366 return (sector <= 31) ? false : false;
367 break;
368
369 case 'M':
370 if (sector % 2)
371 return (sector <= 31) ? false : false;
372 else
373 return (sector <= 31) ? false : false;
374 break;
375
376 case 'S':
377 if (sector % 2)
378 return sector <= 31;
379 else
380 return sector > 31;
381 break;
382
383 case 'F':
384 if (
stationName()[1] ==
'O' && (sector == 25 || sector == 26 || sector == 57 || sector == 58)) {
385 if (sector % 2)
386 return sector > 31;
387 else
388 return sector <= 31;
389 }
390
391 if (sector % 2)
392 return sector <= 31;
393 else
394 return sector > 31;
395 break;
396
397 case 'G':
398 if (
stationName()[1] ==
'O' &&
stationName()[3] !=
'8' && (sector == 25 || sector == 26 || sector == 57 || sector == 58)) {
399 if (sector % 2)
400 return sector > 31;
401 else
402 return sector <= 31;
403 }
404
405 if (sector % 2)
406 return sector <= 31;
407 else
408 return sector > 31;
409 break;
410
411 default: return false;
412 }
413}
◆ local_connector()
| bool RPCchamber::local_connector |
( |
ViewType | side, |
|
|
int | strip_number, |
|
|
int & | local_address, |
|
|
int & | low_eta_strips, |
|
|
int & | hi_eta_strips ) const |
Definition at line 153 of file RPCchamber.cxx.
153 {
154 int strip_address;
155 if (
local_strip(side, strip_number, strip_address)) {
156 int address = abs(strip_address) - 1;
157 int strip_sign = (abs(strip_address)) / strip_address;
161 int left =
m_params.stripsInEtaCon - low_eta_strips - 1;
162 int residual_strips =
residual(side, strip_number);
163 hi_eta_strips = (left <= residual_strips) ? left : residual_strips;
164 return true;
165 }
166 if (side ==
Phi) {
return false; }
167 }
168
169 return false;
170}
int residual(ViewType, int) const
◆ local_strip()
| bool RPCchamber::local_strip |
( |
ViewType | side, |
|
|
int | strip_number, |
|
|
int & | local_address ) const |
Definition at line 112 of file RPCchamber.cxx.
112 {
114 if (strip_number >=
m_params.etaStrips)
return false;
116 local_address = strip_number + 1;
117 } else {
118 int middle =
m_params.etaStrips / 2;
119 int address = strip_number - middle;
120 local_address = (strip_number < middle) ? address :
address + 1;
121 }
122 return true;
123 }
124
126 if (strip_number >=
m_params.phiStrips)
return false;
127 local_address = strip_number + 1;
128 }
129
130 return false;
131}
◆ name()
| const std::string & BaseObject::name |
( |
| ) |
const |
|
inlineinherited |
◆ no_connection_error()
| std::string CablingObject::no_connection_error |
( |
const std::string & | conn_name, |
|
|
int | num ) const |
|
nodiscardinherited |
Definition at line 30 of file CablingObject.cxx.
30 {
31 std::ostringstream disp;
32 disp <<
error_header() <<
name() <<
" n. " <<
number() <<
" is supposed to receive input from " << conn_name <<
" n. " <<
num <<
" which doesn't exist!";
33 return disp.str();
34}
const std::string & name() const
◆ number()
| int CablingObject::number |
( |
| ) |
const |
|
inherited |
◆ operator=()
◆ phi_connectors()
| int RPCchamber::phi_connectors |
( |
| ) |
const |
◆ phi_strips()
| int RPCchamber::phi_strips |
( |
| ) |
const |
◆ phiReadoutPannels()
| int RPCchamber::phiReadoutPannels |
( |
| ) |
const |
◆ Print()
| void RPCchamber::Print |
( |
std::ostream & | stream, |
|
|
bool | detail ) const |
|
virtual |
Reimplemented from BaseObject.
Definition at line 250 of file RPCchamber.cxx.
250 {
251 stream <<
" chamber n. " << std::setw(2) <<
number() <<
" ";
264 if (detail) {
266 << std::endl;
271 ++cma;
272 }
273 stream <<
" Eta Readout multiplicity:" << std::endl;
275 << " 1 5 10 15 20 25 30 35 40" << std::endl;
277 << " | | | | | | | | |" << std::endl;
281 stream <<
" It gives input to " <<
m_readoutWORs.size() <<
" WiredOR pannel:" << std::endl;
282 RPCchamber::WORlist::const_iterator wor =
m_readoutWORs.begin();
285 ++wor;
286 }
287
288 stream <<
"========================================"
289 << "=======================================" << std::endl;
290 }
291}
int eta_connectors() const
int ijk_phiReadout() const
int phi_connectors() const
int ijk_etaReadout() const
const std::string & chamber_name() const
◆ readoutCMAs()
◆ readoutWORs()
◆ residual()
| int RPCchamber::residual |
( |
ViewType | side, |
|
|
int | strip_number ) const |
|
private |
Definition at line 172 of file RPCchamber.cxx.
172 {
175 return (
m_params.etaStrips - 1 - strip_number);
176 } else {
177 int total_strips =
m_params.etaStrips / 2;
178 if (strip_number < total_strips)
179 return strip_number;
180 else
181 return m_params.etaStrips - strip_number - 1;
182 }
183 }
184 if (side ==
Phi) {
return (
m_params.phiStrips - 1 - strip_number); }
185 return 0;
186}
◆ sector_type()
| int CablingObject::sector_type |
( |
| ) |
const |
|
inherited |
◆ set_eta_co_global()
| void RPCchamber::set_eta_co_global |
( |
int | gl | ) |
|
◆ set_eta_st_global()
| void RPCchamber::set_eta_st_global |
( |
int | gl | ) |
|
◆ setup()
Definition at line 48 of file RPCchamber.cxx.
48 {
52
53 if (ijk_eta !=
m_params.ijk_EtaReadOut) {
55 <<
error(
"==> mismatch of ijk_etaReadout with respect to others RPC");
56 return false;
57 }
58
59 if (ijk_phi !=
m_params.ijk_PhiReadOut) {
61 <<
error(
"==> mismatch of ijk_phiReadout with respect to others RPC");
62 return false;
63 }
64
65 return true;
66}
RPCchamber(const RPCchamber::chamberParameters ¶ms)
Helper struct to reduce the number of arguments in the constructor.
bool setup(SectorLogicSetup &)
◆ station()
| int CablingObject::station |
( |
| ) |
const |
|
inherited |
◆ stationEta()
| int RPCchamber::stationEta |
( |
| ) |
const |
◆ stationName()
| std::string RPCchamber::stationName |
( |
| ) |
const |
◆ strips_in_Eta_Conn()
| int RPCchamber::strips_in_Eta_Conn |
( |
| ) |
const |
◆ strips_in_Phi_Conn()
| int RPCchamber::strips_in_Phi_Conn |
( |
| ) |
const |
◆ tag()
◆ m_eta_conn_global
| int RPC_CondCabling::RPCchamber::m_eta_conn_global {0} |
|
private |
◆ m_eta_read_mul
| ReadoutCh RPC_CondCabling::RPCchamber::m_eta_read_mul |
|
private |
◆ m_eta_strip_global
| int RPC_CondCabling::RPCchamber::m_eta_strip_global {0} |
|
private |
◆ m_name
| std::string BaseObject::m_name |
|
privateinherited |
◆ m_number
| int CablingObject::m_number {0} |
|
privateinherited |
◆ m_params
◆ m_readoutCMAs
| CMAlist RPC_CondCabling::RPCchamber::m_readoutCMAs |
|
private |
◆ m_readoutWORs
| WORlist RPC_CondCabling::RPCchamber::m_readoutWORs |
|
private |
◆ m_sector_type
| int CablingObject::m_sector_type {0} |
|
privateinherited |
◆ m_station
| int CablingObject::m_station {0} |
|
privateinherited |
◆ m_tag
The documentation for this class was generated from the following files: