ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCablings
MuonTGC_Cabling
src
TGCChannelId.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MuonTGC_Cabling/TGCChannelId.h
"
6
7
namespace
MuonTGC_Cabling
{
8
9
bool
TGCChannelId::operator==
(
const
TGCChannelId
& channelId)
const
{
10
if
((this->
getChannelIdType
() == channelId.
getChannelIdType
()) &&
11
(this->getSideType() == channelId.getSideType()) &&
12
(this->getRegionType() == channelId.getRegionType()) &&
13
(this->getSignalType() == channelId.getSignalType()) &&
14
(this->getModuleType() == channelId.getModuleType()) &&
15
(this->getSector() == channelId.getSector()) &&
16
(this->getLayer() == channelId.getLayer()) &&
17
(this->getChamber() == channelId.getChamber()) &&
18
(this->getId() == channelId.getId()) &&
19
(this->getBlock() == channelId.getBlock()) &&
20
(this->getChannel() == channelId.getChannel())) {
21
return
true
;
22
}
23
return
false
;
24
}
25
26
TGCChannelId::ChannelIdType
TGCChannelId::getChannelIdType
()
const
{
27
return
m_channelType
;
28
}
29
int
TGCChannelId::getLayer
()
const
{
30
return
m_layer
;
31
}
32
int
TGCChannelId::getBlock
()
const
{
33
return
m_block
;
34
}
35
int
TGCChannelId::getChannel
()
const
{
36
return
m_channel
;
37
}
38
39
int
TGCChannelId::getGasGap
()
const
{
40
if
(
getLayer
() == 0 ||
getLayer
() == 3 ||
getLayer
() == 5 ||
41
getLayer
() == 7) {
42
return
1;
43
}
44
if
(
getLayer
() == 1 ||
getLayer
() == 4 ||
getLayer
() == 6 ||
45
getLayer
() == 8) {
46
return
2;
47
}
48
if
(
getLayer
() == 2 ||
getLayer
() == 9) {
// getLayer() == 9 is only possible for Run 4+
49
return
3;
50
}
51
return
-1;
52
}
53
54
void
TGCChannelId::setChannelIdType
(
ChannelIdType
idtype) {
55
m_channelType
= idtype;
56
}
57
58
void
TGCChannelId::setLayer
(
int
v_layer
) {
59
m_layer
=
v_layer
;
60
if
(
m_layer
>= 0 &&
m_layer
<= 2) {
61
setStation
(
StationType::M1
);
62
}
63
if
(
m_layer
>= 3 &&
m_layer
<= 4) {
64
setStation
(
StationType::M2
);
65
}
66
if
(
m_layer
>= 5 &&
m_layer
<= 6) {
67
setStation
(
StationType::M3
);
68
}
69
if
(
m_layer
>= 7 &&
m_layer
<= 9) {
70
setStation
(
StationType::M4
);
71
if
(
m_sector
!= -1) {
72
m_octant
=
m_sector
/ 3;
73
}
74
}
75
}
76
77
void
TGCChannelId::setBlock
(
int
block) {
78
m_block
= block;
79
}
80
81
void
TGCChannelId::setChannel
(
int
channel) {
82
m_channel
= channel;
83
}
84
85
void
TGCChannelId::setSignalAndLayer
(
TGCId::SignalType
signal,
int
layer) {
86
m_signal
= signal;
87
m_layer
= layer;
88
if
(
m_layer
>= 0 &&
m_layer
<= 2) {
89
setStation
(
StationType::M1
);
90
if
(
m_signal
==
SignalType::Wire
) {
91
m_module
=
ModuleType::WT
;
92
}
else
if
(
m_signal
==
SignalType::Strip
) {
93
m_module
=
ModuleType::ST
;
94
}
95
}
else
if
(
m_layer
>= 3 &&
m_layer
<= 4) {
96
setStation
(
StationType::M2
);
97
if
(
m_signal
==
SignalType::Wire
) {
98
m_module
=
ModuleType::WD
;
99
}
else
if
(
m_signal
==
SignalType::Strip
) {
100
m_module
=
ModuleType::SD
;
101
}
102
}
else
if
(
m_layer
>= 5 &&
m_layer
<= 6) {
103
setStation
(
StationType::M3
);
104
if
(
m_signal
==
SignalType::Wire
) {
105
m_module
=
ModuleType::WD
;
106
}
else
if
(
m_signal
==
SignalType::Strip
) {
107
m_module
=
ModuleType::SD
;
108
}
109
}
else
if
(
m_layer
>= 7 &&
m_layer
<= 9) {
110
setStation
(
StationType::M4
);
111
if
(
m_signal
==
SignalType::Wire
) {
112
m_module
=
ModuleType::WI
;
113
}
else
if
(
m_signal
==
SignalType::Strip
) {
114
m_module
=
ModuleType::SI
;
115
}
116
if
(
m_sector
!= -1) {
117
m_octant
=
m_sector
/ 3;
118
}
119
}
120
}
121
122
bool
TGCChannelId::isBackward
()
const
{
123
if
(
isEndcap
()) {
124
if
(!
isInner
()) {
125
if
(
isAside
()) {
126
return
(
m_sector
% 2 == 1);
127
}
else
{
128
return
(
m_sector
% 2 == 0);
129
}
130
}
else
{
131
// EI
132
// Special case of EI11
133
if
(
m_sector
== 15) {
134
if
(
isAside
()) {
135
return
false
;
136
}
else
{
137
return
true
;
138
}
139
}
else
if
(
m_sector
== 16) {
140
if
(
isAside
()) {
141
return
true
;
142
}
else
{
143
return
false
;
144
}
145
}
else
{
146
// A-m_side phi0 F: phi1 F: phi2 B
147
// C-m_side phi0 B: phi1 B: phi2 F
148
if
(
isAside
()) {
149
return
(
m_sector
% 3 == 2);
150
}
else
{
151
return
(
m_sector
% 3 != 2);
152
}
153
}
154
}
155
}
else
{
156
if
(
isAside
()) {
157
return
true
;
// all Backward
158
}
else
{
159
return
false
;
// all Forward
160
}
161
}
162
}
163
164
}
// namespace MuonTGC_Cabling
v_layer
std::vector< short > v_layer
Definition
LArNoiseBursts.cxx:70
TGCChannelId.h
MuonTGC_Cabling::TGCChannelId::setSignalAndLayer
void setSignalAndLayer(TGCId::SignalType signal, int layer)
Definition
TGCChannelId.cxx:85
MuonTGC_Cabling::TGCChannelId::m_channel
int m_channel
Definition
TGCChannelId.h:62
MuonTGC_Cabling::TGCChannelId::m_layer
int m_layer
Definition
TGCChannelId.h:60
MuonTGC_Cabling::TGCChannelId::ChannelIdType
ChannelIdType
Definition
TGCChannelId.h:19
MuonTGC_Cabling::TGCChannelId::setChannel
virtual void setChannel(int channel)
Definition
TGCChannelId.cxx:81
MuonTGC_Cabling::TGCChannelId::getChannel
int getChannel() const
Definition
TGCChannelId.cxx:35
MuonTGC_Cabling::TGCChannelId::m_block
int m_block
Definition
TGCChannelId.h:61
MuonTGC_Cabling::TGCChannelId::setChannelIdType
void setChannelIdType(ChannelIdType type)
Definition
TGCChannelId.cxx:54
MuonTGC_Cabling::TGCChannelId::setLayer
void setLayer(int layer)
Definition
TGCChannelId.cxx:58
MuonTGC_Cabling::TGCChannelId::getChannelIdType
ChannelIdType getChannelIdType() const
Definition
TGCChannelId.cxx:26
MuonTGC_Cabling::TGCChannelId::operator==
virtual bool operator==(const TGCChannelId &channelId) const
Definition
TGCChannelId.cxx:9
MuonTGC_Cabling::TGCChannelId::m_channelType
ChannelIdType m_channelType
Definition
TGCChannelId.h:59
MuonTGC_Cabling::TGCChannelId::TGCChannelId
TGCChannelId(ChannelIdType type=ChannelIdType::NoChannelIdType)
Definition
TGCChannelId.h:31
MuonTGC_Cabling::TGCChannelId::setBlock
virtual void setBlock(int block)
Definition
TGCChannelId.cxx:77
MuonTGC_Cabling::TGCChannelId::getLayer
int getLayer() const
Definition
TGCChannelId.cxx:29
MuonTGC_Cabling::TGCChannelId::getGasGap
virtual int getGasGap() const
Definition
TGCChannelId.cxx:39
MuonTGC_Cabling::TGCChannelId::isBackward
bool isBackward() const
Definition
TGCChannelId.cxx:122
MuonTGC_Cabling::TGCChannelId::getBlock
int getBlock() const
Definition
TGCChannelId.cxx:32
MuonTGC_Cabling::TGCId::isEndcap
bool isEndcap() const
Definition
TGCId.h:178
MuonTGC_Cabling::TGCId::m_module
ModuleType m_module
Definition
TGCId.h:109
MuonTGC_Cabling::TGCId::m_signal
SignalType m_signal
Definition
TGCId.h:110
MuonTGC_Cabling::TGCId::isAside
bool isAside() const
Definition
TGCId.h:154
MuonTGC_Cabling::TGCId::ModuleType::WI
@ WI
Definition
TGCId.h:53
MuonTGC_Cabling::TGCId::ModuleType::SD
@ SD
Definition
TGCId.h:51
MuonTGC_Cabling::TGCId::ModuleType::WT
@ WT
Definition
TGCId.h:52
MuonTGC_Cabling::TGCId::ModuleType::WD
@ WD
Definition
TGCId.h:51
MuonTGC_Cabling::TGCId::ModuleType::SI
@ SI
Definition
TGCId.h:53
MuonTGC_Cabling::TGCId::ModuleType::ST
@ ST
Definition
TGCId.h:52
MuonTGC_Cabling::TGCId::SignalType
SignalType
Definition
TGCId.h:58
MuonTGC_Cabling::TGCId::SignalType::Strip
@ Strip
Definition
TGCId.h:58
MuonTGC_Cabling::TGCId::SignalType::Wire
@ Wire
Definition
TGCId.h:58
MuonTGC_Cabling::TGCId::m_sector
int m_sector
Definition
TGCId.h:114
MuonTGC_Cabling::TGCId::StationType::M4
@ M4
Definition
TGCId.h:49
MuonTGC_Cabling::TGCId::StationType::M2
@ M2
Definition
TGCId.h:49
MuonTGC_Cabling::TGCId::StationType::M3
@ M3
Definition
TGCId.h:49
MuonTGC_Cabling::TGCId::StationType::M1
@ M1
Definition
TGCId.h:49
MuonTGC_Cabling::TGCId::m_octant
int m_octant
Definition
TGCId.h:113
MuonTGC_Cabling::TGCId::setStation
void setStation(StationType vstation)
Definition
TGCId.cxx:78
MuonTGC_Cabling::TGCId::isInner
bool isInner() const
Definition
TGCId.h:172
MuonTGC_Cabling
Definition
TGCCable.h:12
Generated on
for ATLAS Offline Software by
1.17.0