ATLAS Offline Software
TGCChannelASDIn.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace MuonTGC_Cabling
8 {
9 
10 // Constructor
12  TGCIdBase::SignalType vsignal,
13  TGCIdBase::RegionType vregion,
14  int vsector,
15  int vlayer,
16  int vchamber,
17  int vchannel)
18  : TGCChannelId(TGCIdBase::ASDIn)
19 {
20  setSideType(vside);
21  setSignalType(vsignal);
22  setRegionType(vregion);
23  setLayer(vlayer);
25  setChamber(vchamber);
26  setChannel(vchannel);
27 }
28 
29 void TGCChannelASDIn::setSector(int sector)
30 {
31  if(isEndcap()&&!isInner()){
33  } else {
35  }
36 }
37 
39 {
40  int sector;
41  if(isEndcap()&&!isInner()){
42  sector = TGCIdBase::getSector()-1;
43  if(sector<=0) sector += TGCId::NumberOfEndcapSector;
44  } else {
45  sector = TGCIdBase::getSector();
46  if(sector<=0) sector += TGCId::NumberOfForwardSector;
47  }
48 
49  return sector;
50 }
51 
52 bool TGCChannelASDIn::isValid(void) const
53 {
60  (getOctant() >=0) &&
61  (getOctant() <8) &&
62  (getLayer() >=0) &&
63  (getChamber() >=0) &&
64  (getChannel() >=0) )
65  return true;
66  return false;
67 }
68 
69 } // 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::isInner
bool isInner(void) const
Definition: TGCIdBase.cxx:60
MuonTGC_Cabling::TGCChannelASDIn::TGCChannelASDIn
TGCChannelASDIn(void)
Definition: TGCChannelASDIn.h:34
MuonTGC_Cabling::TGCId::setSignalType
void setSignalType(SignalType signal)
Definition: TGCId.cxx:79
TGCIdBase::MaxRegionType
@ MaxRegionType
Definition: TGCIdBase.h:40
MuonTGC_Cabling::TGCId::setChamber
void setChamber(int chamber)
Definition: TGCId.cxx:206
TGCIdBase::getChamber
int getChamber(void) const
Definition: TGCIdBase.cxx:47
MuonTGC_Cabling::TGCChannelASDIn::isValid
virtual bool isValid(void) const
Definition: TGCChannelASDIn.cxx:52
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
TGCIdBase::getSector
virtual int getSector(void) const
Definition: TGCIdBase.cxx:45
TGCIdBase::getLayer
int getLayer(void) const
Definition: TGCIdBase.cxx:46
MuonTGC_Cabling::TGCId::NumberOfEndcapSector
@ NumberOfEndcapSector
Definition: TGCId.h:53
MuonTGC_Cabling::TGCChannelASDIn::setSector
virtual void setSector(int sector)
Definition: TGCChannelASDIn.cxx:29
MuonTGC_Cabling
Definition: TGCCable.h:13
TGCIdBase::getSideType
SideType getSideType(void) const
Definition: TGCIdBase.cxx:37
TGCIdBase::isEndcap
bool isEndcap(void) const
Definition: TGCIdBase.cxx:62
MuonTGC_Cabling::TGCId::NumberOfForwardSector
@ NumberOfForwardSector
Definition: TGCId.h:51
TGCIdBase::getSignalType
SignalType getSignalType(void) const
Definition: TGCIdBase.cxx:39
TGCIdBase::RegionType
RegionType
Definition: TGCIdBase.h:39
TGCIdBase
Definition: TGCIdBase.h:18
TGCIdBase::NoSignalType
@ NoSignalType
Definition: TGCIdBase.h:35
TGCIdBase::MaxSignalType
@ MaxSignalType
Definition: TGCIdBase.h:36
MuonTGC_Cabling::TGCChannelId
Definition: TGCChannelId.h:15
TGCIdBase::NoSideType
@ NoSideType
Definition: TGCIdBase.h:31
TGCIdBase::getOctant
int getOctant(void) const
Definition: TGCIdBase.cxx:44
MuonTGC_Cabling::TGCChannelASDIn::getSector
virtual int getSector(void) const
Definition: TGCChannelASDIn.cxx:38
TGCIdBase::SideType
SideType
Definition: TGCIdBase.h:31
TGCIdBase::SignalType
SignalType
Definition: TGCIdBase.h:35
TGCIdBase::MaxSideType
@ MaxSideType
Definition: TGCIdBase.h:32
MuonTGC_Cabling::TGCId::setChannel
virtual void setChannel(int channel)
Definition: TGCId.cxx:218
TGCChannelASDIn.h
MuonTGC_Cabling::TGCId::setLayer
void setLayer(int layer)
Definition: TGCId.cxx:184