CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
DetectorDescription/Identifier/Identifier-01-02-15/Identifier/MuonID.h
Go to the documentation of this file.
1#ifndef __MuonID_h__
2#define __MuonID_h__
3
4#include "Identifier/BesDetectorID.h"
5#include <string>
6#include <assert.h>
7
8class MuonID : public BesDetectorID
9{
10public:
13
14 /// constructor
16
17 /// destructor
19
20 /// For a single crystal
22 int segment,
23 int layer,
24 int channel
25 );
26
28 int segment,
29 int layer,
30 int channel
31 );
40
41 static bool values_ok ( const unsigned int barrel_ec,
42 const unsigned int segment,
43 const unsigned int layer,
44 const unsigned int channel
45 ) ;
46
47 /// Test for barrel
48 static bool is_barrel (const Identifier& id) ;
49
50 /// Values of different levels
51 static int barrel_ec (const Identifier& id) ;
52 static int segment (const Identifier& id) ;
53 static int layer (const Identifier& id) ;
54 static int channel (const Identifier& id) ;
55
56 /// Max/Min values for each field
57 int segment_max (const Identifier& id) ;
58 int layer_max (const Identifier& id) ;
59 int channel_max (const Identifier& id) ;
60
61private:
62
63 typedef std::vector<Identifier> id_vec;
64 typedef id_vec::const_iterator id_vec_it;
65
66 static const unsigned int BARREL_EC_INDEX = 16;
67 static const unsigned int BARREL_EC_MASK = 0x000F0000;
68
69 static const unsigned int SEGMENT_INDEX = 12;
70 static const unsigned int SEGMENT_MASK = 0x0000F000;
71
72 static const unsigned int LAYER_INDEX = 8;
73 static const unsigned int LAYER_MASK = 0x00000F00;
74
75 static const unsigned int CHANNEL_INDEX = 0;
76 static const unsigned int CHANNEL_MASK = 0x000000FF;
77
78 static const unsigned int LAYER_BARREL_MAX = 8;
79 static const unsigned int LAYER_ENDCAP_MAX = 7;
80
81 static const unsigned int SEGMENT_BARREL_MAX = 7;
82 static const unsigned int SEGMENT_ENDCAP_MAX = 3;
83
84 static const unsigned int CHANNEL_BARREL_MAX = 95;
85 static const unsigned int CHANNEL_ENDCAP_MAX = 63;
86
87 static const unsigned int BARREL_EC_MAX = 2;
88 static const unsigned int BARREL_EC_MIN = 0;
89
90};
91
92#endif
static value_type getLAYER_BARREL_MAX()
static value_type getSEGMENT_ENDCAP_MAX()
static int barrel_ec(const Identifier &id)
Values of different levels.
int segment_max(const Identifier &id)
Max/Min values for each field.
int channel_max(const Identifier &id)
int layer_max(const Identifier &id)
static value_type getCHANNEL_ENDCAP_MAX()
~MuonID()
destructor
static value_type getLAYER_ENDCAP_MAX()
MuonID()
constructor
static value_type getBARREL_EC_MAX()
static value_type getSEGMENT_BARREL_MAX()
static int segment(const Identifier &id)
static bool values_ok(const unsigned int barrel_ec, const unsigned int segment, const unsigned int layer, const unsigned int channel)
static value_type getIntID(int barrel_ec, int segment, int layer, int channel)
static Identifier channel_id(int barrel_ec, int segment, int layer, int channel)
For a single crystal.
static bool is_barrel(const Identifier &id)
Test for barrel.
static int channel(const Identifier &id)
static value_type getBARREL_EC_MIN()
static int layer(const Identifier &id)
static value_type getCHANNEL_BARREL_MAX()