MucRecHitID Class Reference

#include <MucRecHitID.h>

List of all members.

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

Private Attributes

int m_Part
int m_Seg
int m_Gap
int m_Hit


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 {mailto:youzy@hep.pku.cn}

Definition at line 30 of file MucRecHitID.h.


Constructor & Destructor Documentation

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.

00021   : m_Part(part), m_Seg(seg), m_Gap(gap), m_Hit(hit)
00022 { }

MucRecHitID::MucRecHitID ( const MucRecHitID source  ) 

Copy constructor.

Definition at line 25 of file MucRecHitID.cxx.

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 { }

MucRecHitID::~MucRecHitID (  ) 

Destructor.

Definition at line 33 of file MucRecHitID.cxx.

00034 { }


Member Function Documentation

int MucRecHitID::Gap (  )  const [inline]

Get gap number. (0-8).

Definition at line 71 of file MucRecHitID.h.

References m_Gap.

00071 { return m_Gap; }

int MucRecHitID::Hit (  )  const [inline]

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

Definition at line 74 of file MucRecHitID.h.

References m_Hit.

00074 { return m_Hit; }

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

Definition at line 63 of file MucRecHitID.cxx.

References m_Gap, m_Hit, m_Part, m_Seg, and EvtCyclic3::other().

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 }

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

Definition at line 75 of file MucRecHitID.cxx.

References m_Gap, m_Hit, m_Part, m_Seg, and EvtCyclic3::other().

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 }

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

Assignment operator.

Definition at line 38 of file MucRecHitID.cxx.

References m_Gap, m_Hit, m_Part, and m_Seg.

00039 {
00040   // Assignment operator.
00041   if (this != &orig) {             // Watch out for self-assignment!
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 }

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

Comparison operators.

Definition at line 51 of file MucRecHitID.cxx.

References m_Gap, m_Hit, m_Part, m_Seg, and EvtCyclic3::other().

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 }

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

Definition at line 89 of file MucRecHitID.cxx.

References m_Gap, m_Hit, m_Part, m_Seg, and EvtCyclic3::other().

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 }

int MucRecHitID::Part (  )  const [inline]

Get part number. (0-east cap, 1-barrel, 2-west cap).

Definition at line 65 of file MucRecHitID.h.

References m_Part.

00065 { return m_Part; }

int MucRecHitID::Seg (  )  const [inline]

Get seg number. (0-7).

Definition at line 68 of file MucRecHitID.h.

References m_Seg.

00068 { return m_Seg; }

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.

References m_Gap, m_Hit, m_Part, and m_Seg.

00108 {
00109   m_Part = part;
00110   m_Seg  = seg;
00111   m_Gap  = gap;
00112   m_Hit  = hit;
00113 }


Member Data Documentation

int MucRecHitID::m_Gap [private]

Definition at line 79 of file MucRecHitID.h.

Referenced by Gap(), operator!=(), operator<(), operator=(), operator==(), operator>(), and SetID().

int MucRecHitID::m_Hit [private]

Definition at line 80 of file MucRecHitID.h.

Referenced by Hit(), operator!=(), operator<(), operator=(), operator==(), operator>(), and SetID().

int MucRecHitID::m_Part [private]

Definition at line 77 of file MucRecHitID.h.

Referenced by operator!=(), operator<(), operator=(), operator==(), operator>(), Part(), and SetID().

int MucRecHitID::m_Seg [private]

Definition at line 78 of file MucRecHitID.h.

Referenced by operator!=(), operator<(), operator=(), operator==(), operator>(), Seg(), and SetID().


Generated on Tue Nov 29 23:20:30 2016 for BOSS_7.0.2 by  doxygen 1.4.7