#include <MucRecHitID.h>
Class BesMUCRecRawHit contains the four numbers necessary to identify a hit uniquely: part, seg, gap, strip, and hit within the gap.
- Author
- Zhengyun You \URL{youzy.nosp@m.@hep.nosp@m..pku..nosp@m.cn}
Definition at line 30 of file MucRecHitID.h.
◆ MucRecHitID() [1/2]
MucRecHitID::MucRecHitID |
( |
const int | part = -1, |
|
|
const int | seg = -1, |
|
|
const int | gap = -1, |
|
|
const int | hit = -1 ) |
Constructor.
Definition at line 17 of file MucRecHitID.cxx.
21 : m_Part(part), m_Seg(seg), m_Gap(gap), m_Hit(hit)
22{ }
◆ MucRecHitID() [2/2]
Copy constructor.
Definition at line 25 of file MucRecHitID.cxx.
26 : m_Part(source.m_Part),
27 m_Seg(source.m_Seg),
28 m_Gap(source.m_Gap),
29 m_Hit(source.m_Hit)
30{ }
◆ ~MucRecHitID()
MucRecHitID::~MucRecHitID |
( |
| ) |
|
◆ Gap()
int MucRecHitID::Gap |
( |
| ) |
const |
|
inline |
◆ Hit()
int MucRecHitID::Hit |
( |
| ) |
const |
|
inline |
Get hit number within this gap. (starts at 0)
Definition at line 74 of file MucRecHitID.h.
◆ operator!=()
Definition at line 63 of file MucRecHitID.cxx.
64{
65 if ( m_Part ==
other.m_Part &&
66 m_Seg ==
other.m_Seg &&
67 m_Gap ==
other.m_Gap &&
68 m_Hit ==
other.m_Hit )
69 return false;
70 else
71 return true;
72}
Index other(Index i, Index j)
◆ operator<()
Definition at line 74 of file MucRecHitID.cxx.
76{
77 if (m_Part <
other.m_Part ||
78 (m_Part ==
other.m_Part && m_Seg <
other.m_Seg) ||
79 (m_Part ==
other.m_Part && m_Seg ==
other.m_Seg && m_Gap <
other.m_Gap) ||
80 (m_Part ==
other.m_Part && m_Seg ==
other.m_Seg && m_Gap ==
other.m_Gap && m_Hit <
other.m_Hit)) {
81 return true;
82 }
83 else {
84 return false;
85 }
86}
◆ operator=()
Assignment operator.
Definition at line 38 of file MucRecHitID.cxx.
39{
40
41 if (this != &orig) {
42 m_Part = orig.m_Part;
43 m_Seg = orig.m_Seg;
44 m_Gap = orig.m_Gap;
45 m_Hit = orig.m_Hit;
46 }
47 return *this;
48}
◆ operator==()
Comparison operators.
Definition at line 51 of file MucRecHitID.cxx.
52{
53 if ( m_Part ==
other.m_Part &&
54 m_Seg ==
other.m_Seg &&
55 m_Gap ==
other.m_Gap &&
56 m_Hit ==
other.m_Hit )
57 return true;
58 else
59 return false;
60}
◆ operator>()
Definition at line 89 of file MucRecHitID.cxx.
90{
91 if (m_Part >
other.m_Part ||
92 (m_Part ==
other.m_Part && m_Seg >
other.m_Seg) ||
93 (m_Part ==
other.m_Part && m_Seg ==
other.m_Seg && m_Gap >
other.m_Gap) ||
94 (m_Part ==
other.m_Part && m_Seg ==
other.m_Seg && m_Gap ==
other.m_Gap && m_Hit >
other.m_Hit)) {
95 return true;
96 }
97 else {
98 return false;
99 }
100}
◆ Part()
int MucRecHitID::Part |
( |
| ) |
const |
|
inline |
Get part number. (0-east cap, 1-barrel, 2-west cap)
Definition at line 65 of file MucRecHitID.h.
◆ Seg()
int MucRecHitID::Seg |
( |
| ) |
const |
|
inline |
◆ SetID()
void MucRecHitID::SetID |
( |
const int | part = -1, |
|
|
const int | seg = -1, |
|
|
const int | gap = -1, |
|
|
const int | hit = -1 ) |
Set the identifier.
Definition at line 104 of file MucRecHitID.cxx.
108{
109 m_Part = part;
110 m_Seg = seg;
111 m_Gap = gap;
112 m_Hit = hit;
113}
The documentation for this class was generated from the following files: