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

#include <TGCChannelId.h>

Inheritance diagram for MuonTGC_Cabling::TGCChannelId:
Collaboration diagram for MuonTGC_Cabling::TGCChannelId:

Public Types

enum class  ChannelIdType {
  NoChannelIdType , ASDIn , ASDOut , PPIn ,
  PPOut , SLBIn , SLBOut , HPBIn
}
enum class  IdType { NoIdType , Channel , Module , MaxIdType }
enum  SideType { NoSideType =-1 , Aside , Cside , MaxSideType }
enum  ModuleType {
  NoModuleType =-1 , WD , SD , WT ,
  ST , WI , SI , MaxModuleType
}
enum  SignalType { NoSignalType =-1 , Wire , Strip , MaxSignalType }
enum  MultipletType {
  NoMultipletType =-1 , Doublet , Triplet , Inner ,
  MaxChamberType
}
enum  RegionType { NoRegionType =-1 , Endcap , Forward , MaxRegionType }

Public Member Functions

 TGCChannelId (ChannelIdType type=ChannelIdType::NoChannelIdType)
virtual ~TGCChannelId (void)=default
virtual TGCModuleIdgetModule (void) const
virtual bool operator== (const TGCChannelId &channelId) const
virtual bool isValid () const
ChannelIdType getChannelIdType () const
int getLayer () const
int getBlock () const
int getChannel () const
virtual int getGasGap () const
void setChannelIdType (ChannelIdType type)
void setLayer (int layer)
virtual void setBlock (int block)
virtual void setChannel (int channel)
bool isBackward () const
IdType getIdType (void) const
SideType getSideType (void) const
ModuleType getModuleType (void) const
SignalType getSignalType (void) const
MultipletType getMultipletType (void) const
RegionType getRegionType (void) const
int getSectorInReadout (void) const
virtual int getSectorInOctant () const
virtual int getSectorModule () const
int getStation () const
int getOctant () const
virtual int getSector () const
int getChamber () const
int getId () 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 setModuleType (ModuleType module)
void setSignalType (SignalType signal)
void setMultipletType (MultipletType multiplet)
void setRegionType (RegionType region)
virtual void setStation (int vstation)
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_STATIONS = 4
 in ChannelId
static constexpr int NUM_LAYERS = 9
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

ChannelIdType m_channelType {ChannelIdType::NoChannelIdType}
int m_layer {-1}
int m_block {-1}
int m_channel {-1}
SideType m_side {NoSideType}
ModuleType m_module {NoModuleType}
SignalType m_signal {NoSignalType}
MultipletType m_multiplet {NoMultipletType}
RegionType m_region {NoRegionType}
int m_station {-1}
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 14 of file TGCChannelId.h.

Member Enumeration Documentation

◆ ChannelIdType

Enumerator
NoChannelIdType 
ASDIn 
ASDOut 
PPIn 
PPOut 
SLBIn 
SLBOut 
HPBIn 

Definition at line 17 of file TGCChannelId.h.

17 {
18 NoChannelIdType,
19 ASDIn, ASDOut,
20 PPIn, PPOut, SLBIn, SLBOut, HPBIn
21 };

◆ IdType

enum class MuonTGC_Cabling::TGCId::IdType
stronginherited
Enumerator
NoIdType 
Channel 
Module 
MaxIdType 

Definition at line 12 of file TGCId.h.

12{ NoIdType, Channel, Module, MaxIdType };
Identifier32::value_type Channel

◆ ModuleType

Enumerator
NoModuleType 
WD 
SD 
WT 
ST 
WI 
SI 
MaxModuleType 

Definition at line 47 of file TGCId.h.

◆ MultipletType

Enumerator
NoMultipletType 
Doublet 
Triplet 
Inner 
MaxChamberType 

Definition at line 51 of file TGCId.h.

◆ RegionType

Enumerator
NoRegionType 
Endcap 
Forward 
MaxRegionType 

Definition at line 53 of file TGCId.h.

◆ SideType

Enumerator
NoSideType 
Aside 
Cside 
MaxSideType 

Definition at line 45 of file TGCId.h.

◆ SignalType

Enumerator
NoSignalType 
Wire 
Strip 
MaxSignalType 

Definition at line 49 of file TGCId.h.

Constructor & Destructor Documentation

◆ TGCChannelId()

MuonTGC_Cabling::TGCChannelId::TGCChannelId ( ChannelIdType type = ChannelIdType::NoChannelIdType)
inline

Definition at line 24 of file TGCChannelId.h.

◆ ~TGCChannelId()

virtual MuonTGC_Cabling::TGCChannelId::~TGCChannelId ( void )
virtualdefault

Member Function Documentation

◆ getBlock()

int MuonTGC_Cabling::TGCChannelId::getBlock ( ) const

Definition at line 28 of file TGCChannelId.cxx.

◆ getChamber()

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

Definition at line 130 of file TGCId.h.

130{ return m_chamber; }

◆ getChannel()

int MuonTGC_Cabling::TGCChannelId::getChannel ( ) const

Definition at line 29 of file TGCChannelId.cxx.

◆ getChannelIdType()

TGCChannelId::ChannelIdType MuonTGC_Cabling::TGCChannelId::getChannelIdType ( ) const

Definition at line 26 of file TGCChannelId.cxx.

26{ return m_channelType; }

◆ getGasGap()

int MuonTGC_Cabling::TGCChannelId::getGasGap ( ) const
virtual

Definition at line 31 of file TGCChannelId.cxx.

31 {
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}

◆ getId()

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

Definition at line 131 of file TGCId.h.

131{ return m_id; }

◆ getIdType()

TGCId::IdType MuonTGC_Cabling::TGCId::getIdType ( void ) const
inlineinherited

Definition at line 120 of file TGCId.h.

120{ return m_idType; }

◆ getLayer()

int MuonTGC_Cabling::TGCChannelId::getLayer ( ) const

Definition at line 27 of file TGCChannelId.cxx.

◆ getModule()

virtual TGCModuleId * MuonTGC_Cabling::TGCChannelId::getModule ( void ) const
inlinevirtual

◆ getModuleType()

TGCId::ModuleType MuonTGC_Cabling::TGCId::getModuleType ( void ) const
inlineinherited

Definition at line 122 of file TGCId.h.

122{ return m_module; }
ModuleType m_module
Definition TGCId.h:105

◆ getMultipletType()

TGCId::MultipletType MuonTGC_Cabling::TGCId::getMultipletType ( void ) const
inlineinherited

Definition at line 124 of file TGCId.h.

124{ return m_multiplet; }
MultipletType m_multiplet
Definition TGCId.h:107

◆ getOctant()

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

Definition at line 128 of file TGCId.h.

128{ return m_octant; }

◆ getRegionType()

TGCId::RegionType MuonTGC_Cabling::TGCId::getRegionType ( void ) const
inlineinherited

Definition at line 125 of file TGCId.h.

125{ return m_region; }
RegionType m_region
Definition TGCId.h:108

◆ getSector()

int MuonTGC_Cabling::TGCId::getSector ( void ) const
inlinevirtualinherited

Reimplemented in MuonTGC_Cabling::TGCChannelASDIn.

Definition at line 129 of file TGCId.h.

129{ return m_sector; }

◆ getSectorInOctant()

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

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:141
bool isForward() const
Definition TGCId.h:140
static constexpr int NUM_INNER_SECTOR
Definition TGCId.h:42
static constexpr int NUM_ENDCAP_SECTOR
Definition TGCId.h:40
virtual int getSector() const
Definition TGCId.h:129
bool isInner() const
Definition TGCId.h:139
static constexpr int NUM_OCTANT
Definition TGCId.h:39
static constexpr int NUM_FORWARD_SECTOR
Definition TGCId.h:41

◆ getSectorInReadout()

int MuonTGC_Cabling::TGCId::getSectorInReadout ( void ) const
inherited

Definition at line 26 of file TGCId.cxx.

26 {
27 if(isInner()){
29 }
30 if(isEndcap()){
32 }
33 if(isForward()){
35 }
36 return -1;
37}
static constexpr int N_RODS
Definition TGCId.h:43

◆ getSectorModule()

int MuonTGC_Cabling::TGCId::getSectorModule ( void ) const
virtualinherited

Definition at line 112 of file TGCId.cxx.

112 {
113 if(m_sector==-1) return -1;
114
115 static const int moduleEndcap[6]={ 0, 1, 3, 4, 6, 7};
116 static const int moduleForward[3]={ 2, 5, 8};
117 static const int moduleEI[3]={ 9, 10, 11};
118 static const int moduleFI[3]={ 12, 13, 14};
119
120 if(isEndcap()){
121 if(isInner()) return moduleEI[getSectorInOctant()];
122 return moduleEndcap[getSectorInOctant()];
123 }
124 if(isForward()){
125 if(isInner()) return moduleFI[getSectorInOctant()];
126 return moduleForward[getSectorInOctant()];
127 }
128 return -1;
129}
virtual int getSectorInOctant() const
Definition TGCId.cxx:13

◆ getSideType()

TGCId::SideType MuonTGC_Cabling::TGCId::getSideType ( void ) const
inlineinherited

Definition at line 121 of file TGCId.h.

121{ return m_side; }

◆ getSignalType()

TGCId::SignalType MuonTGC_Cabling::TGCId::getSignalType ( void ) const
inlineinherited

Definition at line 123 of file TGCId.h.

123{ return m_signal; }
SignalType m_signal
Definition TGCId.h:106

