ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
MuonTGC_Cabling::TGCCableSLBToSSW Class Reference

#include <TGCCableSLBToSSW.h>

Inheritance diagram for MuonTGC_Cabling::TGCCableSLBToSSW:
Collaboration diagram for MuonTGC_Cabling::TGCCableSLBToSSW:

Public Types

enum  { SL = TGCId::MaxModuleType, MaxModuleType = TGCId::MaxModuleType + 1 }
 
enum  CableType {
  NoCableType =-1, InASD, ASDToPP, InPP,
  PPToSLB, InSLB, SLBToHPB, HPBToSL,
  SLBToSSW, SSWToROD, MaxCableType
}
 

Public Member Functions

 TGCCableSLBToSSW (const std::string &filename)
 
virtual ~TGCCableSLBToSSW (void)
 
virtual TGCModuleMapgetModule (const TGCModuleId *moduleId) const
 
CableType getCableType (void) const
 

Protected Member Functions

virtual TGCChannelIdgetChannelIn (const TGCChannelId *, bool) const
 
virtual TGCChannelIdgetChannelOut (const TGCChannelId *, bool) const
 

Private Member Functions

 TGCCableSLBToSSW (void)
 
virtual TGCModuleMapgetModuleIn (const TGCModuleId *ssw) const
 
virtual TGCModuleMapgetModuleOut (const TGCModuleId *slb) const
 

Private Attributes

TGCDatabasem_database [TGCId::MaxRegionType][MaxModuleType] {}
 
CableType m_type
 

Detailed Description

Definition at line 19 of file TGCCableSLBToSSW.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SL 
MaxModuleType 

Definition at line 22 of file TGCCableSLBToSSW.h.

22  {
25  };

◆ CableType

Enumerator
NoCableType 
InASD 
ASDToPP 
InPP 
PPToSLB 
InSLB 
SLBToHPB 
HPBToSL 
SLBToSSW 
SSWToROD 
MaxCableType 

Definition at line 18 of file TGCCable.h.

Constructor & Destructor Documentation

◆ TGCCableSLBToSSW() [1/2]

MuonTGC_Cabling::TGCCableSLBToSSW::TGCCableSLBToSSW ( const std::string &  filename)

Definition at line 14 of file TGCCableSLBToSSW.cxx.

16 {
18  new TGCDatabaseSLBToROD(filename,"SLB EWT");
20  new TGCDatabaseSLBToROD(filename,"SLB EWD");
22  new TGCDatabaseSLBToROD(filename,"SLB EST");
24  new TGCDatabaseSLBToROD(filename,"SLB ESD");
26  new TGCDatabaseSLBToROD(filename,"SLB EWI");
28  new TGCDatabaseSLBToROD(filename,"SLB ESI");
30  new TGCDatabaseSLBToROD(filename,"SLB ESL");
31 
33  new TGCDatabaseSLBToROD(filename,"SLB FWT");
35  new TGCDatabaseSLBToROD(filename,"SLB FWD");
37  new TGCDatabaseSLBToROD(filename,"SLB FST");
39  new TGCDatabaseSLBToROD(filename,"SLB FSD");
41  new TGCDatabaseSLBToROD(filename,"SLB FWI");
43  new TGCDatabaseSLBToROD(filename,"SLB FSI");
45  new TGCDatabaseSLBToROD(filename,"SLB FSL");
46 }

◆ ~TGCCableSLBToSSW()

MuonTGC_Cabling::TGCCableSLBToSSW::~TGCCableSLBToSSW ( void  )
virtual

◆ TGCCableSLBToSSW() [2/2]

MuonTGC_Cabling::TGCCableSLBToSSW::TGCCableSLBToSSW ( void  )
inlineprivate

Definition at line 35 of file TGCCableSLBToSSW.h.

35 {}

Member Function Documentation

◆ getCableType()

CableType MuonTGC_Cabling::TGCCable::getCableType ( void  ) const
inlineinherited

Definition at line 30 of file TGCCable.h.

30 { return m_type; }

◆ getChannelIn()

