TofID Class Reference

#include <TofID.h>

Inheritance diagram for TofID:

BesDetectorID List of all members.

Public Types

typedef Identifier::size_type size_type
typedef Identifier::value_type value_type

Public Member Functions

 TofID ()
 constructor
 ~TofID ()
 destructor
int phi_module_max (const Identifier &id)
 Max/Min values for each field (error returns -999).
int layer_max (const Identifier &id)
Identifier mdc (void) const
Identifier tof (void) const
Identifier emc (void) const
Identifier muc (void) const
Identifier hlt (void) const
Identifier mrpc (void) const
bool is_mdc (const Identifier &id) const
bool is_tof (const Identifier &id) const
bool is_emc (const Identifier &id) const
bool is_muc (const Identifier &id) const
bool is_hlt (const Identifier &id) const
bool is_mrpc (const Identifier &id) const

Static Public Member Functions

static Identifier cell_id (int barrel_ec, int layer, int phi_module, int end)
 For a single crystal.
static Identifier cell_id (int value)
static value_type getIntID (int barrel_ec, int layer, int phi_module, int end)
static Identifier cell_id (int barrel_ec, int endcap, int module, int strip, int end)
 For a single MRPC.
static value_type getIntID (int barrel_ec, int endcap, int module, int strip, int end)
static value_type getLAYER_BARREL_MAX ()
static value_type getLAYER_ENDCAP_MAX ()
static value_type getPHI_BARREL_MAX ()
static value_type getPHI_ENDCAP_MAX ()
static value_type getBARREL_EC_MAX ()
static value_type getBARREL_EC_MIN ()
static bool values_ok (const unsigned int barrel_ec, const unsigned int layer, const unsigned int phi_module, const unsigned int end)
static value_type getBARREL_EC_MRPC ()
static value_type getENDCAP_MRPC_MAX ()
static value_type getMODULE_MRPC_MAX ()
static value_type getSTRIP_MRPC_MAX ()
static bool values_ok (const unsigned int barrel_ec, const unsigned int endcap, const unsigned int module, const unsigned int strip, const unsigned int end)
static bool is_barrel (const Identifier &id)
 Test for barrel.
static bool is_barrel (const unsigned int barrel_ec)
static int barrel_ec (const Identifier &id)
 Values of different levels (failure returns 0).
static int layer (const Identifier &id)
static int phi_module (const Identifier &id)
static int end (const Identifier &id)
static bool is_scin (const Identifier &id)
static bool is_scin (const unsigned int barrel_ec)
static bool is_mrpc (const Identifier &id)
static bool is_mrpc (const unsigned int barrel_ec)
static int endcap (const Identifier &id)
static int module (const Identifier &id)
static int strip (const Identifier &id)

Protected Member Functions

int mdc_field_value () const
 Provide efficient access to individual field values.
int tof_field_value () const
int emc_field_value () const
int muc_field_value () const
int hlt_field_value () const
int mrpc_field_value () const
int get_detectorID (const Identifier &id) const

Static Protected Attributes

static const unsigned int MDC_ID = 0x10
static const unsigned int MDC_INDEX = 24
static const unsigned int MDC_MASK = 0xFF000000
static const unsigned int TOF_ID = 0x20
static const unsigned int TOF_INDEX = 24
static const unsigned int TOF_MASK = 0xFF000000
static const unsigned int EMC_ID = 0x30
static const unsigned int EMC_INDEX = 24
static const unsigned int EMC_MASK = 0xFF000000
static const unsigned int MUC_ID = 0x40
static const unsigned int MUC_INDEX = 24
static const unsigned int MUC_MASK = 0xFF000000
static const unsigned int HLT_ID = 0x50
static const unsigned int HLT_INDEX = 24
static const unsigned int HLT_MASK = 0xFF000000
static const unsigned int MRPC_ID = 0x70
static const unsigned int MRPC_INDEX = 24
static const unsigned int MRPC_MASK = 0xFF000000

Private Types

typedef std::vector< Identifierid_vec
typedef id_vec::const_iterator id_vec_it

Static Private Attributes

static const unsigned int BARREL_EC_INDEX = 14
static const unsigned int BARREL_EC_MASK = 0x0000C000
static const unsigned int LAYER_INDEX = 8
static const unsigned int LAYER_MASK = 0x00000100
static const unsigned int PHI_INDEX = 1
static const unsigned int PHI_MASK = 0x000000FE
static const unsigned int END_INDEX = 0
static const unsigned int END_MASK = 0x00000001
static const unsigned int LAYER_BARREL_MAX = 1
static const unsigned int LAYER_ENDCAP_MAX = 0
static const unsigned int PHI_BARREL_MAX = 87
static const unsigned int PHI_ENDCAP_MAX = 47
static const unsigned int BARREL_EC_MAX = 2
static const unsigned int BARREL_EC_MIN = 0
static const unsigned int ENDCAP_INDEX = 11
static const unsigned int ENDCAP_MASK = 0x00000800
static const unsigned int MODULE_INDEX = 5
static const unsigned int MODULE_MASK = 0x000007E0
static const unsigned int STRIP_INDEX = 1
static const unsigned int STRIP_MASK = 0x0000001E
static const unsigned int BARREL_EC_MRPC = 3
static const unsigned int ENDCAP_MRPC_MAX = 1
static const unsigned int MODULE_MRPC_MAX = 35
static const unsigned int STRIP_MRPC_MAX = 11

Detailed Description

Definition at line 8 of file TofID.h.


Member Typedef Documentation

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

Definition at line 102 of file TofID.h.

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

Definition at line 103 of file TofID.h.

typedef Identifier::size_type TofID::size_type

Definition at line 11 of file TofID.h.

typedef Identifier::value_type TofID::value_type

Definition at line 12 of file TofID.h.


Constructor & Destructor Documentation

TofID::TofID (  ) 

constructor

Definition at line 6 of file TofID.cxx.

00006                  {
00007 }

TofID::~TofID (  ) 

destructor

Definition at line 9 of file TofID.cxx.

00009                   {
00010 }


Member Function Documentation

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

Values of different levels (failure returns 0).

Definition at line 61 of file TofID.cxx.

References BARREL_EC_INDEX, and BARREL_EC_MASK.

Referenced by TofROOTGeo::DrawHits(), TofShower::energyCalib(), BesTrigL1::execute(), EventAssemblyAlg::execute(), TofCheckDigi::FillCol(), TofShower::findShower(), TofShower::getNeighbors(), TofMcHitBuilder::makeTofTruth(), TofTrack::match(), PrintMcInfo::printDigi(), PrintMcInfo::printHit(), McTestAlg::RetrieveTof(), TofROOTGeo::SetHits(), TofData::setIdentify(), Adc::setValue(), TofRawDataProvider::tofDataMapFull(), and TofRawDataProvider::tofDataMapOnlineMode().

00061                                            {
00062   return ((id.get_value() & TofID::BARREL_EC_MASK) >>  TofID::BARREL_EC_INDEX);
00063 }

Identifier TofID::cell_id ( int  barrel_ec,
int  endcap,
int  module,
int  strip,
int  end 
) [static]

For a single MRPC.

Definition at line 163 of file TofID.cxx.

References BARREL_EC_INDEX, END_INDEX, ENDCAP_INDEX, MODULE_INDEX, STRIP_INDEX, BesDetectorID::TOF_ID, BesDetectorID::TOF_INDEX, and values_ok().

00168                               {
00169   assert ( values_ok(barrel_ec, endcap, module, strip, end) );
00170   unsigned int value = (BesDetectorID::TOF_ID << TOF_INDEX) |
00171                        (barrel_ec << BARREL_EC_INDEX)|
00172                        (endcap << ENDCAP_INDEX) | (module << MODULE_INDEX) |
00173                        (strip << STRIP_INDEX) | (end << END_INDEX);
00174   return Identifier(value);
00175 }

Identifier TofID::cell_id ( int  value  )  [static]

Definition at line 157 of file TofID.cxx.

00157                                    {
00158   return Identifier(value);
00159 }

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

For a single crystal.

Definition at line 143 of file TofID.cxx.

References BARREL_EC_INDEX, END_INDEX, LAYER_INDEX, PHI_INDEX, BesDetectorID::TOF_ID, BesDetectorID::TOF_INDEX, and values_ok().

Referenced by PmtData::adc(), RawDataTofMcHitCnv::createObj(), TofCheckDigi::FillCol(), TofShower::getNeighbors(), BesRawDataWriter::SaveTofDigits(), BesMcTruthWriter::SaveTofTruth(), TofTrack::setTofData(), TofRawDataProvider::tofDataMapEmc(), TofRawDataProvider::tofDataMapFull(), and TofRawDataProvider::tofDataMapTof().

00147                               {
00148   assert ( values_ok(barrel_ec, layer, phi_module, end) ); 
00149   unsigned int value = (BesDetectorID::TOF_ID << TOF_INDEX) | 
00150                        (barrel_ec << BARREL_EC_INDEX)|
00151                        (layer << LAYER_INDEX) | (phi_module << PHI_INDEX) | 
00152                        (end << END_INDEX);
00153   return Identifier(value); 
00154 }

Identifier BesDetectorID::emc ( void   )  const [inherited]

Definition at line 63 of file BesDetectorID.cxx.

References BesDetectorID::EMC_INDEX, and BesDetectorID::m_EmcId.

00063                                         {
00064   Identifier id = Identifier(  m_EmcId << EMC_INDEX );
00065   return id; 
00066 }

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

Definition at line 111 of file BesDetectorID.h.

References BesDetectorID::m_EmcId.

00111 {return (m_EmcId);}       

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

Definition at line 79 of file TofID.cxx.

References END_INDEX, and END_MASK.

Referenced by TofShower::energyCalib(), TofCheckDigi::FillCol(), TofShower::findShower(), TofShower::getNeighbors(), TofTrack::match(), McTestAlg::RetrieveTof(), Adc::setValue(), TofRawDataProvider::tofDataMapFull(), and TofRawDataProvider::tofDataMapOnlineMode().

00079                                    {
00080   return ((id.get_value() & TofID::END_MASK) >> TofID::END_INDEX);
00081 }

int TofID::endcap ( const Identifier id  )  [static]

Definition at line 124 of file TofID.cxx.

References ENDCAP_INDEX, ENDCAP_MASK, and is_scin().

Referenced by TofShower::energyCalib(), EsTimeAlg::execute(), TofCheckDigi::FillCol(), TofShower::findShower(), TofShower::getNeighbors(), TofMcHitBuilder::makeTofTruth(), and TofData::setIdentify().

00124                                         {
00125   if( ( TofID::is_scin( id ) ) ) { return -999; }
00126   return ((id.get_value() & TofID::ENDCAP_MASK) >>  TofID::ENDCAP_INDEX);
00127 }

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

unsigned int TofID::getBARREL_EC_MAX (  )  [static]

Definition at line 226 of file TofID.cxx.

References BARREL_EC_MAX.

Referenced by TofBuilder::initialize().

00227 {
00228      return BARREL_EC_MAX;
00229 }

unsigned int TofID::getBARREL_EC_MIN (  )  [static]

Definition at line 231 of file TofID.cxx.

References BARREL_EC_MIN.

Referenced by TofBuilder::initialize().

00232 {
00233      return BARREL_EC_MIN;
00234 }

unsigned int TofID::getBARREL_EC_MRPC (  )  [static]

Definition at line 236 of file TofID.cxx.

References BARREL_EC_MRPC.

00237 {
00238   return BARREL_EC_MRPC;
00239 }

unsigned int TofID::getENDCAP_MRPC_MAX (  )  [static]

Definition at line 241 of file TofID.cxx.

References ENDCAP_MRPC_MAX.

00242 {
00243   return ENDCAP_MRPC_MAX;
00244 }

unsigned int TofID::getIntID ( int  barrel_ec,
int  endcap,
int  module,
int  strip,
int  end 
) [static]

Definition at line 193 of file TofID.cxx.

References BARREL_EC_INDEX, END_INDEX, ENDCAP_INDEX, MODULE_INDEX, STRIP_INDEX, BesDetectorID::TOF_ID, and BesDetectorID::TOF_INDEX.

00198                                  {
00199   unsigned int value = (BesDetectorID::TOF_ID << TOF_INDEX) |
00200                        (barrel_ec << BARREL_EC_INDEX)|
00201                        (endcap << ENDCAP_INDEX) | (module << MODULE_INDEX) |
00202                        (strip << STRIP_INDEX) | (end << END_INDEX);
00203   return value;
00204 }

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

Definition at line 178 of file TofID.cxx.

References BARREL_EC_INDEX, END_INDEX, LAYER_INDEX, PHI_INDEX, BesDetectorID::TOF_ID, and BesDetectorID::TOF_INDEX.

