DataFormats
MuonDetId
interface
DTTracoId.h
Go to the documentation of this file.
1
//-------------------------------------------------
2
//
8
//
9
//--------------------------------------------------
10
#ifndef DT_TRACO_ID_H_
11
#define DT_TRACO_ID_H_
12
13
//------------------------------------
14
// Collaborating Class Declarations --
15
//------------------------------------
16
17
//----------------------
18
// Base Class Headers --
19
//----------------------
20
#include "
DataFormats/MuonDetId/interface/DTChamberId.h
"
21
22
//---------------
23
// C++ Headers --
24
//---------------
25
26
//---------------------------------------------------
27
// DTTracoChip
28
//---------------------------------------------------
29
30
// ---------------------
31
// -- Class Interface --
32
// ---------------------
33
34
class
DTTracoId
{
35
public
:
37
DTTracoId
() :
_traco
(0) {}
38
40
DTTracoId
(
const
DTChamberId
& mu_stat_id,
const
int
traco_id) :
_statId
(mu_stat_id),
_traco
(traco_id) {}
41
43
DTTracoId
(
const
int
wheel_id,
const
int
station_id,
const
int
sector_id,
const
int
traco_id)
44
:
_statId
(wheel_id, station_id, sector_id),
_traco
(traco_id) {}
45
47
DTTracoId
(
const
DTTracoId
& tracoId) :
_statId
(tracoId.
_statId
),
_traco
(tracoId.
_traco
) {}
48
50
virtual
~DTTracoId
() {}
51
53
inline
int
wheel
()
const
{
return
_statId
.
wheel
(); }
55
inline
int
station
()
const
{
return
_statId
.
station
(); }
57
inline
int
sector
()
const
{
return
_statId
.
sector
(); }
59
inline
int
traco
()
const
{
return
_traco
; }
61
inline
DTChamberId
ChamberId
()
const
{
return
_statId
; }
62
63
bool
operator==
(
const
DTTracoId
&
id
)
const
{
64
if
(
wheel
() !=
id
.
wheel
())
65
return
false
;
66
if
(
sector
() !=
id
.
sector
())
67
return
false
;
68
if
(
station
() !=
id
.
station
())
69
return
false
;
70
if
(
_traco
!=
id
.
traco
())
71
return
false
;
72
return
true
;
73
}
74
75
bool
operator<
(
const
DTTracoId
&
id
)
const
{
76
if
(
wheel
() <
id
.
wheel
())
77
return
true
;
78
if
(
wheel
() >
id
.
wheel
())
79
return
false
;
80
81
if
(
station
() <
id
.
station
())
82
return
true
;
83
if
(
station
() >
id
.
station
())
84
return
false
;
85
86
if
(
sector
() <
id
.
sector
())
87
return
true
;
88
if
(
sector
() >
id
.
sector
())
89
return
false
;
90
91
if
(
traco
() <
id
.
traco
())
92
return
true
;
93
if
(
traco
() >
id
.
traco
())
94
return
false
;
95
96
return
false
;
97
}
98
99
private
:
100
DTChamberId
_statId
;
// this is 3 bytes
101
int
_traco
;
102
};
103
104
#endif
DTTracoId::DTTracoId
DTTracoId(const int wheel_id, const int station_id, const int sector_id, const int traco_id)
Constructor.
Definition:
DTTracoId.h:43
DTTracoId
Definition:
DTTracoId.h:34
DTTracoId::_traco
int _traco
Definition:
DTTracoId.h:101
DTTracoId::operator==
bool operator==(const DTTracoId &id) const
Definition:
DTTracoId.h:63
DTTracoId::station
int station() const
Returns station number.
Definition:
DTTracoId.h:55
DTTracoId::~DTTracoId
virtual ~DTTracoId()
Destructor.
Definition:
DTTracoId.h:50
DTChamberId.h
DTChamberId::sector
int sector() const
Definition:
DTChamberId.h:49
DTTracoId::operator<
bool operator<(const DTTracoId &id) const
Definition:
DTTracoId.h:75
DTTracoId::DTTracoId
DTTracoId(const DTTracoId &tracoId)
Constructor.
Definition:
DTTracoId.h:47
DTTracoId::ChamberId
DTChamberId ChamberId() const
Returns the chamber id.
Definition:
DTTracoId.h:61
DTTracoId::_statId
DTChamberId _statId
Definition:
DTTracoId.h:100
DTTracoId::traco
int traco() const
Returns the traco.
Definition:
DTTracoId.h:59
DTTracoId::DTTracoId
DTTracoId(const DTChamberId &mu_stat_id, const int traco_id)
Constructor.
Definition:
DTTracoId.h:40
DTTracoId::wheel
int wheel() const
Returns wheel number.
Definition:
DTTracoId.h:53
DTChamberId
Definition:
DTChamberId.h:14
DTTracoId::DTTracoId
DTTracoId()
Constructor.
Definition:
DTTracoId.h:37
DTTracoId::sector
int sector() const
Returns sector number.
Definition:
DTTracoId.h:57
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition:
DTChamberId.h:39
DTChamberId::station
int station() const
Return the station number.
Definition:
DTChamberId.h:42
Generated for CMSSW Reference Manual by
1.8.16