13 if(
index ==
"BIL" ) {
15 }
else if(
index ==
"BMS" ) {
17 }
else if(
index ==
"BIS" ) {
19 }
else if(
index ==
"BML" ) {
21 }
else if(
index ==
"BOS" ) {
23 }
else if(
index ==
"BOL" ) {
25 }
else if(
index ==
"BEE" ) {
27 }
else if(
index ==
"EIS" ) {
29 }
else if(
index ==
"EIL" ) {
31 }
else if(
index ==
"EMS" ) {
33 }
else if(
index ==
"EML" ) {
35 }
else if(
index ==
"EOS" ) {
37 }
else if(
index ==
"EOL" ) {
39 }
else if(
index ==
"EES" ) {
41 }
else if(
index ==
"EEL" ) {
43 }
else if(
index ==
"CSS" ) {
45 }
else if(
index ==
"CSL" ) {
52 static constexpr std::array<StIndex, nMax> regionLayerToStationIndex {
53 StIndex::EI, StIndex::EM, StIndex::EO,
54 StIndex::EE, StIndex::BE, StIndex::BI,
55 StIndex::BM, StIndex::BO, StIndex::StUnknown,
57 StIndex::EI, StIndex::EM, StIndex::EO,
58 StIndex::EE, StIndex::BE
66 static constexpr std::array<ChIndex, nMax> regionLayerToChamberIndexSmall {
74 static constexpr std::array<ChIndex, nMax> regionLayerToChamberIndexLarge {
90 "BI1",
"BI2",
"BM1",
"BM2",
"BO1",
"BO2",
"T1",
"T2",
"T3",
"T4",
"CSC",
"STGC1",
95 static const std::string dummy{
"PhiUnknown"};
99 static const std::string dummy{
"PhiOutOfRange"};
106 static const std::array<std::string,
toInt(StIndex::StIndexMax)> stationIndexNames {
107 "BI",
"BM",
"BO",
"BE",
"EI",
"EM",
"EO",
"EE"};
109 if(
index == StIndex::StUnknown ) {
110 static const std::string dummy{
"StUnknown"};
113 if(
index >= StIndex::StIndexMax) {
114 static const std::string dummy{
"StIndexMax"};
122 "BIS",
"BIL",
"BMS",
"BML",
"BOS",
"BOL",
"BEE",
123 "EIS",
"EIL",
"EMS",
"EML",
"EOS",
"EOL",
"EES",
128 static const std::string dummy{
"ChUnknown"};
132 static const std::string dummy{
"ChOutOfRange"};
141 "EndcapA",
"Barrel",
"EndcapC"};
144 static const std::string dummy(
"DetectorRegionUnknown" );
148 static const std::string dummy(
"DetectorRegionIndexMax" );
151 return detectorRegionIndexNames[
toInt(
index) ];
156 "Inner",
"Middle",
"Outer",
"Extended",
"BarrelExtended"};
159 static const std::string dummy{
"LayerUnknown"};
163 static const std::string dummy{
"LayerOutOfRange"};
172 static const std::array<std::string,
toInt(TechIdx::TechnologyIndexMax)> technologyIndexNames {
173 "MDT",
"CSC",
"RPC",
"TGC",
"STGC",
"MM"};
175 if(
index == TechIdx::TechnologyUnknown ) {
176 static const std::string dummy{
"TechnologyUnknown"};
179 if(
index >= TechIdx::TechnologyIndexMax ) {
180 static const std::string dummy{
"TechnologyIndexMax"};
187 return (ostr<<
stName(stIdx));
190 return (ostr<<
chName(chIdx));
193 return (ostr<<
phiName(phiIdx));
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
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
bool isSmall(const ChIndex index)
Returns true if the chamber index is in a small sector.
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
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
const std::string & phiName(PhiIndex index)
convert PhiIndex into a string
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.