BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
MucSoftID Class Reference

#include <MucSoftID.h>

Public Member Functions

 MucSoftID (const int part=-1, const int seg=-1, const int gap=-1, const int strip=-1)
 Constructor.
 
MucSoftIDoperator= (const MucSoftID &orig)
 Assignment constructor.
 
 MucSoftID (const MucSoftID &orig)
 Copy constructor.
 
 ~MucSoftID ()
 Destructor.
 
bool operator== (const MucSoftID &id) const
 Compare whehter two MucSoftID is equal.
 
int GetPart () const
 Get part number. (0-east cap, 1-barrel, 2-west cap)
 
int GetSeg () const
 Get segment number. (barrel 0-3, cap 0-7)
 
int GetGap () const
 Get gap number. (barrel 0-8, cap 0-7)
 
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)
 
void SetID (const int part=-1, const int seg=-1, const int gap=-1, const int strip=-1)
 Set the sub-identifier.
 

Static Public Attributes

static const int m_kPart = 3
 Number of parts in Bes Muc.
 
static const int m_kSegInPartMax = 8
 Number of segments in a part max.
 
static const int m_kSegInPart [m_kPart] = {4, 8, 4}
 Number of segments in a part.
 
static const int m_kGapInSegMax = 9
 Number of gaps in a segment max.
 
static const int m_kGapInPart [m_kPart] = {8, 9, 8}
 Number of gaps in a segment of part.
 
static const int m_kStripInGapMax = 96
 Number of strips in a gap max.
 
static const int m_kStripInGap [m_kPart][m_kGapInSegMax]
 Number of strips in a gap.
 
static const int m_kSegTotal = MucSoftID::m_kSegInPartMax * MucSoftID::m_kPart
 Number of segments total in the Bes MUC.
 
static const int m_kGapTotal = MucSoftID::m_kGapInSegMax * MucSoftID::m_kSegTotal
 Number of gaps total in the Bes MUC.
 
static const int m_kStripTotal = MucSoftID::m_kStripInGapMax * MucSoftID::m_kGapTotal
 Number of strips total in the Bes MUC.
 
static const int m_kHitInGapMax = MucSoftID::m_kStripInGapMax
 Maximum number of hits in a gap.
 
static const int m_kHitTotalMax = MucSoftID::m_kStripTotal
 Maximum number of hits total in the Bes MUC.
 

Detailed Description

Class MucSoftID contains the "software" representation of a MUC channel address.

Indexing a Muc readout channel (in the "software" scheme) requires 4 numbers: \begin{enumerate} \item the part number, m_Part (0-east cap, 1-barrel, 2-west cap) \item the seg number in a part, m_Seg (barrel 0-3, cap 0-7) \item the gap number in a segment, m_Gap (barrel 0-8, cap 0-7) \item the strip number in a gap, m_Strip (barrel gap 0,2,4,6,8 0-47 \ barrel gap 1,3,5,7 0-95 \ endcap 0-63) \end{enumerate}

Author
Zhengyun You \URL{youzy.nosp@m.@pku.nosp@m..edu..nosp@m.cn}

Definition at line 31 of file MucSoftID.h.

Constructor & Destructor Documentation

◆ MucSoftID() [1/2]

MucSoftID::MucSoftID ( const int  part = -1,
const int  seg = -1,
const int  gap = -1,
const int  strip = -1 
)

Constructor.

Definition at line 58 of file MucSoftID.cxx.

62 : m_Part(part),
63 m_Seg(seg),
64 m_Gap(gap),
65 m_Strip(strip)
66{
67 // Constructor.
68}

◆ MucSoftID() [2/2]

MucSoftID::MucSoftID ( const MucSoftID orig)

Copy constructor.

Definition at line 83 of file MucSoftID.cxx.

84 : m_Part(orig.m_Part),
85 m_Seg(orig.m_Seg),
86 m_Gap(orig.m_Gap),
87 m_Strip(orig.m_Strip)
88{
89 // Copy constructor.
90}

◆ ~MucSoftID()

MucSoftID::~MucSoftID ( )
inline

Destructor.

Definition at line 78 of file MucSoftID.h.

79 { };

Member Function Documentation

◆ GetGap()

int MucSoftID::GetGap ( ) const
inline

Get gap number. (barrel 0-8, cap 0-7)

Definition at line 91 of file MucSoftID.h.

91{ return m_Gap; }

Referenced by operator==().

◆ GetPart()

int MucSoftID::GetPart ( ) const
inline

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

Definition at line 85 of file MucSoftID.h.

85{ return m_Part; }

Referenced by operator==().

◆ GetSeg()

int MucSoftID::GetSeg ( ) const
inline

Get segment number. (barrel 0-3, cap 0-7)

Definition at line 88 of file MucSoftID.h.

