CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
17 void RPCPacMuon::setAll(const RPCPattern& pattern, int quality, unsigned short firedPlanes) {
18  m_PatternNum = pattern.getNumber();
19  m_PtCode = pattern.getCode();
20  m_Sign = pattern.getSign();
21  m_Quality = quality;
22  m_FiredPlanes = firedPlanes;
23 }
24 
25 void RPCPacMuon::setPatternNum(int patternNum) {
26  m_PatternNum = patternNum;
27 }
28 
29 bool RPCPacMuon::operator <(const RPCPacMuon& pacMuon) const {
30  if( this->m_Quality < pacMuon.m_Quality)
31  return true;
32  else if( this->m_Quality > pacMuon.m_Quality)
33  return false;
34  else { //==
35  if( this->m_PtCode < pacMuon.m_PtCode)
36  return true;
37  else if( this->m_PtCode > pacMuon.m_PtCode)
38  return false;
39  else { //==
40  //if( this->m_Sign < pacMuon.m_Sign)
41  if( this->m_Sign > pacMuon.m_Sign)
42  return true;
43  else
44  return false;
45  }
46  }
47 }
48 
49 bool RPCPacMuon::operator >(const RPCPacMuon& pacMuon) const {
50  if( this->m_Quality > pacMuon.m_Quality)
51  return true;
52  else if( this->m_Quality < pacMuon.m_Quality)
53  return false;
54  else { //==
55  if( this->m_PtCode > pacMuon.m_PtCode)
56  return true;
57  else if( this->m_PtCode < pacMuon.m_PtCode)
58  return false;
59  else { //==
60  if( this->m_Sign < pacMuon.m_Sign)
61  return true;
62  else
63  return false;
64  }
65  }
66 }
67 bool RPCPacMuon::operator ==(const RPCPacMuon& pacMuon) const {
68  if( this->m_Quality == pacMuon.m_Quality &&
69  this->m_PtCode == pacMuon.m_PtCode &&
70  this->m_Sign == pacMuon.m_Sign)
71  return true;
72  else
73  return false;
74 }
unsigned short m_FiredPlanes
bits of this number denotes fired planes that conform to pattern pattern
Definition: RPCMuon.h:101
int getNumber() const
Definition: RPCPattern.cc:69
bool operator>(const RPCPacMuon &pacMuon) const
Definition: RPCPacMuon.cc:49
list pattern
Definition: chain.py:104
void setAll(const RPCPattern &pattern, int quality, unsigned short firedPlanes)
Definition: RPCPacMuon.cc:17
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:87
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:93
int m_PatternNum
number of pattern (in given Pac), that was fit to this muon.
Definition: RPCMuon.h:96
bool operator<(const RPCPacMuon &pacMuon) const
Definition: RPCPacMuon.cc:29
int getSign() const
Definition: RPCPattern.cc:67
void setPatternNum(int patternNum)
Definition: RPCPacMuon.cc:25
RPCPacMuon()
Default constructor. No muon.
Definition: RPCPacMuon.cc:10
int getCode() const
Definition: RPCPattern.cc:65
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:90
bool operator==(const RPCPacMuon &pacMuon) const
Definition: RPCPacMuon.cc:67