ATLAS Offline Software
Public Types | Static Public Member Functions | List of all members
Muon::MuonStationIndex Class Reference

#include <MuonStationIndex.h>

Collaboration diagram for Muon::MuonStationIndex:

Public Types

enum  ChIndex {
  ChUnknown = -1, BIS, BIL, BMS,
  BML, BOS, BOL, BEE,
  EIS, EIL, EMS, EML,
  EOS, EOL, EES, EEL,
  CSS, CSL, ChIndexMax
}
 enum to classify the different chamber layers in the muon spectrometer More...
 
enum  StIndex {
  StUnknown = -1, BI, BM, BO,
  BE, EI, EM, EO,
  EE, StIndexMax
}
 enum to classify the different station layers in the muon spectrometer More...
 
enum  PhiIndex {
  PhiUnknown = -1, BI1, BI2, BM1,
  BM2, BO1, BO2, T1,
  T2, T3, T4, CSC,
  STGC1, STGC2, PhiIndexMax
}
 enum to classify the different phi layers in the muon spectrometer More...
 
enum  LayerIndex {
  LayerUnknown = -1, Inner, Middle, Outer,
  Extended, BarrelExtended, LayerIndexMax
}
 enum to classify the different layers in the muon spectrometer More...
 
enum  DetectorRegionIndex {
  DetectorRegionUnknown = -1, EndcapA, Barrel, EndcapC,
  DetectorRegionIndexMax
}
 enum to classify the different layers in the muon spectrometer More...
 
enum  TechnologyIndex {
  TechnologyUnknown = -1, MDT, CSCI, RPC,
  TGC, STGC, MM, TechnologyIndexMax
}
 enum to classify the different layers in the muon spectrometer More...
 

Static Public Member Functions

static StIndex toStationIndex (ChIndex index)
 convert ChIndex into StIndex More...
 
static LayerIndex toLayerIndex (ChIndex index)
 convert ChIndex into LayerIndex More...
 
static LayerIndex toLayerIndex (StIndex index)
 convert StIndex into LayerIndex More...
 
static StIndex toStationIndex (DetectorRegionIndex region, LayerIndex layer)
 convert DetectorRegionIndex + LayerIndex into StIndex More...
 
static ChIndex toChamberIndex (DetectorRegionIndex region, LayerIndex layer, bool isSmall)
 convert DetectorRegionIndex + LayerIndex + isSmall into ChIndex More...
 
static ChIndex toChamberIndex (StIndex stIndex, bool isSmall)
 convert StIndex + isSmall into ChIndex More...
 
static const std::string & phiName (PhiIndex index)
 convert PhiIndex into a string More...
 
static const std::string & stName (StIndex index)
 convert StIndex into a string More...
 
static const std::string & chName (ChIndex index)
 convert ChIndex into a string More...
 
static const std::string & regionName (DetectorRegionIndex index)
 convert DetectorRegionIndex into a string More...
 
static const std::string & layerName (LayerIndex index)
 convert LayerIndex into a string More...
 
static const std::string & technologyName (TechnologyIndex index)
 convert LayerIndex into a string More...
 
static unsigned int sectorLayerHash (DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex)
 create a hash out of region and layer More...
 
static unsigned int sectorLayerHashMax ()
 maximum create a hash out of region and layer More...
 
static std::pair< DetectorRegionIndex, LayerIndexdecomposeSectorLayerHash (unsigned int hash)
 decompose the hash into Region and Layer More...
 
static unsigned int numberOfSectors ()
 return total number of sectors More...
 
static ChIndex chIndex (const std::string &index)
 convert ChIndex name string to enum More...
 

Detailed Description

Definition at line 12 of file MuonStationIndex.h.

Member Enumeration Documentation

◆ ChIndex

enum to classify the different chamber layers in the muon spectrometer

Enumerator
ChUnknown 
BIS 
BIL 
BMS 
BML 
BOS 
BOL 
BEE 
EIS 
EIL 
EMS 
EML 
EOS 
EOL 
EES 
EEL 
CSS 
CSL 
ChIndexMax 

Definition at line 15 of file MuonStationIndex.h.

15  {
16  ChUnknown = -1,
17  BIS, BIL, BMS, BML, BOS, BOL, BEE,
18  EIS, EIL, EMS, EML, EOS, EOL, EES, EEL, CSS, CSL,
20  };

