ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCablings
MuonTGC_Cabling
src
TGCChannelASDIn.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/TGCChannelASDIn.h
"
6
7
namespace
MuonTGC_Cabling
{
8
9
// Constructor
10
TGCChannelASDIn::TGCChannelASDIn
(
TGCId::SideType
vside,
11
TGCId::SignalType
vsignal,
12
TGCId::RegionType
vregion,
int
vsector,
13
int
vlayer,
int
vchamber,
int
vchannel)
14
:
TGCChannelId
(
TGCChannelId
::
ChannelIdType
::ASDIn) {
15
setSideType
(vside);
// SideType
16
setRegionType
(vregion);
// RegionType
17
setSignalAndLayer
(vsignal, vlayer);
// SignalType as well as Layer (to define station,Module)
18
TGCChannelASDIn::setSector
(vsector);
19
setChamber
(vchamber);
20
setChannel
(vchannel);
21
}
22
23
void
TGCChannelASDIn::setSector
(
int
sector) {
24
if
(
isEndcap
() && !
isInner
()) {
25
TGCId::setSector
((sector + 1) %
TGCId::NUM_ENDCAP_SECTOR
);
26
}
else
{
27
TGCId::setSector
(sector %
TGCId::NUM_FORWARD_SECTOR
);
28
}
29
}
30
31
int
TGCChannelASDIn::getSector
()
const
{
32
int
sector;
33
if
(
isEndcap
() && !
isInner
()) {
34
sector =
TGCId::getSector
() - 1;
35
if
(sector <= 0) {
36
sector +=
TGCId::NUM_ENDCAP_SECTOR
;
37
}
38
}
else
{
39
sector =
TGCId::getSector
();
40
if
(sector <= 0) {
41
sector +=
TGCId::NUM_FORWARD_SECTOR
;
42
}
43
}
44
45
return
sector;
46
}
47
48
bool
TGCChannelASDIn::isValid
()
const
{
49
if
((
getSideType
() <
TGCId::SideType::MaxSideType
) &&
50
(
getSignalType
() <
TGCId::SignalType::MaxSignalType
) &&
51
(
getRegionType
() <
TGCId::RegionType::MaxRegionType
) &&
52
(
getOctant
() >= 0) && (
getOctant
() < 8) &&
53
(
getLayer
() >= 0) && (
getChamber
() >= 0) &&
54
(
getChannel
() >= 0)) {
55
return
true
;
56
}
57
return
false
;
58
}
59
60
}
// namespace MuonTGC_Cabling
TGCChannelASDIn.h
MuonTGC_Cabling::TGCChannelASDIn::isValid
virtual bool isValid() const override
Definition
TGCChannelASDIn.cxx:48
MuonTGC_Cabling::TGCChannelASDIn::TGCChannelASDIn
TGCChannelASDIn(TGCId::SideType side, TGCId::SignalType signal, TGCId::RegionType region, int sector, int layer, int chamber, int channel)
Definition
TGCChannelASDIn.cxx:10
MuonTGC_Cabling::TGCChannelASDIn::getSector
virtual int getSector() const override
Definition
TGCChannelASDIn.cxx:31
MuonTGC_Cabling::TGCChannelASDIn::setSector
virtual void setSector(int sector) override
Definition
TGCChannelASDIn.cxx:23
MuonTGC_Cabling::TGCChannelId::setSignalAndLayer
void setSignalAndLayer(TGCId::SignalType signal, int layer)
Definition
TGCChannelId.cxx:85
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::TGCChannelId
TGCChannelId(ChannelIdType type=ChannelIdType::NoChannelIdType)
Definition
TGCChannelId.h:31
MuonTGC_Cabling::TGCChannelId::getLayer
int getLayer() const
Definition
TGCChannelId.cxx:29
MuonTGC_Cabling::TGCId::setSideType
void setSideType(SideType side)
Definition
TGCId.h:182
MuonTGC_Cabling::TGCId::isEndcap
bool isEndcap() const
Definition
TGCId.h:178
MuonTGC_Cabling::TGCId::getOctant
int getOctant() const
Definition
TGCId.h:141
MuonTGC_Cabling::TGCId::setRegionType
void setRegionType(RegionType region)
Definition
TGCId.h:186
MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR
static constexpr int NUM_ENDCAP_SECTOR
Definition
TGCId.h:43
MuonTGC_Cabling::TGCId::getChamber
int getChamber() const
Definition
TGCId.h:147
MuonTGC_Cabling::TGCId::SignalType
SignalType
Definition
TGCId.h:58
MuonTGC_Cabling::TGCId::SignalType::MaxSignalType
@ MaxSignalType
Definition
TGCId.h:58
MuonTGC_Cabling::TGCId::getRegionType
RegionType getRegionType() const
Definition
TGCId.h:137
MuonTGC_Cabling::TGCId::getSector
virtual int getSector() const
Definition
TGCId.h:144
MuonTGC_Cabling::TGCId::RegionType
RegionType
Definition
TGCId.h:59
MuonTGC_Cabling::TGCId::RegionType::MaxRegionType
@ MaxRegionType
Definition
TGCId.h:59
MuonTGC_Cabling::TGCId::setSector
virtual void setSector(int vsector)
Definition
TGCId.cxx:82
MuonTGC_Cabling::TGCId::getSideType
SideType getSideType() const
Definition
TGCId.h:125
MuonTGC_Cabling::TGCId::isInner
bool isInner() const
Definition
TGCId.h:172
MuonTGC_Cabling::TGCId::getSignalType
SignalType getSignalType() const
Definition
TGCId.h:134
MuonTGC_Cabling::TGCId::SideType
SideType
Definition
TGCId.h:48
MuonTGC_Cabling::TGCId::SideType::MaxSideType
@ MaxSideType
Definition
TGCId.h:48
MuonTGC_Cabling::TGCId::setChamber
virtual void setChamber(int chamber)
Definition
TGCId.h:190
MuonTGC_Cabling::TGCId::NUM_FORWARD_SECTOR
static constexpr int NUM_FORWARD_SECTOR
Definition
TGCId.h:44
MuonTGC_Cabling
Definition
TGCCable.h:12
Generated on
for ATLAS Offline Software by
1.17.0