virtual TGCChannelId* MuonTGC_Cabling::TGCCable::getChannelIn ( const TGCChannelId ,
bool   
) const
inlineprotectedvirtualinherited

◆ getChannelOut()

virtual TGCChannelId* MuonTGC_Cabling::TGCCable::getChannelOut ( const TGCChannelId ,
bool   
) const
inlineprotectedvirtualinherited

◆ getModule()

TGCModuleMap * MuonTGC_Cabling::TGCCableSLBToSSW::getModule ( const TGCModuleId moduleId) const
virtual

Definition at line 68 of file TGCCableSLBToSSW.cxx.

68  {
69  if(moduleId){
70  if(moduleId->getModuleIdType()==TGCModuleId::SLB)
71  return getModuleOut(moduleId);
72  if(moduleId->getModuleIdType()==TGCModuleId::SSW)
73  return getModuleIn(moduleId);
74  }
75  return nullptr;
76 }

◆ getModuleIn()

TGCModuleMap * MuonTGC_Cabling::TGCCableSLBToSSW::getModuleIn ( const TGCModuleId ssw) const
privatevirtual

Reimplemented from MuonTGC_Cabling::TGCCable.

Definition at line 78 of file TGCCableSLBToSSW.cxx.

78  {
79  if(ssw->isValid()==false) return nullptr;
80 
81  const int sswId = ssw->getId();
82 
83  TGCDatabase* databaseP[TGCId::MaxRegionType * MaxModuleType];
86  for(int i=0; i<TGCId::MaxRegionType; i++){
87  for(int j=0; j< MaxModuleType; j++){
88  databaseP[i*MaxModuleType + j] = m_database[i][j];
89  region[i*MaxModuleType + j] = static_cast<TGCId::RegionType>(i);
90  module[i*MaxModuleType + j] = static_cast<TGCId::ModuleType>(j);
91  }
92  }
93 
94  TGCModuleMap* mapId = nullptr;
96  const int MaxEntry = databaseP[type]->getMaxEntry();
97  for(int i=0; i<MaxEntry; i++){
98 
99  if(databaseP[type]->getEntry(i,4) == sswId) {
100  int sector = databaseP[type]->getEntry(i,0);
101 
102  // Inner
103  if(module[type]==TGCId::WI) {
104  // EI/FI
105  // wire(TGCId::WI) and strip(TGCId::SI) of a chamber
106  // use the same SLB chip
107 
108  int sswSector = ssw->getReadoutSector();
109  // one ROD (rodId = 2,5,8,11) covers 6 Inner sectors
110  if(sswSector %3 != 1) continue;
111  sswSector -= 1;
112 
113  sector += sswSector*2;
114  int id = databaseP[type]->getEntry(i,1);
115  int block = databaseP[type]->getEntry(i,5);
116  int sbLoc = databaseP[type]->getEntry(i,2);
117  int slbAddr = databaseP[type]->getEntry(i,3);
118  for(int ip= 0; ip<3 ; ip++){
119  int psector = sector + ip*2;
120  int pblock = block + ip*4;
121  int psbLoc = sbLoc + ip*4;
122  int pslbAddr = slbAddr + ip*2;
123  TGCModuleSLB* slb = new TGCModuleSLB(ssw->getSideType(),
124  module[type],
125  region[type],
126  psector,
127  id,
128  psbLoc,
129  pslbAddr);
130 
131  if(mapId==nullptr) mapId = new TGCModuleMap();
132  mapId->insert(pblock,slb);
133  }
134 
135  } else if(module[type]==TGCId::SI) {
136  // EI/FI
137  // wire(TGCId::WI) and strip(TGCId::SI) of a chamber
138  // use the same SLB chip
139 
140  // do nothing
141 
142  } else {
143  if(region[type]==TGCId::Endcap) {
144  sector += ssw->getReadoutSector() * (TGCId::NUM_ENDCAP_SECTOR/TGCId::N_RODS);
145  } else {
146  sector += ssw->getReadoutSector() * (TGCId::NUM_FORWARD_SECTOR/TGCId::N_RODS);
147  }
148  int id = databaseP[type]->getEntry(i,1);
149  int sbLoc = databaseP[type]->getEntry(i,2);
150  int slbAddr = databaseP[type]->getEntry(i,3);
151  int block = databaseP[type]->getEntry(i,5);
152  TGCModuleSLB* slb = new TGCModuleSLB(ssw->getSideType(),
153  module[type],
154  region[type],
155  sector,
156  id,
157  sbLoc,
158  slbAddr);
159 
160  if(mapId==nullptr) mapId = new TGCModuleMap();
161  mapId->insert(block,slb);
162  }
163 
164  }
165  }
166  }
167 
168  return mapId;
169 }

◆ getModuleOut()

TGCModuleMap * MuonTGC_Cabling::TGCCableSLBToSSW::getModuleOut ( const TGCModuleId slb) const
privatevirtual

Reimplemented from MuonTGC_Cabling::TGCCable.

Definition at line 172 of file TGCCableSLBToSSW.cxx.

172  {
173  if(slb->isValid()==false) return nullptr;
174 
175  const int slbId = slb->getId();
176  const int sector = slb->getSectorInReadout();
177  int readoutSector = slb->getReadoutSector();
178 
179  TGCModuleMap* mapId = nullptr;
180 
181  TGCDatabase* databaseP =m_database[slb->getRegionType()][slb->getModuleType()];
182  const int MaxEntry = databaseP->getMaxEntry();
183  if(slb->getModuleType() == TGCId::WI ||
184  slb->getModuleType() == TGCId::SI) {
185  // inner
186  for(int i=0; i<MaxEntry; i++){
187  if(databaseP->getEntry(i,0)==sector &&
188  databaseP->getEntry(i,1)==slbId) {
189 
190  int sswSectorRO = readoutSector - (readoutSector%3) + 1;
191  int id = databaseP->getEntry(i,4);
192  int block = databaseP->getEntry(i,5) + 4*(readoutSector%3);
193 
194  TGCModuleSSW* ssw = new TGCModuleSSW(slb->getSideType(),
195  sswSectorRO,
196  id);
197  mapId = new TGCModuleMap();
198  mapId->insert(block,ssw);
199  break;
200  }
201  }
202 
203  } else {
204  for(int i=0; i<MaxEntry; i++){
205  if(databaseP->getEntry(i,0)==sector&&
206  databaseP->getEntry(i,1)==slbId) {
207 
208  int id = databaseP->getEntry(i,4);
209  int block = databaseP->getEntry(i,5);
210  TGCModuleSSW* ssw = new TGCModuleSSW(slb->getSideType(),
211  readoutSector,
212  id);
213  mapId = new TGCModuleMap();
214  mapId->insert(block,ssw);
215  break;
216  }
217  }
218 
219  }
220  return mapId;
221 }

Member Data Documentation

◆ m_database

TGCDatabase* MuonTGC_Cabling::TGCCableSLBToSSW::m_database[TGCId::MaxRegionType][MaxModuleType] {}
private

Definition at line 38 of file TGCCableSLBToSSW.h.

◆ m_type

CableType MuonTGC_Cabling::TGCCable::m_type
privateinherited

Definition at line 43 of file TGCCable.h.


