ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTGC_Cabling::TGCId Class Reference

#include <TGCId.h>

Inheritance diagram for MuonTGC_Cabling::TGCId:
Collaboration diagram for MuonTGC_Cabling::TGCId:

Public Types

enum class  IdType { NoIdType , Channel , Module }
enum class  SideType : int { Aside = 0 , Cside = 1 , MaxSideType = 2 , Undefined = 99 }
enum class  StationType : int {
  M1 = 0 , M2 = 1 , M3 = 2 , M4 = 3 ,
  MaxStationType = 4 , Undefined = 99
}
enum class  ModuleType : int {
  WD = 0 , SD = 1 , WT = 2 , ST = 3 ,
  WI = 4 , SI = 5 , MaxModuleType = 6 , SL_SLB = 6 ,
  Undefined = 99
}
enum class  SignalType : int { Wire = 0 , Strip = 1 , MaxSignalType = 2 , Undefined = 99 }
enum class  RegionType : int { Endcap = 0 , Forward = 1 , MaxRegionType = 2 , Undefined = 99 }

Public Member Functions

 TGCId (IdType vtype=IdType::NoIdType)
virtual ~TGCId ()=default
virtual bool isValid () const
IdType getIdType () const
SideType getSideType () const
StationType getStation () const
ModuleType getModuleType () const
SignalType getSignalType () const
RegionType getRegionType () const
int getSectorInReadout () const
virtual int getSectorInOctant () const
virtual int getSectorModule () const
int getOctant () const
virtual int getSector () const
int getChamber () const
int getId () const
int getBlock () const
bool isAside () const
bool isCside () const
bool isStrip () const
bool isWire () const
bool isTriplet () const
bool isDoublet () const
bool isInner () const
bool isForward () const
bool isEndcap () const
void setSideType (SideType side)
void setStation (StationType vstation)
virtual void setModuleType (ModuleType module)
void setSignalType (SignalType signal)
void setRegionType (RegionType region)
virtual void setOctant (int voctant)
virtual void setSector (int vsector)
virtual void setChamber (int chamber)
void setId (int id)

Static Public Attributes

static constexpr int NUM_LAYERS
 in ChannelId
static constexpr int NUM_OCTANT = 8
static constexpr int NUM_ENDCAP_SECTOR = 48
static constexpr int NUM_FORWARD_SECTOR = 24
static constexpr int NUM_INNER_SECTOR = 24
static constexpr int N_RODS = 12

Protected Member Functions

void setIdType (IdType idtype)
void setReadoutSector (int sector)
void setSectorModule (int sectorModule)

Protected Attributes

SideType m_side {SideType::Undefined}
StationType m_station {StationType::Undefined}
ModuleType m_module {ModuleType::Undefined}
SignalType m_signal {SignalType::Undefined}
RegionType m_region {RegionType::Undefined}
int m_octant {-1}
int m_sector {-1}
int m_chamber {-1}
int m_id {-1}

Private Attributes

IdType m_idType {IdType::NoIdType}

Detailed Description

Definition at line 13 of file TGCId.h.

Member Enumeration Documentation

◆ IdType

enum class MuonTGC_Cabling::TGCId::IdType
strong
Enumerator
NoIdType 
Channel 
Module 

Definition at line 15 of file TGCId.h.

15{ NoIdType, Channel, Module };
Identifier32::value_type Channel

◆ ModuleType

enum class MuonTGC_Cabling::TGCId::ModuleType : int
strong
Enumerator
WD 
SD 
WT 
ST 
WI 
SI 
MaxModuleType 
SL_SLB 
Undefined 

Definition at line 51 of file TGCId.h.

51 : int { WD = 0, SD = 1,
52 WT = 2, ST = 3,
53 WI = 4, SI = 5,
54 MaxModuleType = 6,
55 SL_SLB = 6, // SL SLB module, not used in TGCId but in TGCModuleSLB
56 Undefined = 99
57 };
@ Undefined

◆ RegionType

enum class MuonTGC_Cabling::TGCId::RegionType : int
strong
Enumerator
Endcap 
Forward 
MaxRegionType 
Undefined 

Definition at line 59 of file TGCId.h.

59: int { Endcap = 0, Forward = 1, MaxRegionType = 2, Undefined = 99 };
@ Endcap
Definition DetType.h:14

◆ SideType

enum class MuonTGC_Cabling::TGCId::SideType : int
strong
Enumerator
Aside 
Cside 
MaxSideType 
Undefined 

Definition at line 48 of file TGCId.h.

48: int { Aside = 0, Cside = 1, MaxSideType = 2, Undefined = 99 };

◆ SignalType

