CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemID Class Reference

#include <CgemID.h>

+ Inheritance diagram for CgemID:

Public Types

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

Public Member Functions

 CgemID ()
 
 ~CgemID ()
 
- Public Member Functions inherited from BesDetectorID
 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
 

Static Public Member Functions

static Identifier strip_id (int f_layer, int f_sheet, int f_strip_type, int f_strip)
 
static value_type getIntID (unsigned int f_layer, unsigned int f_sheet, unsigned int f_strip_type, unsigned int f_strip)
 
static value_type getLAYER_MAX ()
 
static value_type getSHEET_MAX ()
 
static value_type getXSTRIP_MAX (unsigned int f_layer)
 
static value_type getVSTRIP_MAX (unsigned int f_layer)
 
static value_type getXSTRIP_TYPE ()
 
static value_type getVSTRIP_TYPE ()
 
static bool values_ok (const unsigned int f_layer, const unsigned int f_sheet, const unsigned int f_strip_type, const unsigned int f_strip)
 
static bool is_xstrip (const Identifier &id)
 
static int layer (const Identifier &id)
 
static int sheet (const Identifier &id)
 
static int strip (const Identifier &id)
 

Additional Inherited Members

- Protected Member Functions inherited from BesDetectorID
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 inherited from BesDetectorID
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

Definition at line 14 of file CgemID.h.

Member Typedef Documentation

◆ size_type

Definition at line 17 of file CgemID.h.

◆ value_type

Constructor & Destructor Documentation

◆ CgemID()

CgemID::CgemID ( void )

Definition at line 13 of file CgemID.cxx.

14{
15}

◆ ~CgemID()

CgemID::~CgemID ( void )

Definition at line 18 of file CgemID.cxx.

19{
20}

Member Function Documentation

◆ getIntID()

unsigned int CgemID::getIntID ( unsigned int f_layer,
unsigned int f_sheet,
unsigned int f_strip_type,
unsigned int f_strip )
static

Definition at line 104 of file CgemID.cxx.

108{
109 unsigned int value = ((BesDetectorID::CGEM_ID << CGEM_INDEX) & CGEM_MASK)
110 |((f_layer << LAYER_INDEX) & LAYER_MASK)
111 |((f_sheet << SHEET_INDEX) & SHEET_MASK)
112 |((f_strip_type << STRIP_TYPE_INDEX) & STRIP_TYPE_MASK)
113 |((f_strip << STRIP_INDEX) & STRIP_MASK);//change from STRIP_INDEX to STRIP_MASK by sunxh on 2015.06.25
114 return value;
115}
static const unsigned int CGEM_ID
static const unsigned int CGEM_MASK
static const unsigned int CGEM_INDEX

Referenced by BesCgemDigitizer::Digitize_v1(), BesCgemDigitizer::Digitize_v2(), BesCgemDigitizer::Digitize_v3(), and CgemSegmentRecAlg::exe_v1().

◆ getLAYER_MAX()

unsigned int CgemID::getLAYER_MAX ( )
static

Definition at line 118 of file CgemID.cxx.

119{
120 return LAYER_MAX;
121}

◆ getSHEET_MAX()

unsigned int CgemID::getSHEET_MAX ( )
static

Definition at line 124 of file CgemID.cxx.

125{
126 return SHEET_MAX;
127}

◆ getVSTRIP_MAX()

unsigned int CgemID::getVSTRIP_MAX ( unsigned int f_layer)
static

Definition at line 136 of file CgemID.cxx.

137{
138 return VSTRIP_MAX[f_layer];
139}

Referenced by TestInputOutput::initialize().

◆ getVSTRIP_TYPE()

unsigned int CgemID::getVSTRIP_TYPE ( )
static

Definition at line 148 of file CgemID.cxx.

149{
150 return VSTRIP_TYPE;
151}

◆ getXSTRIP_MAX()

unsigned int CgemID::getXSTRIP_MAX ( unsigned int f_layer)
static

Definition at line 130 of file CgemID.cxx.

131{
132 return XSTRIP_MAX[f_layer];
133}

Referenced by TestInputOutput::initialize().

◆ getXSTRIP_TYPE()

unsigned int CgemID::getXSTRIP_TYPE ( )
static

Definition at line 142 of file CgemID.cxx.

143{
144 return XSTRIP_TYPE;
145}

◆ is_xstrip()

◆ layer()

◆ sheet()

◆ strip()

◆ strip_id()

Identifier CgemID::strip_id ( int f_layer,
int f_sheet,
int f_strip_type,
int f_strip )
static

Definition at line 89 of file CgemID.cxx.

90{
91 /* Check over input parameters */
92 assert(values_ok(f_layer, f_sheet, f_strip_type, f_strip));
93
94 unsigned int value = ( BesDetectorID::CGEM_ID << CGEM_INDEX )
95 | ( f_layer << LAYER_INDEX )
96 | ( f_sheet << SHEET_INDEX )
97 | ( f_strip_type << STRIP_TYPE_INDEX )
98 | ( f_strip << STRIP_INDEX );
99
100 return Identifier(value);
101}
static bool values_ok(const unsigned int f_layer, const unsigned int f_sheet, const unsigned int f_strip_type, const unsigned int f_strip)
Definition CgemID.cxx:23

Referenced by TestMapping::CheckFEBPositionCgemBoss(), TestGeometry::initialize(), TestMapping::PositionCgemBoss(), and BesRawDataWriter::SaveCgemDigits().

◆ values_ok()

bool CgemID::values_ok ( const unsigned int f_layer,
const unsigned int f_sheet,
const unsigned int f_strip_type,
const unsigned int f_strip )
static

Definition at line 23 of file CgemID.cxx.

27{
28 /* Check over strip type */
29 if ((f_strip_type != XSTRIP_TYPE) && (f_strip_type != VSTRIP_TYPE))
30 {
31 return false;
32 }
33
34 /* Check over layer sheet strip */
35 if ((f_layer < LAYER_MAX) && (f_sheet < SHEET_MAX))
36 {
37 if (f_strip_type == XSTRIP_TYPE)
38 {
39 if (f_strip < XSTRIP_MAX[f_layer])
40 {
41 return true;
42 }
43 }
44
45 if (f_strip_type == VSTRIP_TYPE)
46 {
47 if (f_strip < VSTRIP_MAX[f_layer])
48 {
49 return true;
50 }
51 }
52 }
53
54 std::cout << " INFO : Identifier::CgemID, values_ok(): " << std::endl;
55 std::cout << " layer = " << f_layer
56 << " sheet = " << f_sheet
57 << " stripType = " << f_strip_type
58 << " strip = " << f_strip << std::endl;
59
60 return false;
61}

Referenced by strip_id().


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