CGEM BOSS 6.6.5.f
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
 
typedef Identifier::size_type size_type
 
typedef Identifier::value_type value_type
 
typedef Identifier::size_type size_type
 
typedef Identifier::value_type value_type
 

Public Member Functions

 CgemID ()
 
 ~CgemID ()
 
 CgemID ()
 
 ~CgemID ()
 
 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
 
 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
 
 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)
 
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)
 
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
 
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
 
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

Member Typedef Documentation

◆ size_type [1/3]

◆ size_type [2/3]

◆ size_type [3/3]

◆ value_type [1/3]

◆ value_type [2/3]

◆ value_type [3/3]

Constructor & Destructor Documentation

◆ CgemID() [1/3]

CgemID::CgemID ( void  )

Definition at line 13 of file bak_Identifier-01-02-14/src/CgemID.cxx.

14{
15}

◆ ~CgemID() [1/3]

CgemID::~CgemID ( void  )

Definition at line 18 of file bak_Identifier-01-02-14/src/CgemID.cxx.

19{
20}

◆ CgemID() [2/3]

CgemID::CgemID ( )

◆ ~CgemID() [2/3]

CgemID::~CgemID ( )

◆ CgemID() [3/3]

CgemID::CgemID ( )

◆ ~CgemID() [3/3]

CgemID::~CgemID ( )

Member Function Documentation

◆ getIntID() [1/3]

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 bak_Identifier-01-02-14/src/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}

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

◆ getIntID() [2/3]

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

◆ getIntID() [3/3]

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

◆ getLAYER_MAX() [1/3]

unsigned int CgemID::getLAYER_MAX ( )
static

Definition at line 118 of file bak_Identifier-01-02-14/src/CgemID.cxx.

119{
120 return LAYER_MAX;
121}

◆ getLAYER_MAX() [2/3]

static value_type CgemID::getLAYER_MAX ( )
static

◆ getLAYER_MAX() [3/3]

static value_type CgemID::getLAYER_MAX ( )
static

◆ getSHEET_MAX() [1/3]

unsigned int CgemID::getSHEET_MAX ( )
static

Definition at line 124 of file bak_Identifier-01-02-14/src/CgemID.cxx.

125{
126 return SHEET_MAX;
127}

◆ getSHEET_MAX() [2/3]

static value_type CgemID::getSHEET_MAX ( )
static

◆ getSHEET_MAX() [3/3]

static value_type CgemID::getSHEET_MAX ( )
static

◆ getVSTRIP_MAX() [1/3]

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

Definition at line 136 of file bak_Identifier-01-02-14/src/CgemID.cxx.

137{
138 return VSTRIP_MAX[f_layer];
139}

Referenced by TestInputOutput::initialize().

◆ getVSTRIP_MAX() [2/3]

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

◆ getVSTRIP_MAX() [3/3]

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

◆ getVSTRIP_TYPE() [1/3]

unsigned int CgemID::getVSTRIP_TYPE ( )
static

Definition at line 148 of file bak_Identifier-01-02-14/src/CgemID.cxx.

149{
150 return VSTRIP_TYPE;
151}

◆ getVSTRIP_TYPE() [2/3]

static value_type CgemID::getVSTRIP_TYPE ( )
static

◆ getVSTRIP_TYPE() [3/3]

static value_type CgemID::getVSTRIP_TYPE ( )
static

◆ getXSTRIP_MAX() [1/3]

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

Definition at line 130 of file bak_Identifier-01-02-14/src/CgemID.cxx.

131{
132 return XSTRIP_MAX[f_layer];
133}

Referenced by TestInputOutput::initialize().

◆ getXSTRIP_MAX() [2/3]

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

◆ getXSTRIP_MAX() [3/3]

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

◆ getXSTRIP_TYPE() [1/3]

unsigned int CgemID::getXSTRIP_TYPE ( )
static

Definition at line 142 of file bak_Identifier-01-02-14/src/CgemID.cxx.

143{
144 return XSTRIP_TYPE;
145}

◆ getXSTRIP_TYPE() [2/3]

static value_type CgemID::getXSTRIP_TYPE ( )
static

◆ getXSTRIP_TYPE() [3/3]

static value_type CgemID::getXSTRIP_TYPE ( )
static

◆ is_xstrip() [1/3]

bool CgemID::is_xstrip ( const Identifier id)
static

Definition at line 64 of file bak_Identifier-01-02-14/src/CgemID.cxx.

65{
66 unsigned int type = (id.get_value() & CgemID::STRIP_TYPE_MASK) >> CgemID::STRIP_TYPE_INDEX;
67 return (type == XSTRIP_TYPE) ? true : false;
68}

Referenced by TestMapping::CheckFEBPositionCgemBoss(), CgemROOTGeo::Draw3DHits(), CgemSimCheck::execute(), TestInputOutput::execute(), TestHit::execute(), HoughFinder::getMcHitCol(), TestMapping::PositionCgemBoss(), BesRawDataWriter::SaveCgemDigits(), and CgemROOTGeo::SetHits().

◆ is_xstrip() [2/3]

static bool CgemID::is_xstrip ( const Identifier id)
static

◆ is_xstrip() [3/3]

static bool CgemID::is_xstrip ( const Identifier id)
static

◆ layer() [1/3]

int CgemID::layer ( const Identifier id)
static

◆ layer() [2/3]

static int CgemID::layer ( const Identifier id)
static

◆ layer() [3/3]

static int CgemID::layer ( const Identifier id)
static

◆ sheet() [1/3]

int CgemID::sheet ( const Identifier id)
static

◆ sheet() [2/3]

static int CgemID::sheet ( const Identifier id)
static

◆ sheet() [3/3]

static int CgemID::sheet ( const Identifier id)
static

◆ strip() [1/3]

◆ strip() [2/3]

static int CgemID::strip ( const Identifier id)
static

◆ strip() [3/3]

static int CgemID::strip ( const Identifier id)
static

◆ strip_id() [1/3]

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

Definition at line 89 of file bak_Identifier-01-02-14/src/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)

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

◆ strip_id() [2/3]

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

◆ strip_id() [3/3]

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

◆ values_ok() [1/3]

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 bak_Identifier-01-02-14/src/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().

◆ values_ok() [2/3]

static 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

◆ values_ok() [3/3]

static 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

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