◆ getStation()

int MuonTGC_Cabling::TGCId::getStation ( ) const
inlineinherited

Definition at line 127 of file TGCId.h.

127{ return m_station; }

◆ isAside()

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

Definition at line 133 of file TGCId.h.

133{ return (m_side == Aside); }

◆ isBackward()

bool MuonTGC_Cabling::TGCChannelId::isBackward ( ) const

Definition at line 76 of file TGCChannelId.cxx.

76 {
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}
bool isAside() const
Definition TGCId.h:133

◆ isCside()

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

Definition at line 134 of file TGCId.h.

134{ return (m_side == Cside); }

◆ isDoublet()

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

Definition at line 138 of file TGCId.h.

138{ return (m_multiplet == Doublet); }

◆ isEndcap()

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

Definition at line 141 of file TGCId.h.

141{ return (m_region == Endcap); }

◆ isForward()

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

Definition at line 140 of file TGCId.h.

140{ return (m_region == Forward); }

◆ isInner()

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

Definition at line 139 of file TGCId.h.

139{ return (m_multiplet == Inner); }

◆ isStrip()

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

Definition at line 135 of file TGCId.h.

135{ return (m_signal == Strip); }

◆ isTriplet()

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

Definition at line 137 of file TGCId.h.

137{ return (m_multiplet == Triplet); }

◆ isValid()

virtual bool MuonTGC_Cabling::TGCChannelId::isValid ( void ) const
inlinevirtual

◆ isWire()

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

Definition at line 136 of file TGCId.h.

136{ return (m_signal == Wire); }

◆ operator==()

bool MuonTGC_Cabling::TGCChannelId::operator== ( const TGCChannelId & channelId) const
virtual

Definition at line 9 of file TGCChannelId.cxx.

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}
ChannelIdType getChannelIdType() const

◆ setBlock()

void MuonTGC_Cabling::TGCChannelId::setBlock ( int block)
virtual

Definition at line 67 of file TGCChannelId.cxx.

67 {
68 m_block = block;
69}

◆ setChamber()

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

Definition at line 151 of file TGCId.h.

151 {
153}

◆ setChannel()

void MuonTGC_Cabling::TGCChannelId::setChannel ( int channel)
virtual

Reimplemented in MuonTGC_Cabling::TGCChannelSLBIn.

Definition at line 71 of file TGCChannelId.cxx.

◆ setChannelIdType()

void MuonTGC_Cabling::TGCChannelId::setChannelIdType ( ChannelIdType type)

Definition at line 41 of file TGCChannelId.cxx.

41 {
42 m_channelType = idtype;
43}

◆ setId()

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

Definition at line 155 of file TGCId.h.

◆ setIdType()

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

Definition at line 159 of file TGCId.h.

159 {
160 m_idType = idtype;
161}

◆ setLayer()

void MuonTGC_Cabling::TGCChannelId::setLayer ( int layer)

Definition at line 45 of file TGCChannelId.cxx.

45 {
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}
std::vector< short > v_layer
virtual void setStation(int vstation)
Definition TGCId.cxx:87
void setMultipletType(MultipletType multiplet)
Definition TGCId.cxx:77

◆ setModuleType()

void MuonTGC_Cabling::TGCId::setModuleType ( ModuleType module)
inherited

Definition at line 39 of file TGCId.cxx.

39 {
40 m_module=v_module;
41 if(m_module==WI){
44 }
45 if(m_module==SI){
48 }
49 if(m_module==WD){
52 }
53 if(m_module==SD){
56 }
57 if(m_module==WT){
60 }
61 if(m_module==ST){
64 }
65}
void setSignalType(SignalType signal)
Definition TGCId.cxx:67

◆ setMultipletType()

void MuonTGC_Cabling::TGCId::setMultipletType ( MultipletType multiplet)
inherited

◆ setOctant()

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

Definition at line 108 of file TGCId.cxx.

108 {
109 m_octant = v_octant;
110}

◆ setReadoutSector()

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

◆ setRegionType()

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

Definition at line 147 of file TGCId.h.

147 {
148 m_region = region;
149}

◆ setSector()

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

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

Definition at line 95 of file TGCId.cxx.

95 {
96 m_sector = v_sector;
97 if(m_region==Endcap) {
98 if(m_multiplet==Inner) {
100 } else {
102 }
103 } else if(m_region==Forward) {
105 }
106}

◆ setSectorModule()

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

Definition at line 132 of file TGCId.cxx.

132 {
133 if(m_octant <0) return;
134
135 const int MaxModuleInOctant = 15;
136 static const int regionId[MaxModuleInOctant] ={
137 0, 0, 1, 0, 0, 1, 0, 0, 1, 2, 2, 2, 3, 3, 3
138 } ;
139 static const int sectorId[MaxModuleInOctant] ={
140 0, 1, 0, 2, 3, 1, 4, 5, 2, 0, 1, 2, 0, 1, 2
141 };
142
143 if(sectorModule< 0 || sectorModule>=MaxModuleInOctant) return;
144
145 if(regionId[sectorModule]==0){
147 setSector(sectorId[sectorModule] + m_octant*(NUM_ENDCAP_SECTOR/NUM_OCTANT));
148
149 } else if(regionId[sectorModule]==1){
151 setSector(sectorId[sectorModule] + m_octant*(NUM_FORWARD_SECTOR/NUM_OCTANT));
152 } else {
154 if(regionId[sectorModule]==2){ setRegionType(Endcap); }
155 if(regionId[sectorModule]==3){ setRegionType(Forward); }
156 setSector(sectorId[sectorModule] + m_octant*(NUM_INNER_SECTOR/NUM_OCTANT));
157 }
158}
void setRegionType(RegionType region)
Definition TGCId.h:147
virtual void setSector(int vsector)
Definition TGCId.cxx:95

◆ setSideType()

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

Definition at line 143 of file TGCId.h.

143 {
144 m_side = side;
145}

◆ setSignalType()

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

◆ setStation()

void MuonTGC_Cabling::TGCId::setStation ( int vstation)
virtualinherited

Definition at line 87 of file TGCId.cxx.

Member Data Documentation

◆ m_block

int MuonTGC_Cabling::TGCChannelId::m_block {-1}
protected

Definition at line 52 of file TGCChannelId.h.

52{-1};

◆ m_chamber

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

Definition at line 113 of file TGCId.h.

113{-1};

◆ m_channel

int MuonTGC_Cabling::TGCChannelId::m_channel {-1}
protected

Definition at line 53 of file TGCChannelId.h.

53{-1};

◆ m_channelType

ChannelIdType MuonTGC_Cabling::TGCChannelId::m_channelType {ChannelIdType::NoChannelIdType}
protected

◆ m_id

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

Definition at line 114 of file TGCId.h.

114{-1};

◆ m_idType

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

Definition at line 117 of file TGCId.h.

◆ m_layer

int MuonTGC_Cabling::TGCChannelId::m_layer {-1}
protected

Definition at line 51 of file TGCChannelId.h.

51{-1};

◆ m_module

ModuleType MuonTGC_Cabling::TGCId::m_module {NoModuleType}
protectedinherited

Definition at line 105 of file TGCId.h.

◆ m_multiplet

MultipletType MuonTGC_Cabling::TGCId::m_multiplet {NoMultipletType}
protectedinherited

Definition at line 107 of file TGCId.h.

◆ m_octant

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

Definition at line 111 of file TGCId.h.

111{-1};

◆ m_region

RegionType MuonTGC_Cabling::TGCId::m_region {NoRegionType}
protectedinherited

Definition at line 108 of file TGCId.h.

◆ m_sector

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

Definition at line 112 of file TGCId.h.

112{-1};

◆ m_side

SideType MuonTGC_Cabling::TGCId::m_side {NoSideType}
protectedinherited

Definition at line 104 of file TGCId.h.

104{NoSideType};

◆ m_signal

SignalType MuonTGC_Cabling::TGCId::m_signal {NoSignalType}
protectedinherited

Definition at line 106 of file TGCId.h.

◆ m_station

int MuonTGC_Cabling::TGCId::m_station {-1}
protectedinherited

Definition at line 110 of file TGCId.h.

110{-1};

◆ N_RODS

int MuonTGC_Cabling::TGCId::N_RODS = 12
staticconstexprinherited

Definition at line 43 of file TGCId.h.

◆ NUM_ENDCAP_SECTOR

int MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR = 48
staticconstexprinherited

Definition at line 40 of file TGCId.h.

◆ NUM_FORWARD_SECTOR

int MuonTGC_Cabling::TGCId::NUM_FORWARD_SECTOR = 24
staticconstexprinherited

Definition at line 41 of file TGCId.h.

◆ NUM_INNER_SECTOR

int MuonTGC_Cabling::TGCId::NUM_INNER_SECTOR = 24
staticconstexprinherited

Definition at line 42 of file TGCId.h.

◆ NUM_LAYERS

int MuonTGC_Cabling::TGCId::NUM_LAYERS = 9
staticconstexprinherited

Definition at line 38 of file TGCId.h.

◆ NUM_OCTANT

int MuonTGC_Cabling::TGCId::NUM_OCTANT = 8
staticconstexprinherited

Definition at line 39 of file TGCId.h.

◆ NUM_STATIONS

int MuonTGC_Cabling::TGCId::NUM_STATIONS = 4
staticconstexprinherited

in ChannelId

Definition at line 37 of file TGCId.h.


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