Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MdcID Class Reference

#include <MdcID.h>

Inheritance diagram for MdcID:

BesDetectorID BesDetectorID List of all members.

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< Identifierid_vec
typedef std::vector< Identifierid_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

Member Typedef Documentation

typedef std::vector<Identifier> MdcID::id_vec [private]
 

typedef std::vector<Identifier> MdcID::id_vec [private]
 

typedef id_vec::const_iterator MdcID::id_vec_it [private]
 

typedef id_vec::const_iterator MdcID::id_vec_it [private]
 

typedef Identifier::size_type MdcID::size_type
 

typedef Identifier::size_type MdcID::size_type
 

typedef Identifier::value_type MdcID::value_type
 

typedef Identifier::value_type MdcID::value_type
 


Constructor & Destructor Documentation

MdcID::MdcID  ) 
 

constructor

00005                  {
00006 }

MdcID::~MdcID  ) 
 

destructor

00008                   {
00009 }

MdcID::MdcID  ) 
 

constructor

MdcID::~MdcID  ) 
 

destructor


Member Function Documentation

Identifier BesDetectorID::emc void   )  const [inherited]
 

Identifier BesDetectorID::emc void   )  const [inherited]
 

00054                                         {
00055   Identifier id = Identifier(  m_EmcId << EMC_INDEX );
00056   return id; 
00057 }

int BesDetectorID::emc_field_value  )  const [protected, inherited]
 

int BesDetectorID::emc_field_value  )  const [inline, protected, inherited]
 

00097 {return (m_EmcId);}       

int BesDetectorID::get_detectorID const Identifier id  )  const [protected, inherited]
 

int BesDetectorID::get_detectorID const Identifier id  )  const [protected, inherited]
 

value_type MdcID::getAXIAL_LAYER_MAX  )  [static]
 

unsigned int MdcID::getAXIAL_LAYER_MAX  )  [static]
 

00139 {
00140     return AXIAL_LAYER_MAX;
00141 }

value_type MdcID::getAXIAL_WIRE  )  [static]
 

unsigned int MdcID::getAXIAL_WIRE  )  [static]
 

00156 {
00157     return AXIAL_WIRE;
00158 }

value_type MdcID::getAXIAL_WIRE_MAX  )  [static]
 

unsigned int MdcID::getAXIAL_WIRE_MAX  )  [static]
 

00147 {
00148     return AXIAL_WIRE_MAX;
00149 }

value_type MdcID::getIntID unsigned int  layer,
unsigned int  wire
[static]
 

value_type MdcID::getIntID unsigned int  wireType,
unsigned int  layer,
unsigned int  wire
[static]
 

unsigned int MdcID::getIntID unsigned int  layer,
unsigned int  wire
[static]
 

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 }

unsigned int MdcID::getIntID unsigned int  wireType,
unsigned int  layer,
unsigned int  wire
[static]
 

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 }

value_type MdcID::getSTEREO_LAYER_MAX  )  [static]
 

unsigned int MdcID::getSTEREO_LAYER_MAX  )  [static]
 

00143 {
00144     return STEREO_LAYER_MAX;
00145 }

value_type MdcID::getSTEREO_WIRE  )  [static]
 

unsigned int MdcID::getSTEREO_WIRE  )  [static]
 

00161 {
00162     return STEREO_WIRE;
00163 }

value_type MdcID::getSTEREO_WIRE_MAX  )  [static]
 

unsigned int MdcID::getSTEREO_WIRE_MAX  )  [static]
 

00151 {
00152     return STEREO_WIRE_MAX;
00153 }

Identifier BesDetectorID::hlt void   )  const [inherited]
 

Identifier BesDetectorID::hlt void   )  const [inherited]
 

00064                                         {
00065   Identifier id = Identifier(  m_HltId << HLT_INDEX );
00066   return id;
00067 }

int BesDetectorID::hlt_field_value  )  const [protected, inherited]
 

int BesDetectorID::hlt_field_value  )  const [inline, protected, inherited]
 

00103 {return (m_HltId);}

bool MdcID::is_axial const Identifier id  ) 
 

Test for axial and stereo wire.

