CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
MucRecHitID Class Reference

#include <MucRecHitID.h>

Public Member Functions

 MucRecHitID (const int part=-1, const int seg=-1, const int gap=-1, const int hit=-1)
 Constructor.
 
 MucRecHitID (const MucRecHitID &source)
 Copy constructor.
 
MucRecHitIDoperator= (const MucRecHitID &orig)
 Assignment operator.
 
bool operator== (const MucRecHitID &other) const
 Comparison operators.
 
bool operator!= (const MucRecHitID &other) const
 
bool operator< (const MucRecHitID &other) const
 
bool operator> (const MucRecHitID &other) const
 
 ~MucRecHitID ()
 Destructor.
 
void SetID (const int part=-1, const int seg=-1, const int gap=-1, const int hit=-1)
 Set the identifier.
 
int Part () const
 Get part number. (0-east cap, 1-barrel, 2-west cap)
 
int Seg () const
 Get seg number. (0-7)
 
int Gap () const
 Get gap number. (0-8)
 
int Hit () const
 Get hit number within this gap. (starts at 0)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ 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]

MucRecHitID::MucRecHitID ( const MucRecHitID source)

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 ( )

Destructor.

Definition at line 33 of file MucRecHitID.cxx.

34{ }

Member Function Documentation

◆ Gap()

int MucRecHitID::Gap ( ) const
inline

Get gap number. (0-8)

Definition at line 71 of file MucRecHitID.h.

71{ return m_Gap; }

◆ Hit()

int MucRecHitID::Hit ( ) const
inline

Get hit number within this gap. (starts at 0)

Definition at line 74 of file MucRecHitID.h.

74{ return m_Hit; }

◆ operator!=()

bool MucRecHitID::operator!= ( const MucRecHitID other) const

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)
Definition: EvtCyclic3.cc:118

◆ operator<()

bool MucRecHitID::operator< ( const MucRecHitID other) const

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=()

MucRecHitID & MucRecHitID::operator= ( const MucRecHitID orig)

Assignment operator.

Definition at line 38 of file MucRecHitID.cxx.

39{
40 // Assignment operator.
41 if (this != &orig) { // Watch out for self-assignment!
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==()

bool MucRecHitID::operator== ( const MucRecHitID other) const

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>()

bool MucRecHitID::operator> ( const MucRecHitID other) const

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.

65{ return m_Part; }

◆ Seg()

int MucRecHitID::Seg ( ) const
inline

Get seg number. (0-7)

Definition at line 68 of file MucRecHitID.h.

68{ return m_Seg; }

◆ 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: