CMS 3D CMS Logo

L1MuDTTrackSegEta.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
3 // Class: L1MuDTTrackSegEta
4 //
5 // Description: ETA Track Segment
6 //
7 //
8 //
9 // Author :
10 // N. Neumeister CERN EP
11 //
12 //--------------------------------------------------
13 
14 //-----------------------
15 // This Class's Header --
16 //-----------------------
17 
19 
20 //---------------
21 // C++ Headers --
22 //---------------
23 
24 #include <iostream>
25 #include <iomanip>
26 #include <algorithm>
27 #include <bitset>
28 
29 //-------------------------------
30 // Collaborating Class Headers --
31 //-------------------------------
32 
34 
35 using namespace std;
36 
37 // --------------------------------
38 // class L1MuDTTrackSegEta
39 //---------------------------------
40 
41 //----------------
42 // Constructors --
43 //----------------
44 
45 L1MuDTTrackSegEta::L1MuDTTrackSegEta() : m_location(), m_position(0), m_quality(0), m_bx(0) {}
46 
47 L1MuDTTrackSegEta::L1MuDTTrackSegEta(int wheel_id, int sector_id, int station_id, int pos, int quality, int bx)
48  : m_location(wheel_id, sector_id, station_id), m_position(pos), m_quality(quality), m_bx(bx) {}
49 
51  : m_location(id), m_position(pos), m_quality(quality), m_bx(bx) {}
52 
54  : m_location(id.m_location), m_position(id.m_position), m_quality(id.m_quality), m_bx(id.m_bx) {}
55 
56 //--------------
57 // Destructor --
58 //--------------
60 
61 //--------------
62 // Operations --
63 //--------------
64 
65 //
66 // reset ETA Track Segment
67 //
69  m_position = 0;
70  m_quality = 0;
71  m_bx = 0;
72 }
73 
74 //
75 // Assignment operator
76 //
78  if (this != &id) {
79  m_location = id.m_location;
80  m_position = id.m_position;
81  m_quality = id.m_quality;
82  m_bx = id.m_bx;
83  }
84  return *this;
85 }
86 
87 //
88 // Equal operator
89 //
91  if (m_location != id.m_location)
92  return false;
93  if (m_position != id.m_position)
94  return false;
95  if (m_quality != id.m_quality)
96  return false;
97  if (m_bx != id.m_bx)
98  return false;
99  return true;
100 }
101 
102 //
103 // Unequal operator
104 //
106  if (m_location != id.m_location)
107  return true;
108  if (m_position != id.m_position)
109  return true;
110  if (m_quality != id.m_quality)
111  return true;
112  if (m_bx != id.m_bx)
113  return true;
114  return false;
115 }
116 
117 //
118 // output stream operator
119 //
120 ostream& operator<<(ostream& s, const L1MuDTTrackSegEta& id) {
121  s.setf(ios::right, ios::adjustfield);
122  s << (id.m_location) << "\t"
123  << "position : " << bitset<7>(id.position()) << " "
124  << "quality : " << bitset<7>(id.quality());
125 
126  return s;
127 }
L1MuDTTrackSegLoc
Definition: L1MuDTTrackSegLoc.h:41
L1MuDTTrackSegEta::operator==
bool operator==(const L1MuDTTrackSegEta &) const
equal operator
Definition: L1MuDTTrackSegEta.cc:90
L1MuDTTrackSegEta::operator!=
bool operator!=(const L1MuDTTrackSegEta &) const
unequal operator
Definition: L1MuDTTrackSegEta.cc:105
pos
Definition: PixelAliasList.h:18
operator<<
ostream & operator<<(ostream &s, const L1MuDTTrackSegEta &id)
Definition: L1MuDTTrackSegEta.cc:120
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1MuDTTrackSegEta::m_bx
int m_bx
Definition: L1MuDTTrackSegEta.h:96
L1MuDTTrackSegEta::reset
void reset()
reset eta track segment
Definition: L1MuDTTrackSegEta.cc:68
L1MuDTTrackSegEta
Definition: L1MuDTTrackSegEta.h:36
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1MuDTTrackSegLoc.h
L1MuDTTrackSegEta::m_position
unsigned int m_position
Definition: L1MuDTTrackSegEta.h:94
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
L1MuDTTrackSegEta::m_location
L1MuDTTrackSegLoc m_location
Definition: L1MuDTTrackSegEta.h:93
L1MuDTTrackSegEta::L1MuDTTrackSegEta
L1MuDTTrackSegEta()
default constructor
Definition: L1MuDTTrackSegEta.cc:45
L1MuDTTrackSegEta::m_quality
unsigned int m_quality
Definition: L1MuDTTrackSegEta.h:95
std
Definition: JetResolutionObject.h:76
L1MuDTTrackSegEta::operator=
L1MuDTTrackSegEta & operator=(const L1MuDTTrackSegEta &)
assignment operator
Definition: L1MuDTTrackSegEta.cc:77
L1MuDTTrackSegEta.h
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
L1MuDTTrackSegEta::~L1MuDTTrackSegEta
virtual ~L1MuDTTrackSegEta()
destructor
Definition: L1MuDTTrackSegEta.cc:59