Referenced by TofBuilder::initialize(), TofTrack::setTofData(), TofRawDataProvider::tofDataMapFull(), and TofConverter::unPackETF().

00183 {
00184      unsigned int value = (BesDetectorID::TOF_ID << TOF_INDEX) |
00185                      (barrel_ec << BARREL_EC_INDEX)|
00186                      (layer << LAYER_INDEX) | (phi_module << PHI_INDEX) |
00187                      (end << END_INDEX);
00188      return value;
00189 }

unsigned int TofID::getLAYER_BARREL_MAX (  )  [static]

Definition at line 207 of file TofID.cxx.

References LAYER_BARREL_MAX.

Referenced by TofBuilder::initialize().

00208 {
00209      return LAYER_BARREL_MAX;
00210 }

unsigned int TofID::getLAYER_ENDCAP_MAX (  )  [static]

Definition at line 212 of file TofID.cxx.

References LAYER_ENDCAP_MAX.

Referenced by TofBuilder::initialize().

00213 {
00214      return LAYER_ENDCAP_MAX;
00215 }

unsigned int TofID::getMODULE_MRPC_MAX (  )  [static]

Definition at line 246 of file TofID.cxx.

References MODULE_MRPC_MAX.

00247 {
00248   return MODULE_MRPC_MAX;
00249 }

unsigned int TofID::getPHI_BARREL_MAX (  )  [static]

Definition at line 217 of file TofID.cxx.

References PHI_BARREL_MAX.

Referenced by RawDataTofMcHitCnv::createObj(), TofBuilder::initialize(), TofMcHitBuilder::makeTofTruth(), BesRawDataWriter::SaveTofDigits(), and BesMcTruthWriter::SaveTofTruth().

00218 {
00219      return PHI_BARREL_MAX;
00220 }

unsigned int TofID::getPHI_ENDCAP_MAX (  )  [static]

Definition at line 222 of file TofID.cxx.

References PHI_ENDCAP_MAX.

00223 {
00224      return PHI_ENDCAP_MAX;
00225 }

unsigned int TofID::getSTRIP_MRPC_MAX (  )  [static]

Definition at line 251 of file TofID.cxx.

References STRIP_MRPC_MAX.

00252 {
00253   return STRIP_MRPC_MAX;
00254 }

Identifier BesDetectorID::hlt ( void   )  const [inherited]

Definition at line 73 of file BesDetectorID.cxx.

References BesDetectorID::HLT_INDEX, and BesDetectorID::m_HltId.

00073                                         {
00074   Identifier id = Identifier(  m_HltId << HLT_INDEX );
00075   return id;
00076 }

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

Definition at line 117 of file BesDetectorID.h.

References BesDetectorID::m_HltId.

00117 {return (m_HltId);}

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

Definition at line 55 of file TofID.cxx.

References BARREL_EC_MAX, BARREL_EC_MIN, and BARREL_EC_MRPC.

00055                                                     {
00056   return (barrel_ec == BARREL_EC_MAX || barrel_ec == BARREL_EC_MIN || barrel_ec == BARREL_EC_MRPC) ? false : true;
00057 }

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

Test for barrel.

Definition at line 49 of file TofID.cxx.

References BARREL_EC_INDEX, BARREL_EC_MASK, BARREL_EC_MAX, BARREL_EC_MIN, BARREL_EC_MRPC, and boss::pos.

Referenced by EmcRecTofDigitCalib::Convert(), TofCheckDigi::FillCol(), layer_max(), TofMcHitBuilder::makeTofTruth(), phi_module_max(), BesRawDataWriter::SaveTofDigits(), BesMcTruthWriter::SaveTofTruth(), and TofRawDataProvider::tofDataMapFull().

00049                                             {
00050   unsigned int pos = (id.get_value() & TofID::BARREL_EC_MASK) >>  TofID::BARREL_EC_INDEX;
00051   return (pos == BARREL_EC_MAX || pos == BARREL_EC_MIN || pos == BARREL_EC_MRPC) ? false : true;
00052 }

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

Definition at line 30 of file BesDetectorID.cxx.

References BesDetectorID::EMC_ID, BesDetectorID::EMC_INDEX, and BesDetectorID::EMC_MASK.

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

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

Definition at line 40 of file BesDetectorID.cxx.

