ATLAS Offline Software
Loading...
Searching...
No Matches
TGCId.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 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:
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
66
67 IdType getIdType() const;
68 SideType getSideType() const;
73
74 int getSectorInReadout() const;
75
76 virtual int getSectorInOctant() const;
77 virtual int getSectorModule() const;
78
79 int getStation() const;
80 int getOctant() const;
81 virtual int getSector() const;
82 int getChamber() const;
83 int getId() const;
84 int getBlock() const;
85
86 bool isAside() const;
87 bool isCside() const;
88 bool isStrip() const;
89 bool isWire() const;
90 bool isTriplet() const;
91 bool isDoublet() const;
92 bool isInner() const;
93 bool isForward() const;
94 bool isEndcap() const;
95
96 public:
97 void setSideType(SideType side);
98 void setModuleType(ModuleType module);
99 void setSignalType(SignalType signal);
100 void setMultipletType(MultipletType multiplet);
101 void setRegionType(RegionType region);
102
103 virtual void setStation(int vstation);
104 virtual void setOctant(int voctant);
105 virtual void setSector(int vsector);
106 virtual void setChamber(int chamber);
107 void setId(int id);
108
109 protected:
110 void setIdType(IdType idtype);
111 void setReadoutSector(int sector);
112 void setSectorModule(int sectorModule);
113
114 protected:
120
121 int m_station{-1};
122 int m_octant{-1};
123 int m_sector{-1};
124 int m_chamber{-1};
125 int m_id{-1};
126
127 private:
129};
130
132 return m_idType;
133}
135 return m_side;
136}
138 return m_module;
139}
141 return m_signal;
142}
147 return m_region;
148}
149
150inline int TGCId::getStation() const {
151 return m_station;
152}
153inline int TGCId::getOctant() const {
154 return m_octant;
155}
156inline int TGCId::getSector() const {
157 return m_sector;
158}
159inline int TGCId::getChamber() const {
160 return m_chamber;
161}
162inline int TGCId::getId() const {
163 return m_id;
164}
165
166inline bool TGCId::isAside() const {
167 return (m_side == Aside);
168}
169inline bool TGCId::isCside() const {
170 return (m_side == Cside);
171}
172inline bool TGCId::isStrip() const {
173 return (m_signal == Strip);
174}
175inline bool TGCId::isWire() const {
176 return (m_signal == Wire);
177}
178inline bool TGCId::isTriplet() const {
179 return (m_multiplet == Triplet);
180}
181inline bool TGCId::isDoublet() const {
182 return (m_multiplet == Doublet);
183}
184inline bool TGCId::isInner() const {
185 return (m_multiplet == Inner);
186}
187inline bool TGCId::isForward() const {
188 return (m_region == Forward);
189}
190inline bool TGCId::isEndcap() const {
191 return (m_region == Endcap);
192}
193
194inline void TGCId::setSideType(SideType side) {
195 m_side = side;
196}
197
198inline void TGCId::setRegionType(RegionType region) {
199 m_region = region;
200}
201
202inline void TGCId::setChamber(int chamber) {
203 m_chamber = chamber;
204}
205
206inline void TGCId::setId(int id) {
207 m_id = id;
208}
209
210inline void TGCId::setIdType(IdType idtype) {
211 m_idType = idtype;
212}
213
214} // namespace MuonTGC_Cabling
215
216#endif
void setSideType(SideType side)
Definition TGCId.h:194
static constexpr int NUM_STATIONS
in ChannelId
Definition TGCId.h:37
bool isEndcap() const
Definition TGCId.h:190
int getOctant() const
Definition TGCId.h:153
virtual bool isValid() const
Definition TGCId.h:18
bool isTriplet() const
Definition TGCId.h:178
bool isDoublet() const
Definition TGCId.h:181
ModuleType m_module
Definition TGCId.h:116
SignalType m_signal
Definition TGCId.h:117
bool isAside() const
Definition TGCId.h:166
bool isForward() const
Definition TGCId.h:187
RegionType m_region
Definition TGCId.h:119
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:198
void setSectorModule(int sectorModule)
Definition TGCId.cxx:170
int getSectorInReadout() const
Definition TGCId.cxx:26
ModuleType getModuleType() const
Definition TGCId.h:137
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:159
void setIdType(IdType idtype)
Definition TGCId.h:210
virtual void setStation(int vstation)
Definition TGCId.cxx:111
void setId(int id)
Definition TGCId.h:206
bool isCside() const
Definition TGCId.h:169
bool isStrip() const
Definition TGCId.h:172
void setReadoutSector(int sector)
int getStation() const
Definition TGCId.h:150
RegionType getRegionType() const
Definition TGCId.h:146
MultipletType m_multiplet
Definition TGCId.h:118
static constexpr int N_RODS
Definition TGCId.h:44
bool isWire() const
Definition TGCId.h:175
virtual int getSector() const
Definition TGCId.h:156
IdType getIdType() const
Definition TGCId.h:131
void setSignalType(SignalType signal)
Definition TGCId.cxx:67
MultipletType getMultipletType() const
Definition TGCId.h:143
virtual void setSector(int vsector)
Definition TGCId.cxx:127
SideType getSideType() const
Definition TGCId.h:134
bool isInner() const
Definition TGCId.h:184
virtual int getSectorInOctant() const
Definition TGCId.cxx:13
static constexpr int NUM_OCTANT
Definition TGCId.h:40
SignalType getSignalType() const
Definition TGCId.h:140
int getId() const
Definition TGCId.h:162
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:202
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