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 = 9; // [0..2]:M1, [3..4]:M2, [5..6]:M3, [7..8]:M4(Inner)
39 static constexpr int NUM_OCTANT = 8;
40 static constexpr int NUM_ENDCAP_SECTOR = 48;
41 static constexpr int NUM_FORWARD_SECTOR = 24;
42 static constexpr int NUM_INNER_SECTOR = 24;
43 static constexpr int N_RODS = 12;
44
55
56 IdType getIdType (void) const;
57 SideType getSideType (void) const;
58 ModuleType getModuleType (void) const;
59 SignalType getSignalType (void) const;
61 RegionType getRegionType (void) const;
62
63 int getSectorInReadout(void) const;
64
65 virtual int getSectorInOctant() const;
66 virtual int getSectorModule() const;
67
68 int getStation() const;
69 int getOctant() const;
70 virtual int getSector() const;
71 int getChamber() const;
72 int getId() const;
73 int getBlock() const;
74
75 bool isAside() const;
76 bool isCside() const;
77 bool isStrip() const;
78 bool isWire() const;
79 bool isTriplet() const;
80 bool isDoublet() const;
81 bool isInner() const;
82 bool isForward() const;
83 bool isEndcap() const;
84
85 public:
86 void setSideType(SideType side);
87 void setModuleType(ModuleType module);
88 void setSignalType(SignalType signal);
89 void setMultipletType(MultipletType multiplet);
90 void setRegionType(RegionType region);
91
92 virtual void setStation (int vstation);
93 virtual void setOctant (int voctant);
94 virtual void setSector (int vsector);
95 virtual void setChamber(int chamber);
96 void setId(int id);
97
98 protected:
99 void setIdType(IdType idtype);
100 void setReadoutSector(int sector);
101 void setSectorModule(int sectorModule);
102
103 protected:
109
110 int m_station{-1};
111 int m_octant{-1};
112 int m_sector{-1};
113 int m_chamber{-1};
114 int m_id{-1};
115
116 private:
118};
119
120inline TGCId::IdType TGCId::getIdType() const { return m_idType; }
121inline TGCId::SideType TGCId::getSideType() const { return m_side; }
126
127inline int TGCId::getStation() const { return m_station; }
128inline int TGCId::getOctant() const { return m_octant; }
129inline int TGCId::getSector() const { return m_sector; }
130inline int TGCId::getChamber() const { return m_chamber; }
131inline int TGCId::getId() const { return m_id; }
132
133inline bool TGCId::isAside() const { return (m_side == Aside); }
134inline bool TGCId::isCside() const { return (m_side == Cside); }
135inline bool TGCId::isStrip() const { return (m_signal == Strip); }
136inline bool TGCId::isWire() const { return (m_signal == Wire); }
137inline bool TGCId::isTriplet() const { return (m_multiplet == Triplet); }
138inline bool TGCId::isDoublet() const { return (m_multiplet == Doublet); }
139inline bool TGCId::isInner() const { return (m_multiplet == Inner); }
140inline bool TGCId::isForward() const { return (m_region == Forward); }
141inline bool TGCId::isEndcap() const { return (m_region == Endcap); }
142
143inline void TGCId::setSideType(SideType side) {
144 m_side = side;
145}
146
147inline void TGCId::setRegionType(RegionType region) {
148 m_region = region;
149}
150
151inline void TGCId::setChamber(int chamber) {
152 m_chamber = chamber;
153}
154
155inline void TGCId::setId(int id) {
156 m_id = id;
157}
158
159inline void TGCId::setIdType(IdType idtype) {
160 m_idType = idtype;
161}
162
163} // end of namespace
164
165#endif
void setSideType(SideType side)
Definition TGCId.h:143
static constexpr int NUM_STATIONS
in ChannelId
Definition TGCId.h:37
bool isEndcap() const
Definition TGCId.h:141
int getOctant() const
Definition TGCId.h:128
virtual bool isValid() const
Definition TGCId.h:18
bool isTriplet() const
Definition TGCId.h:137
bool isDoublet() const
Definition TGCId.h:138
ModuleType m_module
Definition TGCId.h:105
SignalType m_signal
Definition TGCId.h:106
bool isAside() const
Definition TGCId.h:133
bool isForward() const
Definition TGCId.h:140
RegionType m_region
Definition TGCId.h:108
virtual int getSectorModule() const
Definition TGCId.cxx:112
static constexpr int NUM_INNER_SECTOR
Definition TGCId.h:42
void setRegionType(RegionType region)
Definition TGCId.h:147
ModuleType getModuleType(void) const
Definition TGCId.h:122
void setSectorModule(int sectorModule)
Definition TGCId.cxx:132
virtual void setOctant(int voctant)
Definition TGCId.cxx:108
static constexpr int NUM_ENDCAP_SECTOR
Definition TGCId.h:40
int getChamber() const
Definition TGCId.h:130
void setIdType(IdType idtype)
Definition TGCId.h:159
RegionType getRegionType(void) const
Definition TGCId.h:125
virtual void setStation(int vstation)
Definition TGCId.cxx:87
void setId(int id)
Definition TGCId.h:155
bool isCside() const
Definition TGCId.h:134
bool isStrip() const
Definition TGCId.h:135
void setReadoutSector(int sector)
int getStation() const
Definition TGCId.h:127
SignalType getSignalType(void) const
Definition TGCId.h:123
MultipletType m_multiplet
Definition TGCId.h:107
static constexpr int N_RODS
Definition TGCId.h:43
bool isWire() const
Definition TGCId.h:136
virtual int getSector() const
Definition TGCId.h:129
void setSignalType(SignalType signal)
Definition TGCId.cxx:67
int getSectorInReadout(void) const
Definition TGCId.cxx:26
virtual void setSector(int vsector)
Definition TGCId.cxx:95
MultipletType getMultipletType(void) const
Definition TGCId.h:124
IdType getIdType(void) const
Definition TGCId.h:120
bool isInner() const
Definition TGCId.h:139
virtual int getSectorInOctant() const
Definition TGCId.cxx:13
static constexpr int NUM_OCTANT
Definition TGCId.h:39
SideType getSideType(void) const
Definition TGCId.h:121
int getId() const
Definition TGCId.h:131
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:151
static constexpr int NUM_LAYERS
Definition TGCId.h:38
void setMultipletType(MultipletType multiplet)
Definition TGCId.cxx:77
static constexpr int NUM_FORWARD_SECTOR
Definition TGCId.h:41