ATLAS Offline Software
Loading...
Searching...
No Matches
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
12namespace Muon {
13 namespace MuonStationIndex {
15 enum class ChIndex: int8_t {
20 };
21
23 enum class StIndex: int8_t {
25 BI, BM, BO, BE,
26 EI, EM, EO, EE,
28 };
29
31 enum class PhiIndex: int8_t {
35 };
36
45
52
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 }
64
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
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
StIndex
enum to classify the different station layers in the muon spectrometer
const std::string & layerName(LayerIndex index)
convert LayerIndex into a string
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
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
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
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
const std::string & phiName(PhiIndex index)
convert PhiIndex into a string
LayerIndex toLayerIndex(ChIndex index)
convert ChIndex into LayerIndex
LayerIndex
enum to classify the different layers in the muon spectrometer
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