MucID Class Reference

#include <MucID.h>

Inheritance diagram for MucID:

BesDetectorID List of all members.

Public Types

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

Public Member Functions

 MucID ()
 constructor
 ~MucID ()
 destructor
int segment_max (const Identifier &id)
 Max/Min values for each field.
int layer_max (const Identifier &id)
int channel_max (const Identifier &id)
int getSegNum (const Identifier &id)
int getGapNum (const Identifier &id)
int getStripNum (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 channel_id (int barrel_ec, int segment, int layer, int channel)
 For a single crystal.
static value_type getIntID (int barrel_ec, int segment, int layer, int channel)
static value_type getSEGMENT_BARREL_MAX ()
static value_type getSEGMENT_ENDCAP_MAX ()
static value_type getLAYER_BARREL_MAX ()
static value_type getLAYER_ENDCAP_MAX ()
static value_type getCHANNEL_BARREL_MAX ()
static value_type getCHANNEL_ENDCAP_MAX ()
static value_type getBARREL_EC_MAX ()
static value_type getBARREL_EC_MIN ()
static value_type getPartNum ()
static value_type getSegNum (int part)
 ---------------------------------------------------------------------------
static value_type getGapNum (int part)
static value_type getStripNum (int part, int seg, int gap)
static value_type getSegMax ()
 ---------------------------------------------------------------------------
static value_type getGapMax ()
 ---------------------------------------------------------------------------
static value_type getStripMax ()
static bool values_ok (const unsigned int barrel_ec, const unsigned int segment, const unsigned int layer, const unsigned int channel)
static bool is_barrel (const Identifier &id)
 Test for barrel.
static int barrel_ec (const Identifier &id)
 Values of different levels.
static int segment (const Identifier &id)
static int layer (const Identifier &id)
static int channel (const Identifier &id)
static int part (const Identifier &id)
static int seg (const Identifier &id)
static int gap (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 = 16
static const unsigned int BARREL_EC_MASK = 0x000F0000
static const unsigned int SEGMENT_INDEX = 12
static const unsigned int SEGMENT_MASK = 0x0000F000
static const unsigned int LAYER_INDEX = 8
static const unsigned int LAYER_MASK = 0x00000F00
static const unsigned int CHANNEL_INDEX = 0
static const unsigned int CHANNEL_MASK = 0x000000FF
static const unsigned int BARREL_EC_NUM = 3
static const unsigned int LAYER_BARREL_NUM = 9
static const unsigned int LAYER_ENDCAP_NUM = 8
static const unsigned int SEGMENT_BARREL_NUM = 8
static const unsigned int SEGMENT_ENDCAP_NUM = 4
static const unsigned int CHANNEL_BARREL_NUM_MAX = 112
static const unsigned int CHANNEL_ENDCAP_NUM_MAX = 64
static const unsigned int CHANNEL_BARREL_LAYER_NUM [LAYER_BARREL_NUM]
static const unsigned int BARREL_EC_MAX = 2
static const unsigned int BARREL_EC_MIN = 0

Detailed Description

Definition at line 8 of file MucID.h.


Member Typedef Documentation

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

Definition at line 80 of file MucID.h.

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

Definition at line 81 of file MucID.h.

typedef Identifier::size_type MucID::size_type

Definition at line 11 of file MucID.h.

typedef Identifier::value_type MucID::value_type

Definition at line 12 of file MucID.h.


Constructor & Destructor Documentation

MucID::MucID (  ) 

constructor

Definition at line 7 of file MucID.cxx.

00007                  {
00008 }

MucID::~MucID (  ) 

destructor

Definition at line 10 of file MucID.cxx.

00010                   {
00011 }


Member Function Documentation

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

Values of different levels.

Definition at line 41 of file MucID.cxx.

References BARREL_EC_INDEX, and BARREL_EC_MASK.

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::execute(), DQA_MUC::execute(), ExtMucKal::GapHit(), PrintMcInfo::printDigi(), PrintMcInfo::printHit(), and MucCalibMgr::ReadEvent().

00041                                           {
00042   return ((id.get_value() & MucID::BARREL_EC_MASK) >>  MucID::BARREL_EC_INDEX);  
00043 }

int MucID::channel ( const Identifier id  )  [static]

Definition at line 71 of file MucID.cxx.

References CHANNEL_INDEX, and CHANNEL_MASK.

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::execute(), DQA_MUC::execute(), and MucCalibMgr::ReadEvent().

00071                                         {
00072   return (id.get_value() & MucID::CHANNEL_MASK) >>  MucID::CHANNEL_INDEX;  
00073 }

Identifier MucID::channel_id ( int  barrel_ec,
int  segment,
int  layer,
int  channel 
) [static]

For a single crystal.

Definition at line 135 of file MucID.cxx.

References BARREL_EC_INDEX, CHANNEL_INDEX, LAYER_INDEX, BesDetectorID::MUC_ID, BesDetectorID::MUC_INDEX, SEGMENT_INDEX, and values_ok().

Referenced by RawDataMucMcHitCnv::createObj(), MucGeoGeneral::FindIntersectGaps(), MucGeoGeneral::FindIntersectStrips(), MucGeoGeneral::GetGap(), MucRecHitContainer::GetHitByIdentifier(), MucGeoGeneral::GetStrip(), MucGeoGeneral::InitFromASCII(), MucGeoGeneral::InitFromXML(), MucRecHit::MucRecHit(), BesRawDataWriter::SaveMucDigits(), and BesMcTruthWriter::SaveMucTruth().

00139                                   {
00140   assert ( values_ok(barrel_ec, segment, layer, channel) );
00141   value_type value = (MUC_ID << MUC_INDEX) | (barrel_ec << BARREL_EC_INDEX)|
00142     (segment << SEGMENT_INDEX) | (layer << LAYER_INDEX) | (channel << CHANNEL_INDEX);
00143   return Identifier(value);  
00144 }

int MucID::channel_max ( const Identifier id  ) 

Definition at line 117 of file MucID.cxx.

References CHANNEL_BARREL_NUM_MAX, and CHANNEL_ENDCAP_NUM_MAX.

00117                                              {
00118   if (this->is_barrel(id)) {
00119     return CHANNEL_BARREL_NUM_MAX - 1;
00120   } else {
00121     return CHANNEL_ENDCAP_NUM_MAX - 1;
00122   } 
00123 }

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 MucID::gap ( const Identifier id  )  [static]

Definition at line 66 of file MucID.cxx.

References LAYER_INDEX, and LAYER_MASK.

Referenced by MucRecHitContainer::AddHit(), BesEvent::ConstructMucTrackFromRec(), MucROOTGeo::DrawHits(), MucRecHit::Gap(), MucGeoGeneral::GetGap(), MucRecHitContainer::GetHitByIdentifier(), MucTrigHit::getMucDigi(), RecMucTrack::LineFit(), main(), MucMcHitBuilder::makeMucTruth(), and MucROOTGeo::SetHits().

00066                                     {
00067   return (id.get_value() & MucID::LAYER_MASK) >>  MucID::LAYER_INDEX;  
00068 }

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

unsigned int MucID::getBARREL_EC_MAX (  )  [static]

Definition at line 236 of file MucID.cxx.

References BARREL_EC_NUM.

00236                                     {
00237   return BARREL_EC_NUM - 1;
00238 }

unsigned int MucID::getBARREL_EC_MIN (  )  [static]

Definition at line 241 of file MucID.cxx.

00241                                     {
00242   return 0;
00243 }

unsigned int MucID::getCHANNEL_BARREL_MAX (  )  [static]

Definition at line 226 of file MucID.cxx.

References CHANNEL_BARREL_NUM_MAX.

00226                                          {
00227    return CHANNEL_BARREL_NUM_MAX;
00228 }

unsigned int MucID::getCHANNEL_ENDCAP_MAX (  )  [static]

Definition at line 231 of file MucID.cxx.

References CHANNEL_ENDCAP_NUM_MAX.

00231                                          {
00232    return CHANNEL_ENDCAP_NUM_MAX;
00233 }

unsigned int MucID::getGapMax (  )  [static]

---------------------------------------------------------------------------

Definition at line 195 of file MucID.cxx.

References LAYER_BARREL_NUM, and LAYER_ENDCAP_NUM.

Referenced by MucRec2DRoad::AttachHit(), MucRec2DRoad::AttachHitNoFit(), RecMucTrack::ComputeDepth(), RecMucTrack::ComputeNGapsWithHits(), MucRec3DRoad::GetHit(), MucRec2DRoad::GetHit(), MucRec2DRoad::GetHitDistance(), MucRec3DRoad::GetHitsPerGap(), MucRec2DRoad::GetHitsPerGap(), MucRec3DRoad::GetNGapsWithHits(), MucRec2DRoad::GetNGapsWithHits(), MucRec2DRoad::GetSearchWindowSize(), MucRec3DRoad::HasHitInGap(), MucRec2DRoad::HasHitInGap(), MucGeoGeneral::Init(), MucRec3DRoad::MucRec3DRoad(), MucRec3DRoad::Project(), MucRec2DRoad::Project(), MucRec3DRoad::ProjectNoCurrentGap(), MucRec3DRoad::ProjectToStrip(), and MucRec3DRoad::ProjectWithSigma().

00195                               {
00196   if (LAYER_BARREL_NUM > LAYER_ENDCAP_NUM) return LAYER_BARREL_NUM;
00197   else return LAYER_ENDCAP_NUM;
00198 }

int MucID::getGapNum ( const Identifier id  ) 

Definition at line 108 of file MucID.cxx.

References LAYER_BARREL_NUM, and LAYER_ENDCAP_NUM.

00108                                            {
00109   if (this->is_barrel(id)) {
00110     return LAYER_BARREL_NUM;
00111   } else {
00112     return LAYER_ENDCAP_NUM;
00113   } 
00114 }

unsigned int MucID::getGapNum ( int  part  )  [static]

Definition at line 171 of file MucID.cxx.

References LAYER_BARREL_NUM, and LAYER_ENDCAP_NUM.

Referenced by MucRecHitContainer::AddHit(), RecMucTrack::AttachHit(), MucRecHitContainer::Clear(), RecMucTrack::ComputeMaxHitsInGap(), MucRec2DRoad::CountHits(), MucRecTrkExt::execute(), MucGeoGeneral::FindIntersection(), MucGeoGeneral::FindIntersectionQuadLocal(), MucGeoGeneral::FindIntersectionSurface(), ExtMucKal::GetDistance(), RecMucTrack::GetHit(), MucRecHitContainer::GetHitCount(), RecMucTrack::GetHitDistance(), RecMucTrack::GetHitDistance2(), RecMucTrack::GetHitInGap(), MucGeoGeneral::GetStripNumTotal(), RecMucTrack::HasHitInGap(), RecMucTrack::LineFit(), main(), RecMucTrack::Project(), MucRecTrkExt::TrackFinding(), and MucRecRoadFinder::TrackFinding().

00171                                         {
00172   if (part == 1) return LAYER_BARREL_NUM;
00173   if (part == 0 || part == 2) return LAYER_ENDCAP_NUM;
00174   else return 0;
00175 }

unsigned int MucID::getIntID ( int  barrel_ec,
int  segment,
int  layer,
int  channel 
) [static]

Definition at line 147 of file MucID.cxx.

References BARREL_EC_INDEX, CHANNEL_INDEX, LAYER_INDEX, BesDetectorID::MUC_ID, BesDetectorID::MUC_INDEX, and SEGMENT_INDEX.

Referenced by MucBuilder::initialize().

00151                                 {
00152   value_type value = (MUC_ID << MUC_INDEX) | (barrel_ec << BARREL_EC_INDEX)|
00153     (segment << SEGMENT_INDEX) | (layer << LAYER_INDEX) | (channel << CHANNEL_INDEX);
00154   return value;
00155 
00156 }

unsigned int MucID::getLAYER_BARREL_MAX (  )  [static]

Definition at line 216 of file MucID.cxx.

References LAYER_BARREL_NUM.

00216                                        {
00217    return LAYER_BARREL_NUM - 1;
00218 }

unsigned int MucID::getLAYER_ENDCAP_MAX (  )  [static]

Definition at line 221 of file MucID.cxx.

References LAYER_ENDCAP_NUM.

00221                                        {
00222    return LAYER_ENDCAP_NUM - 1;
00223 }

unsigned int MucID::getPartNum (  )  [static]

Definition at line 159 of file MucID.cxx.

References BARREL_EC_NUM.

Referenced by MucRecHitContainer::AddHit(), MucRecHitContainer::Clear(), RecMucTrack::ComputeMaxHitsInGap(), MucRecTrkExt::execute(), MucRecRoadFinder::execute(), MucGeoGeneral::FindIntersection(), MucGeoGeneral::FindIntersectionQuadLocal(), MucGeoGeneral::FindIntersectionSurface(), RecMucTrack::FindSegWithMaxHits(), MucRecHitContainer::GetHitCount(), MucGeoGeneral::GetStripNumTotal(), MucGeoGeneral::Init(), main(), MucRec3DRoad::ProjectToStrip(), MucRecTrkExt::TrackFinding(), and MucRecRoadFinder::TrackFinding().

00159                               {
00160    return BARREL_EC_NUM;
00161 }

unsigned int MucID::getSegMax (  )  [static]

---------------------------------------------------------------------------

Definition at line 188 of file MucID.cxx.

References SEGMENT_BARREL_NUM, and SEGMENT_ENDCAP_NUM.

Referenced by MucGeoGeneral::Init().

00188                               {
00189   if (SEGMENT_BARREL_NUM > SEGMENT_ENDCAP_NUM) return SEGMENT_BARREL_NUM;
00190   else return SEGMENT_ENDCAP_NUM;
00191 }

unsigned int MucID::getSEGMENT_BARREL_MAX (  )  [static]

Definition at line 206 of file MucID.cxx.

References SEGMENT_BARREL_NUM.

00206                                          {
00207    return SEGMENT_BARREL_NUM - 1;
00208 }

unsigned int MucID::getSEGMENT_ENDCAP_MAX (  )  [static]

Definition at line 211 of file MucID.cxx.

References SEGMENT_ENDCAP_NUM.

00211                                          {
00212    return SEGMENT_ENDCAP_NUM - 1;
00213 }

int MucID::getSegNum ( const Identifier id  ) 

Definition at line 90 of file MucID.cxx.

References is_barrel(), SEGMENT_BARREL_NUM, and SEGMENT_ENDCAP_NUM.

00090                                            {
00091    if (is_barrel(id)) {
00092     return SEGMENT_BARREL_NUM;
00093   } else {
00094     return SEGMENT_ENDCAP_NUM;
00095   }  
00096 }

unsigned int MucID::getSegNum ( int  part  )  [static]

---------------------------------------------------------------------------

Definition at line 164 of file MucID.cxx.

References SEGMENT_BARREL_NUM, and SEGMENT_ENDCAP_NUM.

Referenced by MucRecHitContainer::AddHit(), MucRecHitContainer::Clear(), MucRecTrkExt::execute(), MucRecRoadFinder::execute(), MucGeoGeneral::FindIntersectGaps(), MucGeoGeneral::FindIntersections(), RecMucTrack::FindSegWithMaxHits(), ExtMucKal::GapHit(), MucRecHitContainer::GetHitCount(), RecMucTrack::GetHitInSegOrient(), MucGeoGeneral::GetStripNumTotal(), MucRecTrkExt::TrackFinding(), and MucRecRoadFinder::TrackFinding().

00164                                         {
00165    if (part == 1) return SEGMENT_BARREL_NUM;
00166    else if (part == 0 || part == 2) return SEGMENT_ENDCAP_NUM;
00167    else return 0;
00168 }

unsigned int MucID::getStripMax (  )  [static]

Definition at line 200 of file MucID.cxx.

References CHANNEL_BARREL_NUM_MAX, and CHANNEL_ENDCAP_NUM_MAX.

00200                                 {
00201   if (CHANNEL_BARREL_NUM_MAX > CHANNEL_ENDCAP_NUM_MAX) return CHANNEL_BARREL_NUM_MAX;
00202   else return CHANNEL_ENDCAP_NUM_MAX;
00203 }

int MucID::getStripNum ( const Identifier id  ) 

Definition at line 126 of file MucID.cxx.

References CHANNEL_BARREL_LAYER_NUM, and CHANNEL_ENDCAP_NUM_MAX.

00126                                               {
00127   if (this->is_barrel(id)) {
00128     return CHANNEL_BARREL_LAYER_NUM[this->gap(id)];
00129   } else {
00130     return CHANNEL_ENDCAP_NUM_MAX;
00131   } 
00132 }

unsigned int MucID::getStripNum ( int  part,
int  seg,
int  gap 
) [static]

Definition at line 178 of file MucID.cxx.

References CHANNEL_BARREL_LAYER_NUM, and CHANNEL_ENDCAP_NUM_MAX.

Referenced by MucRecHitContainer::AddHit().

00178                                                              {
00179   if (part == 1) {
00180     if (seg == 2) return CHANNEL_BARREL_LAYER_NUM[gap];
00181     else return CHANNEL_BARREL_LAYER_NUM[gap];
00182   } else {
00183     return CHANNEL_ENDCAP_NUM_MAX;
00184   } 
00185 }

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 MucID::is_barrel ( const Identifier id  )  [static]

Test for barrel.

Definition at line 35 of file MucID.cxx.

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

Referenced by getSegNum(), and segment_max().

00035                                             {
00036   unsigned int pos = (id.get_value() & MucID::BARREL_EC_MASK) >>  MucID::BARREL_EC_INDEX;
00037   return (pos == 0 || pos == BARREL_EC_NUM - 1) ? false : true;
00038 }

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

Definition at line 61 of file MucID.cxx.

References LAYER_INDEX, and LAYER_MASK.

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::execute(), DQA_MUC::execute(), ExtMucKal::GapHit(), PrintMcInfo::printDigi(), PrintMcInfo::printHit(), and MucCalibMgr::ReadEvent().

00061                                       {
00062   return (id.get_value() & MucID::LAYER_MASK) >>  MucID::LAYER_INDEX;  
00063 }

int MucID::layer_max ( const Identifier id  ) 

Definition at line 99 of file MucID.cxx.

References LAYER_BARREL_NUM, and LAYER_ENDCAP_NUM.

00099                                            {
00100   if (this->is_barrel(id)) {
00101     return LAYER_BARREL_NUM - 1;
00102   } else {
00103     return LAYER_ENDCAP_NUM - 1;
00104   } 
00105 }

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

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 MucID::part ( const Identifier id  )  [static]

Definition at line 46 of file MucID.cxx.

References BARREL_EC_INDEX, and BARREL_EC_MASK.

Referenced by MucRecHitContainer::AddHit(), BesEvent::ConstructMucTrackFromRec(), MucROOTGeo::DrawHits(), MucGeoGeneral::GetGap(), MucRecHitContainer::GetHitByIdentifier(), MucTrigHit::getMucDigi(), RecMucTrack::LineFit(), main(), MucMcHitBuilder::makeMucTruth(), MucRecHit::Part(), and MucROOTGeo::SetHits().

00046                                      {
00047   return ((id.get_value() & MucID::BARREL_EC_MASK) >>  MucID::BARREL_EC_INDEX);  
00048 }

int MucID::seg ( const Identifier id  )  [static]

Definition at line 56 of file MucID.cxx.

References SEGMENT_INDEX, and SEGMENT_MASK.

Referenced by MucRecHitContainer::AddHit(), BesEvent::ConstructMucTrackFromRec(), MucROOTGeo::DrawHits(), MucGeoGeneral::FindIntersectStrips(), MucGeoGeneral::GetGap(), MucRecHitContainer::GetHitByIdentifier(), MucTrigHit::getMucDigi(), RecMucTrack::LineFit(), main(), MucMcHitBuilder::makeMucTruth(), MucRecHit::Seg(), and MucROOTGeo::SetHits().

00056                                     {
00057   return (id.get_value() & MucID::SEGMENT_MASK) >>  MucID::SEGMENT_INDEX;  
00058 }

int MucID::segment ( const Identifier id  )  [static]

Definition at line 51 of file MucID.cxx.

References SEGMENT_INDEX, and SEGMENT_MASK.

Referenced by MucRecTrkExt::execute(), MucRecRoadFinder::execute(), DQA_MUC::execute(), ExtMucKal::GapHit(), PrintMcInfo::printDigi(), PrintMcInfo::printHit(), and MucCalibMgr::ReadEvent().

00051                                         {
00052   return (id.get_value() & MucID::SEGMENT_MASK) >>  MucID::SEGMENT_INDEX;  
00053 }

int MucID::segment_max ( const Identifier id  ) 

Max/Min values for each field.

Definition at line 81 of file MucID.cxx.

References is_barrel(), SEGMENT_BARREL_NUM, and SEGMENT_ENDCAP_NUM.

00081                                              {
00082    if (is_barrel(id)) {
00083     return SEGMENT_BARREL_NUM - 1;
00084   } else {
00085     return SEGMENT_ENDCAP_NUM - 1;
00086   }  
00087 }

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

Definition at line 76 of file MucID.cxx.

References CHANNEL_INDEX, and CHANNEL_MASK.

Referenced by MucRecHitContainer::AddHit(), BesEvent::ConstructMucTrackFromRec(), MucROOTGeo::DrawHits(), ExtMucKal::GapHit(), MucRecHitContainer::GetHitByIdentifier(), MucTrigHit::getMucDigi(), RecMucTrack::LineFit(), main(), MucMcHitBuilder::makeMucTruth(), PrintMcInfo::printDigi(), PrintMcInfo::printHit(), MucROOTGeo::SetHits(), and MucRecHit::Strip().

00076                                       {
00077   return (id.get_value() & MucID::CHANNEL_MASK) >>  MucID::CHANNEL_INDEX;  
00078 }

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 MucID::values_ok ( const unsigned int  barrel_ec,
const unsigned int  segment,
const unsigned int  layer,
const unsigned int  channel 
) [static]

Definition at line 14 of file MucID.cxx.

References BARREL_EC_NUM, CHANNEL_BARREL_LAYER_NUM, CHANNEL_ENDCAP_NUM_MAX, LAYER_BARREL_NUM, LAYER_ENDCAP_NUM, SEGMENT_BARREL_NUM, and SEGMENT_ENDCAP_NUM.

Referenced by channel_id().

00018                           {
00019   // Check values
00020   if ( barrel_ec >= BARREL_EC_NUM )     return false;
00021   if ( barrel_ec == 0 || barrel_ec  == BARREL_EC_NUM - 1 ) {
00022     if ( segment >= SEGMENT_ENDCAP_NUM ) return false;
00023     if ( layer   >= LAYER_ENDCAP_NUM   ) return false;
00024     if ( channel >= CHANNEL_ENDCAP_NUM_MAX ) return false;
00025   }
00026   else {
00027     if ( segment >= SEGMENT_BARREL_NUM )       return false;
00028     if ( layer   >= LAYER_BARREL_NUM   )       return false;
00029     if ( channel >= CHANNEL_BARREL_LAYER_NUM[layer] )     return false;
00030   }
00031   return true;
00032 }


Member Data Documentation

const unsigned int MucID::BARREL_EC_INDEX = 16 [static, private]

Definition at line 83 of file MucID.h.

Referenced by barrel_ec(), channel_id(), getIntID(), is_barrel(), and part().

const unsigned int MucID::BARREL_EC_MASK = 0x000F0000 [static, private]

Definition at line 84 of file MucID.h.

Referenced by barrel_ec(), is_barrel(), and part().

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

Definition at line 108 of file MucID.h.

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

Definition at line 109 of file MucID.h.

const unsigned int MucID::BARREL_EC_NUM = 3 [static, private]

Definition at line 95 of file MucID.h.

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

const unsigned int MucID::CHANNEL_BARREL_LAYER_NUM [static, private]

Initial value:

 
  {64,112,64,112,64,112,64,112,64}

Definition at line 106 of file MucID.h.

Referenced by getStripNum(), and values_ok().

const unsigned int MucID::CHANNEL_BARREL_NUM_MAX = 112 [static, private]

Definition at line 103 of file MucID.h.

Referenced by channel_max(), getCHANNEL_BARREL_MAX(), and getStripMax().

const unsigned int MucID::CHANNEL_ENDCAP_NUM_MAX = 64 [static, private]

Definition at line 104 of file MucID.h.

Referenced by channel_max(), getCHANNEL_ENDCAP_MAX(), getStripMax(), getStripNum(), and values_ok().

const unsigned int MucID::CHANNEL_INDEX = 0 [static, private]

Definition at line 92 of file MucID.h.

Referenced by channel(), channel_id(), getIntID(), and strip().

const unsigned int MucID::CHANNEL_MASK = 0x000000FF [static, private]

Definition at line 93 of file MucID.h.

Referenced by channel(), and strip().

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 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 MucID::LAYER_BARREL_NUM = 9 [static, private]

Definition at line 97 of file MucID.h.

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

const unsigned int MucID::LAYER_ENDCAP_NUM = 8 [static, private]

Definition at line 98 of file MucID.h.

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

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

Definition at line 89 of file MucID.h.

Referenced by channel_id(), gap(), getIntID(), and layer().

const unsigned int MucID::LAYER_MASK = 0x00000F00 [static, private]

Definition at line 90 of file MucID.h.

Referenced by gap(), and 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 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 channel_id(), 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 channel_id(), 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 MucID::SEGMENT_BARREL_NUM = 8 [static, private]

Definition at line 100 of file MucID.h.

Referenced by getSegMax(), getSEGMENT_BARREL_MAX(), getSegNum(), segment_max(), and values_ok().

const unsigned int MucID::SEGMENT_ENDCAP_NUM = 4 [static, private]

Definition at line 101 of file MucID.h.

Referenced by getSegMax(), getSEGMENT_ENDCAP_MAX(), getSegNum(), segment_max(), and values_ok().

const unsigned int MucID::SEGMENT_INDEX = 12 [static, private]

Definition at line 86 of file MucID.h.

Referenced by channel_id(), getIntID(), seg(), and segment().

const unsigned int MucID::SEGMENT_MASK = 0x0000F000 [static, private]

Definition at line 87 of file MucID.h.

Referenced by seg(), and segment().

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

Definition at line 70 of file BesDetectorID.h.

Referenced by TofID::cell_id(), TofID::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 TofID::cell_id(), TofID::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:20:29 2016 for BOSS_7.0.2 by  doxygen 1.4.7