#include <TofID.h>
Inheritance diagram for TofID:
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_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) |
int | layer_max (const Identifier &id) |
Identifier | mdc (void) const |
Identifier | mdc (void) const |
Identifier | muc (void) const |
Identifier | muc (void) const |
int | phi_module_max (const Identifier &id) |
Max/Min values for each field (error returns -999). | |
int | phi_module_max (const Identifier &id) |
Max/Min values for each field (error returns -999). | |
Identifier | tof (void) const |
Identifier | tof (void) const |
TofID () | |
constructor | |
TofID () | |
constructor | |
~TofID () | |
destructor | |
~TofID () | |
destructor | |
Static Public Member Functions | |
int | barrel_ec (const Identifier &id) |
Values of different levels (failure returns 0). | |
int | barrel_ec (const Identifier &id) |
Values of different levels (failure returns 0). | |
Identifier | cell_id (int barrel_ec, int layer, int phi_module, int end) |
For a single crystal. | |
Identifier | cell_id (int barrel_ec, int layer, int phi_module, int end) |
For a single crystal. | |
int | end (const Identifier &id) |
int | end (const Identifier &id) |
value_type | getBARREL_EC_MAX () |
value_type | getBARREL_EC_MAX () |
value_type | getBARREL_EC_MIN () |
value_type | getBARREL_EC_MIN () |
value_type | getIntID (int barrel_ec, int layer, int phi_module, int end) |
value_type | getIntID (int barrel_ec, int layer, int phi_module, int end) |
value_type | getLAYER_BARREL_MAX () |
value_type | getLAYER_BARREL_MAX () |
value_type | getLAYER_ENDCAP_MAX () |
value_type | getLAYER_ENDCAP_MAX () |
value_type | getPHI_BARREL_MAX () |
value_type | getPHI_BARREL_MAX () |
value_type | getPHI_ENDCAP_MAX () |
value_type | getPHI_ENDCAP_MAX () |
bool | is_barrel (const unsigned int barrel_ec) |
bool | is_barrel (const Identifier &id) |
Test for barrel. | |
bool | is_barrel (const unsigned int barrel_ec) |
bool | is_barrel (const Identifier &id) |
Test for barrel. | |
int | layer (const Identifier &id) |
int | layer (const Identifier &id) |
int | phi_module (const Identifier &id) |
int | phi_module (const Identifier &id) |
bool | values_ok (const unsigned int barrel_ec, const unsigned int layer, const unsigned int phi_module, const unsigned int) |
bool | values_ok (const unsigned int barrel_ec, const unsigned int layer, const unsigned int phi_module, const unsigned int) |
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 | BARREL_EC_INDEX = 14 |
const unsigned int | BARREL_EC_MASK = 0x0000C000 |
const unsigned int | BARREL_EC_MAX = 2 |
const unsigned int | BARREL_EC_MIN = 0 |
const unsigned int | END_INDEX = 0 |
const unsigned int | END_MASK = 0x00000001 |
const unsigned int | LAYER_BARREL_MAX = 1 |
const unsigned int | LAYER_ENDCAP_MAX = 0 |
const unsigned int | LAYER_INDEX = 8 |
const unsigned int | LAYER_MASK = 0x00000100 |
const unsigned int | PHI_BARREL_MAX = 87 |
const unsigned int | PHI_ENDCAP_MAX = 47 |
const unsigned int | PHI_INDEX = 1 |
const unsigned int | PHI_MASK = 0x000000FE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor
00005 { 00006 }
|
|
destructor
00008 { 00009 }
|
|
constructor
|
|
destructor
|
|
Values of different levels (failure returns 0).
|
|
Values of different levels (failure returns 0).
00044 { 00045 return ((id.get_value() & TofID::BARREL_EC_MASK) >> TofID::BARREL_EC_INDEX); 00046 }
|
|
For a single crystal.
|
|
For a single crystal.
00085 { 00086 assert ( values_ok(barrel_ec, layer, phi_module, end) ); 00087 unsigned int value = (BesDetectorID::TOF_ID << TOF_INDEX) | 00088 (barrel_ec << BARREL_EC_INDEX)| 00089 (layer << LAYER_INDEX) | (phi_module << PHI_INDEX) | 00090 (end << END_INDEX); 00091 return Identifier(value); 00092 }
|
|
|
|
00054 { 00055 Identifier id = Identifier( m_EmcId << EMC_INDEX ); 00056 return id; 00057 }
|
|
|
|
00097 {return (m_EmcId);}
|
|
|
|
00059 { 00060 return (id.get_value() & TofID::END_MASK) >> TofID::END_INDEX; 00061 }
|
|
|
|
|
|
|
|
00127 {
00128 return BARREL_EC_MAX;
00129 }
|
|
|
|
00132 {
00133 return BARREL_EC_MIN;
00134 }
|
|
|
|
00099 { 00100 unsigned int value = (BesDetectorID::TOF_ID << TOF_INDEX) | 00101 (barrel_ec << BARREL_EC_INDEX)| 00102 (layer << LAYER_INDEX) | (phi_module << PHI_INDEX) | 00103 (end << END_INDEX); 00104 return value; 00105 }
|
|
|
|
00108 {
00109 return LAYER_BARREL_MAX;
00110 }
|
|
|
|
00113 {
00114 return LAYER_ENDCAP_MAX;
00115 }
|
|
|
|
00118 {
00119 return PHI_BARREL_MAX;
00120 }
|
|
|
|
00123 {
00124 return PHI_ENDCAP_MAX;
00125 }
|
|
|
|
00064 { 00065 Identifier id = Identifier( m_HltId << HLT_INDEX ); 00066 return id; 00067 }
|
|
|
|
00103 {return (m_HltId);}
|
|
|
|
Test for barrel.
|
|
00040 { 00041 return (barrel_ec == BARREL_EC_MAX || barrel_ec == BARREL_EC_MIN) ? false : true; 00042 }
|
|
Test for barrel.
00036 { 00037 unsigned int pos = (id.get_value() & TofID::BARREL_EC_MASK) >> TofID::BARREL_EC_INDEX; 00038 return (pos == BARREL_EC_MAX || pos == BARREL_EC_MIN) ? false : true; 00039 }
|
|
|
|
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 }
|
|
|
|
00049 { 00050 return (id.get_value() & TofID::LAYER_MASK) >> TofID::LAYER_INDEX; 00051 }
|
|
|
|
00063 { 00064 if (is_barrel(id)) { 00065 return LAYER_BARREL_MAX; 00066 } else { 00067 return LAYER_ENDCAP_MAX; 00068 } 00069 }
|
|
|
|
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);}
|
|
|
|
00054 { 00055 return (id.get_value() & TofID::PHI_MASK) >> TofID::PHI_INDEX; 00056 }
|
|
Max/Min values for each field (error returns -999).
|
|
Max/Min values for each field (error returns -999).
00072 { 00073 if (is_barrel(id)) { 00074 return PHI_BARREL_MAX; 00075 } else { 00076 return PHI_ENDCAP_MAX; 00077 } 00078 }
|
|
|
|
00049 { 00050 Identifier id = Identifier( m_TofId << TOF_INDEX ); 00051 return id; 00052 }
|
|
|
|
00094 {return (m_TofId);}
|
|
|
|
00016 { 00017 // Check values 00018 00019 //std::cout << " barrel_ec = "<< barrel_ec 00020 // << " layer = "<< layer 00021 // << " phi_module = "<< phi_module <<std::endl; 00022 00023 if ( barrel_ec > BARREL_EC_MAX) return false; 00024 if ( BARREL_EC_MIN == barrel_ec || BARREL_EC_MIN == barrel_ec) { 00025 if ( phi_module > PHI_ENDCAP_MAX ) return false; 00026 if ( layer > LAYER_ENDCAP_MAX ) return false; 00027 } 00028 else { 00029 if ( phi_module > PHI_BARREL_MAX ) return false; 00030 if ( layer > LAYER_BARREL_MAX ) return false; 00031 } 00032 return true; 00033 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|