ATLAS Offline Software
Loading...
Searching...
No Matches
TGCId.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONTGC_CABLING_TGCID_H
6#define MUONTGC_CABLING_TGCID_H
7
8namespace MuonTGC_Cabling {
9
10class TGCId {
11 public:
12 enum class IdType { NoIdType, Channel, Module };
13
14 public:
16 virtual ~TGCId() = default;
17
18 virtual bool isValid() const { return true; }
19
20 public:
21 // <internal numbering scheme>
22 // 1. IdType
23 // 2. IdIndex
24 // int station [0..3]
25 // int sectorRO [0..11]
26 // int srod [0..2]
27 // int octant [0..7]
28 // int sector [0..47],[0..23]
29 // int chamber [0..n]
30 // int id [0..n]
31 //
33 // int layer [0..8]
34 // int block [0..n]
35 // int channel [0..n]
36
37 static constexpr int NUM_STATIONS = 4;
38 static constexpr int NUM_LAYERS =
39 9; // [0..2]:M1, [3..4]:M2, [5..6]:M3, [7..8]:M4(Inner)
40 static constexpr int NUM_OCTANT = 8;
41 static constexpr int NUM_ENDCAP_SECTOR = 48;
42 static constexpr int NUM_FORWARD_SECTOR = 24;
43 static constexpr int NUM_INNER_SECTOR = 24;
44 static constexpr int N_RODS = 12;
45
47 enum class StationType { NoStationType, M1, M2, M3, M4 };
67
68 IdType getIdType() const;
69 SideType getSideType() const;
70 StationType getStation() const;
75
76 int getSectorInReadout() const;
77
78 virtual int getSectorInOctant() const;
79 virtual int getSectorModule() const;
80
81 int getOctant() const;
82 virtual int getSector() const;
83 int getChamber() const;
84 int getId() const;
85 int getBlock() const;
86
87 bool isAside() const;
88 bool isCside() const;
89 bool isStrip() const;
90 bool isWire() const;
91 bool isTriplet() const;
92 bool isDoublet() const;
93 bool isInner() const;
94 bool isForward() const;
95 bool isEndcap() const;
96
97 public:
98 void setSideType(SideType side);
99 virtual void setStation(StationType vstation);
100 void setModuleType(ModuleType module);
101 void setSignalType(SignalType signal);
102 void setMultipletType(MultipletType multiplet);
103 void setRegionType(RegionType region);
104
105 virtual void setOctant(int voctant);
106 virtual void setSector(int vsector);
107 virtual void setChamber(int chamber);
108 void setId(int id);
109
110 protected:
111 void setIdType(IdType idtype);
112 void setReadoutSector(int sector);
113 void setSectorModule(int sectorModule);
114
115 protected:
122
123 int m_octant{-1};
124 int m_sector{-1};
125 int m_chamber{-1};
126 int m_id{-1};
127
128 private:
130};
131
133 return m_idType;
134}
136 return m_side;
137}
139 return m_station;
140}
142 return m_module;
143}
145 return m_signal;
146}
151 return m_region;
152}
153
154inline int TGCId::getOctant() const {
155 return m_octant;
156}
157inline int TGCId::getSector() const {
158 return m_sector;
159}
160inline int TGCId::getChamber() const {
161 return m_chamber;
162}
163inline int TGCId::getId() const {
164 return m_id;
165}
166
167inline bool TGCId::isAside() const {
168 return (m_side == Aside);
169}
170inline bool TGCId::isCside() const {
171 return (m_side == Cside);
172}
173inline bool TGCId::isStrip() const {
174 return (m_signal == Strip);
175}
176inline bool TGCId::isWire() const {
177 return (m_signal == Wire);
178}
179inline bool TGCId::isTriplet() const {
180 return (m_multiplet == Triplet);
181}
182inline bool TGCId::isDoublet() const {
183 return (m_multiplet == Doublet);
184}
185inline bool TGCId::isInner() const {
186 return (m_multiplet == Inner);
187}
188inline bool TGCId::isForward() const {
189 return (m_region == Forward);
190}
191inline bool TGCId::isEndcap() const {
192 return (m_region == Endcap);
193}
194
195inline void TGCId::setSideType(SideType side) {
196 m_side = side;
197}
198
199inline void TGCId::setRegionType(RegionType region) {
200 m_region = region;
201}
202
203inline void TGCId::setChamber(int chamber) {
204 m_chamber = chamber;
205}
206
207inline void TGCId::setId(int id) {
208 m_id = id;
209}
210
211inline void TGCId::setIdType(IdType idtype) {
212 m_idType = idtype;
213}
214
215} // namespace MuonTGC_Cabling
216
217#endif
void setSideType(SideType side)
Definition TGCId.h:195
static constexpr int NUM_STATIONS
in ChannelId
Definition TGCId.h:37
StationType getStation() const
Definition TGCId.h:138
bool isEndcap() const
Definition TGCId.h:191
int getOctant() const
Definition TGCId.h:154
virtual bool isValid() const
Definition TGCId.h:18
bool isTriplet() const
Definition TGCId.h:179
bool isDoublet() const
Definition TGCId.h:182
ModuleType m_module
Definition TGCId.h:118
SignalType m_signal
Definition TGCId.h:119
bool isAside() const
Definition TGCId.h:167
bool isForward() const
Definition TGCId.h:188
RegionType m_region
Definition TGCId.h:121
virtual int getSectorModule() const
Definition TGCId.cxx:144
static constexpr int NUM_INNER_SECTOR
Definition TGCId.h:43
void setRegionType(RegionType region)
Definition TGCId.h:199
void setSectorModule(int sectorModule)
Definition TGCId.cxx:170
int getSectorInReadout() const
Definition TGCId.cxx:26
ModuleType getModuleType() const
Definition TGCId.h:141
virtual void setOctant(int voctant)
Definition TGCId.cxx:140
static constexpr int NUM_ENDCAP_SECTOR
Definition TGCId.h:41
int getChamber() const
Definition TGCId.h:160
void setIdType(IdType idtype)
Definition TGCId.h:211
void setId(int id)
Definition TGCId.h:207
bool isCside() const
Definition TGCId.h:170
bool isStrip() const
Definition TGCId.h:173
void setReadoutSector(int sector)
RegionType getRegionType() const
Definition TGCId.h:150
MultipletType m_multiplet
Definition TGCId.h:120
static constexpr int N_RODS
Definition TGCId.h:44
bool isWire() const
Definition TGCId.h:176
virtual int getSector() const
Definition TGCId.h:157
IdType getIdType() const
Definition TGCId.h:132
void setSignalType(SignalType signal)
Definition TGCId.cxx:67
virtual void setStation(StationType vstation)
Definition TGCId.cxx:111
MultipletType getMultipletType() const
Definition TGCId.h:147
virtual void setSector(int vsector)
Definition TGCId.cxx:127
StationType m_station
Definition TGCId.h:117
SideType getSideType() const
Definition TGCId.h:135
bool isInner() const
Definition TGCId.h:185
virtual int getSectorInOctant() const
Definition TGCId.cxx:13
static constexpr int NUM_OCTANT
Definition TGCId.h:40
SignalType getSignalType() const
Definition TGCId.h:144
int getId() const
Definition TGCId.h:163
virtual ~TGCId()=default
void setModuleType(ModuleType module)
Definition TGCId.cxx:39
TGCId(IdType vtype=IdType::NoIdType)
Definition TGCId.cxx:9
virtual void setChamber(int chamber)
Definition TGCId.h:203
static constexpr int NUM_LAYERS
Definition TGCId.h:38
void setMultipletType(MultipletType multiplet)
Definition TGCId.cxx:89
static constexpr int NUM_FORWARD_SECTOR
Definition TGCId.h:42