◆ DetectorRegionIndex

enum to classify the different layers in the muon spectrometer

Enumerator
DetectorRegionUnknown 
EndcapA 
Barrel 
EndcapC 
DetectorRegionIndexMax 

Definition at line 47 of file MuonStationIndex.h.

47  {
51  };

◆ LayerIndex

enum to classify the different layers in the muon spectrometer

Enumerator
LayerUnknown 
Inner 
Middle 
Outer 
Extended 
BarrelExtended 

EE.

LayerIndexMax 

BEE.

Definition at line 38 of file MuonStationIndex.h.

38  {
39  LayerUnknown = -1,
40  Inner, Middle, Outer,
41  Extended,
44  };

◆ PhiIndex

enum to classify the different phi layers in the muon spectrometer

Enumerator
PhiUnknown 
BI1 
BI2 
BM1 
BM2 
BO1 
BO2 
T1 
T2 
T3 
T4 
CSC 
STGC1 
STGC2 
PhiIndexMax 

Definition at line 31 of file MuonStationIndex.h.

31  {
32  PhiUnknown = -1,
33  BI1, BI2, BM1, BM2, BO1, BO2, T1, T2, T3, T4, CSC, STGC1, STGC2,
35  };

◆ StIndex

enum to classify the different station layers in the muon spectrometer

Enumerator
StUnknown 
BI 
BM 
BO 
BE 
EI 
EM 
EO 
EE 
StIndexMax 

Definition at line 23 of file MuonStationIndex.h.

23  {
24  StUnknown = -1,
25  BI, BM, BO, BE,
26  EI, EM, EO, EE,
28  };

◆ TechnologyIndex

enum to classify the different layers in the muon spectrometer

Enumerator
TechnologyUnknown 
MDT 
CSCI 
RPC 
TGC 
STGC 
MM 
TechnologyIndexMax 

Definition at line 54 of file MuonStationIndex.h.

54  {
55  TechnologyUnknown = -1,
56  MDT, CSCI, RPC, TGC, STGC, MM,
58  };

Member Function Documentation

◆ chIndex()

MuonStationIndex::ChIndex Muon::MuonStationIndex::chIndex ( const std::string &  index)
static

convert ChIndex name string to enum

Definition at line 20 of file MuonStationIndex.cxx.

20  {
21 
22  if( index == "BIS" ) return BIS;
23  if( index == "BIL" ) return BIL;
24  if( index == "BMS" ) return BMS;
25  if( index == "BML" ) return BML;
26  if( index == "BOS" ) return BOS;
27  if( index == "BOL" ) return BOL;
28  if( index == "BEE" ) return BEE;
29  if( index == "EIS" ) return EIS;
30  if( index == "EIL" ) return EIL;
31  if( index == "EMS" ) return EMS;
32  if( index == "EML" ) return EML;
33  if( index == "EOS" ) return EOS;
34  if( index == "EOL" ) return EOL;
35  if( index == "EES" ) return EES;
36  if( index == "EEL" ) return EEL;
37  if( index == "CSS" ) return CSS;
38  if( index == "CSL" ) return CSL;
39  return ChUnknown;
40  }

◆ chName()

const std::string & Muon::MuonStationIndex::chName ( ChIndex  index)
static

convert ChIndex into a string

Definition at line 157 of file MuonStationIndex.cxx.

157  {
158  static const std::array<std::string, N_CHAMBER_INDEX> chamberIndexNames {
159  "BIS", "BIL", "BMS", "BML", "BOS", "BOL", "BEE",
160  "EIS", "EIL", "EMS", "EML", "EOS", "EOL", "EES",
161  "EEL", "CSS", "CSL", "ChIndexMax"
162  };
163 
164  if( index == ChUnknown ) {
165  static const std::string dummy( "ChUnknown" );
166  return dummy;
167  }
168  if( index >= ChIndexMax ) {
169  static const std::string dummy( "ChOutOfRange" );
170  return dummy;
171  }
172  return chamberIndexNames[ index ];
173  }

◆ decomposeSectorLayerHash()

std::pair< MuonStationIndex::DetectorRegionIndex, MuonStationIndex::LayerIndex > Muon::MuonStationIndex::decomposeSectorLayerHash ( unsigned int  hash)
static

decompose the hash into Region and Layer

Definition at line 237 of file MuonStationIndex.cxx.