88{ return m_Seg; }

Referenced by operator==().

◆ GetStrip()

int MucSoftID::GetStrip ( ) const
inline

Get strip number. (barrel 0-47 for gap0,2,4,6,8, 0-95 for gap1,3,5,7, endcap 0-63)

Definition at line 94 of file MucSoftID.h.

94{ return m_Strip; }

Referenced by operator==().

◆ operator=()

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

Assignment constructor.

Definition at line 71 of file MucSoftID.cxx.

72{
73 // Assignment operator.
74 if (this != &orig) { // Watch out for self-assignment!
75 m_Part = orig.m_Part;
76 m_Seg = orig.m_Seg;
77 m_Gap = orig.m_Gap;
78 m_Strip = orig.m_Strip;
79 }
80 return *this;
81}

◆ operator==()

bool MucSoftID::operator== ( const MucSoftID id) const

Compare whehter two MucSoftID is equal.

Definition at line 93 of file MucSoftID.cxx.

94{
95 if( m_Part == id.GetPart()
96 && m_Seg == id.GetSeg()
97 && m_Gap == id.GetGap()
98 && m_Strip == id.GetStrip() ) {
99 return true;
100 }
101 else {
102 return false;
103 }
104}
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
int GetGap() const
Get gap number. (barrel 0-8, cap 0-7)
Definition: MucSoftID.h:91
int GetSeg() const
Get segment number. (barrel 0-3, cap 0-7)
Definition: MucSoftID.h:88

◆ SetID()

void MucSoftID::SetID ( const int  part = -1,
const int  seg = -1,
const int  gap = -1,
const int  strip = -1 
)

Set the sub-identifier.

Definition at line 107 of file MucSoftID.cxx.

111{
112 // Set the sub-identifier, m_GapID and m_StripID.
113 m_Part = part;
114 m_Seg = seg;
115 m_Gap = gap;
116 m_Strip = strip;
117}

Member Data Documentation

◆ m_kGapInPart

const int MucSoftID::m_kGapInPart = {8, 9, 8}
static

Number of gaps in a segment of part.

Definition at line 46 of file MucSoftID.h.

◆ m_kGapInSegMax

const int MucSoftID::m_kGapInSegMax = 9
static

Number of gaps in a segment max.

Definition at line 44 of file MucSoftID.h.

Referenced by GapHash(), and StripHash().

◆ m_kGapTotal

const int MucSoftID::m_kGapTotal = MucSoftID::m_kGapInSegMax * MucSoftID::m_kSegTotal
static

Number of gaps total in the Bes MUC.

Definition at line 56 of file MucSoftID.h.

◆ m_kHitInGapMax

const int MucSoftID::m_kHitInGapMax = MucSoftID::m_kStripInGapMax
static

Maximum number of hits in a gap.

Definition at line 61 of file MucSoftID.h.

◆ m_kHitTotalMax

const int MucSoftID::m_kHitTotalMax = MucSoftID::m_kStripTotal
static

Maximum number of hits total in the Bes MUC.

Definition at line 63 of file MucSoftID.h.

◆ m_kPart

const int MucSoftID::m_kPart = 3
static

Number of parts in Bes Muc.

Definition at line 36 of file MucSoftID.h.

◆ m_kSegInPart

const int MucSoftID::m_kSegInPart = {4, 8, 4}
static

Number of segments in a part.

Definition at line 41 of file MucSoftID.h.

◆ m_kSegInPartMax

const int MucSoftID::m_kSegInPartMax = 8
static

Number of segments in a part max.

Definition at line 39 of file MucSoftID.h.

Referenced by GapHash(), and StripHash().

◆ m_kSegTotal

const int MucSoftID::m_kSegTotal = MucSoftID::m_kSegInPartMax * MucSoftID::m_kPart
static

Number of segments total in the Bes MUC.

Definition at line 54 of file MucSoftID.h.

◆ m_kStripInGap

const int MucSoftID::m_kStripInGap
static
Initial value:
= { {64, 64, 64, 64, 64, 64, 64, 64},
{48, 96, 48, 96, 48, 96, 48, 96, 48},
{64, 64, 64, 64, 64, 64, 64, 64} }

Number of strips in a gap.

Definition at line 51 of file MucSoftID.h.

◆ m_kStripInGapMax

const int MucSoftID::m_kStripInGapMax = 96
static

Number of strips in a gap max.

Definition at line 49 of file MucSoftID.h.

Referenced by StripHash().

◆ m_kStripTotal

const int MucSoftID::m_kStripTotal = MucSoftID::m_kStripInGapMax * MucSoftID::m_kGapTotal
static

Number of strips total in the Bes MUC.

Definition at line 58 of file MucSoftID.h.


The documentation for this class was generated from the following files: