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

TofID Class Reference

#include <TofID.h>

Inheritance diagram for TofID:

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_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< 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 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

Member Typedef Documentation

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

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

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

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

typedef Identifier::size_type TofID::size_type
 

typedef Identifier::size_type TofID::size_type
 

typedef Identifier::value_type TofID::value_type
 

typedef Identifier::value_type TofID::value_type
 


Constructor & Destructor Documentation

TofID::TofID  ) 
 

constructor

00005                  {
00006 }

TofID::~TofID  ) 
 

destructor

00008                   {
00009 }

TofID::TofID  ) 
 

constructor

TofID::~TofID  ) 
 

destructor


Member Function Documentation

int TofID::barrel_ec const Identifier id  )  [static]
 

Values of different levels (failure returns 0).

int TofID::barrel_ec const Identifier id  )  [static]
 

Values of different levels (failure returns 0).

00044                                           {
00045   return ((id.get_value() & TofID::BARREL_EC_MASK) >>  TofID::BARREL_EC_INDEX);  
00046 }

Identifier TofID::cell_id int  barrel_ec,
int  layer,
int  phi_module,
int  end
[static]
 

For a single crystal.

Identifier TofID::cell_id int  barrel_ec,
int  layer,
int  phi_module,
int  end
[static]
 

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 }

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 TofID::end const Identifier id  )  [static]
 

int TofID::end const Identifier id  )  [static]
 

00059                                    {
00060   return (id.get_value() & TofID::END_MASK) >> TofID::END_INDEX;
00061 }

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

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

value_type TofID::getBARREL_EC_MAX  )  [static]
 

unsigned int TofID::getBARREL_EC_MAX  )  [static]
 

00127 {
00128      return BARREL_EC_MAX;
00129 }

value_type TofID::getBARREL_EC_MIN  )  [static]
 

unsigned int TofID::getBARREL_EC_MIN  )  [static]
 

00132 {
00133      return BARREL_EC_MIN;
00134 }

value_type TofID::getIntID int  barrel_ec,
int  layer,
int  phi_module,
int  end
[static]
 

unsigned int TofID::getIntID int  barrel_ec,
int  layer,
int  phi_module,
int  end
[static]
 

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 }

value_type TofID::getLAYER_BARREL_MAX  )  [static]
 

unsigned int TofID::getLAYER_BARREL_MAX  )  [static]
 

00108 {
00109      return LAYER_BARREL_MAX;
00110 }

value_type TofID::getLAYER_ENDCAP_MAX  )  [static]
 

unsigned int TofID::getLAYER_ENDCAP_MAX  )  [static]
 

00113 {
00114      return LAYER_ENDCAP_MAX;
00115 }

value_type TofID::getPHI_BARREL_MAX  )  [static]
 

unsigned int TofID::getPHI_BARREL_MAX  )  [static]
 

00118 {
00119      return PHI_BARREL_MAX;
00120 }

value_type TofID::getPHI_ENDCAP_MAX  )  [static]
 

unsigned int TofID::getPHI_ENDCAP_MAX  )  [static]
 

00123 {
00124      return PHI_ENDCAP_MAX;
00125 }

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 TofID::is_barrel const unsigned int  barrel_ec  )  [static]
 

bool TofID::is_barrel const Identifier id  )  [static]
 

Test for barrel.

bool TofID::is_barrel const unsigned int  barrel_ec  )  [static]
 

00040                                                     {
00041   return (barrel_ec == BARREL_EC_MAX || barrel_ec == BARREL_EC_MIN) ? false : true;
00042 }

bool TofID::is_barrel const Identifier id  )  [static]
 

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 }

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 TofID::layer const Identifier id  )  [static]
 

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

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

int TofID::layer_max const Identifier id  ) 
 

int TofID::layer_max const Identifier id  ) 
 

00063                                            {
00064    if (is_barrel(id)) {
00065     return LAYER_BARREL_MAX;
00066   } else {
00067     return LAYER_ENDCAP_MAX;
00068   }  
00069 }

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);}       

int TofID::phi_module const Identifier id  )  [static]
 

int TofID::phi_module const Identifier id  )  [static]
 

00054                                            {
00055   return (id.get_value() & TofID::PHI_MASK) >>  TofID::PHI_INDEX;  
00056 }

int TofID::phi_module_max const Identifier id  ) 
 

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

int TofID::phi_module_max const Identifier id  ) 
 

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 }

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 TofID::values_ok const unsigned int  barrel_ec,
const unsigned int  layer,
const unsigned int  phi_module,
const unsigned  int
[static]
 

bool TofID::values_ok const unsigned int  barrel_ec,
const unsigned int  layer,
const unsigned int  phi_module,
const unsigned  int
[static]
 

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 }


Member Data Documentation

const unsigned int TofID::BARREL_EC_INDEX = 14 [static, private]
 

const unsigned int TofID::BARREL_EC_MASK = 0x0000C000 [static, private]
 

const unsigned int TofID::BARREL_EC_MAX = 2 [static, private]
 

const unsigned int TofID::BARREL_EC_MIN = 0 [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 TofID::END_INDEX = 0 [static, private]
 

const unsigned int TofID::END_MASK = 0x00000001 [static, private]
 

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 TofID::LAYER_BARREL_MAX = 1 [static, private]
 

const unsigned int TofID::LAYER_ENDCAP_MAX = 0 [static, private]
 

const unsigned int TofID::LAYER_INDEX = 8 [static, private]
 

const unsigned int TofID::LAYER_MASK = 0x00000100 [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 TofID::PHI_BARREL_MAX = 87 [static, private]
 

const unsigned int TofID::PHI_ENDCAP_MAX = 47 [static, private]
 

const unsigned int TofID::PHI_INDEX = 1 [static, private]
 

const unsigned int TofID::PHI_MASK = 0x000000FE [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]
 


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