References BesDetectorID::HLT_ID, BesDetectorID::HLT_INDEX, and BesDetectorID::HLT_MASK.

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

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

Definition at line 20 of file BesDetectorID.cxx.

References BesDetectorID::MDC_ID, BesDetectorID::MDC_INDEX, and BesDetectorID::MDC_MASK.

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

bool BesDetectorID::is_mrpc ( const Identifier id  )  const [inherited]

Definition at line 46 of file BesDetectorID.cxx.

References BesDetectorID::MRPC_ID, BesDetectorID::MRPC_INDEX, and BesDetectorID::MRPC_MASK.

00046                                                        {
00047   Identifier::value_type value = id.get_value();
00048   return ((value  &  MRPC_MASK) >> MRPC_INDEX) == MRPC_ID ? true : false;
00049 }

bool TofID::is_mrpc ( const unsigned int  barrel_ec  )  [static]

Definition at line 119 of file TofID.cxx.

References BARREL_EC_MRPC.

00119                                                  {
00120   return (barrel_ec == BARREL_EC_MRPC) ? true : false;
00121 }

bool TofID::is_mrpc ( const Identifier id  )  [static]

Definition at line 113 of file TofID.cxx.

References BARREL_EC_INDEX, BARREL_EC_MASK, BARREL_EC_MRPC, and boss::pos.

Referenced by PmtData::adc(), EventAssemblyAlg::execute(), TofCheckDigi::FillCol(), TofShower::findShower(), layer(), TofMcHitBuilder::makeTofTruth(), phi_module(), TofData::setIdentify(), TofTrack::setTofData(), Adc::setValue(), TofRawDataProvider::tofDataMapEmc(), TofRawDataProvider::tofDataMapFull(), and TofRawDataProvider::tofDataMapTof().

00113                                           {
00114   unsigned int pos = (id.get_value() & TofID::BARREL_EC_MASK) >>  TofID::BARREL_EC_INDEX;
00115   return (pos == BARREL_EC_MRPC) ? true : false;
00116 }

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

Definition at line 35 of file BesDetectorID.cxx.

References BesDetectorID::MUC_ID, BesDetectorID::MUC_INDEX, and BesDetectorID::MUC_MASK.

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

bool TofID::is_scin ( const unsigned int  barrel_ec  )  [static]

Definition at line 108 of file TofID.cxx.

References BARREL_EC_MRPC.

00108                                                  {
00109   return (barrel_ec < BARREL_EC_MRPC) ? true : false;
00110 }

bool TofID::is_scin ( const Identifier id  )  [static]

Definition at line 102 of file TofID.cxx.

References BARREL_EC_INDEX, BARREL_EC_MASK, BARREL_EC_MRPC, and boss::pos.

Referenced by endcap(), TofShower::energyCalib(), TofCheckDigi::FillCol(), TofShower::getNeighbors(), TofMcHitBuilder::makeTofTruth(), module(), BesRawDataWriter::SaveTofDigits(), BesMcTruthWriter::SaveTofTruth(), Adc::setValue(), strip(), TofRawDataProvider::tofDataMapFull(), and TofRawDataProvider::tofDataMapOnlineMode().

00102                                           {
00103   unsigned int pos = (id.get_value() & TofID::BARREL_EC_MASK) >>  TofID::BARREL_EC_INDEX;
00104   return (pos == BARREL_EC_MRPC) ? false : true;
00105 }

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

Definition at line 25 of file BesDetectorID.cxx.

References BesDetectorID::TOF_ID, BesDetectorID::TOF_INDEX, and BesDetectorID::TOF_MASK.

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

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

Definition at line 66 of file TofID.cxx.

References is_mrpc(), LAYER_INDEX, and LAYER_MASK.

Referenced by EmcRecTofDigitCalib::Convert(), TofROOTGeo::DrawHits(), TofShower::energyCalib(), BesTrigL1::execute(), TofEnergyCalib::execute(), EventAssemblyAlg::execute(), TofCheckDigi::FillCol(), TofShower::findShower(), TofShower::getNeighbors(), RecEmcTofHit::IntCellId(), TofMcHitBuilder::makeTofTruth(), TofTrack::match(), PrintMcInfo::printDigi(), PrintMcInfo::printHit(), McTestAlg::RetrieveTof(), TofROOTGeo::SetHits(), TofData::setIdentify(), and Adc::setValue().

00066                                       {
00067   if( ( TofID::is_mrpc( id ) ) ) { return -999; }
00068   return ((id.get_value() & TofID::LAYER_MASK) >>  TofID::LAYER_INDEX);
00069 }

int TofID::layer_max ( const Identifier id  ) 

Definition at line 84 of file TofID.cxx.

References is_barrel(), LAYER_BARREL_MAX, and LAYER_ENDCAP_MAX.

00084                                            {
00085    if (is_barrel(id)) {
00086     return LAYER_BARREL_MAX;
00087   } else {
00088     return LAYER_ENDCAP_MAX;
00089   }  
00090 }

Identifier BesDetectorID::mdc ( void   )  const [inherited]

Definition at line 53 of file BesDetectorID.cxx.

References BesDetectorID::m_MdcId, and BesDetectorID::MDC_INDEX.

00053                                         {
00054   Identifier id = Identifier(  m_MdcId << MDC_INDEX );
00055   return id; 
00056 }

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

Provide efficient access to individual field values.

Definition at line 105 of file BesDetectorID.h.

References BesDetectorID::m_MdcId.

00105 {return (m_MdcId);}     

int TofID::module ( const Identifier id  )  [static]

Definition at line 130 of file TofID.cxx.

References is_scin(), MODULE_INDEX, and MODULE_MASK.

Referenced by TofShower::energyCalib(), EventAssemblyAlg::execute(), TofCheckDigi::FillCol(), TofShower::findShower(), TofShower::getNeighbors(), TofMcHitBuilder::makeTofTruth(), and TofData::setIdentify().

00130                                         {
00131   if( ( TofID::is_scin( id ) ) ) { return -999; }
00132   return ((id.get_value() & TofID::MODULE_MASK) >>  TofID::MODULE_INDEX);
00133 }

Identifier BesDetectorID::mrpc ( void   )  const [inherited]

Definition at line 78 of file BesDetectorID.cxx.

References BesDetectorID::m_MrpcId, and BesDetectorID::MRPC_INDEX.

00078                                          {
00079   Identifier id = Identifier(  m_MrpcId << MRPC_INDEX );
00080   return id;
00081 }

int BesDetectorID::mrpc_field_value (  )  const [inline, protected, inherited]

Definition at line 120 of file BesDetectorID.h.

References BesDetectorID::m_MrpcId.

00120 {return (m_MrpcId);}

Identifier BesDetectorID::muc ( void   )  const [inherited]

Definition at line 68 of file BesDetectorID.cxx.

References BesDetectorID::m_MucId, and BesDetectorID::MUC_INDEX.

00068                                         {
00069   Identifier id = Identifier(  m_MucId << MUC_INDEX );
00070   return id; 
00071 }

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

Definition at line 114 of file BesDetectorID.h.

References BesDetectorID::m_MucId.

00114 {return (m_MucId);}       

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

Definition at line 73 of file TofID.cxx.

References is_mrpc(), PHI_INDEX, and PHI_MASK.

Referenced by EmcRecTofDigitCalib::Convert(), TofROOTGeo::DrawHits(), TofShower::energyCalib(), BesTrigL1::execute(), TofEnergyCalib::execute(), EventAssemblyAlg::execute(), TofCheckDigi::FillCol(), TofShower::findShower(), TofShower::getNeighbors(), RecEmcTofHit::IntCellId(), TofMcHitBuilder::makeTofTruth(), TofTrack::match(), PrintMcInfo::printDigi(), PrintMcInfo::printHit(), McTestAlg::RetrieveTof(), TofROOTGeo::SetHits(), TofData::setIdentify(), Adc::setValue(), TofRawDataProvider::tofDataMapFull(), and TofRawDataProvider::tofDataMapOnlineMode().

00073                                            {
00074   if( ( TofID::is_mrpc( id ) ) ) { return -999; }
00075   return ((id.get_value() & TofID::PHI_MASK) >>  TofID::PHI_INDEX);
00076 }

int TofID::phi_module_max ( const Identifier id  ) 

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

Definition at line 93 of file TofID.cxx.

References is_barrel(), PHI_BARREL_MAX, and PHI_ENDCAP_MAX.

00093                                                   {
00094   if (is_barrel(id)) {
00095     return PHI_BARREL_MAX;
00096   } else {
00097     return PHI_ENDCAP_MAX;
00098   } 
00099 }