The documentation for this class was generated from the following files:
MuonTGC_Cabling::TGCCableSLBToSSW::m_database
TGCDatabase * m_database[TGCId::MaxRegionType][MaxModuleType]
Definition: TGCCableSLBToSSW.h:38
MuonTGC_Cabling::TGCId::MaxModuleType
@ MaxModuleType
Definition: TGCId.h:48
MuonTGC_Cabling::TGCCable::NoCableType
@ NoCableType
Definition: TGCCable.h:18
MuonTGC_Cabling::TGCId::SI
@ SI
Definition: TGCId.h:47
MuonTGC_Cabling::TGCCable::InASD
@ InASD
Definition: TGCCable.h:19
MuonTGC_Cabling::TGCCableSLBToSSW::getModuleOut
virtual TGCModuleMap * getModuleOut(const TGCModuleId *slb) const
Definition: TGCCableSLBToSSW.cxx:172
MuonTGC_Cabling::TGCId::N_RODS
static constexpr int N_RODS
Definition: TGCId.h:43
MuonTGC_Cabling::TGCCable::PPToSLB
@ PPToSLB
Definition: TGCCable.h:19
MuonTGC_Cabling::TGCId::ModuleType
ModuleType
Definition: TGCId.h:47
MuonTGC_Cabling::TGCModuleId::SLB
@ SLB
Definition: TGCModuleId.h:16
MuonTGC_Cabling::TGCCable::TGCCable
TGCCable(CableType type=NoCableType)
Definition: TGCCable.h:24
MuonTGC_Cabling::TGCId::SD
@ SD
Definition: TGCId.h:47
MuonTGC_Cabling::TGCModuleId::SSW
@ SSW
Definition: TGCModuleId.h:16
MuonTGC_Cabling::TGCId::NUM_FORWARD_SECTOR
static constexpr int NUM_FORWARD_SECTOR
Definition: TGCId.h:41
python.PyAthena.module
module
Definition: PyAthena.py:131
MuonTGC_Cabling::TGCCable::ASDToPP
@ ASDToPP
Definition: TGCCable.h:19
MuonTGC_Cabling::TGCCable::InSLB
@ InSLB
Definition: TGCCable.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:85
MuonTGC_Cabling::TGCCable::MaxCableType
@ MaxCableType
Definition: TGCCable.h:21
MuonTGC_Cabling::TGCId::WT
@ WT
Definition: TGCId.h:47
MuonTGC_Cabling::TGCCable::m_type
CableType m_type
Definition: TGCCable.h:43
MuonTGC_Cabling::TGCDatabase::getMaxEntry
virtual int getMaxEntry(void) const
Definition: TGCDatabase.cxx:36
MuonTGC_Cabling::TGCCableSLBToSSW::MaxModuleType
@ MaxModuleType
Definition: TGCCableSLBToSSW.h:24
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
MuonTGC_Cabling::TGCCableSLBToSSW::SL
@ SL
Definition: TGCCableSLBToSSW.h:23
MuonTGC_Cabling::TGCCable::SLBToSSW
@ SLBToSSW
Definition: TGCCable.h:20
MuonTGC_Cabling::TGCId::WD
@ WD
Definition: TGCId.h:47
MuonTGC_Cabling::TGCId::Endcap
@ Endcap
Definition: TGCId.h:53
MuonTGC_Cabling::TGCId::WI
@ WI
Definition: TGCId.h:47
MuonTGC_Cabling::TGCId::MaxRegionType
@ MaxRegionType
Definition: TGCId.h:54
MuonTGC_Cabling::TGCCable::HPBToSL
@ HPBToSL
Definition: TGCCable.h:20
MuonTGC_Cabling::TGCCable::SSWToROD
@ SSWToROD
Definition: TGCCable.h:20
MuonTGC_Cabling::TGCId::ST
@ ST
Definition: TGCId.h:47
MuonTGC_Cabling::TGCCable::SLBToHPB
@ SLBToHPB
Definition: TGCCable.h:20
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MuonTGC_Cabling::TGCId::NUM_ENDCAP_SECTOR
static constexpr int NUM_ENDCAP_SECTOR
Definition: TGCId.h:40
MuonTGC_Cabling::TGCCable::InPP
@ InPP
Definition: TGCCable.h:19
CaloCellTimeCorrFiller.filename
filename
Definition: CaloCellTimeCorrFiller.py:24
MuonTGC_Cabling::TGCId::RegionType
RegionType
Definition: TGCId.h:53
MuonTGC_Cabling::TGCCableSLBToSSW::getModuleIn
virtual TGCModuleMap * getModuleIn(const TGCModuleId *ssw) const
Definition: TGCCableSLBToSSW.cxx:78
MuonTGC_Cabling::TGCId::Forward
@ Forward
Definition: TGCId.h:53