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 }
RPCPacMuon::setAll
void setAll(const RPCPattern &pattern, int quality, unsigned short firedPlanes)
Definition: RPCPacMuon.cc:15
RPCMuon::m_Quality
unsigned int m_Quality
3 bits, 0-7.
Definition: RPCMuon.h:93
RPCPacMuon::operator==
bool operator==(const RPCPacMuon &pacMuon) const
Definition: RPCPacMuon.cc:63
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:122
RPCPacMuon::operator>
bool operator>(const RPCPacMuon &pacMuon) const
Definition: RPCPacMuon.cc:45
RPCPattern
Definition: RPCPattern.h:16
RPCPacMuon::setPatternNum
void setPatternNum(int patternNum)
Definition: RPCPacMuon.cc:23
RPCMuon
Definition: RPCMuon.h:15
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
RPCPacMuon
Definition: RPCPacMuon.h:15
RPCMuon::m_FiredPlanes
unsigned short m_FiredPlanes
bits of this number denotes fired planes that conform to pattern pattern
Definition: RPCMuon.h:104
RPCPacMuon::operator<
bool operator<(const RPCPacMuon &pacMuon) const
Definition: RPCPacMuon.cc:25
RPCPacMuon.h
RPCMuon::m_Sign
unsigned int m_Sign
1 bit, 0 - negative, 1 - positive.
Definition: RPCMuon.h:96
RPCMuon::m_PtCode
unsigned int m_PtCode
5 bits, 0-31.
Definition: RPCMuon.h:90
RPCMuon::m_PatternNum
int m_PatternNum
number of pattern (in given Pac), that was fit to this muon.
Definition: RPCMuon.h:99
RPCPacMuon::RPCPacMuon
RPCPacMuon()
Default constructor. No muon.
Definition: RPCPacMuon.cc:9