BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/Identifier/include/Identifier/MucID.h
Go to the documentation of this file.
1#ifndef __MucID_h__
2#define __MucID_h__
3
4#include "Identifier/BesDetectorID.h"
5#include <assert.h>
6#include <string>
7
8class MucID : public BesDetectorID {
9public:
12
13 /// constructor
14 MucID();
15
16 /// destructor
17 ~MucID();
18
19 /// For a single crystal
20 static Identifier channel_id( int barrel_ec, int segment, int layer, int channel );
21
22 static value_type getIntID( int barrel_ec, int segment, int layer, int channel );
31
32 static value_type getPartNum();
33 static value_type getSegNum( int part );
34 static value_type getGapNum( int part );
35 static value_type getStripNum( int part, int seg, int gap );
36 static value_type getSegMax();
37 static value_type getGapMax();
38 static value_type getStripMax();
39
40 static bool values_ok( const unsigned int barrel_ec, const unsigned int segment,
41 const unsigned int layer, const unsigned int channel );
42
43 /// Test for barrel
44 static bool is_barrel( const Identifier& id );
45
46 /// Values of different levels
47 static int barrel_ec( const Identifier& id );
48 static int segment( const Identifier& id );
49 static int layer( const Identifier& id );
50 static int channel( const Identifier& id );
51
52 static int part( const Identifier& id );
53 static int seg( const Identifier& id );
54 static int gap( const Identifier& id );
55 static int strip( const Identifier& id );
56
57 /// Max/Min values for each field
58 int segment_max( const Identifier& id );
59 int layer_max( const Identifier& id );
60 int channel_max( const Identifier& id );
61
62 int getSegNum( const Identifier& id );
63 int getGapNum( const Identifier& id );
64 int getStripNum( const Identifier& id );
65
66private:
67 typedef std::vector<Identifier> id_vec;
68 typedef id_vec::const_iterator id_vec_it;
69
70 static const unsigned int BARREL_EC_INDEX = 16;
71 static const unsigned int BARREL_EC_MASK = 0x000F0000;
72
73 static const unsigned int SEGMENT_INDEX = 12;
74 static const unsigned int SEGMENT_MASK = 0x0000F000;
75
76 static const unsigned int LAYER_INDEX = 8;
77 static const unsigned int LAYER_MASK = 0x00000F00;
78
79 static const unsigned int CHANNEL_INDEX = 0;
80 static const unsigned int CHANNEL_MASK = 0x000000FF;
81
82 static const unsigned int BARREL_EC_NUM = 3;
83
84 static const unsigned int LAYER_BARREL_NUM = 9;
85 static const unsigned int LAYER_ENDCAP_NUM = 8;
86
87 static const unsigned int SEGMENT_BARREL_NUM = 8;
88 static const unsigned int SEGMENT_ENDCAP_NUM = 4;
89
90 static const unsigned int CHANNEL_BARREL_NUM_MAX = 112;
91 static const unsigned int CHANNEL_ENDCAP_NUM_MAX = 64;
92
93 static const unsigned int CHANNEL_BARREL_LAYER_NUM[LAYER_BARREL_NUM];
94
95 static const unsigned int BARREL_EC_MAX = 2;
96 static const unsigned int BARREL_EC_MIN = 0;
97};
98
99#endif
static int barrel_ec(const Identifier &id)
Values of different levels.
Definition MucID.cxx:38
static value_type getStripMax()
Definition MucID.cxx:170
static value_type getIntID(int barrel_ec, int segment, int layer, int channel)
Definition MucID.cxx:123
static int layer(const Identifier &id)
Definition MucID.cxx:58
static bool values_ok(const unsigned int barrel_ec, const unsigned int segment, const unsigned int layer, const unsigned int channel)
Definition MucID.cxx:12
static int channel(const Identifier &id)
Definition MucID.cxx:68
static value_type getSEGMENT_BARREL_MAX()
Definition MucID.cxx:176
int segment_max(const Identifier &id)
Max/Min values for each field.
Definition MucID.cxx:78
static int part(const Identifier &id)
Definition MucID.cxx:43
static value_type getGapMax()
Definition MucID.cxx:165
static int segment(const Identifier &id)
Definition MucID.cxx:48
static value_type getBARREL_EC_MAX()
Definition MucID.cxx:194
static value_type getPartNum()
Definition MucID.cxx:131
static Identifier channel_id(int barrel_ec, int segment, int layer, int channel)
For a single crystal.
Definition MucID.cxx:114
int layer_max(const Identifier &id)
Definition MucID.cxx:90
~MucID()
destructor
Definition MucID.cxx:9
static value_type getSegMax()
Definition MucID.cxx:158
static value_type getSEGMENT_ENDCAP_MAX()
Definition MucID.cxx:179
static value_type getLAYER_BARREL_MAX()
Definition MucID.cxx:182
static bool is_barrel(const Identifier &id)
Test for barrel.
Definition MucID.cxx:32
static int gap(const Identifier &id)
Definition MucID.cxx:63
static int seg(const Identifier &id)
Definition MucID.cxx:53
static value_type getLAYER_ENDCAP_MAX()
Definition MucID.cxx:185
static value_type getBARREL_EC_MIN()
Definition MucID.cxx:197
MucID()
constructor
Definition MucID.cxx:7
static value_type getSegNum(int part)
Definition MucID.cxx:134
static value_type getStripNum(int part, int seg, int gap)
Definition MucID.cxx:148
static value_type getCHANNEL_BARREL_MAX()
Definition MucID.cxx:188
static int strip(const Identifier &id)
Definition MucID.cxx:73
static value_type getGapNum(int part)
Definition MucID.cxx:141
int channel_max(const Identifier &id)
Definition MucID.cxx:102
static value_type getCHANNEL_ENDCAP_MAX()
Definition MucID.cxx:191