ATLAS Offline Software
TGCChannelSLBOut.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8 
9 namespace MuonTGC_Cabling
10 {
11 
12 // Constructor
14  TGCIdBase::ModuleType vmodule,
15  TGCIdBase::RegionType vregion,
16  int vsector,
17  int vid,
18  int vblock,
19  int vchannel)
20  : TGCChannelId(TGCIdBase::SLBOut)
21 {
22  setSideType(vside);
23  setModuleType(vmodule);
24  setRegionType(vregion);
25  setSector(vsector);
26  setId(vid);
27  setBlock(vblock);
28  setChannel(vchannel);
29 }
30 
32 {
33  return (new TGCModuleSLB(getSideType(),
34  getModuleType(),
35  getRegionType(),
36  getSector(),
37  getId()));
38 }
39 
40 
41 bool TGCChannelSLBOut::isValid(void) const
42 {
49  (getOctant() >=0) &&
50  (getOctant() <8) &&
51  (getId() >=0) &&
52  (getBlock() >=0) &&
53  (getChannel() >=0) )
54  return true;
55  return false;
56 }
57 
58 
71 
73  switch(moduleType){
74  case TGCIdBase::WD:
75  return s_numberOfBlockInWD;
76  case TGCIdBase::SD:
77  return s_numberOfBlockInSD;
78  case TGCIdBase::WT:
79  return s_numberOfBlockInWT;
80  case TGCIdBase::ST:
81  return s_numberOfBlockInST;
82  default:
83  break;
84  }
85  return -1;
86 }
87 
89  switch(moduleType){
90  case TGCIdBase::WD:
91  return s_numberOfLayerInWD;
92  case TGCIdBase::SD:
93  return s_numberOfLayerInSD;
94  case TGCIdBase::WT:
95  return s_numberOfLayerInWT;
96  case TGCIdBase::ST:
97  return s_numberOfLayerInST;
98  default:
99  break;
100  }
101  return -1;
102 }
103 
105  switch(moduleType){
106  case TGCIdBase::WD:
107  return s_channelInBlockForWD;
108  case TGCIdBase::SD:
109  return s_channelInBlockForSD;
110  case TGCIdBase::WT:
111  return s_channelInBlockForWT;
112  case TGCIdBase::ST:
113  return s_channelInBlockForST;
114  default:
115  break;
116  }
117  return -1;
118 }
119 
120 } // end of namespace
MuonTGC_Cabling::TGCId::setRegionType
void setRegionType(RegionType region)
Definition: TGCId.cxx:99
TGCIdBase::getRegionType
RegionType getRegionType(void) const
Definition: TGCIdBase.cxx:41
TGCIdBase::NoRegionType
@ NoRegionType
Definition: TGCIdBase.h:39
TGCIdBase::getChannel
virtual int getChannel(void) const
Definition: TGCIdBase.cxx:50
TGCIdBase::WT
@ WT
Definition: TGCIdBase.h:33
MuonTGC_Cabling::TGCId::setId
void setId(int id)
Definition: TGCId.cxx:210
TGCIdBase::MaxRegionType
@ MaxRegionType
Definition: TGCIdBase.h:40
MuonTGC_Cabling::TGCModuleSLB
Definition: TGCModuleSLB.h:14
MuonTGC_Cabling::TGCChannelSLBOut::s_numberOfBlockInWD
static const int s_numberOfBlockInWD
Definition: TGCChannelSLBOut.h:32
TGCIdBase::getBlock
int getBlock(void) const
Definition: TGCIdBase.cxx:49
TGCIdBase::MaxModuleType
@ MaxModuleType
Definition: TGCIdBase.h:34
MuonTGC_Cabling::TGCId::setModuleType
void setModuleType(ModuleType module)
Definition: TGCId.cxx:51
TGCIdBase::SD
@ SD
Definition: TGCIdBase.h:33
MuonTGC_Cabling::TGCChannelSLBOut::s_channelInBlockForWD
static const int s_channelInBlockForWD
Definition: TGCChannelSLBOut.h:40
MuonTGC_Cabling::TGCChannelSLBOut::s_numberOfBlockInWT
static const int s_numberOfBlockInWT
Definition: TGCChannelSLBOut.h:34
MuonTGC_Cabling::TGCId::setBlock
void setBlock(int block)
Definition: TGCId.cxx:214
MuonTGC_Cabling::TGCChannelSLBOut::s_numberOfLayerInWT
static const int s_numberOfLayerInWT
Definition: TGCChannelSLBOut.h:38
MuonTGC_Cabling::TGCChannelSLBOut::s_numberOfLayerInWD
static const int s_numberOfLayerInWD
Definition: TGCChannelSLBOut.h:36
MuonTGC_Cabling::TGCId::setSideType
void setSideType(SideType side)
Definition: TGCId.cxx:47
MuonTGC_Cabling::TGCId::setSector
virtual void setSector(int sector)
Definition: TGCId.cxx:115
MuonTGC_Cabling::TGCChannelSLBOut::s_channelInBlockForSD
static const int s_channelInBlockForSD
Definition: TGCChannelSLBOut.h:41
TGCIdBase::getModuleType
ModuleType getModuleType(void) const
Definition: TGCIdBase.cxx:38
TGCIdBase::getSector
virtual int getSector(void) const
Definition: TGCIdBase.cxx:45
MuonTGC_Cabling::TGCChannelSLBOut::getNumberOfLayer
static int getNumberOfLayer(TGCIdBase::ModuleType moduleType)
Definition: TGCChannelSLBOut.cxx:88
MuonTGC_Cabling::TGCChannelSLBOut::s_channelInBlockForST
static const int s_channelInBlockForST
Definition: TGCChannelSLBOut.h:43
MuonTGC_Cabling::TGCChannelSLBOut::getChannelInBlock
static int getChannelInBlock(TGCIdBase::ModuleType moduleType)
Definition: TGCChannelSLBOut.cxx:104
TGCIdBase::NoModuleType
@ NoModuleType
Definition: TGCIdBase.h:33
TGCIdBase::ModuleType
ModuleType
Definition: TGCIdBase.h:33
MuonTGC_Cabling
Definition: TGCCable.h:13
MuonTGC_Cabling::TGCChannelSLBOut::s_numberOfBlockInST
static const int s_numberOfBlockInST
Definition: TGCChannelSLBOut.h:35
TGCIdBase::getSideType
SideType getSideType(void) const
Definition: TGCIdBase.cxx:37
TGCIdBase::RegionType
RegionType
Definition: TGCIdBase.h:39
MuonTGC_Cabling::TGCChannelSLBOut::s_channelInBlockForWT
static const int s_channelInBlockForWT
Definition: TGCChannelSLBOut.h:42
TGCIdBase::ST
@ ST
Definition: TGCIdBase.h:33
TGCIdBase
Definition: TGCIdBase.h:18
MuonTGC_Cabling::TGCChannelSLBOut::s_numberOfBlockInSD
static const int s_numberOfBlockInSD
Definition: TGCChannelSLBOut.h:33
TGCChannelSLBOut.h
MuonTGC_Cabling::TGCChannelId
Definition: TGCChannelId.h:15
TGCIdBase::NoSideType
@ NoSideType
Definition: TGCIdBase.h:31
MuonTGC_Cabling::TGCChannelSLBOut::isValid
virtual bool isValid(void) const
Definition: TGCChannelSLBOut.cxx:41
MuonTGC_Cabling::TGCChannelSLBOut::TGCChannelSLBOut
TGCChannelSLBOut(void)
Definition: TGCChannelSLBOut.h:51
TGCIdBase::getOctant
int getOctant(void) const
Definition: TGCIdBase.cxx:44
TGCIdBase::SideType
SideType
Definition: TGCIdBase.h:31
MuonTGC_Cabling::TGCChannelSLBOut::s_numberOfLayerInST
static const int s_numberOfLayerInST
Definition: TGCChannelSLBOut.h:39
MuonTGC_Cabling::TGCModuleId
Definition: TGCModuleId.h:14
MuonTGC_Cabling::TGCChannelSLBOut::getModule
virtual TGCModuleId * getModule(void) const
Definition: TGCChannelSLBOut.cxx:31
TGCIdBase::MaxSideType
@ MaxSideType
Definition: TGCIdBase.h:32
TGCModuleSLB.h
TGCIdBase::getId
int getId(void) const
Definition: TGCIdBase.cxx:48
MuonTGC_Cabling::TGCId::setChannel
virtual void setChannel(int channel)
Definition: TGCId.cxx:218
TGCIdBase::WD
@ WD
Definition: TGCIdBase.h:33
MuonTGC_Cabling::TGCChannelSLBOut::getNumberOfBlock
static int getNumberOfBlock(TGCIdBase::ModuleType moduleType)
Definition: TGCChannelSLBOut.cxx:72
MuonTGC_Cabling::TGCChannelSLBOut::s_numberOfLayerInSD
static const int s_numberOfLayerInSD
Definition: TGCChannelSLBOut.h:37