00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "MucRecEvent/MucRecHitID.h"
00013
00014
00015
00016
00017 MucRecHitID::MucRecHitID(const int part,
00018 const int seg,
00019 const int gap,
00020 const int hit)
00021 : m_Part(part), m_Seg(seg), m_Gap(gap), m_Hit(hit)
00022 { }
00023
00024
00025 MucRecHitID::MucRecHitID(const MucRecHitID& source)
00026 : m_Part(source.m_Part),
00027 m_Seg(source.m_Seg),
00028 m_Gap(source.m_Gap),
00029 m_Hit(source.m_Hit)
00030 { }
00031
00032
00033 MucRecHitID::~MucRecHitID()
00034 { }
00035
00036
00037 MucRecHitID&
00038 MucRecHitID::operator=(const MucRecHitID& orig)
00039 {
00040
00041 if (this != &orig) {
00042 m_Part = orig.m_Part;
00043 m_Seg = orig.m_Seg;
00044 m_Gap = orig.m_Gap;
00045 m_Hit = orig.m_Hit;
00046 }
00047 return *this;
00048 }
00049
00050 bool
00051 MucRecHitID::operator == (const MucRecHitID& other) const
00052 {
00053 if ( m_Part == other.m_Part &&
00054 m_Seg == other.m_Seg &&
00055 m_Gap == other.m_Gap &&
00056 m_Hit == other.m_Hit )
00057 return true;
00058 else
00059 return false;
00060 }
00061
00062 bool
00063 MucRecHitID::operator != (const MucRecHitID& other) const
00064 {
00065 if ( m_Part == other.m_Part &&
00066 m_Seg == other.m_Seg &&
00067 m_Gap == other.m_Gap &&
00068 m_Hit == other.m_Hit )
00069 return false;
00070 else
00071 return true;
00072 }
00073
00074 bool
00075 MucRecHitID::operator < (const MucRecHitID& other) const
00076 {
00077 if (m_Part < other.m_Part ||
00078 (m_Part == other.m_Part && m_Seg < other.m_Seg) ||
00079 (m_Part == other.m_Part && m_Seg == other.m_Seg && m_Gap < other.m_Gap) ||
00080 (m_Part == other.m_Part && m_Seg == other.m_Seg && m_Gap == other.m_Gap && m_Hit < other.m_Hit)) {
00081 return true;
00082 }
00083 else {
00084 return false;
00085 }
00086 }
00087
00088 bool
00089 MucRecHitID::operator > (const MucRecHitID& other) const
00090 {
00091 if (m_Part > other.m_Part ||
00092 (m_Part == other.m_Part && m_Seg > other.m_Seg) ||
00093 (m_Part == other.m_Part && m_Seg == other.m_Seg && m_Gap > other.m_Gap) ||
00094 (m_Part == other.m_Part && m_Seg == other.m_Seg && m_Gap == other.m_Gap && m_Hit > other.m_Hit)) {
00095 return true;
00096 }
00097 else {
00098 return false;
00099 }
00100 }
00101
00102
00103 void
00104 MucRecHitID::SetID(const int part,
00105 const int seg,
00106 const int gap,
00107 const int hit)
00108 {
00109 m_Part = part;
00110 m_Seg = seg;
00111 m_Gap = gap;
00112 m_Hit = hit;
00113 }
00114
00115
00116
00117
00118
00119
00120