CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/Identifier/Identifier-01-02-15/Identifier/TofID.h
Go to the documentation of this file.
1 #ifndef __TofID_h__
2#define __TofID_h__
3
4#include "Identifier/BesDetectorID.h"
5#include <string>
6#include <assert.h>
7
8class TofID : public BesDetectorID
9{
10public:
13
14 /// constructor
16
17 /// destructor
19
20 /// For a single crystal
22 int layer,
23 int phi_module,
24 int end
25 );
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
static int layer(const Identifier &id)
static value_type getBARREL_EC_MIN()
static Identifier cell_id_mrpc(int partID, int scinNum)
static bool values_ok(const unsigned int barrel_ec, const unsigned int layer, const unsigned int phi_module, const unsigned int)
static value_type getIntID_mrpc(int partID, int scinNum)
static bool values_ok_mrpc(const unsigned int partID, const unsigned int scinNum)
static bool is_barrel(const unsigned int barrel_ec)
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
static value_type getBARREL_EC_MAX()
~TofID()
destructor
static value_type getPHI_BARREL_MAX()
static value_type getLAYER_ENDCAP_MAX()
static int end(const Identifier &id)
static value_type getPHI_ENDCAP_MAX()
static int phi_module(const Identifier &id)
static bool is_mymrpc(const Identifier &id)
static int end(const Identifier &id)
TofID()
constructor
static Identifier cell_id(int value)
static value_type getIntID(int barrel_ec, int layer, int phi_module, int end)
static int phi_module(const Identifier &id)
static int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
int phi_module_max(const Identifier &id)
Max/Min values for each field (error returns -999)
static bool is_barrel(const Identifier &id)
Test for barrel.
static Identifier cell_id_mrpc_mc(int partID, int scinNum)
static Identifier cell_id(int barrel_ec, int layer, int phi_module, int end)
For a single crystal.
static int layer(const Identifier &id)
int layer_max(const Identifier &id)
static value_type getLAYER_BARREL_MAX()
static bool values_ok_mrpc_mc(const unsigned int partID, const unsigned int scinNum)