10 std::string
convertChamberName(
int ChamberName ,
int ChamberEta ,
int ChamberPhi ,
const std::string& ChamberType) {
13 int Name_int = ChamberName;
14 int Eta_int = ChamberEta;
15 int Phi_int = ChamberPhi;
20 const std::string&
Type=ChamberType;
24 std::string Name_string;
25 std::string Eta_string;
26 std::string Phi_string;
31 std::vector<int> limits;
39 case 0 : Name_string =
"BIL"; limits.push_back(6); limits.push_back(0); limits.push_back(1); limits.push_back(5); limits.push_back(7); limits.push_back(-100); limits.push_back(1);
break;
40 case 1 : Name_string =
"BIS"; limits.push_back(8); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
41 case 2 : Name_string =
"BML"; limits.push_back(6); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(1);
break;
42 case 3 : Name_string =
"BMS"; limits.push_back(6); limits.push_back(0); limits.push_back(1); limits.push_back(5); limits.push_back(8); limits.push_back(-100); limits.push_back(-1);
break;
43 case 4 : Name_string =
"BOL"; limits.push_back(7); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(1);
break;
44 case 5 : Name_string =
"BOS"; limits.push_back(6); limits.push_back(0); limits.push_back(1); limits.push_back(5); limits.push_back(8); limits.push_back(-100); limits.push_back(-1);
break;
45 case 6 : Name_string =
"BEE"; limits.push_back(2); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
46 case 7 : Name_string =
"BIR"; limits.push_back(6); limits.push_back(0); limits.push_back(100); limits.push_back(-100); limits.push_back(6); limits.push_back(8); limits.push_back(1);
break;
47 case 8 : Name_string =
"BMF"; limits.push_back(3); limits.push_back(0); limits.push_back(100); limits.push_back(-100); limits.push_back(6); limits.push_back(7); limits.push_back(-1);
break;
48 case 9 : Name_string =
"BOF"; limits.push_back(4); limits.push_back(0); limits.push_back(100); limits.push_back(-100); limits.push_back(6); limits.push_back(7); limits.push_back(-1);
break;
49 case 10 : Name_string =
"BOG"; limits.push_back(4); limits.push_back(-100); limits.push_back(100); limits.push_back(-100); limits.push_back(6); limits.push_back(7); limits.push_back(-1);
break;
50 case 11 : Name_string =
"BOH_DOES_NOT_EXIST!"; limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
51 case 12 : Name_string =
"EIC_DOES_NOT_EXIST!"; limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
52 case 13 : Name_string =
"EIL"; limits.push_back(5); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(1);
break;
53 case 14 : Name_string =
"EEL"; limits.push_back(2); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(1);
break;
54 case 15 : Name_string =
"EES"; limits.push_back(2); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
55 case 16 : Name_string =
"EMC_DOES_NOT_EXIST!"; limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
56 case 17 : Name_string =
"EML"; limits.push_back(5); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(1);
break;
57 case 18 : Name_string =
"EMS"; limits.push_back(5); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
58 case 19 : Name_string =
"EOC_DOES_NOT_EXIST!"; limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
59 case 20 : Name_string =
"EOL"; limits.push_back(6); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(1);
break;
60 case 21 : Name_string =
"EOS"; limits.push_back(6); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
64 case 41 : Name_string =
"T1F"; limits.push_back(1); limits.push_back(0); limits.push_back(1); limits.push_back(24); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
65 case 42 : Name_string =
"T1E"; limits.push_back(4); limits.push_back(0); limits.push_back(1); limits.push_back(48); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
66 case 43 : Name_string =
"T2F"; limits.push_back(1); limits.push_back(0); limits.push_back(1); limits.push_back(24); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
67 case 44 : Name_string =
"T2E"; limits.push_back(5); limits.push_back(0); limits.push_back(1); limits.push_back(48); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
68 case 45 : Name_string =
"T3F"; limits.push_back(1); limits.push_back(0); limits.push_back(1); limits.push_back(24); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
69 case 46 : Name_string =
"T3E"; limits.push_back(5); limits.push_back(0); limits.push_back(1); limits.push_back(48); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
70 case 47 : Name_string =
"T4F"; limits.push_back(1); limits.push_back(0); limits.push_back(1); limits.push_back(24); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
71 case 48 : Name_string =
"T4E"; limits.push_back(1); limits.push_back(0); limits.push_back(1); limits.push_back(21); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
74 case 49 : Name_string =
"EIS"; limits.push_back(2); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
75 case 50 : Name_string =
"CSS"; limits.push_back(1); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(-1);
break;
76 case 51 : Name_string =
"CSL"; limits.push_back(1); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(1);
break;
77 case 52 : Name_string =
"BIM"; limits.push_back(5); limits.push_back(0); limits.push_back(100); limits.push_back(-100); limits.push_back(6); limits.push_back(8); limits.push_back(1);
break;
78 case 53 : Name_string =
"BME"; limits.push_back(1); limits.push_back(0); limits.push_back(100); limits.push_back(-100); limits.push_back(7); limits.push_back(7); limits.push_back(-1);
break;
79 case 54 : Name_string =
"BMG"; limits.push_back(3); limits.push_back(0); limits.push_back(100); limits.push_back(-100); limits.push_back(6); limits.push_back(7); limits.push_back(-1);
break;
80 default : Name_string =
"WrongName"; limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100);
82 }
else if (
Type==
"RPC") {
85 case 2 : Name_string =
"BML"; limits.push_back(7); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(1);
break;
86 case 3 : Name_string =
"BMS"; limits.push_back(6); limits.push_back(0); limits.push_back(1); limits.push_back(5); limits.push_back(8); limits.push_back(-100); limits.push_back(-1);
break;
87 case 4 : Name_string =
"BOL"; limits.push_back(6); limits.push_back(0); limits.push_back(1); limits.push_back(8); limits.push_back(-100); limits.push_back(-100); limits.push_back(1);
break;
88 case 5 : Name_string =
"BOS"; limits.push_back(6); limits.push_back(0); limits.push_back(1); limits.push_back(5); limits.push_back(8); limits.push_back(-100); limits.push_back(-1);
break;
89 case 8 : Name_string =
"BMF"; limits.push_back(3); limits.push_back(0); limits.push_back(100); limits.push_back(-100); limits.push_back(6); limits.push_back(7); limits.push_back(-1);
break;
90 case 9 : Name_string =
"BOF"; limits.push_back(4); limits.push_back(0); limits.push_back(100); limits.push_back(-100); limits.push_back(6); limits.push_back(7); limits.push_back(-1);
break;
91 case 10 : Name_string =
"BOG"; limits.push_back(4); limits.push_back(-100); limits.push_back(100); limits.push_back(-100); limits.push_back(6); limits.push_back(7); limits.push_back(-1);
break;
92 default : Name_string =
"WrongName"; limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100); limits.push_back(-100);
94 }
else {Name_string =
"WrongName";}
97 if (Eta_int>=-limits[0] && Eta_int<=limits[0] && Eta_int!=limits[1]){
100 Eta_int=(2*Eta_int)-1;
108 std::stringstream eta_inttostring;
110 eta_inttostring << Eta_int;
111 eta_inttostring >> eta_str;
112 Eta_string += eta_str;
118 Eta_int=(2*Eta_int)+1;
126 std::stringstream eta_inttostring;
128 eta_inttostring << std::abs(Eta_int);
129 eta_inttostring >> eta_str;
130 Eta_string += eta_str;
136 std::stringstream eta_inttostring;
138 eta_inttostring << Eta_int;
139 eta_inttostring >> eta_str;
140 Eta_string += eta_str;
143 }
else {Eta_string=
"WrongEta";}
147 if ((Phi_int>=limits[2] && Phi_int<=limits[3]) || Phi_int==limits[4] || Phi_int==limits[5]) {
149 std::stringstream phi_inttostring;
151 phi_inttostring << Phi_int;
152 phi_inttostring >> phi_str;
153 Phi_string = phi_str ;
156 Phi_int = (2*Phi_int)-1;
157 std::stringstream phi_inttostring;
159 phi_inttostring << Phi_int;
160 phi_inttostring >> phi_str;
162 Phi_string =
"0"+phi_str;
164 Phi_string = phi_str;
169 std::stringstream phi_inttostring;
171 phi_inttostring << Phi_int;
172 phi_inttostring >> phi_str;
174 Phi_string =
"0"+phi_str;
175 }
else {Phi_string = phi_str;}
179 Phi_string=
"WrongPhi";
183 Name_string += Eta_string;
184 Name_string += Phi_string;