BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/Identifier/include/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 <assert.h>
6#include <string>
7
8class MdcID : public BesDetectorID {
9public:
12
13 /// constructor
14 MdcID();
15
16 /// destructor
17 ~MdcID();
18
19 /// For a single wire
20 static Identifier wire_id( int wireType, int layer, int wire );
21
22 static Identifier wire_id( int layer, int wire );
23
24 static value_type getIntID( unsigned int wireType, unsigned int layer, unsigned int wire );
25
26 static value_type getIntID( unsigned int layer, unsigned int wire );
27
34
35 static bool values_ok( const unsigned int wireType, const unsigned int layer,
36 const unsigned int wire );
37 /// Test for axial and stereo wire
38 // bool MdcID::is_axial (const Identifier& id);
39 bool is_axial( const Identifier& id );
40
41 /// Values of different levels (failure returns 0)
42 static int layer( const Identifier& id );
43 static int wire( const Identifier& id );
44
45 /// Max/Min values for each field (error returns -999)
46 int layer_max( const Identifier& id );
47 int wire_max( const Identifier& id );
48
49private:
50 typedef std::vector<Identifier> id_vec;
51 typedef id_vec::const_iterator id_vec_it;
52
53 static const unsigned int AXIAL_WIRE = 0;
54 static const unsigned int STEREO_WIRE = 1;
55
56 static const unsigned int WIRETYPE_INDEX = 15;
57 static const unsigned int WIRETYPE_MASK = 0x00008000;
58
59 // LAYER numbering not seperating AXIAL and STEREO
60 static const unsigned int LAYER_INDEX = 9;
61 static const unsigned int LAYER_MASK = 0x00007E00;
62
63 static const unsigned int WIRE_INDEX = 0;
64 static const unsigned int WIRE_MASK = 0x000001FF;
65
66 static const unsigned int AXIAL_LAYER_MAX = 18;
67 static const unsigned int INNER_AXIAL_LAYER_MAX = 12;
68 static const unsigned int OUTER_AXIAL_LAYER_MAX = 7;
69
70 static const unsigned int LAYER_MAX = 43;
71
72 static const unsigned int STEREO_LAYER_MAX = 23;
73 static const unsigned int INNER_STEREO_LAYER_MAX = 8;
74 static const unsigned int OUTER_STEREO_LAYER_MAX = 16;
75
76 static const unsigned int AXIAL_WIRE_MAX = 287;
77 static const unsigned int STEREO_WIRE_MAX = 239;
78};
79
80#endif
static value_type getAXIAL_LAYER_MAX()
Definition MdcID.cxx:110
static Identifier wire_id(int wireType, int layer, int wire)
For a single wire.
Definition MdcID.cxx:69
int layer_max(const Identifier &id)
Max/Min values for each field (error returns -999).
Definition MdcID.cxx:57
bool is_axial(const Identifier &id)
Test for axial and stereo wire.
Definition MdcID.cxx:41
static value_type getSTEREO_WIRE()
Definition MdcID.cxx:117
static bool values_ok(const unsigned int wireType, const unsigned int layer, const unsigned int wire)
Definition MdcID.cxx:10
~MdcID()
destructor
Definition MdcID.cxx:7
static int layer(const Identifier &id)
Values of different levels (failure returns 0).
Definition MdcID.cxx:47
int wire_max(const Identifier &id)
Definition MdcID.cxx:63
static value_type getAXIAL_WIRE_MAX()
Definition MdcID.cxx:112
static int wire(const Identifier &id)
Definition MdcID.cxx:52
static value_type getIntID(unsigned int wireType, unsigned int layer, unsigned int wire)
Definition MdcID.cxx:102
MdcID()
constructor
Definition MdcID.cxx:5
static value_type getSTEREO_WIRE_MAX()
Definition MdcID.cxx:113
static value_type getSTEREO_LAYER_MAX()
Definition MdcID.cxx:111
static value_type getAXIAL_WIRE()
Definition MdcID.cxx:115