237  {
238  return std::make_pair( static_cast< DetectorRegionIndex >( hash /
239  LayerIndexMax ),
240  static_cast< LayerIndex >( hash % LayerIndexMax ) );
241  }

◆ layerName()

const std::string & Muon::MuonStationIndex::layerName ( LayerIndex  index)
static

convert LayerIndex into a string

Definition at line 192 of file MuonStationIndex.cxx.

192  {
193  static const std::array<std::string, 6> layerIndexNames {
194  "Inner", "Middle", "Outer", "Extended", "BarrelExtended", "LayerIndexMax"
195  };
196 
197  if( index == LayerUnknown ) {
198  static const std::string dummy( "LayerUnknown" );
199  return dummy;
200  }
201  if( index >= LayerIndexMax ) {
202  static const std::string dummy ( "LayerOutOfRange" );
203  return dummy;
204  }
205  return layerIndexNames[ index ];
206  }

◆ numberOfSectors()

static unsigned int Muon::MuonStationIndex::numberOfSectors ( )
inlinestatic

return total number of sectors

Definition at line 106 of file MuonStationIndex.h.

106 { return 16; }

◆ phiName()

const std::string & Muon::MuonStationIndex::phiName ( PhiIndex  index)
static

convert PhiIndex into a string

Definition at line 124 of file MuonStationIndex.cxx.

124  {
125  static const std::array<std::string, 14> phiIndexNames = {
126  "BI1", "BI2", "BM1", "BM2", "BO1", "BO2", "T1", "T2", "T3", "T4", "CSC", "STGC1",
127  "STGC2", "PhiIndexMax"
128  };
129 
130  if( index == PhiUnknown ) {
131  static const std::string dummy( "PhiUnknown" );
132  return dummy;
133  }
134  if( index >= PhiIndexMax ) {
135  static const std::string dummy( "PhiOutOfRange" );
136  return dummy;
137  }
138  return phiIndexNames[ index ];
139  }

◆ regionName()

const std::string & Muon::MuonStationIndex::regionName ( DetectorRegionIndex  index)
static

convert DetectorRegionIndex into a string

Definition at line 176 of file MuonStationIndex.cxx.

176  {
177  static const std::array<std::string, 4> detectorRegionIndexNames {
178  "EndcapA", "Barrel", "EndcapC", "DetectorRegionIndexMax"
179  };
180 
181  if( index == DetectorRegionUnknown ) {
182  static const std::string dummy( "DetectorRegionUnknown" );
183  return dummy;
184  }
185  if( index >= DetectorRegionIndexMax ) {
186  static const std::string dummy( "DetectorRegionOutOfRange" );
187  return dummy;
188  }
189  return detectorRegionIndexNames[ index ];
190  }

◆ sectorLayerHash()

unsigned int Muon::MuonStationIndex::sectorLayerHash ( DetectorRegionIndex  detectorRegionIndex,
LayerIndex  layerIndex 
)
static

create a hash out of region and layer

Definition at line 226 of file MuonStationIndex.cxx.

227  {
228  return detectorRegionIndex*LayerIndexMax + layerIndex;
229  }

◆ sectorLayerHashMax()

unsigned int Muon::MuonStationIndex::sectorLayerHashMax ( )
static

maximum create a hash out of region and layer

Definition at line 231 of file MuonStationIndex.cxx.

231  {
233  }

◆ stName()

const std::string & Muon::MuonStationIndex::stName ( StIndex  index)
static

convert StIndex into a string

Definition at line 141 of file MuonStationIndex.cxx.

141  {
142  static const std::array<std::string, N_STATION_INDEX> stationIndexNames {
143  "BI", "BM", "BO", "BE", "EI", "EM", "EO", "EE", "StIndexMax"
144  };
145 
146  if( index == StUnknown ) {
147  static const std::string dummy( "StUnknown" );
148  return dummy;
149  }
150  if( index >= StIndexMax ) {
151  static const std::string dummy( "StOutOfRange" );
152  return dummy;
153  }
154  return stationIndexNames[ index ];
155  }

◆ technologyName()

const std::string & Muon::MuonStationIndex::technologyName ( TechnologyIndex  index)
static

convert LayerIndex into a string

Definition at line 209 of file MuonStationIndex.cxx.

209  {
210  static const std::array<std::string, 7> technologyIndexNames {
211  "MDT", "CSC", "RPC", "TGC", "STGC", "MM", "TechnologyIndexMax"
212  };
213 
214  if( index == TechnologyUnknown ) {
215  static const std::string dummy( "TechnologyUnknown" );
216  return dummy;
217  }
218  if( index >= TechnologyIndexMax ) {
219  static const std::string dummy( "TechnologyOutOfRange" );
220  return dummy;
221  }
222  return technologyIndexNames[ index ];
223  }

◆ toChamberIndex() [1/2]

MuonStationIndex::ChIndex Muon::MuonStationIndex::toChamberIndex ( DetectorRegionIndex  region,
LayerIndex  layer,
bool  isSmall 
)
static

convert DetectorRegionIndex + LayerIndex + isSmall into ChIndex

Definition at line 98 of file MuonStationIndex.cxx.

99  {
100  static constexpr std::array<MuonStationIndex::ChIndex, N_REGIONLAYER_INDEX> regionLayerToChamberIndexSmall {
107  };
108  static constexpr std::array<MuonStationIndex::ChIndex, N_REGIONLAYER_INDEX> regionLayerToChamberIndexLarge {
115  };
116  if( isSmall ) {
117  return regionLayerToChamberIndexSmall[ sectorLayerHash( region,
118  layer ) ];
119  }
120  return regionLayerToChamberIndexLarge[ sectorLayerHash( region,
121  layer ) ];
122  }

◆ toChamberIndex() [2/2]

MuonStationIndex::ChIndex Muon::MuonStationIndex::toChamberIndex ( StIndex  stIndex,
bool  isSmall 
)
static

convert StIndex + isSmall into ChIndex

Definition at line 14 of file MuonStationIndex.cxx.

14  {
15  if( stIndex == BE && isSmall ) return ChUnknown;
16  return static_cast<ChIndex>( 2*stIndex + !isSmall );
17  }

◆ toLayerIndex() [1/2]

MuonStationIndex::LayerIndex Muon::MuonStationIndex::toLayerIndex ( ChIndex  index)
static

◆ toLayerIndex() [2/2]

MuonStationIndex::LayerIndex Muon::MuonStationIndex::toLayerIndex ( StIndex  index)
static

convert StIndex into LayerIndex

Definition at line 72 of file MuonStationIndex.cxx.

72  {
73  static constexpr std::array<MuonStationIndex::LayerIndex, N_STATION_INDEX> stationToLayerIndex {
79  };
80  return stationToLayerIndex[ index ];
81  }

◆ toStationIndex() [1/2]

MuonStationIndex::StIndex Muon::MuonStationIndex::toStationIndex ( ChIndex  index)
static

convert ChIndex into StIndex

Definition at line 43 of file MuonStationIndex.cxx.

◆ toStationIndex() [2/2]

MuonStationIndex::StIndex Muon::MuonStationIndex::toStationIndex ( DetectorRegionIndex  region,
LayerIndex  layer 
)
static

convert DetectorRegionIndex + LayerIndex into StIndex

Definition at line 84 of file MuonStationIndex.cxx.

85  {
86  static constexpr std::array<MuonStationIndex::StIndex, N_REGIONLAYER_INDEX> regionLayerToStationIndex {
93  };
94  return regionLayerToStationIndex[ sectorLayerHash( region, layer ) ];
95  }

The documentation for this class was generated from the following files:
Muon::MuonStationIndex::BIS
@ BIS
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::StUnknown
@ StUnknown
Definition: MuonStationIndex.h:24
Muon::MuonStationIndex::BE
@ BE
Definition: MuonStationIndex.h:25
Muon::MuonStationIndex::CSS
@ CSS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::LayerIndexMax
@ LayerIndexMax
BEE.
Definition: MuonStationIndex.h:43
Muon::MuonStationIndex::BarrelExtended
@ BarrelExtended
EE.
Definition: MuonStationIndex.h:42
Muon::MuonStationIndex::EndcapA
@ EndcapA
Definition: MuonStationIndex.h:49
Muon::MuonStationIndex::Inner
@ Inner
Definition: MuonStationIndex.h:40
Muon::MuonStationIndex::STGC1
@ STGC1
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::T1
@ T1
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::Outer
@ Outer
Definition: MuonStationIndex.h:40
Muon::MuonStationIndex::EEL
@ EEL
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::EO
@ EO
Definition: MuonStationIndex.h:26
index
Definition: index.py:1
Muon::MuonStationIndex::TechnologyUnknown
@ TechnologyUnknown
Definition: MuonStationIndex.h:55
Muon::MuonStationIndex::BO1
@ BO1
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::BML
@ BML
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:38
Muon::MuonStationIndex::sectorLayerHash
static unsigned int sectorLayerHash(DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex)
create a hash out of region and layer
Definition: MuonStationIndex.cxx:226
Muon::MuonStationIndex::BI1
@ BI1
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::BI
@ BI
Definition: MuonStationIndex.h:25
Muon::MuonStationIndex::BOS
@ BOS
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::T4
@ T4
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::BMS
@ BMS
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::PhiIndexMax
@ PhiIndexMax
Definition: MuonStationIndex.h:34
Muon::MuonStationIndex::MM
@ MM
Definition: MuonStationIndex.h:56
Muon::MuonStationIndex::EIS
@ EIS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::BI2
@ BI2
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::T2
@ T2
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::EOS
@ EOS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::T3
@ T3
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::PhiUnknown
@ PhiUnknown
Definition: MuonStationIndex.h:32
Muon::MuonStationIndex::BM1
@ BM1
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::BO2
@ BO2
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::BM
@ BM
Definition: MuonStationIndex.h:25
Muon::MuonStationIndex::LayerUnknown
@ LayerUnknown
Definition: MuonStationIndex.h:39
Muon::MuonStationIndex::STGC
@ STGC
Definition: MuonStationIndex.h:56
Muon::MuonStationIndex::EI
@ EI
Definition: MuonStationIndex.h:26
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Muon::MuonStationIndex::Barrel
@ Barrel
Definition: MuonStationIndex.h:49
Muon::MuonStationIndex::DetectorRegionUnknown
@ DetectorRegionUnknown
Definition: MuonStationIndex.h:48
Muon::MuonStationIndex::STGC2
@ STGC2
Definition: MuonStationIndex.h:33
python.xAODType.dummy
dummy
Definition: xAODType.py:4
Muon::MuonStationIndex::CSCI
@ CSCI
Definition: MuonStationIndex.h:56
Muon::MuonStationIndex::EES
@ EES
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::ChUnknown
@ ChUnknown
Definition: MuonStationIndex.h:16
Muon::MuonStationIndex::DetectorRegionIndex
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:47
Muon::MuonStationIndex::StIndexMax
@ StIndexMax
Definition: MuonStationIndex.h:27
Muon::MuonStationIndex::DetectorRegionIndexMax
@ DetectorRegionIndexMax
Definition: MuonStationIndex.h:50
Muon::MuonStationIndex::ChIndexMax
@ ChIndexMax
Definition: MuonStationIndex.h:19
Muon::MuonStationIndex::EML
@ EML
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::MDT
@ MDT
Definition: MuonStationIndex.h:56
DeMoScan.index
string index
Definition: DeMoScan.py:364
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
Muon::MuonStationIndex::BO
@ BO
Definition: MuonStationIndex.h:25
Muon::MuonStationIndex::BIL
@ BIL
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::EndcapC
@ EndcapC
Definition: MuonStationIndex.h:49
Muon::MuonStationIndex::BEE
@ BEE
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::TGC
@ TGC
Definition: MuonStationIndex.h:56
Muon::MuonStationIndex::CSC
@ CSC
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::TechnologyIndexMax
@ TechnologyIndexMax
Definition: MuonStationIndex.h:57
Muon::MuonStationIndex::RPC
@ RPC
Definition: MuonStationIndex.h:56
Muon::MuonStationIndex::Middle
@ Middle
Definition: MuonStationIndex.h:40
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
Muon::MuonStationIndex::Extended
@ Extended
Definition: MuonStationIndex.h:41
Muon::MuonStationIndex::EMS
@ EMS
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::EOL
@ EOL
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::EE
@ EE
Definition: MuonStationIndex.h:26
Muon::MuonStationIndex::BOL
@ BOL
Definition: MuonStationIndex.h:17
Muon::MuonStationIndex::BM2
@ BM2
Definition: MuonStationIndex.h:33
Muon::MuonStationIndex::EM
@ EM
Definition: MuonStationIndex.h:26
Muon::MuonStationIndex::CSL
@ CSL
Definition: MuonStationIndex.h:18
Muon::MuonStationIndex::EIL
@ EIL
Definition: MuonStationIndex.h:18