int TofID::strip ( const Identifier id  )  [static]

Definition at line 136 of file TofID.cxx.

References is_scin(), STRIP_INDEX, and STRIP_MASK.

Referenced by TofShower::energyCalib(), TofCheckDigi::FillCol(), TofShower::findShower(), TofShower::getNeighbors(), TofMcHitBuilder::makeTofTruth(), and TofData::setIdentify().

00136                                        {
00137   if( ( TofID::is_scin( id ) ) ) { return -999; }
00138   return ((id.get_value() & TofID::STRIP_MASK) >>  TofID::STRIP_INDEX);
00139 }

Identifier BesDetectorID::tof ( void   )  const [inherited]

Definition at line 58 of file BesDetectorID.cxx.

References BesDetectorID::m_TofId, and BesDetectorID::TOF_INDEX.

00058                                        {
00059   Identifier id = Identifier(  m_TofId << TOF_INDEX );
00060   return id; 
00061 }

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

Definition at line 108 of file BesDetectorID.h.

References BesDetectorID::m_TofId.

00108 {return (m_TofId);}

bool TofID::values_ok ( const unsigned int  barrel_ec,
const unsigned int  endcap,
const unsigned int  module,
const unsigned int  strip,
const unsigned int  end 
) [static]

Definition at line 32 of file TofID.cxx.

References BARREL_EC_MRPC, ENDCAP_MRPC_MAX, MODULE_MRPC_MAX, and STRIP_MRPC_MAX.

00037                           {
00038   if( barrel_ec != BARREL_EC_MRPC ) return false;
00039   if( endcap > ENDCAP_MRPC_MAX ) return false;
00040   if( module > MODULE_MRPC_MAX ) return false;
00041   if( strip  > STRIP_MRPC_MAX  ) return false;
00042   if( end    > 1               ) return false;
00043 
00044   return true;
00045 }

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

Definition at line 13 of file TofID.cxx.

References BARREL_EC_MAX, BARREL_EC_MIN, LAYER_BARREL_MAX, and LAYER_ENDCAP_MAX.

Referenced by cell_id().

00017                           {
00018   if ( barrel_ec > BARREL_EC_MAX ) return false;
00019   if ( BARREL_EC_MIN == barrel_ec || BARREL_EC_MIN == barrel_ec) {
00020     if ( layer > LAYER_ENDCAP_MAX ) return false;
00021   }
00022   else {
00023     if ( layer > LAYER_BARREL_MAX  ) return false;
00024   }
00025   if( end > 1 ) return false;
00026 
00027   return true;
00028 }


Member Data Documentation

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

Definition at line 105 of file TofID.h.

Referenced by barrel_ec(), cell_id(), getIntID(), is_barrel(), is_mrpc(), and is_scin().

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

Definition at line 106 of file TofID.h.

Referenced by barrel_ec(), is_barrel(), is_mrpc(), and is_scin().

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

Definition at line 123 of file TofID.h.

Referenced by getBARREL_EC_MAX(), is_barrel(), and values_ok().

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

Definition at line 124 of file TofID.h.

Referenced by getBARREL_EC_MIN(), is_barrel(), and values_ok().

const unsigned int TofID::BARREL_EC_MRPC = 3 [static, private]

Definition at line 136 of file TofID.h.

Referenced by getBARREL_EC_MRPC(), is_barrel(), is_mrpc(), is_scin(), and values_ok().

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

Definition at line 74 of file BesDetectorID.h.

Referenced by EmcID::crystal_id(), EmcID::getIntID(), and BesDetectorID::is_emc().

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

Definition at line 75 of file BesDetectorID.h.

Referenced by EmcID::crystal_id(), BesDetectorID::emc(), EmcID::getIntID(), and BesDetectorID::is_emc().

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

Definition at line 76 of file BesDetectorID.h.

Referenced by BesDetectorID::is_emc().

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

Definition at line 114 of file TofID.h.

Referenced by cell_id(), end(), and getIntID().

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

Definition at line 115 of file TofID.h.

Referenced by end().

const unsigned int TofID::ENDCAP_INDEX = 11 [static, private]

Definition at line 127 of file TofID.h.

Referenced by cell_id(), endcap(), and getIntID().

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

Definition at line 128 of file TofID.h.

