CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
MucSoftID.h
Go to the documentation of this file.
1//$id$
2//
3//$log$
4/*
5 * 2003/08/30 Zhengyun You Peking University
6 *
7 * 2004/09/09 Zhengyun You Peking University
8 * transplanted to Gaudi framework
9 */
10
11#ifndef MUC_SOFT_ID_H
12#define MUC_SOFT_ID_H
13
14/**
15 * Class MucSoftID contains the "software" representation of a MUC channel address.
16 *
17 * Indexing a Muc readout channel (in the "software" scheme) requires 4 numbers:
18 \begin{enumerate}
19 \item the part number, m_Part (0-east cap, 1-barrel, 2-west cap)
20 \item the seg number in a part, m_Seg (barrel 0-3, cap 0-7)
21 \item the gap number in a segment, m_Gap (barrel 0-8, cap 0-7)
22 \item the strip number in a gap, m_Strip (barrel gap 0,2,4,6,8 0-47
23 \ barrel gap 1,3,5,7 0-95
24 \ endcap 0-63)
25 \end{enumerate}
26 *
27 * @author Zhengyun You \URL{mailto:[email protected]}
28 *
29 */
30
32{
33 public:
34
35 /// Number of parts in Bes Muc.
36 static const int m_kPart = 3;
38 /// Number of segments in a part max.
39 static const int m_kSegInPartMax = 8;
40 /// Number of segments in a part.
41 static const int m_kSegInPart[m_kPart];
42
43 /// Number of gaps in a segment max.
44 static const int m_kGapInSegMax = 9;
45 /// Number of gaps in a segment of part.
46 static const int m_kGapInPart[m_kPart];
47
48 /// Number of strips in a gap max.
49 static const int m_kStripInGapMax = 96;
50 /// Number of strips in a gap.
51 static const int m_kStripInGap[m_kPart][m_kGapInSegMax];
52
53 /// Number of segments total in the Bes MUC.
54 static const int m_kSegTotal;
55 /// Number of gaps total in the Bes MUC.
56 static const int m_kGapTotal;
57 /// Number of strips total in the Bes MUC.
58 static const int m_kStripTotal;
59
60 /// Maximum number of hits in a gap.
61 static const int m_kHitInGapMax;
62 /// Maximum number of hits total in the Bes MUC.
63 static const int m_kHitTotalMax;
64
65 /// Constructor.
66 MucSoftID(const int part = -1,
67 const int seg = -1,
68 const int gap = -1,
69 const int strip = -1);
70
71 /// Assignment constructor.
72 MucSoftID& operator=(const MucSoftID& orig);
73
74 /// Copy constructor.
75 MucSoftID(const MucSoftID& orig);
76
77 /// Destructor.
79 { };
80
81 /// Compare whehter two MucSoftID is equal.
82 bool operator == (const MucSoftID& id) const;
83
84 /// Get part number. (0-east cap, 1-barrel, 2-west cap)
85 int GetPart() const { return m_Part; }
86
87 /// Get segment number. (barrel 0-3, cap 0-7)
88 int GetSeg() const { return m_Seg; }
89
90 /// Get gap number. (barrel 0-8, cap 0-7)
91 int GetGap() const { return m_Gap; }
92
93 /// Get strip number. (barrel 0-47 for gap0,2,4,6,8, 0-95 for gap1,3,5,7, endcap 0-63)
94 int GetStrip() const { return m_Strip; }
95
96 /// Set the sub-identifier.
97 void SetID(const int part = -1,
98 const int seg = -1,
99 const int gap = -1,
100 const int strip = -1);
101
102 private:
103 int m_Part;
104 int m_Seg;
105 int m_Gap;
106 int m_Strip;
107};
108
109/// Return the position of a MucSoftID object in the GapGeo hash table.
110size_t GapHash(const MucSoftID& id);
111
112/// Return the position of a MucSoftID object in the StripGeo hash table.
113size_t StripHash(const MucSoftID& id);
114
115/// Print MucSoftID information to a stream.
116ostream& operator << (ostream& s, const MucSoftID& id);
117
118#endif /* MUC_SOFT_ID_H */
XmlRpcServer s
size_t GapHash(const MucSoftID &id)
Return the position of a MucSoftID object in the GapGeo hash table.
size_t StripHash(const MucSoftID &id)
Return the position of a MucSoftID object in the StripGeo hash table.
ostream & operator<<(ostream &s, const MucSoftID &id)
Print MucSoftID information to a stream.
static const int m_kStripTotal
Number of strips total in the Bes MUC.
Definition MucSoftID.h:58
~MucSoftID()
Destructor.
Definition MucSoftID.h:78
static const int m_kSegTotal
Number of segments total in the Bes MUC.
Definition MucSoftID.h:54
static const int m_kStripInGapMax
Number of strips in a gap max.
Definition MucSoftID.h:49
static const int m_kGapInSegMax
Number of gaps in a segment max.
Definition MucSoftID.h:44
static const int m_kSegInPart[m_kPart]
Number of segments in a part.
Definition MucSoftID.h:25
int GetPart() const
Get part number. (0-east cap, 1-barrel, 2-west cap)
Definition MucSoftID.h:85
int GetStrip() const
Get strip number. (barrel 0-47 for gap0,2,4,6,8, 0-95 for gap1,3,5,7, endcap 0-63)
Definition MucSoftID.h:94
static const int m_kHitInGapMax
Maximum number of hits in a gap.
Definition MucSoftID.h:61
int GetGap() const
Get gap number. (barrel 0-8, cap 0-7)
Definition MucSoftID.h:91
MucSoftID(const int part=-1, const int seg=-1, const int gap=-1, const int strip=-1)
Constructor.
Definition MucSoftID.cxx:58
static const int m_kSegInPartMax
Number of segments in a part max.
Definition MucSoftID.h:39
static const int m_kGapTotal
Number of gaps total in the Bes MUC.
Definition MucSoftID.h:56
void SetID(const int part=-1, const int seg=-1, const int gap=-1, const int strip=-1)
Set the sub-identifier.
static const int m_kHitTotalMax
Maximum number of hits total in the Bes MUC.
Definition MucSoftID.h:63
static const int m_kPart
Number of parts in Bes Muc.
Definition MucSoftID.h:36
MucSoftID & operator=(const MucSoftID &orig)
Assignment constructor.
Definition MucSoftID.cxx:71
int GetSeg() const
Get segment number. (barrel 0-3, cap 0-7)
Definition MucSoftID.h:88
bool operator==(const MucSoftID &id) const
Compare whehter two MucSoftID is equal.
Definition MucSoftID.cxx:93
static const int m_kStripInGap[m_kPart][m_kGapInSegMax]
Number of strips in a gap.
Definition MucSoftID.h:37
static const int m_kGapInPart[m_kPart]
Number of gaps in a segment of part.
Definition MucSoftID.h:31