#include <MdcID.h>
Inheritance diagram for MdcID:
Public Types | |
typedef Identifier::size_type | size_type |
typedef Identifier::size_type | size_type |
typedef Identifier::value_type | value_type |
typedef Identifier::value_type | value_type |
Public Member Functions | |
Identifier | emc (void) const |
Identifier | emc (void) const |
Identifier | hlt (void) const |
Identifier | hlt (void) const |
bool | is_axial (const Identifier &id) |
Test for axial and stereo wire. | |
bool | is_axial (const Identifier &id) |
Test for axial and stereo wire. | |
bool | is_emc (const Identifier &id) const |
bool | is_emc (const Identifier &id) const |
bool | is_hlt (const Identifier &id) const |
bool | is_hlt (const Identifier &id) const |
bool | is_mdc (const Identifier &id) const |
bool | is_mdc (const Identifier &id) const |
bool | is_muc (const Identifier &id) const |
bool | is_muc (const Identifier &id) const |
bool | is_tof (const Identifier &id) const |
bool | is_tof (const Identifier &id) const |
int | layer_max (const Identifier &id) |
Max/Min values for each field (error returns -999). | |
int | layer_max (const Identifier &id) |
Max/Min values for each field (error returns -999). | |
Identifier | mdc (void) const |
Identifier | mdc (void) const |
MdcID () | |
constructor | |
MdcID () | |
constructor | |
Identifier | muc (void) const |
Identifier | muc (void) const |
Identifier | tof (void) const |
Identifier | tof (void) const |
int | wire_max (const Identifier &id) |
int | wire_max (const Identifier &id) |
~MdcID () | |
destructor | |
~MdcID () | |
destructor | |
Static Public Member Functions | |
value_type | getAXIAL_LAYER_MAX () |
value_type | getAXIAL_LAYER_MAX () |
value_type | getAXIAL_WIRE () |
value_type | getAXIAL_WIRE () |
value_type | getAXIAL_WIRE_MAX () |
value_type | getAXIAL_WIRE_MAX () |
value_type | getIntID (unsigned int layer, unsigned int wire) |
value_type | getIntID (unsigned int wireType, unsigned int layer, unsigned int wire) |
value_type | getIntID (unsigned int layer, unsigned int wire) |
value_type | getIntID (unsigned int wireType, unsigned int layer, unsigned int wire) |
value_type | getSTEREO_LAYER_MAX () |
value_type | getSTEREO_LAYER_MAX () |
value_type | getSTEREO_WIRE () |
value_type | getSTEREO_WIRE () |
value_type | getSTEREO_WIRE_MAX () |
value_type | getSTEREO_WIRE_MAX () |
int | layer (const Identifier &id) |
Values of different levels (failure returns 0). | |
int | layer (const Identifier &id) |
Values of different levels (failure returns 0). | |
bool | values_ok (const unsigned int wireType, const unsigned int layer, const unsigned int wire) |
bool | values_ok (const unsigned int wireType, const unsigned int layer, const unsigned int wire) |
int | wire (const Identifier &id) |
int | wire (const Identifier &id) |
Identifier | wire_id (int layer, int wire) |
Identifier | wire_id (int wireType, int layer, int wire) |
For a single wire. | |
Identifier | wire_id (int layer, int wire) |
Identifier | wire_id (int wireType, int layer, int wire) |
For a single wire. | |
Protected Member Functions | |
int | emc_field_value () const |
int | emc_field_value () const |
int | get_detectorID (const Identifier &id) const |
int | get_detectorID (const Identifier &id) const |
int | hlt_field_value () const |
int | hlt_field_value () const |
int | mdc_field_value () const |
Provide efficient access to individual field values. | |
int | mdc_field_value () const |
Provide efficient access to individual field values. | |
int | muc_field_value () const |
int | muc_field_value () const |
int | tof_field_value () const |
int | tof_field_value () const |
Static Protected Attributes | |
const unsigned int | EMC_ID = 0x30 |
const unsigned int | EMC_INDEX = 24 |
const unsigned int | EMC_MASK = 0xFF000000 |
const unsigned int | HLT_ID = 0x50 |
const unsigned int | HLT_INDEX = 24 |
const unsigned int | HLT_MASK = 0xFF000000 |
const unsigned int | MDC_ID = 0x10 |
const unsigned int | MDC_INDEX = 24 |
const unsigned int | MDC_MASK = 0xFF000000 |
const unsigned int | MUC_ID = 0x40 |
const unsigned int | MUC_INDEX = 24 |
const unsigned int | MUC_MASK = 0xFF000000 |
const unsigned int | TOF_ID = 0x20 |
const unsigned int | TOF_INDEX = 24 |
const unsigned int | TOF_MASK = 0xFF000000 |
Private Types | |
typedef std::vector< Identifier > | id_vec |
typedef std::vector< Identifier > | id_vec |
typedef id_vec::const_iterator | id_vec_it |
typedef id_vec::const_iterator | id_vec_it |
Static Private Attributes | |
const unsigned int | AXIAL_LAYER_MAX = 18 |
const unsigned int | AXIAL_WIRE = 0 |
const unsigned int | AXIAL_WIRE_MAX = 287 |
const unsigned int | INNER_AXIAL_LAYER_MAX = 12 |
const unsigned int | INNER_STEREO_LAYER_MAX = 8 |
const unsigned int | LAYER_INDEX = 9 |
const unsigned int | LAYER_MASK = 0x00007E00 |
const unsigned int | LAYER_MAX = 43 |
const unsigned int | OUTER_AXIAL_LAYER_MAX = 7 |
const unsigned int | OUTER_STEREO_LAYER_MAX = 16 |
const unsigned int | STEREO_LAYER_MAX = 23 |
const unsigned int | STEREO_WIRE = 1 |
const unsigned int | STEREO_WIRE_MAX = 239 |
const unsigned int | WIRE_INDEX = 0 |
const unsigned int | WIRE_MASK = 0x000001FF |
const unsigned int | WIRETYPE_INDEX = 15 |
const unsigned int | WIRETYPE_MASK = 0x00008000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor
00005 { 00006 }
|
|
destructor
00008 { 00009 }
|
|
constructor
|
|
destructor
|
|
|
|
00054 { 00055 Identifier id = Identifier( m_EmcId << EMC_INDEX ); 00056 return id; 00057 }
|
|
|
|
00097 {return (m_EmcId);}
|
|
|
|
|
|
|
|
00139 {
00140 return AXIAL_LAYER_MAX;
00141 }
|
|
|
|
00156 {
00157 return AXIAL_WIRE;
00158 }
|
|
|
|
00147 {
00148 return AXIAL_WIRE_MAX;
00149 }
|
|
|
|
|
|
00104 { 00105 unsigned int value; 00106 unsigned int wireType; 00107 00108 if ( layer < INNER_STEREO_LAYER_MAX 00109 || layer < (INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX + OUTER_STEREO_LAYER_MAX) 00110 && layer >= (INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX ) 00111 ) 00112 wireType = STEREO_WIRE; 00113 else wireType = AXIAL_WIRE; 00114 00115 value = ((BesDetectorID::MDC_ID << MDC_INDEX)&MDC_MASK) | 00116 ((wireType << WIRETYPE_INDEX)&WIRETYPE_MASK) | 00117 ((layer << LAYER_INDEX)&LAYER_MASK) | 00118 ((wire << WIRE_INDEX)&WIRE_MASK); 00119 00120 return value; 00121 00122 }
|
|
00127 { 00128 unsigned int value = ((BesDetectorID::MDC_ID << MDC_INDEX)&MDC_MASK) | 00129 ((wireType << WIRETYPE_INDEX)&WIRETYPE_MASK) | 00130 ((layer << LAYER_INDEX)&LAYER_MASK) | 00131 ((wire << WIRE_INDEX)&WIRE_MASK); 00132 return value; 00133 00134 }
|
|
|
|
00143 {
00144 return STEREO_LAYER_MAX;
00145 }
|
|
|
|
00161 {
00162 return STEREO_WIRE;
00163 }
|
|
|
|
00151 {
00152 return STEREO_WIRE_MAX;
00153 }
|
|
|
|
00064 { 00065 Identifier id = Identifier( m_HltId << HLT_INDEX ); 00066 return id; 00067 }
|
|
|
|
00103 {return (m_HltId);}
|
|
Test for axial and stereo wire.
|
|
Test for axial and stereo wire.
00043 { 00044 unsigned int type = (id.get_value() & MdcID::WIRETYPE_MASK) >> MdcID::WIRETYPE_INDEX; 00045 return (type == AXIAL_WIRE) ? true : false; 00046 }
|
|
|
|
00029 { 00030 Identifier::value_type value = id.get_value(); 00031 return (value & EMC_MASK >> EMC_INDEX) == EMC_ID ? true : false; 00032 }
|
|
|
|
00039 { 00040 Identifier::value_type value = id.get_value(); 00041 return (value & HLT_MASK >> HLT_INDEX) == HLT_ID ? true : false; 00042 }
|
|
|
|
00019 { 00020 Identifier::value_type value = id.get_value(); 00021 return (value & MDC_MASK >> MDC_INDEX) == MDC_ID ? true : false; 00022 }
|
|
|
|
00034 { 00035 Identifier::value_type value = id.get_value(); 00036 return (value & MUC_MASK >> MUC_INDEX) == MUC_ID ? true : false; 00037 }
|
|
|
|
00024 { 00025 Identifier::value_type value = id.get_value(); 00026 return (value & TOF_MASK >> TOF_INDEX) == TOF_ID ? true : false; 00027 }
|
|
Values of different levels (failure returns 0).
|
|
Values of different levels (failure returns 0).
00049 { 00050 return (id.get_value() & MdcID::LAYER_MASK) >> MdcID::LAYER_INDEX; 00051 }
|
|
Max/Min values for each field (error returns -999).
|
|
Max/Min values for each field (error returns -999).
00059 { 00060 if (is_axial(id)) { 00061 return AXIAL_LAYER_MAX; 00062 } else { 00063 return STEREO_LAYER_MAX; 00064 } 00065 }
|
|
|
|
00044 { 00045 Identifier id = Identifier( m_MdcId << MDC_INDEX ); 00046 return id; 00047 }
|
|
Provide efficient access to individual field values.
|
|
Provide efficient access to individual field values.
00091 {return (m_MdcId);}
|
|
|
|
00059 { 00060 Identifier id = Identifier( m_MucId << MUC_INDEX ); 00061 return id; 00062 }
|
|
|
|
00100 {return (m_MucId);}
|
|
|
|
00049 { 00050 Identifier id = Identifier( m_TofId << TOF_INDEX ); 00051 return id; 00052 }
|
|
|
|
00094 {return (m_TofId);}
|
|
|
|
00015 { 00016 // Check values 00017 if ( wireType != AXIAL_WIRE && wireType != STEREO_WIRE ) return false; 00018 00019 if ( wireType == STEREO_WIRE ) { 00020 if ( layer < INNER_STEREO_LAYER_MAX 00021 || layer < ( INNER_STEREO_LAYER_MAX 00022 + INNER_AXIAL_LAYER_MAX 00023 + OUTER_STEREO_LAYER_MAX ) 00024 && layer >= (INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX )) 00025 return true; 00026 } 00027 00028 if ( wireType == AXIAL_WIRE ) { 00029 if ( layer >= INNER_STEREO_LAYER_MAX 00030 && layer < ( INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX ) 00031 || layer >= ( INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX 00032 + OUTER_STEREO_LAYER_MAX ) && layer < LAYER_MAX ) 00033 00034 return true; 00035 } 00036 00037 std::cout << " ++ MdcID::values_ok++ wiretype = " << wireType << " layer = " << layer << " wire = " << wire << std::endl; 00038 00039 return false; 00040 }
|
|
|
|
00054 { 00055 return (id.get_value() & MdcID::WIRE_MASK) >> MdcID::WIRE_INDEX; 00056 }
|
|
|
|
For a single wire.
|
|
00092 { 00093 if ( layer < INNER_STEREO_LAYER_MAX 00094 || layer < (INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX + OUTER_STEREO_LAYER_MAX) 00095 && layer >= (INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX ) 00096 ) 00097 return MdcID::wire_id ( STEREO_WIRE, layer, wire ); 00098 else return MdcID::wire_id (AXIAL_WIRE, layer, wire ); 00099 00100 }
|
|
For a single wire.
00080 { 00081 assert ( values_ok(wireType, layer, wire) ); 00082 int value = (BesDetectorID::MDC_ID << MDC_INDEX) | 00083 (wireType << WIRETYPE_INDEX) | 00084 (layer << LAYER_INDEX) | 00085 (wire << WIRE_INDEX); 00086 return Identifier(value); 00087 }
|
|
|
|
00068 { 00069 if (is_axial(id)) { 00070 return AXIAL_WIRE_MAX; 00071 } else { 00072 return STEREO_WIRE_MAX; 00073 } 00074 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|