BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
BesDetectorID Class Reference

#include <BesDetectorID.h>

+ Inheritance diagram for BesDetectorID:

Public Member Functions

 BesDetectorID (void)
 
 ~BesDetectorID (void)
 
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
 

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
 

Detailed Description

class BesDetectorID

This class provides an interface to generate or decode an identifier for the upper levels of the detector element hierarchy, i.e. BES III, the detector systems.

Definition at line 15 of file BesDetectorID.h.

Constructor & Destructor Documentation

◆ BesDetectorID()

BesDetectorID::BesDetectorID ( void  )

Definition at line 6 of file BesDetectorID.cxx.

6 :
7 m_MdcId(BesDetectorID::MDC_ID),
8 m_TofId(BesDetectorID::TOF_ID),
9 m_EmcId(BesDetectorID::EMC_ID),
10 m_MucId(BesDetectorID::MUC_ID),
11 m_HltId(BesDetectorID::HLT_ID),
13{
14}
static const unsigned int MUC_ID
Definition: BesDetectorID.h:78
static const unsigned int MRPC_ID
Definition: BesDetectorID.h:86
static const unsigned int TOF_ID
Definition: BesDetectorID.h:70
static const unsigned int EMC_ID
Definition: BesDetectorID.h:74
static const unsigned int HLT_ID
Definition: BesDetectorID.h:82
static const unsigned int MDC_ID
Definition: BesDetectorID.h:66

◆ ~BesDetectorID()

BesDetectorID::~BesDetectorID ( void  )

Definition at line 16 of file BesDetectorID.cxx.

17{
18}

Member Function Documentation

◆ emc()

Identifier BesDetectorID::emc ( void  ) const

Definition at line 63 of file BesDetectorID.cxx.

63 {
64 Identifier id = Identifier( m_EmcId << EMC_INDEX );
65 return id;
66}
static const unsigned int EMC_INDEX
Definition: BesDetectorID.h:75

◆ emc_field_value()

int BesDetectorID::emc_field_value ( ) const
inlineprotected

Definition at line 111 of file BesDetectorID.h.

111{return (m_EmcId);}

◆ get_detectorID()

int BesDetectorID::get_detectorID ( const Identifier id) const
protected

◆ hlt()

Identifier BesDetectorID::hlt ( void  ) const

Definition at line 73 of file BesDetectorID.cxx.

73 {
74 Identifier id = Identifier( m_HltId << HLT_INDEX );
75 return id;
76}
static const unsigned int HLT_INDEX
Definition: BesDetectorID.h:83

◆ hlt_field_value()

int BesDetectorID::hlt_field_value ( ) const
inlineprotected

Definition at line 117 of file BesDetectorID.h.

117{return (m_HltId);}

◆ is_emc()

bool BesDetectorID::is_emc ( const Identifier id) const

Definition at line 30 of file BesDetectorID.cxx.

30 {
31 Identifier::value_type value = id.get_value();
32 return ((value & EMC_MASK) >> EMC_INDEX) == EMC_ID ? true : false;
33}
static const unsigned int EMC_MASK
Definition: BesDetectorID.h:76
unsigned int value_type
Definition: Identifier.h:27

◆ is_hlt()

bool BesDetectorID::is_hlt ( const Identifier id) const

Definition at line 40 of file BesDetectorID.cxx.

40 {
41 Identifier::value_type value = id.get_value();
42 return ((value & HLT_MASK) >> HLT_INDEX) == HLT_ID ? true : false;
43}
static const unsigned int HLT_MASK
Definition: BesDetectorID.h:84

◆ is_mdc()

bool BesDetectorID::is_mdc ( const Identifier id) const

Definition at line 20 of file BesDetectorID.cxx.

20 {
21 Identifier::value_type value = id.get_value();
22 return ((value & MDC_MASK) >> MDC_INDEX) == MDC_ID ? true : false;
23}
static const unsigned int MDC_MASK
Definition: BesDetectorID.h:68
static const unsigned int MDC_INDEX
Definition: BesDetectorID.h:67

◆ is_mrpc()

bool BesDetectorID::is_mrpc ( const Identifier id) const

Definition at line 46 of file BesDetectorID.cxx.

46 {
47 Identifier::value_type value = id.get_value();
48 return ((value & MRPC_MASK) >> MRPC_INDEX) == MRPC_ID ? true : false;
49}
static const unsigned int MRPC_INDEX
Definition: BesDetectorID.h:87
static const unsigned int MRPC_MASK
Definition: BesDetectorID.h:88

◆ is_muc()

bool BesDetectorID::is_muc ( const Identifier id) const

Definition at line 35 of file BesDetectorID.cxx.

35 {
36 Identifier::value_type value = id.get_value();
37 return ((value & MUC_MASK) >> MUC_INDEX) == MUC_ID ? true : false;
38}
static const unsigned int MUC_INDEX
Definition: BesDetectorID.h:79
static const unsigned int MUC_MASK
Definition: BesDetectorID.h:80

◆ is_tof()

bool BesDetectorID::is_tof ( const Identifier id) const

Definition at line 25 of file BesDetectorID.cxx.

25 {
26 Identifier::value_type value = id.get_value();
27 return ((value & TOF_MASK) >> TOF_INDEX) == TOF_ID ? true : false;
28}
static const unsigned int TOF_INDEX
Definition: BesDetectorID.h:71
static const unsigned int TOF_MASK
Definition: BesDetectorID.h:72

◆ mdc()

Identifier BesDetectorID::mdc ( void  ) const

Definition at line 53 of file BesDetectorID.cxx.

53 {
54 Identifier id = Identifier( m_MdcId << MDC_INDEX );
55 return id;
56}

◆ mdc_field_value()

int BesDetectorID::mdc_field_value ( ) const
inlineprotected

Provide efficient access to individual field values.

Definition at line 105 of file BesDetectorID.h.

105{return (m_MdcId);}

◆ mrpc()

Identifier BesDetectorID::mrpc ( void  ) const

Definition at line 78 of file BesDetectorID.cxx.

78 {
79 Identifier id = Identifier( m_MrpcId << MRPC_INDEX );
80 return id;
81}

◆ mrpc_field_value()

int BesDetectorID::mrpc_field_value ( ) const
inlineprotected

Definition at line 120 of file BesDetectorID.h.

120{return (m_MrpcId);}

◆ muc()

Identifier BesDetectorID::muc ( void  ) const

Definition at line 68 of file BesDetectorID.cxx.

68 {
69 Identifier id = Identifier( m_MucId << MUC_INDEX );
70 return id;
71}

◆ muc_field_value()

int BesDetectorID::muc_field_value ( ) const
inlineprotected

Definition at line 114 of file BesDetectorID.h.

114{return (m_MucId);}

◆ tof()

Identifier BesDetectorID::tof ( void  ) const

Definition at line 58 of file BesDetectorID.cxx.

58 {
59 Identifier id = Identifier( m_TofId << TOF_INDEX );
60 return id;
61}

◆ tof_field_value()

int BesDetectorID::tof_field_value ( ) const
inlineprotected

Definition at line 108 of file BesDetectorID.h.

108{return (m_TofId);}

Member Data Documentation

◆ EMC_ID

const unsigned int BesDetectorID::EMC_ID = 0x30
staticprotected

Definition at line 74 of file BesDetectorID.h.

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

◆ EMC_INDEX

const unsigned int BesDetectorID::EMC_INDEX = 24
staticprotected

Definition at line 75 of file BesDetectorID.h.

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

◆ EMC_MASK

const unsigned int BesDetectorID::EMC_MASK = 0xFF000000
staticprotected

Definition at line 76 of file BesDetectorID.h.

Referenced by is_emc().

◆ HLT_ID

const unsigned int BesDetectorID::HLT_ID = 0x50
staticprotected

Definition at line 82 of file BesDetectorID.h.

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

◆ HLT_INDEX

const unsigned int BesDetectorID::HLT_INDEX = 24
staticprotected

Definition at line 83 of file BesDetectorID.h.

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

◆ HLT_MASK

const unsigned int BesDetectorID::HLT_MASK = 0xFF000000
staticprotected

Definition at line 84 of file BesDetectorID.h.

Referenced by is_hlt().

◆ MDC_ID

const unsigned int BesDetectorID::MDC_ID = 0x10
staticprotected

Definition at line 66 of file BesDetectorID.h.

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

◆ MDC_INDEX

const unsigned int BesDetectorID::MDC_INDEX = 24
staticprotected

Definition at line 67 of file BesDetectorID.h.

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

◆ MDC_MASK

const unsigned int BesDetectorID::MDC_MASK = 0xFF000000
staticprotected

Definition at line 68 of file BesDetectorID.h.

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

◆ MRPC_ID

const unsigned int BesDetectorID::MRPC_ID = 0x70
staticprotected

Definition at line 86 of file BesDetectorID.h.

Referenced by is_mrpc().

◆ MRPC_INDEX

const unsigned int BesDetectorID::MRPC_INDEX = 24
staticprotected

Definition at line 87 of file BesDetectorID.h.

Referenced by is_mrpc(), and mrpc().

◆ MRPC_MASK

const unsigned int BesDetectorID::MRPC_MASK = 0xFF000000
staticprotected

Definition at line 88 of file BesDetectorID.h.

Referenced by is_mrpc().

◆ MUC_ID

const unsigned int BesDetectorID::MUC_ID = 0x40
staticprotected

Definition at line 78 of file BesDetectorID.h.

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

◆ MUC_INDEX

const unsigned int BesDetectorID::MUC_INDEX = 24
staticprotected

Definition at line 79 of file BesDetectorID.h.

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

◆ MUC_MASK

const unsigned int BesDetectorID::MUC_MASK = 0xFF000000
staticprotected

Definition at line 80 of file BesDetectorID.h.

Referenced by is_muc().

◆ TOF_ID

const unsigned int BesDetectorID::TOF_ID = 0x20
staticprotected

Definition at line 70 of file BesDetectorID.h.

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

◆ TOF_INDEX

const unsigned int BesDetectorID::TOF_INDEX = 24
staticprotected

Definition at line 71 of file BesDetectorID.h.

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

◆ TOF_MASK

const unsigned int BesDetectorID::TOF_MASK = 0xFF000000
staticprotected

Definition at line 72 of file BesDetectorID.h.

Referenced by is_tof().


The documentation for this class was generated from the following files: