CGEM BOSS 6.6.5.g
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
 
Identifier cgem (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
 
bool is_cgem (const Identifier &id) const
 

Protected Member Functions

int mdc_field_value () const
 Provide efficient access to individual field values.
 
int cgem_field_value () const
 
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 CGEM_ID = 0x60
 
static const unsigned int CGEM_INDEX = 24
 
static const unsigned int CGEM_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_CgemId(BesDetectorID::CGEM_ID),
9 m_TofId(BesDetectorID::TOF_ID),
10 m_EmcId(BesDetectorID::EMC_ID),
11 m_MucId(BesDetectorID::MUC_ID),
13{
14}
static const unsigned int MUC_ID
Definition: BesDetectorID.h:78
static const unsigned int CGEM_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

◆ cgem()

Identifier BesDetectorID::cgem ( void  ) const

Definition at line 55 of file BesDetectorID.cxx.

55 {
56 Identifier id = Identifier( m_CgemId << CGEM_INDEX );
57 return id;
58}
static const unsigned int CGEM_INDEX
Definition: BesDetectorID.h:87

◆ cgem_field_value()

int BesDetectorID::cgem_field_value ( ) const
inlineprotected

Definition at line 110 of file BesDetectorID.h.

110{return (m_CgemId);}

◆ emc()

Identifier BesDetectorID::emc ( void  ) const

Definition at line 65 of file BesDetectorID.cxx.

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

◆ emc_field_value()

int BesDetectorID::emc_field_value ( ) const
inlineprotected

Definition at line 116 of file BesDetectorID.h.

116{return (m_EmcId);}

◆ get_detectorID()

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

◆ hlt()

Identifier BesDetectorID::hlt ( void  ) const

Definition at line 75 of file BesDetectorID.cxx.

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

◆ hlt_field_value()

int BesDetectorID::hlt_field_value ( ) const
inlineprotected

Definition at line 122 of file BesDetectorID.h.

122{return (m_HltId);}

◆ is_cgem()

bool BesDetectorID::is_cgem ( const Identifier id) const

Definition at line 25 of file BesDetectorID.cxx.

25 {
26 Identifier::value_type value = id.get_value();
27 return (value & CGEM_MASK >> CGEM_INDEX) == CGEM_ID ? true : false;
28}
static const unsigned int CGEM_MASK
Definition: BesDetectorID.h:88
unsigned int value_type
Definition: Identifier.h:27

◆ is_emc()

bool BesDetectorID::is_emc ( const Identifier id) const

Definition at line 35 of file BesDetectorID.cxx.

35 {
36 Identifier::value_type value = id.get_value();
37 return (value & EMC_MASK >> EMC_INDEX) == EMC_ID ? true : false;
38}
static const unsigned int EMC_MASK
Definition: BesDetectorID.h:76

◆ is_hlt()

bool BesDetectorID::is_hlt ( const Identifier id) const

Definition at line 45 of file BesDetectorID.cxx.

45 {
46 Identifier::value_type value = id.get_value();
47 return (value & HLT_MASK >> HLT_INDEX) == HLT_ID ? true : false;
48}
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

◆ is_muc()

bool BesDetectorID::is_muc ( const Identifier id) const

Definition at line 40 of file BesDetectorID.cxx.

40 {
41 Identifier::value_type value = id.get_value();
42 return (value & MUC_MASK >> MUC_INDEX) == MUC_ID ? true : false;
43}
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 30 of file BesDetectorID.cxx.

30 {
31 Identifier::value_type value = id.get_value();
32 return (value & TOF_MASK >> TOF_INDEX) == TOF_ID ? true : false;
33}
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 50 of file BesDetectorID.cxx.

50 {
51 Identifier id = Identifier( m_MdcId << MDC_INDEX );
52 return id;
53}

◆ mdc_field_value()

int BesDetectorID::mdc_field_value ( ) const
inlineprotected

Provide efficient access to individual field values.

Definition at line 107 of file BesDetectorID.h.

107{return (m_MdcId);}

◆ mrpc()

Identifier BesDetectorID::mrpc ( void  ) const

◆ mrpc_field_value()

int BesDetectorID::mrpc_field_value ( ) const
inlineprotected

Definition at line 125 of file BesDetectorID.h.

125{return (m_MrpcId);}

◆ muc()

Identifier BesDetectorID::muc ( void  ) const

Definition at line 70 of file BesDetectorID.cxx.

70 {
71 Identifier id = Identifier( m_MucId << MUC_INDEX );
72 return id;
73}

◆ muc_field_value()

int BesDetectorID::muc_field_value ( ) const
inlineprotected

Definition at line 119 of file BesDetectorID.h.

119{return (m_MucId);}

◆ tof()

Identifier BesDetectorID::tof ( void  ) const

Definition at line 60 of file BesDetectorID.cxx.

60 {
61 Identifier id = Identifier( m_TofId << TOF_INDEX );
62 return id;
63}

◆ tof_field_value()

int BesDetectorID::tof_field_value ( ) const
inlineprotected

Definition at line 113 of file BesDetectorID.h.

113{return (m_TofId);}

Member Data Documentation

◆ CGEM_ID

const unsigned int BesDetectorID::CGEM_ID = 0x60
staticprotected

Definition at line 86 of file BesDetectorID.h.

Referenced by CgemID::getIntID(), is_cgem(), and CgemID::strip_id().

◆ CGEM_INDEX

const unsigned int BesDetectorID::CGEM_INDEX = 24
staticprotected

Definition at line 87 of file BesDetectorID.h.

Referenced by cgem(), CgemID::getIntID(), is_cgem(), and CgemID::strip_id().

◆ CGEM_MASK

const unsigned int BesDetectorID::CGEM_MASK = 0xFF000000
staticprotected

Definition at line 88 of file BesDetectorID.h.

Referenced by CgemID::getIntID(), and is_cgem().

◆ 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

◆ MRPC_INDEX

const unsigned int BesDetectorID::MRPC_INDEX = 24
staticprotected

◆ MRPC_MASK

const unsigned int BesDetectorID::MRPC_MASK = 0xFF000000
staticprotected

Definition at line 92 of file BesDetectorID.h.

◆ 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: