BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
TofID.h
Go to the documentation of this file.
1 #ifndef __TofID_h__
2#define __TofID_h__
3
5#include <string>
6#include <assert.h>
7
8class TofID : public BesDetectorID
9{
10public:
13
14 /// constructor
15 TofID();
16
17 /// destructor
18 ~TofID();
19
20 /// For a single crystal
21 static Identifier cell_id ( int barrel_ec,
22 int layer,
23 int phi_module,
24 int end
25 );
26 static value_type getIntID ( int barrel_ec,
27 int layer,
28 int phi_module,
29 int end
30 );
37
38 static bool values_ok ( const unsigned int barrel_ec,
39 const unsigned int layer,
40 const unsigned int phi_module,
41 const unsigned int
42 ) ;
43
44
45 //#Matthias
46 static bool values_ok_mrpc(const unsigned int partID, const unsigned int scinNum);
47 static bool values_ok_mrpc_mc(const unsigned int partID, const unsigned int scinNum);
48 static Identifier cell_id_mrpc( int partID, int scinNum);
49 static Identifier cell_id_mrpc_mc( int partID, int scinNum);
50 static bool is_mymrpc (const Identifier& id) ;
51 static value_type getIntID_mrpc ( int partID, int scinNum );
52 static Identifier cell_id(int value);
53
54 /// Test for barrel
55 static bool is_barrel (const Identifier& id) ;
56 static bool is_barrel (const unsigned int barrel_ec) ;
57
58
59
60
61 /// Values of different levels (failure returns 0)
62 static int barrel_ec (const Identifier& id) ;
63 static int layer (const Identifier& id) ;
64 static int phi_module (const Identifier& id) ;
65 static int end (const Identifier& id) ;
66
67 /// Max/Min values for each field (error returns -999)
68 int phi_module_max (const Identifier& id) ;
69 int layer_max (const Identifier& id);
70
71private:
72
73 typedef std::vector<Identifier> id_vec;
74 typedef id_vec::const_iterator id_vec_it;
75
76 static const unsigned int BARREL_EC_INDEX = 14;
77 static const unsigned int BARREL_EC_MASK = 0x0000C000;
78
79
80 static const unsigned int LAYER_INDEX = 8;
81 static const unsigned int LAYER_MASK = 0x00000100;
82
83 static const unsigned int PHI_INDEX = 1;
84 static const unsigned int PHI_MASK = 0x000000FE;
85
86 static const unsigned int END_INDEX = 0;
87 static const unsigned int END_MASK = 0x00000001;
88
89 static const unsigned int LAYER_BARREL_MAX = 1;
90 static const unsigned int LAYER_ENDCAP_MAX = 0;
91
92 static const unsigned int PHI_BARREL_MAX = 87;
93 static const unsigned int PHI_ENDCAP_MAX = 47;
94
95 static const unsigned int BARREL_EC_MAX = 2;
96 static const unsigned int BARREL_EC_MIN = 0;
97
98
99
100 //#Matthias
101
102 static const unsigned int BARRELCODE =1; //if partID == Barrelcode -> Barrel!!
103
104
105 //static const unsigned int MRPC_INDEX =27;
106 static const unsigned int PARTID_INDEX =12;
107
108 //static const unsigned int MRPC_MASK =0x18000000;
109 static const unsigned int PARTID_MASK =0x7000;
110 static const unsigned int SCINNUM_MASK =0xFFF;
111
112};
113
114#endif
unsigned int value_type
Definition: Identifier.h:27
unsigned int size_type
Definition: Identifier.h:28
Definition: TofID.h:9
static Identifier cell_id(int barrel_ec, int layer, int phi_module, int end)
For a single crystal.
Definition: TofID.cxx:156
static value_type getIntID_mrpc(int partID, int scinNum)
Definition: TofID.cxx:216
Identifier::size_type size_type
Definition: TofID.h:11
~TofID()
destructor
Definition: TofID.cxx:9
static bool values_ok_mrpc(const unsigned int partID, const unsigned int scinNum)
Definition: TofID.cxx:39
static int end(const Identifier &id)
Definition: TofID.cxx:129
static value_type getPHI_BARREL_MAX()
Definition: TofID.cxx:237
static value_type getPHI_ENDCAP_MAX()
Definition: TofID.cxx:242
static bool values_ok_mrpc_mc(const unsigned int partID, const unsigned int scinNum)
Definition: TofID.cxx:49
static value_type getBARREL_EC_MIN()
Definition: TofID.cxx:251
static value_type getBARREL_EC_MAX()
Definition: TofID.cxx:246
static bool is_barrel(const Identifier &id)
Test for barrel.
Definition: TofID.cxx:78
static Identifier cell_id_mrpc(int partID, int scinNum)
Definition: TofID.cxx:177
TofID()
constructor
Definition: TofID.cxx:6
static int phi_module(const Identifier &id)
Definition: TofID.cxx:117
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition: TofID.cxx:95
static bool values_ok(const unsigned int barrel_ec, const unsigned int layer, const unsigned int phi_module, const unsigned int)
Definition: TofID.cxx:13
int phi_module_max(const Identifier &id)
Max/Min values for each field (error returns -999)
Definition: TofID.cxx:147
static value_type getLAYER_ENDCAP_MAX()
Definition: TofID.cxx:232
static value_type getIntID(int barrel_ec, int layer, int phi_module, int end)
Definition: TofID.cxx:200
static bool is_mymrpc(const Identifier &id)
Definition: TofID.cxx:58
Identifier::value_type value_type
Definition: TofID.h:12
static Identifier cell_id_mrpc_mc(int partID, int scinNum)
Definition: TofID.cxx:189
static int layer(const Identifier &id)
Definition: TofID.cxx:109
int layer_max(const Identifier &id)
Definition: TofID.cxx:138
static value_type getLAYER_BARREL_MAX()
Definition: TofID.cxx:227