ATLAS Offline Software
Functions
MuonSimValUtils/src/MuonStrToIntName.cxx File Reference
#include "MuonSimValUtils/MuonStrToIntName.h"
Include dependency graph for MuonSimValUtils/src/MuonStrToIntName.cxx:

Go to the source code of this file.

Functions

int convertStrToIntName (const std::string &ChamberName, const std::string &ChamberType)
 

Function Documentation

◆ convertStrToIntName()

int convertStrToIntName ( const std::string &  ChamberName,
const std::string &  ChamberType 
)

Definition at line 8 of file MuonSimValUtils/src/MuonStrToIntName.cxx.

8  {
9 
10  //Input values
11  const std::string& Name_str = ChamberName;
12 
13  //add type
14  //"MDT","CSC","TGC" go in the same loop while
15  //"RPC" go to a different loop due to the same
16  //naming with "MDT"
17  const std::string& Type=ChamberType;
18 
19 
20  //Set string variables
21  int Name_int;
22 
23 
24 
25  if (Type=="MDT" || Type=="CSC" || Type=="TGC"){
26  //Switch from ATHENA int name to Hardware string name
27  if (Name_str=="BIL") Name_int = 0;
28  else if (Name_str=="BIS") Name_int = 1;
29  else if (Name_str=="BML") Name_int = 2;
30  else if (Name_str=="BMS") Name_int = 3;
31  else if (Name_str=="BOL") Name_int = 4;
32  else if (Name_str=="BOS") Name_int = 5;
33  else if (Name_str=="BEE") Name_int = 6;
34  else if (Name_str=="BIR") Name_int = 7;
35  else if (Name_str=="BMF") Name_int = 8;
36  else if (Name_str=="BOF") Name_int = 9;
37  else if (Name_str=="BOG") Name_int = 10;
38  else if (Name_str=="BOH") Name_int = 11;
39  else if (Name_str=="EIC") Name_int = 12;
40  else if (Name_str=="EIL") Name_int = 13;
41  else if (Name_str=="EEL") Name_int = 14;
42  else if (Name_str=="EES") Name_int = 15;
43  else if (Name_str=="EMC") Name_int = 16;
44  else if (Name_str=="EML") Name_int = 17;
45  else if (Name_str=="EMS") Name_int = 18;
46  else if (Name_str=="EOC") Name_int = 19;
47  else if (Name_str=="EOL") Name_int = 20;
48  else if (Name_str=="EOS") Name_int = 21;
49  else if (Name_str=="T1C") Name_int = 22;
50  else if (Name_str=="T1L") Name_int = 23;
51  else if (Name_str=="T1S") Name_int = 24;
52  else if (Name_str=="T2C") Name_int = 25;
53  else if (Name_str=="T2L") Name_int = 26;
54  else if (Name_str=="T2S") Name_int = 27;
55  else if (Name_str=="T3C") Name_int = 28;
56  else if (Name_str=="T3L") Name_int = 29;
57  else if (Name_str=="T3S") Name_int = 30;
58  else if (Name_str=="CI1") Name_int = 31;
59  else if (Name_str=="CI2") Name_int = 32;
60  else if (Name_str=="CI3") Name_int = 33;
61  else if (Name_str=="CI4") Name_int = 34;
62  else if (Name_str=="FIL") Name_int = 35;
63  else if (Name_str=="FIS") Name_int = 36;
64  else if (Name_str=="FML") Name_int = 37;
65  else if (Name_str=="FMS") Name_int = 38;
66  else if (Name_str=="FOL") Name_int = 39;
67  else if (Name_str=="FOS") Name_int = 40;
68  else if (Name_str=="T1F") Name_int = 41;
69  else if (Name_str=="T1E") Name_int = 42;
70  else if (Name_str=="T2F") Name_int = 43;
71  else if (Name_str=="T2E") Name_int = 44;
72  else if (Name_str=="T3F") Name_int = 45;
73  else if (Name_str=="T3E") Name_int = 46;
74  else if (Name_str=="T4F") Name_int = 47;
75  else if (Name_str=="T4E") Name_int = 48;
76  else if (Name_str=="EIS") Name_int = 49;
77  else if (Name_str=="CSS") Name_int = 50;
78  else if (Name_str=="CSL") Name_int = 51;
79  else if (Name_str=="BIM") Name_int = 52;
80  else Name_int = -1;
81 
82  } else if (Type=="RPC") {
83  if (Name_str=="BML") Name_int = 2;
84  else if (Name_str=="BMS") Name_int = 3;
85  else if (Name_str=="BOL") Name_int = 4;
86  else if (Name_str=="BOS") Name_int = 5;
87  else if (Name_str=="BMF") Name_int = 8;
88  else if (Name_str=="BOF") Name_int = 9;
89  else if (Name_str=="BOG") Name_int = 10;
90  else Name_int = -1;
91  } else {Name_int = -1;}
92 
93 
94 
95 
96 
97  //Return int StationName
98 
99  return Name_int;
100 
101 }
xAODType
Definition: ObjectType.h:13