ATLAS Offline Software
Loading...
Searching...
No Matches
TGCChannelId.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7namespace MuonTGC_Cabling {
8
9bool TGCChannelId::operator ==(const TGCChannelId& channelId) const
10{
11 if((this->getChannelIdType()==channelId.getChannelIdType())&&
12 (this->getSideType() ==channelId.getSideType()) &&
13 (this->getRegionType() ==channelId.getRegionType()) &&
14 (this->getSignalType() ==channelId.getSignalType()) &&
15 (this->getModuleType() ==channelId.getModuleType()) &&
16 (this->getSector() ==channelId.getSector()) &&
17 (this->getLayer() ==channelId.getLayer()) &&
18 (this->getChamber() ==channelId.getChamber()) &&
19 (this->getId() ==channelId.getId()) &&
20 (this->getBlock() ==channelId.getBlock()) &&
21 (this->getChannel() ==channelId.getChannel()) )
22 return true;
23 return false;
24}
25
27int TGCChannelId::getLayer() const { return m_layer; }
28int TGCChannelId::getBlock() const { return m_block; }
29int TGCChannelId::getChannel() const { return m_channel; }
30
32 if(getLayer()==0||getLayer()==3||getLayer()==5||getLayer()==7)
33 return 1;
34 if(getLayer()==1||getLayer()==4||getLayer()==6||getLayer()==8)
35 return 2;
36 if(getLayer()==2)
37 return 3;
38 return -1;
39}
40
44
47 if(m_layer>=0&&m_layer<=2){
49 setStation(0);
50 }
51 if(m_layer>=3&&m_layer<=4){
53 setStation(1);
54 }
55 if(m_layer>=5&&m_layer<=6){
57 setStation(2);
58 }
59 if(m_layer>=7&&m_layer<=8){
61 setStation(3);
62 if(m_sector!=-1)
64 }
65}
66
67void TGCChannelId::setBlock(int block) {
68 m_block = block;
69}
70
71void TGCChannelId::setChannel(int channel) {
72 m_channel = channel;
73}
74
75
77 if (isEndcap()){
78 if ( !isInner() ) {
79 if(isAside()) return (m_sector%2==1);
80 else return (m_sector%2==0);
81 } else {
82 // EI
83 // Special case of EI11
84 if (m_sector == 15) {
85 if(isAside()) return false;
86 else return true;
87 } else if (m_sector == 16) {
88 if(isAside()) return true;
89 else return false;
90 } else {
91 // A-m_side phi0 F: phi1 F: phi2 B
92 // C-m_side phi0 B: phi1 B: phi2 F
93 if(isAside()) return (m_sector%3==2);
94 else return (m_sector%3!=2);
95 }
96 }
97 } else {
98 if(isAside()) return true; // all Backward
99 else return false; // all Forward
100 }
101}
102
103
104} //end of namespace
std::vector< short > v_layer
virtual void setChannel(int channel)
void setChannelIdType(ChannelIdType type)
ChannelIdType getChannelIdType() const
virtual bool operator==(const TGCChannelId &channelId) const
TGCChannelId(ChannelIdType type=ChannelIdType::NoChannelIdType)
virtual void setBlock(int block)
virtual int getGasGap() const
bool isEndcap() const
Definition TGCId.h:141
bool isAside() const
Definition TGCId.h:133
virtual void setStation(int vstation)
Definition TGCId.cxx:87
bool isInner() const
Definition TGCId.h:139
void setMultipletType(MultipletType multiplet)
Definition TGCId.cxx:77