enum class MuonTGC_Cabling::TGCId::SignalType : int
strong
Enumerator
Wire 
Strip 
MaxSignalType 
Undefined 

Definition at line 58 of file TGCId.h.

58: int { Wire = 0, Strip = 1, MaxSignalType = 2, Undefined = 99 };

◆ StationType

enum class MuonTGC_Cabling::TGCId::StationType : int
strong
Enumerator
M1 
M2 
M3 
M4 
MaxStationType 
Undefined 

Definition at line 49 of file TGCId.h.

49 : int { M1 = 0, M2 = 1, M3 = 2, M4 = 3, // M3 is also used for M2/M3 SLB
50 MaxStationType = 4, Undefined = 99 };

Constructor & Destructor Documentation

◆ TGCId()

MuonTGC_Cabling::TGCId::TGCId ( TGCId::IdType vtype = IdType::NoIdType)

Definition at line 9 of file TGCId.cxx.

9 {
10 m_idType = vtype;
11}

◆ ~TGCId()

virtual MuonTGC_Cabling::TGCId::~TGCId ( )
virtualdefault

Member Function Documentation

◆ getBlock()

int MuonTGC_Cabling::TGCId::getBlock ( ) const

◆ getChamber()

int MuonTGC_Cabling::TGCId::getChamber ( ) const
inline

Definition at line 147 of file TGCId.h.

147 {
148 return m_chamber;
149}

◆ getId()

int MuonTGC_Cabling::TGCId::getId ( ) const
inline

Definition at line 150 of file TGCId.h.

150 {
151 return m_id;
152}

◆ getIdType()

TGCId::IdType MuonTGC_Cabling::TGCId::getIdType ( ) const
inline

Definition at line 122 of file TGCId.h.

122 {
123 return m_idType;
124}

◆ getModuleType()

TGCId::ModuleType MuonTGC_Cabling::TGCId::getModuleType ( ) const
inline

Definition at line 131 of file TGCId.h.

131 {
132 return m_module;
133}
ModuleType m_module
Definition TGCId.h:109

◆ getOctant()

int MuonTGC_Cabling::TGCId::getOctant ( ) const
inline

Definition at line 141 of file TGCId.h.

141 {
142 return m_octant;
143}

◆ getRegionType()

TGCId::RegionType MuonTGC_Cabling::TGCId::getRegionType ( ) const
inline

Definition at line 137 of file TGCId.h.

137 {
138 return m_region;
139}
RegionType m_region
Definition TGCId.h:111

◆ getSector()

int MuonTGC_Cabling::TGCId::getSector ( ) const
inlinevirtual

Reimplemented in MuonTGC_Cabling::TGCChannelASDIn.

Definition at line 144 of file TGCId.h.

144 {
145 return m_sector;
146}

◆ getSectorInOctant()

int MuonTGC_Cabling::TGCId::getSectorInOctant ( ) const
virtual

Definition at line 13 of file TGCId.cxx.

13 {
14 if (isInner()) {
16 }
17 if (isEndcap()) {
19 }
20 if (isForward()) {
22 }
23 return -1;
24}
bool isEndcap() const
Definition TGCId.h:178
bool isForward() const
Definition TGCId.h:175
static constexpr int NUM_INNER_SECTOR
Definition TGCId.h:45
static constexpr int NUM_ENDCAP_SECTOR
Definition TGCId.h:43
virtual int getSector() const
Definition TGCId.h:144
bool isInner() const
Definition TGCId.h:172
static constexpr int NUM_OCTANT
Definition TGCId.h:42
static constexpr int NUM_FORWARD_SECTOR
Definition TGCId.h:44

◆ getSectorInReadout()

int MuonTGC_Cabling::TGCId::getSectorInReadout ( ) const

Definition at line 26 of file TGCId.cxx.

26 {
27 if (isInner()) {
28 return getSector() % (NUM_INNER_SECTOR / N_RODS);
29 }
30 if (isEndcap()) {
31 return getSector() % (NUM_ENDCAP_SECTOR / N_RODS);
32 }
33 if (isForward()) {
34 return getSector() % (NUM_FORWARD_SECTOR / N_RODS);
35 }
36 return -1;
37}
static constexpr int N_RODS
Definition TGCId.h:46

◆ getSectorModule()

int MuonTGC_Cabling::TGCId::getSectorModule ( ) const
virtual

Definition at line 99 of file TGCId.cxx.

