23 int irpcdoubletR =
int(rpcIdHelper.
doubletR(prdcoll_id));
24 int irpcdoubletZ =
int(rpcIdHelper.
doubletZ(prdcoll_id));
26 int irpcgasGap =
int(rpcIdHelper.
gasGap(prdcoll_id));
28 int irpcstrip =
int(rpcIdHelper.
strip(prdcoll_id));
36 std::vector<int> rpcstriptot;
39 int ShiftPhiStrips = descriptor->
NphiStrips() * (irpcdoubletPhi - 1);
41 int ShiftEtaStrips = 0;
43 int NetaStripsTot = 0;
44 int NetaStripsTotSideA = 0;
45 int NetaStripsTotSideC = 0;
46 int ShiftEtaStripsTot = 0;
54 int strip_dbindex = 0;
55 int ShiftPhiTot_db = 0;
56 int NphiStripsTotSideA = 0;
57 int NphiStripsTotSideC = 0;
58 int NetaPanelsTot = 0;
59 int ShiftEtaPanelsTot = 0;
60 int NetaPanelsTotSideA = 0;
61 int NetaPanelsTotSideC = 0;
62 int ShiftStripPhiAtlas = 0;
69 Settore = (irpcstationPhi - 1) * 2;
70 if ((irpcstationName == 3 || irpcstationName == 5 || irpcstationName > 7) &&
71 (irpcstationName < 11)) {
76 Settore = Settore + 1;
79 if (irpcstationEta > 0) {
86 if (irpcstationName == 2 || irpcstationName == 3 || irpcstationName == 8 ||
87 irpcstationName == 53) {
88 if (irpcdoubletR == 1) {
97 if (irpcdoubletR == 2)
100 if (irpcstationName == 2 &&
101 ((std::abs(irpcstationEta) == 7) ||
102 (irpcstationPhi == 7 && std::abs(irpcstationEta) == 6)))
111 int krpcstationName = irpcstationName;
112 int krpcstationNameMin = irpcstationName;
113 int krpcstationNameMax = irpcstationName;
114 if ((irpcstationName == 2 || irpcstationName == 53) &&
115 irpcstationPhi == 7) {
116 krpcstationNameMin = 1;
117 krpcstationNameMax = 2;
119 if (irpcstationName >= 9 && irpcstationName <= 10 &&
121 krpcstationNameMin = 9;
122 krpcstationNameMax = 10;
124 if (irpcstationName >= 8 && irpcstationName <= 10 &&
126 krpcstationNameMin = 8;
127 krpcstationNameMax = 10;
130 for (
int jrpcstationName = krpcstationNameMin;
131 jrpcstationName != krpcstationNameMax + 1; jrpcstationName++) {
132 if (jrpcstationName > 10 && jrpcstationName != 53)
134 krpcstationName = jrpcstationName;
135 if (krpcstationName == 1)
136 krpcstationName = 53;
138 for (
int keta = 0; keta != 9; keta++) {
140 if (irpcstationEta < 0 && ieta == 0)
142 if (irpcstationEta < 0 && ieta > 0)
145 int krpcdoubletR = irpcdoubletR;
147 if (PlaneTipo == 0) {
148 if (krpcstationName == 2 && std::abs(ieta) == 7)
150 if (krpcstationName == 2 && std::abs(ieta) == 6 &&
153 if (krpcstationName == 4 || krpcstationName == 5 ||
154 krpcstationName == 9 || krpcstationName == 10)
156 }
else if (PlaneTipo == 1) {
157 if (krpcstationName == 2 && std::abs(ieta) == 7) {
159 }
else if (krpcstationName == 2 && std::abs(ieta) == 6 &&
160 irpcstationPhi == 7) {
165 }
else if (PlaneTipo == 2) {
166 if (krpcstationName == 2 || krpcstationName == 3 ||
167 krpcstationName == 8 || krpcstationName == 53)
171 for (
int idbz = 1; idbz != 4; idbz++) {
176 krpcstationName, ieta, irpcstationPhi, krpcdoubletR, idbz,
188 if (ieta == irpcstationEta) {
189 if (krpcstationName == irpcstationName) {
190 if (idbz == irpcdoubletZ) {
191 ShiftEtaStrips = NetaStrips;
192 if (irpcstationEta < 0) {
193 ShiftEtaStripsTot = NetaStripsTotSideC;
194 ShiftPhiTot_db = NphiStripsTotSideC;
195 ShiftEtaPanelsTot = NetaPanelsTotSideC;
197 ShiftEtaStripsTot = NetaStripsTotSideA;
198 ShiftPhiTot_db = NphiStripsTotSideA;
199 ShiftEtaPanelsTot = NetaPanelsTotSideA;
208 if (irpcstationEta < 0) {
211 NetaPanelsTotSideC++;
215 NetaPanelsTotSideA++;
224 ShiftStrips = ShiftEtaStrips;
226 if (irpcmeasuresPhi == 1) {
228 ShiftStrips = ShiftPhiStrips;
232 if (irpcstationEta < 0)
235 if (irpcdoubletR == 1) {
236 if (irpcstationName == 2 || irpcstationName == 53) {
237 ShiftStripPhiAtlas = (2 * 48 + 64 * 2) * (irpcstationPhi - 1);
238 }
else if (irpcstationName == 3) {
240 (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 64;
241 }
else if (irpcstationName == 8) {
243 (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 64;
244 }
else if (irpcstationName == 4) {
245 ShiftStripPhiAtlas = (2 * 64 + 80 * 2) * (irpcstationPhi - 1);
248 (2 * 64 + 80 * 2) * (irpcstationPhi - 1) + 2 * 80;
251 if (irpcstationName == 2 && std::abs(irpcstationEta) == 7) {
252 ShiftStripPhiAtlas = (2 * 48 + 64 * 2) * (irpcstationPhi - 1);
253 if (irpcstationPhi == 8)
254 ShiftStripPhiAtlas += 4 * 16;
256 if (irpcstationName == 2 && irpcstationPhi == 7 &&
257 std::abs(irpcstationEta) == 6) {
259 (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 16;
262 if (irpcdoubletR == 2) {
263 if (irpcstationPhi <= 6) {
264 if (irpcstationName == 2) {
265 ShiftStripPhiAtlas = (2 * 48 + 64 * 2) * (irpcstationPhi - 1);
266 }
else if (irpcstationName == 3) {
268 (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 64;
269 }
else if (irpcstationName >= 8 && irpcstationName <= 10) {
271 (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 64;
273 }
else if (irpcstationPhi == 7) {
274 if (irpcstationName == 2 || irpcstationName == 53) {
276 (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 16;
277 }
else if (irpcstationName >= 8 && irpcstationName <= 10) {
279 (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 16 + 2 * 64;
281 }
else if (irpcstationPhi == 8) {
282 if (irpcstationName == 2) {
284 (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 4 * 16;
285 }
else if (irpcstationName == 3) {
287 (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 4 * 16 + 2 * 64;
294 if (irpcmeasuresPhi == 0) {
295 strip_dbindex = (ShiftEtaStripsTot + irpcstrip) * EtaStripSign;
297 if (irpcstationEta < 0) {
298 strip_dbindex = -NetaStripsTotSideC - ShiftPhiTot_db - irpcstrip;
300 strip_dbindex = NetaStripsTotSideA + ShiftPhiTot_db + irpcstrip;
303 if (irpcstationEta >= 0)
304 strip_dbindex = strip_dbindex - 1;
308 int irpcstationName_index = irpcdoubletR - 1;
309 if (irpcstationName != 2 && irpcstationName != 3 && irpcstationName != 8 &&
310 irpcstationName != 53)
311 irpcstationName_index += 2;
313 PanelIndex = irpcmeasuresPhi + (irpcgasGap - 1) * 2 +
314 (irpcdoubletPhi - 1) * 4 + (irpcdoubletZ - 1) * 8 +
315 (irpcstationName_index)*24 + ((std::abs(irpcstationEta))) * 72;
317 if (irpcstationName == 53)
318 PanelIndex = irpcmeasuresPhi + (irpcgasGap - 1) * 2 +
319 (irpcdoubletPhi - 1) * 4 + (irpcdoubletZ - 1) * 8 +
320 (irpcstationName_index)*24;
322 if (irpcstationName == 10) {
325 irpcmeasuresPhi + (irpcgasGap - 1) * 2 + (irpcdoubletPhi - 1) * 4 +
326 16 + (irpcstationName_index)*24 + ((std::abs(irpcstationEta))) * 72;
328 if ((irpcdoubletR == 2) &&
329 (irpcstationName == 9 || irpcstationName == 10)) {
331 PanelIndex = PanelIndex + 7 * 72;
334 if (irpcstationEta < 0)
335 PanelIndex = -PanelIndex;
337 PanelIndex += 1000 * irpctriggerInfo;
342 int tower_dbindex = 0;
343 int panel_dbindex = 0;
346 int laststationEta = 0;
347 int lastdoubletZ = 0;
351 for (
int iphi = 1; iphi != irpcstationPhi + 1; iphi++) {
353 if (iphi == irpcstationPhi) {
354 lastname = irpcstationName;
359 for (
int kname = 1; kname != lastname + 1; kname++) {
363 if (iname > 10 && iname != 53)
365 if (iname == 6 || iname == 7)
370 if (iname == irpcstationName && iphi == irpcstationPhi) {
371 laststationEta = std::abs(irpcstationEta);
374 for (
int ieta = 0; ieta != laststationEta + 1; ieta++) {
375 if (ieta == 0 && irpcstationEta < 0)
378 if (irpcstationEta < 0) {
384 int ir = irpcdoubletR;
386 if (PlaneTipo == 0) {
387 if (iname == 2 && ieta == 7)
389 if (iname == 2 && ieta == 6 && iphi == 7)
391 if (iname == 4 || iname == 5 || iname == 9 || iname == 10)
393 }
else if (PlaneTipo == 1) {
394 if (irpcstationName == 2 && std::abs(irpcstationEta) == 7)
396 if (irpcstationName == 2 && std::abs(irpcstationEta) == 6 &&
399 if (iname == 2 && ieta == 7)
401 if (iname == 2 && ieta == 6 && iphi == 7)
403 }
else if (PlaneTipo == 2) {
404 if (iname == 2 || iname == 3 || iname == 8 || iname == 53)
409 if (iname == irpcstationName && iphi == irpcstationPhi &&
410 keta == irpcstationEta) {
411 lastdoubletZ = irpcdoubletZ;
414 for (
int iz = 1; iz != lastdoubletZ + 1; iz++) {
418 iname, keta, iphi,
ir, iz, 1, 1, 1,
438 rpcstriptot.push_back(NphiStrips);
439 rpcstriptot.push_back(ShiftPhiStrips);
440 rpcstriptot.push_back(NetaStrips);
441 rpcstriptot.push_back(ShiftEtaStrips);
442 rpcstriptot.push_back(ShiftStrips);
443 rpcstriptot.push_back(NetaStripsTot);
444 rpcstriptot.push_back(NetaStripsTotSideA);
445 rpcstriptot.push_back(NetaStripsTotSideC);
446 rpcstriptot.push_back(ShiftEtaStripsTot);
447 rpcstriptot.push_back(Nbin);
448 rpcstriptot.push_back(EtaStripSign);
451 rpcstriptot.push_back(
Side);
452 rpcstriptot.push_back(PanelIndex);
453 rpcstriptot.push_back(Settore);
454 rpcstriptot.push_back(PlaneTipo);
455 rpcstriptot.push_back(strip_dbindex);
456 rpcstriptot.push_back(NphiStripsTotSideA);
457 rpcstriptot.push_back(NphiStripsTotSideC);
458 rpcstriptot.push_back(NetaPanelsTot);
459 rpcstriptot.push_back(ShiftEtaPanelsTot);
460 rpcstriptot.push_back(NetaPanelsTotSideC);
461 rpcstriptot.push_back(NetaPanelsTotSideA);
462 rpcstriptot.push_back(panel_dbindex);
463 rpcstriptot.push_back(tower_dbindex);
464 rpcstriptot.push_back(ShiftStripPhiAtlas);