ATLAS Offline Software
Loading...
Searching...
No Matches
MuonStationIndex.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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#include <iosfwd>
12
13namespace Muon {
14 namespace MuonStationIndex {
16 enum class ChIndex: int8_t {
21 };
22
24 enum class StIndex: int8_t {
26 BI, BM, BO, BE,
27 EI, EM, EO, EE,
29 };
30
32 enum class PhiIndex: int8_t {
36 };
37
46
53
60 /*** Convert the strong enum to an integer */
61 template <typename EnumType>
62 constexpr int toInt(const EnumType enumVal) {
63 return static_cast<int>(enumVal);
64 }
65
67
70
73
76
79
82
84 bool isBarrel(const ChIndex index);
86 bool isBarrel(const StIndex index);
88 bool isSmall(const ChIndex index);
91
93 const std::string& phiName( PhiIndex index ) ;
94
96 const std::string& stName( StIndex index ) ;
97
99 const std::string& chName( ChIndex index ) ;
100
102 const std::string& regionName( DetectorRegionIndex index ) ;
103
105 const std::string& layerName( LayerIndex index ) ;
106
108 const std::string& technologyName( TechnologyIndex index ) ;
109
111 unsigned int sectorLayerHash( DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex );
112
114 unsigned int regionChambernHash( DetectorRegionIndex regionIdx, ChIndex chamberIdx );
115
120
125
126 std::pair<DetectorRegionIndex,LayerIndex> decomposeSectorLayerHash( unsigned int hash );
127
129 std::pair<DetectorRegionIndex, ChIndex> decomposeRegionChamberHash( unsigned int hash );
130
132 constexpr unsigned numberOfSectors() { return 16; }
133
135 ChIndex chIndex( const std::string& index );
136
137 std::ostream& operator<<(std::ostream& ostr, const StIndex stIdx);
138 std::ostream& operator<<(std::ostream& ostr, const ChIndex chIdx);
139 std::ostream& operator<<(std::ostream& ostr, const PhiIndex phiIdx);
140 std::ostream& operator<<(std::ostream& ostr, const DetectorRegionIndex detIdx);
141 std::ostream& operator<<(std::ostream& ostr, const LayerIndex layIdx);
142 std::ostream& operator<<(std::ostream& ostr, const TechnologyIndex techIdx);
143
144 }
145}
147#endif
@ BIL
Definition RegSelEnums.h:10
@ BOL
Definition RegSelEnums.h:14
@ BIS
Definition RegSelEnums.h:11
@ BOS
Definition RegSelEnums.h:15
@ BML
Definition RegSelEnums.h:12
@ BMS
Definition RegSelEnums.h:13
@ CSC
Definition RegSelEnums.h:34
@ STGC
Definition RegSelEnums.h:39
@ MM
Definition RegSelEnums.h:38
@ RPC
Definition RegSelEnums.h:32
@ MDT
Definition RegSelEnums.h:31
StIndex
enum to classify the different station layers in the muon spectrometer
const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
std::pair< DetectorRegionIndex, ChIndex > decomposeRegionChamberHash(unsigned int hash)
decompose the hash into Region and Chamber
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
std::ostream & operator<<(std::ostream &ostr, const StIndex stIdx)
TechnologyIndex
enum to classify the different layers in the muon spectrometer
DetectorRegionIndex
enum to classify the different layers in the muon spectrometer
PhiIndex
enum to classify the different phi layers in the muon spectrometer
StIndex toStationIndex(ChIndex index)
convert ChIndex into StIndex
constexpr unsigned numberOfSectors()
return total number of sectors
unsigned int regionChambernHash(DetectorRegionIndex regionIdx, ChIndex chamberIdx)
create a hash out of chamber index and detector region
bool isSmall(const ChIndex index)
Returns true if the chamber index is in a small sector.
std::pair< DetectorRegionIndex, LayerIndex > decomposeSectorLayerHash(unsigned int hash)
decompose the hash into Region and Layer
constexpr int toInt(const EnumType enumVal)
constexpr unsigned int sectorLayerHashMax()
maximum create a hash out of region and layer
ChIndex toChamberIndex(DetectorRegionIndex region, LayerIndex layer, bool isSmall)
convert DetectorRegionIndex + LayerIndex + isSmall into ChIndex
bool isBarrel(const ChIndex index)
Returns true if the chamber index points to a barrel chamber.
unsigned int sectorLayerHash(DetectorRegionIndex detectorRegionIndex, LayerIndex layerIndex)
create a hash out of region and layer
LayerIndex
enum to classify the different layers in the muon spectrometer
const std::string & stName(StIndex index)
convert StIndex into a string
const std::string & technologyName(TechnologyIndex index)
convert LayerIndex into a string
const std::string & chName(ChIndex index)
convert ChIndex into a string
const std::string & regionName(DetectorRegionIndex index)
convert DetectorRegionIndex into a string
constexpr unsigned int regionChamberHashMax()
maximum create a hash out of chamber and region index
const std::string & phiName(PhiIndex index)
convert PhiIndex into a string
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
DetectorRegionIndex toDetectorRegionIndex(ChIndex index, int8_t etaSign)
convert ChamberIndex + etaSign into DetectorRegionIndex
ChIndex
enum to classify the different chamber layers in the muon spectrometer
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition TgcBase.h:6
Definition index.py:1