99 {
100 if (m_sector == -1) {
101 return -1;
102 }
103
104 static const int moduleEndcap[6] = {0, 1, 3, 4, 6, 7};
105 static const int moduleForward[3] = {2, 5, 8};
106 static const int moduleEI[3] = {9, 10, 11};
107 static const int moduleFI[3] = {12, 13, 14};
108
109 if (isEndcap()) {
110 if (isInner()) {
111 return moduleEI[getSectorInOctant()];
112 }
113 return moduleEndcap[getSectorInOctant()];
114 }
115 if (isForward()) {
116 if (isInner()) {
117 return moduleFI[getSectorInOctant()];
118 }
119 return moduleForward[getSectorInOctant()];
120 }
121 return -1;
122}
virtual int getSectorInOctant() const
Definition TGCId.cxx:13

◆ getSideType()

TGCId::SideType MuonTGC_Cabling::TGCId::getSideType ( ) const
inline

Definition at line 125 of file TGCId.h.

125 {
126 return m_side;
127}

◆ getSignalType()

TGCId::SignalType MuonTGC_Cabling::TGCId::getSignalType ( ) const
inline

Definition at line 134 of file TGCId.h.

134 {
135 return m_signal;
136}
SignalType m_signal
Definition TGCId.h:110

◆ getStation()

TGCId::StationType MuonTGC_Cabling::TGCId::getStation ( ) const
inline

Definition at line 128 of file TGCId.h.

128 {
129 return m_station;
130}
StationType m_station
Definition TGCId.h:108

◆ isAside()

bool MuonTGC_Cabling::TGCId::isAside ( ) const
inline

Definition at line 154 of file TGCId.h.

154 {
155 return (m_side == SideType::Aside);
156}

◆ isCside()

bool MuonTGC_Cabling::TGCId::isCside ( ) const
inline

Definition at line 157 of file TGCId.h.

157 {
158 return (m_side == SideType::Cside);
159}

◆ isDoublet()

bool MuonTGC_Cabling::TGCId::isDoublet ( ) const
inline

◆ isEndcap()

bool MuonTGC_Cabling::TGCId::isEndcap ( ) const
inline

Definition at line 178 of file TGCId.h.

◆ isForward()

bool MuonTGC_Cabling::TGCId::isForward ( ) const
inline

Definition at line 175 of file TGCId.h.

◆ isInner()

bool MuonTGC_Cabling::TGCId::isInner ( ) const
inline

Definition at line 172 of file TGCId.h.

◆ isStrip()

bool MuonTGC_Cabling::TGCId::isStrip ( ) const
inline

Definition at line 160 of file TGCId.h.

◆ isTriplet()

bool MuonTGC_Cabling::TGCId::isTriplet ( ) const
inline

Definition at line 166 of file TGCId.h.

◆ isValid()

◆ isWire()

bool MuonTGC_Cabling::TGCId::isWire ( ) const
inline

Definition at line 163 of file TGCId.h.

◆ setChamber()

void MuonTGC_Cabling::TGCId::setChamber ( int chamber)
inlinevirtual

Definition at line 190 of file TGCId.h.

190 {
192}

◆ setId()

void MuonTGC_Cabling::TGCId::setId ( int id)
inline

Definition at line 194 of file TGCId.h.

◆ setIdType()

void MuonTGC_Cabling::TGCId::setIdType ( IdType idtype)
inlineprotected

Definition at line 198 of file TGCId.h.

198 {
199 m_idType = idtype;
200}

◆ setModuleType()

◆ setOctant()

void MuonTGC_Cabling::TGCId::setOctant ( int voctant)
virtual

Definition at line 95 of file TGCId.cxx.

95 {
96 m_octant = v_octant;
97}

◆ setReadoutSector()

void MuonTGC_Cabling::TGCId::setReadoutSector ( int sector)
protected

◆ setRegionType()

void MuonTGC_Cabling::TGCId::setRegionType ( RegionType region)
inline

Definition at line 186 of file TGCId.h.

186 {
187 m_region = region;
188}

◆ setSector()

void MuonTGC_Cabling::TGCId::setSector ( int vsector)
virtual

Reimplemented in MuonTGC_Cabling::TGCChannelASDIn, and MuonTGC_Cabling::TGCModuleId.

Definition at line 82 of file TGCId.cxx.

82 {
83 m_sector = v_sector;
85 if (isInner()) {
87 } else {
89 }
90 } else if (m_region == RegionType::Forward) {
92 }
93}

◆ setSectorModule()

void MuonTGC_Cabling::TGCId::setSectorModule ( int sectorModule)
protected

Definition at line 125 of file TGCId.cxx.

