L1Trigger
DTTrackFinder
src
L1MuDTTrackSegLoc.cc
Go to the documentation of this file.
1
//-------------------------------------------------
2
//
3
// Class: L1MuDTTrackSegLoc
4
//
5
// Description: Logical location of a Track Segment
6
//
7
//
8
//
9
// Author :
10
// N. Neumeister CERN EP
11
//
12
//--------------------------------------------------
13
14
//-----------------------
15
// This Class's Header --
16
//-----------------------
17
18
#include "
L1Trigger/DTTrackFinder/src/L1MuDTTrackSegLoc.h
"
19
20
//---------------
21
// C++ Headers --
22
//---------------
23
24
#include <iostream>
25
#include <iomanip>
26
#include <cstdlib>
27
#include <cassert>
28
29
//-------------------------------
30
// Collaborating Class Headers --
31
//-------------------------------
32
33
using namespace
std
;
34
35
// --------------------------------
36
// class L1MuDTTrackSegLoc
37
//---------------------------------
38
39
//----------------
40
// Constructors --
41
//----------------
42
43
L1MuDTTrackSegLoc::L1MuDTTrackSegLoc
() : m_wheel(0), m_sector(0), m_station(0) {}
44
45
L1MuDTTrackSegLoc::L1MuDTTrackSegLoc
(
int
wheel_id,
int
sector_id,
int
station_id)
46
: m_wheel(wheel_id), m_sector(sector_id), m_station(station_id) {
47
// assert(wheel_id >= -3 && wheel_id <= 3);
48
// assert(sector_id >= 0 && sector_id < 12);
49
50
if
(
abs
(wheel_id) == 3) {
51
// assert(station_id >= 3 && station_id <= 4);
52
}
else
{
53
// assert(station_id >= 1 && station_id <= 4);
54
}
55
}
56
57
L1MuDTTrackSegLoc::L1MuDTTrackSegLoc
(
const
L1MuDTTrackSegLoc
&
id
)
58
: m_wheel(
id
.m_wheel), m_sector(
id
.m_sector), m_station(
id
.m_station) {}
59
60
//--------------
61
// Destructor --
62
//--------------
63
64
L1MuDTTrackSegLoc::~L1MuDTTrackSegLoc
() {}
65
66
//--------------
67
// Operations --
68
//--------------
69
70
//
71
// Assignment operator
72
//
73
L1MuDTTrackSegLoc
&
L1MuDTTrackSegLoc::operator=
(
const
L1MuDTTrackSegLoc
&
id
) {
74
if
(
this
!= &
id
) {
75
m_wheel
=
id
.m_wheel;
76
m_sector
=
id
.m_sector;
77
m_station
=
id
.m_station;
78
}
79
return
*
this
;
80
}
81
82
//
83
// Equal operator
84
//
85
bool
L1MuDTTrackSegLoc::operator==
(
const
L1MuDTTrackSegLoc
&
id
)
const
{
86
if
(
m_wheel
!=
id
.
wheel
())
87
return
false
;
88
if
(
m_sector
!=
id
.
sector
())
89
return
false
;
90
if
(
m_station
!=
id
.
station
())
91
return
false
;
92
return
true
;
93
}
94
95
//
96
// Unequal operator
97
//
98
bool
L1MuDTTrackSegLoc::operator!=
(
const
L1MuDTTrackSegLoc
&
id
)
const
{
99
if
(
m_wheel
!=
id
.
wheel
())
100
return
true
;
101
if
(
m_sector
!=
id
.
sector
())
102
return
true
;
103
if
(
m_station
!=
id
.
station
())
104
return
true
;
105
return
false
;
106
}
107
108
//
109
// Less operator
110
//
111
bool
L1MuDTTrackSegLoc::operator<
(
const
L1MuDTTrackSegLoc
&
id
)
const
{
112
if
(
wheel
() <
id
.
wheel
())
113
return
true
;
114
if
(
wheel
() >
id
.
wheel
())
115
return
false
;
116
if
(
sector
() <
id
.
sector
())
117
return
true
;
118
if
(
sector
() >
id
.
sector
())
119
return
false
;
120
if
(
station
() <
id
.
station
())
121
return
true
;
122
if
(
station
() >
id
.
station
())
123
return
false
;
124
return
false
;
125
}
126
127
//
128
// output stream operator
129
//
130
ostream&
operator<<
(ostream&
s
,
const
L1MuDTTrackSegLoc
&
id
) {
131
s
.setf(ios::right, ios::adjustfield);
132
s
<<
"wheel = "
<< setw(2) <<
id
.wheel() <<
" "
133
<<
"sector = "
<< setw(2) <<
id
.sector() <<
" "
134
<<
"station = "
<< setw(1) <<
id
.station();
135
136
return
s
;
137
}
L1MuDTTrackSegLoc::m_wheel
int m_wheel
Definition:
L1MuDTTrackSegLoc.h:80
L1MuDTTrackSegLoc::operator=
L1MuDTTrackSegLoc & operator=(const L1MuDTTrackSegLoc &)
assignment operator
Definition:
L1MuDTTrackSegLoc.cc:73
L1MuDTTrackSegLoc
Definition:
L1MuDTTrackSegLoc.h:41
L1MuDTTrackSegLoc::operator==
bool operator==(const L1MuDTTrackSegLoc &) const
equal operator
Definition:
L1MuDTTrackSegLoc.cc:85
L1MuDTTrackSegLoc::wheel
int wheel() const
return wheel
Definition:
L1MuDTTrackSegLoc.h:56
L1MuDTTrackSegLoc::L1MuDTTrackSegLoc
L1MuDTTrackSegLoc()
default constructor
Definition:
L1MuDTTrackSegLoc.cc:43
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
L1MuDTTrackSegLoc.h
L1MuDTTrackSegLoc::station
int station() const
return station
Definition:
L1MuDTTrackSegLoc.h:62
L1MuDTTrackSegLoc::operator!=
bool operator!=(const L1MuDTTrackSegLoc &) const
unequal operator
Definition:
L1MuDTTrackSegLoc.cc:98
L1MuDTTrackSegLoc::m_station
int m_station
Definition:
L1MuDTTrackSegLoc.h:82
L1MuDTTrackSegLoc::~L1MuDTTrackSegLoc
virtual ~L1MuDTTrackSegLoc()
destructor
Definition:
L1MuDTTrackSegLoc.cc:64
L1MuDTTrackSegLoc::m_sector
int m_sector
Definition:
L1MuDTTrackSegLoc.h:81
L1MuDTTrackSegLoc::operator<
bool operator<(const L1MuDTTrackSegLoc &) const
less operator
Definition:
L1MuDTTrackSegLoc.cc:111
std
Definition:
JetResolutionObject.h:76
triggerObjects_cff.id
id
Definition:
triggerObjects_cff.py:31
L1MuDTTrackSegLoc::sector
int sector() const
return sector (30 deg)
Definition:
L1MuDTTrackSegLoc.h:59
funct::abs
Abs< T >::type abs(const T &t)
Definition:
Abs.h:22
operator<<
ostream & operator<<(ostream &s, const L1MuDTTrackSegLoc &id)
Definition:
L1MuDTTrackSegLoc.cc:130
Generated for CMSSW Reference Manual by
1.8.16