bool MdcID::is_axial const Identifier id  ) 
 

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 }

bool BesDetectorID::is_emc const Identifier id  )  const [inherited]
 

bool BesDetectorID::is_emc const Identifier id  )  const [inherited]
 

00029                                                       {
00030   Identifier::value_type value = id.get_value(); 
00031   return (value  &  EMC_MASK >> EMC_INDEX) == EMC_ID ? true : false;   
00032 }

bool BesDetectorID::is_hlt const Identifier id  )  const [inherited]
 

bool BesDetectorID::is_hlt const Identifier id  )  const [inherited]
 

00039                                                       {
00040   Identifier::value_type value = id.get_value();
00041   return (value  &  HLT_MASK >> HLT_INDEX) == HLT_ID ? true : false;
00042 }

bool BesDetectorID::is_mdc const Identifier id  )  const [inherited]
 

bool BesDetectorID::is_mdc const Identifier id  )  const [inherited]
 

00019                                                       {
00020   Identifier::value_type value = id.get_value(); 
00021   return (value  &  MDC_MASK >> MDC_INDEX) == MDC_ID ? true : false;    
00022 }

bool BesDetectorID::is_muc const Identifier id  )  const [inherited]
 

bool BesDetectorID::is_muc const Identifier id  )  const [inherited]
 

00034                                                       {
00035   Identifier::value_type value = id.get_value(); 
00036   return (value  &  MUC_MASK >> MUC_INDEX) == MUC_ID ? true : false;
00037 }

bool BesDetectorID::is_tof const Identifier id  )  const [inherited]
 

bool BesDetectorID::is_tof const Identifier id  )  const [inherited]
 

00024                                                       {
00025   Identifier::value_type value = id.get_value(); 
00026   return (value  &  TOF_MASK >> TOF_INDEX) == TOF_ID ? true : false;
00027 }

int MdcID::layer const Identifier id  )  [static]
 

Values of different levels (failure returns 0).

int MdcID::layer const Identifier id  )  [static]
 

Values of different levels (failure returns 0).

00049                                       {
00050   return (id.get_value() & MdcID::LAYER_MASK) >>  MdcID::LAYER_INDEX;  
00051 }

int MdcID::layer_max const Identifier id  ) 
 

Max/Min values for each field (error returns -999).

int MdcID::layer_max const Identifier id  ) 
 

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 }

Identifier BesDetectorID::mdc void   )  const [inherited]
 

Identifier BesDetectorID::mdc void   )  const [inherited]
 

00044                                         {
00045   Identifier id = Identifier(  m_MdcId << MDC_INDEX );
00046   return id; 
00047 }

int BesDetectorID::mdc_field_value  )  const [protected, inherited]
 

Provide efficient access to individual field values.

int BesDetectorID::mdc_field_value  )  const [inline, protected, inherited]
 

Provide efficient access to individual field values.

00091 {return (m_MdcId);}     

Identifier BesDetectorID::muc void   )  const [inherited]
 

Identifier BesDetectorID::muc void   )  const [inherited]
 

00059                                         {
00060   Identifier id = Identifier(  m_MucId << MUC_INDEX );
00061   return id; 
00062 }

int BesDetectorID::muc_field_value  )  const [protected, inherited]
 

int BesDetectorID::muc_field_value  )  const [inline, protected, inherited]
 

00100 {return (m_MucId);}       

Identifier BesDetectorID::tof void   )  const [inherited]
 

Identifier BesDetectorID::tof void   )  const [inherited]
 

00049                                        {
00050   Identifier id = Identifier(  m_TofId << TOF_INDEX );
00051   return id; 
00052 }

int BesDetectorID::tof_field_value  )  const [protected, inherited]
 

int BesDetectorID::tof_field_value  )  const [inline, protected, inherited]
 

00094 {return (m_TofId);}

bool MdcID::values_ok const unsigned int  wireType,
const unsigned int  layer,
const unsigned int  wire
[static]
 

bool MdcID::values_ok const unsigned int  wireType,
const unsigned int  layer,
const unsigned int  wire
[static]
 

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 }

int MdcID::wire const Identifier id  )  [static]
 

int MdcID::wire const Identifier id  )  [static]
 

00054                                      {
00055   return (id.get_value() & MdcID::WIRE_MASK) >>  MdcID::WIRE_INDEX;  
00056 }

Identifier MdcID::wire_id int  layer,
int  wire
[static]
 

Identifier MdcID::wire_id int  wireType,
int  layer,
int  wire
[static]
 

For a single wire.

Identifier MdcID::wire_id int  layer,
int  wire
[static]
 

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 }

Identifier MdcID::wire_id int  wireType,
int  layer,
int  wire
[static]
 

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 }

int MdcID::wire_max const Identifier id  ) 
 

int MdcID::wire_max const Identifier id  ) 
 

00068                                             {
00069   if (is_axial(id)) {
00070     return AXIAL_WIRE_MAX;
00071   } else {
00072     return STEREO_WIRE_MAX;
00073   } 
00074 }


Member Data Documentation

const unsigned int MdcID::AXIAL_LAYER_MAX = 18 [static, private]
 

const unsigned int MdcID::AXIAL_WIRE = 0 [static, private]
 

const unsigned int MdcID::AXIAL_WIRE_MAX = 287 [static, private]
 

const unsigned int BesDetectorID::EMC_ID = 0x30 [static, protected, inherited]
 

const unsigned int BesDetectorID::EMC_INDEX = 24 [static, protected, inherited]
 

const unsigned int BesDetectorID::EMC_MASK = 0xFF000000 [static, protected, inherited]
 

const unsigned int BesDetectorID::HLT_ID = 0x50 [static, protected, inherited]
 

const unsigned int BesDetectorID::HLT_INDEX = 24 [static, protected, inherited]
 

const unsigned int BesDetectorID::HLT_MASK = 0xFF000000 [static, protected, inherited]
 

const unsigned int MdcID::INNER_AXIAL_LAYER_MAX = 12 [static, private]
 

const unsigned int MdcID::INNER_STEREO_LAYER_MAX = 8 [static, private]
 

const unsigned int MdcID::LAYER_INDEX = 9 [static, private]
 

const unsigned int MdcID::LAYER_MASK = 0x00007E00 [static, private]
 

const unsigned int MdcID::LAYER_MAX = 43 [static, private]
 

const unsigned int BesDetectorID::MDC_ID = 0x10 [static, protected, inherited]
 

const unsigned int BesDetectorID::MDC_INDEX = 24 [static, protected, inherited]
 

const unsigned int BesDetectorID::MDC_MASK = 0xFF000000 [static, protected, inherited]
 

const unsigned int BesDetectorID::MUC_ID = 0x40 [static, protected, inherited]
 

const unsigned int BesDetectorID::MUC_INDEX = 24 [static, protected, inherited]
 

const unsigned int BesDetectorID::MUC_MASK = 0xFF000000 [static, protected, inherited]
 

const unsigned int MdcID::OUTER_AXIAL_LAYER_MAX = 7 [static, private]
 

const unsigned int MdcID::OUTER_STEREO_LAYER_MAX = 16 [static, private]
 

const unsigned int MdcID::STEREO_LAYER_MAX = 23 [static, private]
 

const unsigned int MdcID::STEREO_WIRE = 1 [static, private]
 

const unsigned int MdcID::STEREO_WIRE_MAX = 239 [static, private]
 

const unsigned int BesDetectorID::TOF_ID = 0x20 [static, protected, inherited]
 

const unsigned int BesDetectorID::TOF_INDEX = 24 [static, protected, inherited]
 

const unsigned int BesDetectorID::TOF_MASK = 0xFF000000 [static, protected, inherited]
 

const unsigned int MdcID::WIRE_INDEX = 0 [static, private]
 

const unsigned int MdcID::WIRE_MASK = 0x000001FF [static, private]
 

const unsigned int MdcID::WIRETYPE_INDEX = 15 [static, private]
 

const unsigned int MdcID::WIRETYPE_MASK = 0x00008000 [static, private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:26:22 2011 for BOSS6.5.5 by  doxygen 1.3.9.1