125 {
126 if (m_octant < 0) {
127 return;
128 }
129
130 const int MaxModuleInOctant = 15;
131 static const int regionId[MaxModuleInOctant] = {0, 0, 1, 0, 0, 1, 0, 0,
132 1, 2, 2, 2, 3, 3, 3};
133 static const int sectorId[MaxModuleInOctant] = {0, 1, 0, 2, 3, 1, 4, 5,
134 2, 0, 1, 2, 0, 1, 2};
135
136 if (sectorModule < 0 || sectorModule >= MaxModuleInOctant) {
137 return;
138 }
139
140 if (regionId[sectorModule] == 0) {
142 setSector(sectorId[sectorModule] +
144
145 } else if (regionId[sectorModule] == 1) {
147 setSector(sectorId[sectorModule] +
149 } else {
151 if (regionId[sectorModule] == 2) {
153 }
154 if (regionId[sectorModule] == 3) {
156 }
157 setSector(sectorId[sectorModule] +
159 }
160}
void setRegionType(RegionType region)
Definition TGCId.h:186
void setStation(StationType vstation)
Definition TGCId.cxx:78
virtual void setSector(int vsector)
Definition TGCId.cxx:82

◆ setSideType()

void MuonTGC_Cabling::TGCId::setSideType ( SideType side)
inline

Definition at line 182 of file TGCId.h.

182 {
183 m_side = side;
184}

◆ setSignalType()

void MuonTGC_Cabling::TGCId::setSignalType ( SignalType signal)

Definition at line 61 of file TGCId.cxx.

61 {
62 m_signal = v_signal;
63 if (isInner() && m_signal == SignalType::Wire) {
65 } else if (isInner() && m_signal == SignalType::Strip) {
67 } else if (isDoublet() && m_signal == SignalType::Wire) {
69 } else if (isDoublet() && m_signal == SignalType::Strip) {
71 } else if (isTriplet() && m_signal == SignalType::Wire) {
73 } else if (isTriplet() && m_signal == SignalType::Strip) {
75 }
76}
bool isTriplet() const
Definition TGCId.h:166
bool isDoublet() const
Definition TGCId.h:169

◆ setStation()

void MuonTGC_Cabling::TGCId::setStation ( StationType vstation)

Definition at line 78 of file TGCId.cxx.

78 {
79 m_station = v_station;
80}

Member Data Documentation

◆ m_chamber

int MuonTGC_Cabling::TGCId::m_chamber {-1}
protected

Definition at line 115 of file TGCId.h.

115{-1};

◆ m_id

int MuonTGC_Cabling::TGCId::m_id {-1}
protected

Definition at line 116 of file TGCId.h.

116{-1};

◆ m_idType

IdType MuonTGC_Cabling::TGCId::m_idType {IdType::NoIdType}
private

Definition at line 119 of file TGCId.h.

◆ m_module

ModuleType MuonTGC_Cabling::TGCId::m_module {ModuleType::Undefined}
protected

Definition at line 109 of file TGCId.h.

◆ m_octant

int MuonTGC_Cabling::TGCId::m_octant {-1}
protected

Definition at line 113 of file TGCId.h.

113{-1};

◆ m_region

RegionType MuonTGC_Cabling::TGCId::m_region {RegionType::Undefined}
protected

Definition at line 111 of file TGCId.h.

◆ m_sector

int MuonTGC_Cabling::TGCId::m_sector {-1}
protected

Definition at line 114 of file TGCId.h.

114{-1};

◆ m_side

SideType MuonTGC_Cabling::TGCId::m_side {SideType::Undefined}
protected

Definition at line 107 of file TGCId.h.

◆ m_signal

SignalType MuonTGC_Cabling::TGCId::m_signal {SignalType::Undefined}
protected

Definition at line 110 of file TGCId.h.

◆ m_station

StationType MuonTGC_Cabling::TGCId::m_station {StationType::Undefined}
protected

Definition at line 108 of file TGCId.h.

◆ N_RODS

int MuonTGC_Cabling::TGCId::N_RODS = 12
staticconstexpr

Definition at line 46 of file TGCId.h.

◆ NUM_ENDCAP_SECTOR

int MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR = 48
staticconstexpr

Definition at line 43 of file TGCId.h.

◆ NUM_FORWARD_SECTOR

int MuonTGC_Cabling::TGCId::NUM_FORWARD_SECTOR = 24
staticconstexpr

Definition at line 44 of file TGCId.h.

◆ NUM_INNER_SECTOR

int MuonTGC_Cabling::TGCId::NUM_INNER_SECTOR = 24
staticconstexpr

Definition at line 45 of file TGCId.h.

◆ NUM_LAYERS

int MuonTGC_Cabling::TGCId::NUM_LAYERS
staticconstexpr
Initial value:
=
9

in ChannelId

Definition at line 40 of file TGCId.h.

◆ NUM_OCTANT

int MuonTGC_Cabling::TGCId::NUM_OCTANT = 8
staticconstexpr

Definition at line 42 of file TGCId.h.


The documentation for this class was generated from the following files: