#include <EmcID.h>
Inheritance diagram for EmcID:
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 |
EmcID () | |
constructor | |
EmcID () | |
constructor | |
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 |
Identifier | mdc (void) const |
Identifier | mdc (void) const |
Identifier | muc (void) const |
Identifier | muc (void) const |
unsigned int | phi_module_max (const Identifier &id) |
unsigned int | phi_module_max (const Identifier &id) |
unsigned int | theta_module_max (const Identifier &id) |
Max/Min values for each field (error returns -999). | |
unsigned int | theta_module_max (const Identifier &id) |
Max/Min values for each field (error returns -999). | |
Identifier | tof (void) const |
Identifier | tof (void) const |
~EmcID () | |
destructor | |
~EmcID () | |
destructor | |
Static Public Member Functions | |
unsigned int | barrel_ec (const Identifier &id) |
Values of different levels (failure returns 0). | |
unsigned int | barrel_ec (const Identifier &id) |
Values of different levels (failure returns 0). | |
Identifier | crystal_id (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module) |
For a single crystal. | |
Identifier | crystal_id (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module) |
For a single crystal. | |
unsigned int | getBARREL () |
unsigned int | getBARREL () |
unsigned int | getBARREL_EC_MAX () |
unsigned int | getBARREL_EC_MAX () |
unsigned int | getBARREL_EC_MIN () |
unsigned int | getBARREL_EC_MIN () |
unsigned int | getENDCAP_EAST () |
unsigned int | getENDCAP_EAST () |
unsigned int | getENDCAP_WEST () |
unsigned int | getENDCAP_WEST () |
unsigned int | getIntID (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module) |
unsigned int | getIntID (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module) |
unsigned int | getPHI_BARREL_MAX () |
unsigned int | getPHI_BARREL_MAX () |
unsigned int | getPHI_BARREL_MIN () |
unsigned int | getPHI_BARREL_MIN () |
unsigned int | getPHI_ENDCAP_MAX (const unsigned int theta) |
unsigned int | getPHI_ENDCAP_MAX (const unsigned int theta) |
unsigned int | getPHI_ENDCAP_MIN () |
unsigned int | getPHI_ENDCAP_MIN () |
unsigned int | getTHETA_BARREL_MAX () |
unsigned int | getTHETA_BARREL_MAX () |
unsigned int | getTHETA_BARREL_MIN () |
unsigned int | getTHETA_BARREL_MIN () |
unsigned int | getTHETA_ENDCAP_MAX () |
unsigned int | getTHETA_ENDCAP_MAX () |
unsigned int | getTHETA_ENDCAP_MIN () |
unsigned int | getTHETA_ENDCAP_MIN () |
bool | is_barrel (const Identifier &id) |
Test for barrel. | |
bool | is_barrel (const Identifier &id) |
Test for barrel. | |
unsigned int | phi_module (const Identifier &id) |
unsigned int | phi_module (const Identifier &id) |
unsigned int | theta_module (const Identifier &id) |
unsigned int | theta_module (const Identifier &id) |
bool | values_ok (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module) |
bool | values_ok (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module) |
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 |
Static Private Attributes | |
const unsigned int | BARREL = 1 |
const unsigned int | BARREL_EC_INDEX = 16 |
const unsigned int | BARREL_EC_MASK = 0x000F0000 |
const unsigned int | BARREL_EC_MAX = 2 |
const unsigned int | BARREL_EC_MIN = 0 |
const unsigned int | ENDCAP_EAST = 0 |
const unsigned int | ENDCAP_WEST = 2 |
const unsigned int | PHI_BARREL_MAX = 119 |
const unsigned int | PHI_BARREL_MIN = 0 |
const unsigned int | PHI_ENDCAP_MAX1 = 63 |
const unsigned int | PHI_ENDCAP_MAX2 = 79 |
const unsigned int | PHI_ENDCAP_MAX3 = 95 |
const unsigned int | PHI_ENDCAP_MIN = 0 |
const unsigned int | PHI_INDEX = 0 |
const unsigned int | PHI_MASK = 0x000000FF |
const unsigned int | THETA_BARREL_MAX = 43 |
const unsigned int | THETA_BARREL_MIN = 0 |
const unsigned int | THETA_ENDCAP_MAX = 5 |
const unsigned int | THETA_ENDCAP_MIN = 0 |
const unsigned int | THETA_INDEX = 8 |
const unsigned int | THETA_MASK = 0x00003F00 |
|
|
|
|
|
|
|
|
|
constructor
00004 { 00005 }
|
|
destructor
00007 { 00008 }
|
|
constructor
|
|
destructor
|
|
Values of different levels (failure returns 0).
|
|
Values of different levels (failure returns 0).
00038 { 00039 return ((id.get_value() & EmcID::BARREL_EC_MASK) >> EmcID::BARREL_EC_INDEX); 00040 }
|
|
For a single crystal.
|
|
For a single crystal.
00074 { 00075 assert ( values_ok(barrel_ec, theta_module, phi_module) ); 00076 unsigned int value = (EMC_ID << EMC_INDEX) | (barrel_ec << BARREL_EC_INDEX)| 00077 (theta_module << THETA_INDEX) | (phi_module << PHI_INDEX); 00078 return Identifier(value); 00079 }
|
|
|
|
00054 { 00055 Identifier id = Identifier( m_EmcId << EMC_INDEX ); 00056 return id; 00057 }
|
|
|
|
00097 {return (m_EmcId);}
|
|
|
|
|
|
|
|
00147 {
00148 return BARREL;
00149 }
|
|
|
|
00133 {
00134 return BARREL_EC_MAX;
00135 }
|
|
|
|
00137 {
00138 return BARREL_EC_MIN;
00139 }
|
|
|
|
00142 {
00143 return ENDCAP_EAST;
00144 }
|
|
|
|
00152 {
00153 return ENDCAP_WEST;
00154 }
|
|
|
|
00084 { 00085 assert ( values_ok(barrel_ec, theta_module, phi_module) ); 00086 unsigned int value = (EMC_ID << EMC_INDEX) | (barrel_ec << BARREL_EC_INDEX)| 00087 (theta_module << THETA_INDEX) | (phi_module << PHI_INDEX); 00088 return value; 00089 }
|
|
|
|
00108 {
00109 return PHI_BARREL_MAX;
00110 }
|
|
|
|
00112 {
00113 return PHI_BARREL_MIN;
00114 }
|
|
|
|
00116 { 00117 if(theta==0 || theta==1) { 00118 return PHI_ENDCAP_MAX1; 00119 } 00120 if(theta==2 || theta==3) { 00121 return PHI_ENDCAP_MAX2; 00122 } 00123 if(theta==4 || theta==5) { 00124 return PHI_ENDCAP_MAX3; 00125 } 00126 return 0; //no available number 00127 }
|
|
|
|
00129 {
00130 return PHI_ENDCAP_MIN;
00131 }
|
|
|
|
00092 {
00093 return THETA_BARREL_MAX;
00094 }
|
|
|
|
00096 {
00097 return THETA_BARREL_MIN;
00098 }
|
|
|
|
00100 {
00101 return THETA_ENDCAP_MAX;
00102 }
|
|
|
|
00104 {
00105 return THETA_ENDCAP_MIN;
00106 }
|
|
|
|
00064 { 00065 Identifier id = Identifier( m_HltId << HLT_INDEX ); 00066 return id; 00067 }
|
|
|
|
00103 {return (m_HltId);}
|
|
Test for barrel.
|
|
Test for barrel.
00032 { 00033 unsigned int pos = (id.get_value() & EmcID::BARREL_EC_MASK) >> EmcID::BARREL_EC_INDEX; 00034 return (pos == BARREL) ? true : false ; 00035 }
|
|
|
|
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 }
|
|
|
|
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);}
|
|
|
|
00048 { 00049 return (id.get_value() & EmcID::PHI_MASK) >> EmcID::PHI_INDEX; 00050 }
|
|
|
|
00062 { 00063 if (is_barrel(id)) { 00064 return PHI_BARREL_MAX; 00065 } else { 00066 return getPHI_ENDCAP_MAX(theta_module(id)); 00067 } 00068 }
|
|
|
|
00043 { 00044 return (id.get_value() & EmcID::THETA_MASK) >> EmcID::THETA_INDEX; 00045 }
|
|
Max/Min values for each field (error returns -999).
|
|
Max/Min values for each field (error returns -999).
00053 { 00054 if (is_barrel(id)) { 00055 return THETA_BARREL_MAX; 00056 } else { 00057 return THETA_ENDCAP_MAX; 00058 } 00059 }
|
|
|
|
00049 { 00050 Identifier id = Identifier( m_TofId << TOF_INDEX ); 00051 return id; 00052 }
|
|
|
|
00094 {return (m_TofId);}
|
|
|
|
00014 { 00015 // Check values 00016 // unsigned int >= 0, this is definitely true. 00017 // Omit the compare with MIN(0) to avoid warnings in compile. 00018 if (barrel_ec > BARREL_EC_MAX ) return false; 00019 00020 if ( barrel_ec == BARREL ) { 00021 if ( phi_module > PHI_BARREL_MAX ) return false; 00022 if ( theta_module > THETA_BARREL_MAX ) return false; 00023 } 00024 else { // for endcap 00025 if ( theta_module > THETA_ENDCAP_MAX ) return false; 00026 if ( phi_module > getPHI_ENDCAP_MAX(theta_module) ) return false; 00027 } 00028 return true; 00029 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|