BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/Identifier/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
16
17 /// destructor
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
int layer_max(const Identifier &id)
Max/Min values for each field (error returns -999)
static value_type getAXIAL_WIRE()
bool is_axial(const Identifier &id)
Test for axial and stereo wire.
static value_type getAXIAL_LAYER_MAX()
~MdcID()
destructor
static value_type getSTEREO_WIRE()
static value_type getSTEREO_LAYER_MAX()
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
static value_type getSTEREO_WIRE_MAX()
static value_type getIntID(unsigned int wireType, unsigned int layer, unsigned int wire)
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
Definition: MdcID.cxx:49
int wire_max(const Identifier &id)
static Identifier wire_id(int layer, int wire)
static int wire(const Identifier &id)
Definition: MdcID.cxx:54
static value_type getIntID(unsigned int layer, unsigned int wire)
static bool values_ok(const unsigned int wireType, const unsigned int layer, const unsigned int wire)
static int wire(const Identifier &id)
MdcID()
constructor
static value_type getAXIAL_WIRE_MAX()
static Identifier wire_id(int wireType, int layer, int wire)
For a single wire.