Referenced by endcap().

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

Definition at line 137 of file TofID.h.

Referenced by getENDCAP_MRPC_MAX(), and values_ok().

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

Definition at line 82 of file BesDetectorID.h.

Referenced by HltID::data_type_id(), HltID::getIntID(), and BesDetectorID::is_hlt().

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

Definition at line 83 of file BesDetectorID.h.

Referenced by HltID::data_type_id(), HltID::getIntID(), BesDetectorID::hlt(), and BesDetectorID::is_hlt().

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

Definition at line 84 of file BesDetectorID.h.

Referenced by BesDetectorID::is_hlt().

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

Definition at line 117 of file TofID.h.

Referenced by getLAYER_BARREL_MAX(), layer_max(), and values_ok().

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

Definition at line 118 of file TofID.h.

Referenced by getLAYER_ENDCAP_MAX(), layer_max(), and values_ok().

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

Definition at line 108 of file TofID.h.

Referenced by cell_id(), getIntID(), and layer().

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

Definition at line 109 of file TofID.h.

Referenced by layer().

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

Definition at line 66 of file BesDetectorID.h.

Referenced by MdcID::getIntID(), BesDetectorID::is_mdc(), and MdcID::wire_id().

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

Definition at line 67 of file BesDetectorID.h.

Referenced by MdcID::getIntID(), BesDetectorID::is_mdc(), BesDetectorID::mdc(), and MdcID::wire_id().

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

Definition at line 68 of file BesDetectorID.h.

Referenced by MdcID::getIntID(), and BesDetectorID::is_mdc().

const unsigned int TofID::MODULE_INDEX = 5 [static, private]

Definition at line 130 of file TofID.h.

Referenced by cell_id(), getIntID(), and module().

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

Definition at line 131 of file TofID.h.

Referenced by module().

const unsigned int TofID::MODULE_MRPC_MAX = 35 [static, private]

Definition at line 138 of file TofID.h.

Referenced by getMODULE_MRPC_MAX(), and values_ok().

const unsigned int BesDetectorID::MRPC_ID = 0x70 [static, protected, inherited]

Definition at line 86 of file BesDetectorID.h.

Referenced by BesDetectorID::is_mrpc().

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

Definition at line 87 of file BesDetectorID.h.

Referenced by BesDetectorID::is_mrpc(), and BesDetectorID::mrpc().

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

Definition at line 88 of file BesDetectorID.h.

Referenced by BesDetectorID::is_mrpc().

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

Definition at line 78 of file BesDetectorID.h.

Referenced by MucID::channel_id(), MucID::getIntID(), and BesDetectorID::is_muc().

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

Definition at line 79 of file BesDetectorID.h.

Referenced by MucID::channel_id(), MucID::getIntID(), BesDetectorID::is_muc(), and BesDetectorID::muc().

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

Definition at line 80 of file BesDetectorID.h.

Referenced by BesDetectorID::is_muc().

const unsigned int TofID::PHI_BARREL_MAX = 87 [static, private]

Definition at line 120 of file TofID.h.

Referenced by getPHI_BARREL_MAX(), and phi_module_max().

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

Definition at line 121 of file TofID.h.

Referenced by getPHI_ENDCAP_MAX(), and phi_module_max().

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

Definition at line 111 of file TofID.h.

Referenced by cell_id(), getIntID(), and phi_module().

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

Definition at line 112 of file TofID.h.

Referenced by phi_module().

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

Definition at line 133 of file TofID.h.

Referenced by cell_id(), getIntID(), and strip().

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

Definition at line 134 of file TofID.h.

Referenced by strip().

const unsigned int TofID::STRIP_MRPC_MAX = 11 [static, private]

Definition at line 139 of file TofID.h.

Referenced by getSTRIP_MRPC_MAX(), and values_ok().

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

Definition at line 70 of file BesDetectorID.h.

Referenced by cell_id(), getIntID(), and BesDetectorID::is_tof().

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

Definition at line 71 of file BesDetectorID.h.

Referenced by cell_id(), getIntID(), BesDetectorID::is_tof(), and BesDetectorID::tof().

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

Definition at line 72 of file BesDetectorID.h.

Referenced by BesDetectorID::is_tof().


Generated on Tue Nov 29 23:36:05 2016 for BOSS_7.0.2 by  doxygen 1.4.7