CMS 3D CMS Logo

RPCPacMuon.cc
Go to the documentation of this file.
1 /*******************************************************************************
2 * *
3 * Karol Bunkowski *
4 * Warsaw University 2002 *
5 * *
6 *******************************************************************************/
8 
11 
13 RPCPacMuon::RPCPacMuon(const RPCPattern& pattern, int quality, unsigned short firedPlanes)
14  : RPCMuon(pattern.getCode(), quality, pattern.getSign(), pattern.getNumber(), firedPlanes) {}
15 
16 void RPCPacMuon::setAll(const RPCPattern& pattern, int quality, unsigned short firedPlanes) {
17  m_PatternNum = pattern.getNumber();
18  m_PtCode = pattern.getCode();
19  m_Sign = pattern.getSign();
21  m_FiredPlanes = firedPlanes;
22 }
23 
24 void RPCPacMuon::setPatternNum(int patternNum) { m_PatternNum = patternNum; }
25 
26 bool RPCPacMuon::operator<(const RPCPacMuon& pacMuon) const {
27  if (this->m_Quality < pacMuon.m_Quality)
28  return true;
29  else if (this->m_Quality > pacMuon.m_Quality)
30  return false;
31  else { //==
32  if (this->m_PtCode < pacMuon.m_PtCode)
33  return true;
34  else if (this->m_PtCode > pacMuon.m_PtCode)
35  return false;
36  else { //==
37  //if( this->m_Sign < pacMuon.m_Sign)
38  if (this->m_Sign > pacMuon.m_Sign)
39  return true;
40  else
41  return false;
42  }
43  }
44 }
45 
46 bool RPCPacMuon::operator>(const RPCPacMuon& pacMuon) const {
47  if (this->m_Quality > pacMuon.m_Quality)
48  return true;
49  else if (this->m_Quality < pacMuon.m_Quality)
50  return false;
51  else { //==
52  if (this->m_PtCode > pacMuon.m_PtCode)
53  return true;
54  else if (this->m_PtCode < pacMuon.m_PtCode)
55  return false;
56  else { //==
57  if (this->m_Sign < pacMuon.m_Sign)
58  return true;
59  else
60  return false;
61  }
62  }
63 }
64 bool RPCPacMuon::operator==(const RPCPacMuon& pacMuon) const {
65  if (this->m_Quality == pacMuon.m_Quality && this->m_PtCode == pacMuon.m_PtCode && this->m_Sign == pacMuon.m_Sign)
66  return true;
67  else
68  return false;
69 }
unsigned short m_FiredPlanes
bits of this number denotes fired planes that conform to pattern pattern
Definition: RPCMuon.h:104
int getNumber() const
Definition: RPCPattern.cc:67
bool operator>(const RPCPacMuon &pacMuon) const
Definition: RPCPacMuon.cc:46
void setAll(const RPCPattern &pattern, int quality, unsigned short firedPlanes)
Definition: RPCPacMuon.cc:16
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:90
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:96
int m_PatternNum
number of pattern (in given Pac), that was fit to this muon.
Definition: RPCMuon.h:99
bool operator<(const RPCPacMuon &pacMuon) const
Definition: RPCPacMuon.cc:26
int getSign() const
Definition: RPCPattern.cc:65
void setPatternNum(int patternNum)
Definition: RPCPacMuon.cc:24
RPCPacMuon()
Default constructor. No muon.
Definition: RPCPacMuon.cc:10
int getCode() const
Definition: RPCPattern.cc:63
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:93
int getSign() const
Definition: RPCMuon.cc:73
bool operator==(const RPCPacMuon &pacMuon) const
Definition: RPCPacMuon.cc:64