BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/Identifier/Identifier-00-02-17/Identifier/MdcID.h
Go to the documentation of this file.
1#ifndef __MdcID_h__
2#define __MdcID_h__
3
4#include "Identifier/BesDetectorID.h"
5#include <string>
6#include <assert.h>
7
8class MdcID : public BesDetectorID
9{
10public:
13
14 /// constructor
15 MdcID();
16
17 /// destructor
18 ~MdcID();
19
20 /// For a single wire
21 static Identifier wire_id ( int wireType,
22 int layer,
23 int wire
24 ) ;
25
26 static Identifier wire_id ( int layer, int wire );
27
28
29 static value_type getIntID( unsigned int wireType,
30 unsigned int layer,
31 unsigned int wire
32 );
33
34 static value_type getIntID( unsigned int layer,
35 unsigned int wire
36 );
37
44
45
46 static bool values_ok ( const unsigned int wireType,
47 const unsigned int layer,
48 const unsigned int wire
49 ) ;
50 /// Test for axial and stereo wire
51// bool MdcID::is_axial (const Identifier& id);
52 bool is_axial (const Identifier& id);
53
54 /// Values of different levels (failure returns 0)
55 static int layer (const Identifier& id) ;
56 static int wire (const Identifier& id) ;
57
58
59 /// Max/Min values for each field (error returns -999)
60 int layer_max (const Identifier& id) ;
61 int wire_max (const Identifier& id) ;
62
63private:
64
65 typedef std::vector<Identifier> id_vec;
66 typedef id_vec::const_iterator id_vec_it;
67
68 static const unsigned int AXIAL_WIRE = 0;
69 static const unsigned int STEREO_WIRE = 1;
70
71 static const unsigned int WIRETYPE_INDEX = 15;
72 static const unsigned int WIRETYPE_MASK = 0x00008000;
73
74 //LAYER numbering not seperating AXIAL and STEREO
75 static const unsigned int LAYER_INDEX = 9;
76 static const unsigned int LAYER_MASK = 0x00007E00;
77
78
79 static const unsigned int WIRE_INDEX = 0;
80 static const unsigned int WIRE_MASK = 0x000001FF;
81
82 static const unsigned int AXIAL_LAYER_MAX = 18;
83 static const unsigned int INNER_AXIAL_LAYER_MAX = 12;
84 static const unsigned int OUTER_AXIAL_LAYER_MAX = 7;
85
86 static const unsigned int LAYER_MAX = 43;
87
88
89 static const unsigned int STEREO_LAYER_MAX = 23;
90 static const unsigned int INNER_STEREO_LAYER_MAX = 8;
91 static const unsigned int OUTER_STEREO_LAYER_MAX =16;
92
93 static const unsigned int AXIAL_WIRE_MAX = 287;
94 static const unsigned int STEREO_WIRE_MAX = 239;
95};
96
97#endif
static value_type getAXIAL_LAYER_MAX()
Definition: MdcID.cxx:138
static Identifier wire_id(int wireType, int layer, int wire)
For a single wire.
Definition: MdcID.cxx:77
int layer_max(const Identifier &id)
Max/Min values for each field (error returns -999)
Definition: MdcID.cxx:59
bool is_axial(const Identifier &id)
Test for axial and stereo wire.
Definition: MdcID.cxx:43
static value_type getSTEREO_WIRE()
Definition: MdcID.cxx:160
static bool values_ok(const unsigned int wireType, const unsigned int layer, const unsigned int wire)
Definition: MdcID.cxx:12
~MdcID()
destructor
Definition: MdcID.cxx:8
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
Definition: MdcID.cxx:49
int wire_max(const Identifier &id)
Definition: MdcID.cxx:68
static value_type getAXIAL_WIRE_MAX()
Definition: MdcID.cxx:146
static int wire(const Identifier &id)
Definition: MdcID.cxx:54
static value_type getIntID(unsigned int wireType, unsigned int layer, unsigned int wire)
Definition: MdcID.cxx:124
MdcID()
constructor
Definition: MdcID.cxx:5
static value_type getSTEREO_WIRE_MAX()
Definition: MdcID.cxx:150
static value_type getSTEREO_LAYER_MAX()
Definition: MdcID.cxx:142
static value_type getAXIAL_WIRE()
Definition: MdcID.cxx:155