ATLAS Offline Software
MuonStationIndex.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONSTATIONINDEX_MUONSTATIONINDEX_H
6 #define MUONSTATIONINDEX_MUONSTATIONINDEX_H
7 
8 #include <string>
9 #include <vector>
10 #include <stdint.h>
11 
12 namespace Muon {
13  namespace MuonStationIndex {
15  enum class ChIndex: int8_t {
16  ChUnknown = -1,
17  BIS, BIL, BMS, BML, BOS, BOL, BEE,
18  EIS, EIL, EMS, EML, EOS, EOL, EES, EEL, CSS, CSL,
20  };
21 
23  enum class StIndex: int8_t {
24  StUnknown = -1,
25  BI, BM, BO, BE,
26  EI, EM, EO, EE,
28  };
29 
31  enum class PhiIndex: int8_t {
32  PhiUnknown = -1,
33  BI1, BI2, BM1, BM2, BO1, BO2, T1, T2, T3, T4, CSC, STGC1, STGC2,
35  };
36 
38  enum class LayerIndex: int8_t {
39  LayerUnknown = -1,
40  Inner, Middle, Outer,
41  Extended,
44  };
45 
47  enum class DetectorRegionIndex: int8_t {
51  };
52 
54  enum class TechnologyIndex: int8_t {
55  TechnologyUnknown = -1,
56  MDT, CSC, RPC, TGC, STGC, MM,
58  };
59  /*** Convert the strong enum to an integer */
60  template <typename EnumType>
61  constexpr int toInt(const EnumType enumVal) {
62  return static_cast<int>(enumVal);
63  }
66 
69 
72 
75 
78 
80  bool isBarrel(const ChIndex index);
82  bool isBarrel(const StIndex index);
84  bool isSmall(const ChIndex index);
87 
89  const std::string& phiName( PhiIndex index ) ;
90 
92  const std::string& stName( StIndex index ) ;
93 
95  const std::string& chName( ChIndex index ) ;
96 
98  const std::string& regionName( DetectorRegionIndex index ) ;
99 
101  const std::string& layerName( LayerIndex index ) ;
102 
104  const std::string& technologyName( TechnologyIndex index ) ;
105 
107  unsigned int sectorLayerHash( DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex );
108 
110  constexpr unsigned int sectorLayerHashMax() {
112  }
113 
115  std::pair<DetectorRegionIndex,LayerIndex> decomposeSectorLayerHash( unsigned int hash );
116 
118  constexpr unsigned numberOfSectors() { return 16; }
119 
121  ChIndex chIndex( const std::string& index );
122 
123  }
124 }
126 #endif
Muon::MuonStationIndex::PhiIndex::T4
@ T4
Muon::MuonStationIndex::LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:38
Muon::MuonStationIndex::DetectorRegionIndex::Barrel
@ Barrel
Muon::MuonStationIndex::PhiIndex::STGC1
@ STGC1
Muon::MuonStationIndex::LayerIndex::Outer
@ Outer
Muon::MuonStationIndex::PhiIndex::BO1
@ BO1
Muon::MuonStationIndex::toChamberIndex
ChIndex toChamberIndex(DetectorRegionIndex region, LayerIndex layer, bool isSmall)
convert DetectorRegionIndex + LayerIndex + isSmall into ChIndex
Definition: MuonStationIndex.cxx:63
Muon::MuonStationIndex::ChIndex::EEL
@ EEL
Muon::MuonStationIndex::sectorLayerHashMax
constexpr unsigned int sectorLayerHashMax()
maximum create a hash out of region and layer
Definition: MuonStationIndex.h:110
Muon::MuonStationIndex::ChIndex::EML
@ EML
Muon::MuonStationIndex::ChIndex::EOS
@ EOS
Muon::MuonStationIndex::TechnologyIndex::RPC
@ RPC
index
Definition: index.py:1
Muon::MuonStationIndex::StIndex::EM
@ EM
Muon::MuonStationIndex::sectorLayerHash
unsigned int sectorLayerHash(DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex)
create a hash out of region and layer
Muon::MuonStationIndex::ChIndex::BIL
@ BIL
Muon::MuonStationIndex::stName
const std::string & stName(StIndex index)
convert StIndex into a string
Definition: MuonStationIndex.cxx:104
Muon::MuonStationIndex::LayerIndex::BarrelExtended
@ BarrelExtended
EE.
Muon::MuonStationIndex::PhiIndex::BM1
@ BM1
Muon::MuonStationIndex::TechnologyIndex
TechnologyIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:54
Muon::MuonStationIndex::LayerIndex::Inner
@ Inner
Muon::MuonStationIndex::PhiIndex::STGC2
@ STGC2
Muon::MuonStationIndex::DetectorRegionIndex::EndcapA
@ EndcapA
Muon::MuonStationIndex::ChIndex::EIS
@ EIS
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::MuonStationIndex::DetectorRegionIndex::DetectorRegionIndexMax
@ DetectorRegionIndexMax
Muon::MuonStationIndex::ChIndex::ChIndexMax
@ ChIndexMax
Muon::MuonStationIndex::TechnologyIndex::MDT
@ MDT
Muon::MuonStationIndex::TechnologyIndex::TechnologyIndexMax
@ TechnologyIndexMax
Muon::MuonStationIndex::numberOfSectors
constexpr unsigned numberOfSectors()
return total number of sectors
Definition: MuonStationIndex.h:118
Muon::MuonStationIndex::ChIndex::CSL
@ CSL
Muon::MuonStationIndex::PhiIndex::T1
@ T1
Muon::MuonStationIndex::PhiIndex::PhiUnknown
@ PhiUnknown
Muon::MuonStationIndex::StIndex::StUnknown
@ StUnknown
Muon::MuonStationIndex::LayerIndex::LayerUnknown
@ LayerUnknown
Muon::MuonStationIndex::ChIndex::EIL
@ EIL
Muon::MuonStationIndex::toStationIndex
StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
Muon::MuonStationIndex::TechnologyIndex::MM
@ MM
Muon::MuonStationIndex::ChIndex::BIS
@ BIS
Muon::MuonStationIndex::PhiIndex::CSC
@ CSC
MuonStationIndex.icc
Muon::MuonStationIndex::TechnologyIndex::TGC
@ TGC
Muon::MuonStationIndex::chIndex
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
Definition: MuonStationIndex.cxx:11
Muon::MuonStationIndex::chName
const std::string & chName(ChIndex index)
convert ChIndex into a string
Definition: MuonStationIndex.cxx:119
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Muon::MuonStationIndex::ChIndex::BML
@ BML
Muon::MuonStationIndex::ChIndex::CSS
@ CSS
Muon::MuonStationIndex::ChIndex::BOS
@ BOS
Muon::MuonStationIndex::PhiIndex::BI2
@ BI2
Muon::MuonStationIndex::technologyName
const std::string & technologyName(TechnologyIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:169
Muon::MuonStationIndex::StIndex::EE
@ EE
Muon::MuonStationIndex::ChIndex::EES
@ EES
Muon::MuonStationIndex::StIndex::BO
@ BO
Muon::MuonStationIndex::ChIndex::BEE
@ BEE
Muon::MuonStationIndex::StIndex
StIndex
enum to classify the different station layers in the muon spectrometer
Definition: MuonStationIndex.h:23
Muon::MuonStationIndex::PhiIndex::BI1
@ BI1
Muon::MuonStationIndex::ChIndex::BMS
@ BMS
Muon::MuonStationIndex::PhiIndex::BO2
@ BO2
Muon::MuonStationIndex::LayerIndex::Extended
@ Extended
Muon::MuonStationIndex::DetectorRegionIndex::EndcapC
@ EndcapC
Muon::MuonStationIndex::StIndex::BE
@ BE
Muon::MuonStationIndex::layerName
const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
Definition: MuonStationIndex.cxx:153
Muon::MuonStationIndex::isBarrel
bool isBarrel(const ChIndex index)
Returns true if the chamber index points to a barrel chamber.
Muon::MuonStationIndex::PhiIndex
PhiIndex
enum to classify the different phi layers in the muon spectrometer
Definition: MuonStationIndex.h:31
Muon::MuonStationIndex::regionName
const std::string & regionName(DetectorRegionIndex index)
convert DetectorRegionIndex into a string
Definition: MuonStationIndex.cxx:138
Muon::MuonStationIndex::StIndex::StIndexMax
@ StIndexMax
Muon::MuonStationIndex::DetectorRegionIndex::DetectorRegionUnknown
@ DetectorRegionUnknown
Muon::MuonStationIndex::LayerIndex::LayerIndexMax
@ LayerIndexMax
BEE.
Muon::MuonStationIndex::PhiIndex::T3
@ T3
Muon::MuonStationIndex::DetectorRegionIndex
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
Definition: MuonStationIndex.h:47
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
Muon::MuonStationIndex::PhiIndex::T2
@ T2
Muon::MuonStationIndex::LayerIndex::Middle
@ Middle
Muon::MuonStationIndex::TechnologyIndex::CSC
@ CSC
Muon::MuonStationIndex::PhiIndex::BM2
@ BM2
Muon::MuonStationIndex::TechnologyIndex::STGC
@ STGC
Muon::MuonStationIndex::TechnologyIndex::TechnologyUnknown
@ TechnologyUnknown
Muon::MuonStationIndex::ChIndex::EOL
@ EOL
Muon::MuonStationIndex::StIndex::EO
@ EO
Muon::MuonStationIndex::toLayerIndex
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
Muon::MuonStationIndex::PhiIndex::PhiIndexMax
@ PhiIndexMax
Muon::MuonStationIndex::ChIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
Definition: MuonStationIndex.h:15
Muon::MuonStationIndex::ChIndex::ChUnknown
@ ChUnknown
Muon::MuonStationIndex::ChIndex::EMS
@ EMS
Muon::MuonStationIndex::StIndex::BI
@ BI
Muon::MuonStationIndex::StIndex::BM
@ BM
Muon::MuonStationIndex::phiName
const std::string & phiName(PhiIndex index)
convert PhiIndex into a string
Definition: MuonStationIndex.cxx:87
Muon::MuonStationIndex::decomposeSectorLayerHash
std::pair< DetectorRegionIndex, LayerIndex > decomposeSectorLayerHash(unsigned int hash)
decompose the hash into Region and Layer
Muon::MuonStationIndex::StIndex::EI
@ EI
Muon::MuonStationIndex::isSmall
bool isSmall(const ChIndex index)
Returns true if the chamber index is in a small sector.
Muon::MuonStationIndex::toInt
constexpr int toInt(const EnumType enumVal)
Definition: MuonStationIndex.h:61
Muon::MuonStationIndex::ChIndex::BOL
@ BOL