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);
470 int irpctriggerInfo) {
471 std::string SideSector;
473 char sector_char[1000];
475 char dblPhi_char[100];
477 std::vector<std::string> layersectorside_name;
479 std::string sector_name;
480 std::string layer_name;
481 std::string layer_name_ee_pp;
482 std::string layer_name_e_p;
483 std::string layertodraw1_name;
484 std::string layertodraw2_name;
485 std::string layervslayer_name;
486 std::string layer0_name;
487 std::string layer1_name;
488 std::string layer2_name;
489 std::string layerPhivsEta_name;
490 std::string layerPhivsEtaSector_name;
491 std::string layeronly_name;
492 std::string HVorROsideleft =
"HV side";
493 std::string HVorROsideright =
"RO side";
494 std::string layer_name_panel;
495 std::string sector_dphi_layer;
497 int irpcstationPhi =
int(rpcIdHelper.
stationPhi(prdcoll_id));
499 int irpcstationEta =
int(rpcIdHelper.
stationEta(prdcoll_id));
500 int irpcdoubletR =
int(rpcIdHelper.
doubletR(prdcoll_id));
501 int irpcdoubletZ =
int(rpcIdHelper.
doubletZ(prdcoll_id));
502 int irpcdoubletPhi =
int(rpcIdHelper.
doubletPhi(prdcoll_id));
503 int irpcgasGap =
int(rpcIdHelper.
gasGap(prdcoll_id));
506 sprintf(dblZ_char,
"_dblZ%d", irpcdoubletZ);
507 sprintf(dblPhi_char,
"_dblPhi%d", irpcdoubletPhi);
510 if (irpcstationName == 2 || irpcstationName == 3 || irpcstationName == 8 ||
511 irpcstationName == 53) {
512 if (irpcdoubletR == 1) {
513 layer_name =
"LowPt";
515 layer_name =
"Pivot";
518 layer_name =
"HighPt";
520 if (irpcdoubletR == 2)
521 layer_name =
"Pivot";
523 if (irpcstationName == 2 &&
524 ((std::abs(irpcstationEta) == 7) ||
525 (irpcstationPhi == 7 && std::abs(irpcstationEta) == 6)))
526 layer_name =
"Pivot";
528 if (irpcstationName == 3 || irpcstationName == 5 || irpcstationName == 8 ||
529 irpcstationName == 9 || irpcstationName == 10) {
530 HVorROsideleft =
"RO side";
531 HVorROsideright =
"HV side";
534 layer_name_ee_pp = layer_name;
536 if (irpctriggerInfo == 0) {
537 if (irpcgasGap == 1) {
539 layertodraw1_name =
"GasGap1";
540 layertodraw2_name =
"GasGap2";
544 }
else if (irpctriggerInfo == 100) {
545 layer_name =
"HighPt_TriggerFromLowPt";
546 layertodraw1_name =
"TriggerIn";
547 layertodraw2_name =
"TriggerOut LowPt";
548 }
else if (irpctriggerInfo == 106) {
549 layer_name =
"HighPt_TriggerOut";
550 layertodraw1_name =
"TriggerOut";
551 layertodraw2_name =
"GasGap1or2 Pivot";
552 }
else if (irpctriggerInfo == 6 || irpctriggerInfo == 106) {
553 layer_name =
"LowPt_TriggerOut";
554 layertodraw1_name =
"TriggerOut";
555 layertodraw2_name =
"GasGap1or2 Pivot";
557 layer_name +=
"_NotKnown";
561 layeronly_name = layer_name;
562 layer_name_e_p = layer_name;
563 layer_name_panel = layeronly_name + dblPhi_char + dblZ_char;
564 sector_dphi_layer = layer_name + dblPhi_char;
567 if (irpcmeasuresPhi == 0) {
568 layer_name += dblPhi_char;
569 layer_name +=
"_Eta";
570 layer_name_e_p +=
"_Eta";
571 layer_name_panel +=
"_Eta";
572 layer_name_ee_pp += dblPhi_char;
573 layer_name_ee_pp +=
"_Eta";
577 if (irpctriggerInfo == 0) {
578 layervslayer_name = layer_name_ee_pp +
"2vsEta1";
579 }
else if (irpctriggerInfo == 100) {
580 layervslayer_name = layer_name_ee_pp +
"HPtTrInvsLPtTrOut";
581 }
else if (irpctriggerInfo == 6) {
582 layervslayer_name = layer_name_ee_pp +
"vsLPtTrOut";
583 }
else if (irpctriggerInfo == 106) {
584 layervslayer_name = layer_name_ee_pp +
"vsHPtTrOut";
586 layervslayer_name = layer_name_ee_pp +
"_NotKnown";
592 layer0_name =
"<--- IP Rpc Eta strip EC --->";
594 "<--- IP Rpc Eta strip " + layertodraw1_name +
" EC --->";
596 "<--- IP Rpc Eta strip " + layertodraw2_name +
" EC --->";
598 layer0_name = HVorROsideleft +
" Rpc Phi strip " + HVorROsideright;
599 layer_name += dblZ_char;
600 layer_name +=
"_Phi";
601 layer_name_e_p +=
"_Phi";
602 layer_name_panel +=
"_Phi";
603 layer_name_ee_pp += dblZ_char;
604 layer_name_ee_pp +=
"_Phi";
605 layerPhivsEta_name = layer_name_e_p +
"vsEta";
609 if (irpctriggerInfo == 0) {
610 layervslayer_name = layer_name_ee_pp +
"2vsPhi1";
611 }
else if (irpctriggerInfo == 100) {
612 layervslayer_name = layer_name_ee_pp +
"HighPtTrInvsLowPtTrOut";
613 }
else if (irpctriggerInfo == 6) {
614 layervslayer_name = layer_name_ee_pp +
"LowPtvsLowPtTrOut";
615 }
else if (irpctriggerInfo == 106) {
616 layervslayer_name = layer_name_ee_pp +
"HighPtvsHighPtTrOut";
618 layervslayer_name = layer_name_ee_pp +
"_NotKnown";
624 layerPhivsEtaSector_name = sector_name + layer_name_e_p +
"vsEta";
625 layer1_name =
"<--- DBL_PHI0 Rpc Phi strip " + layertodraw1_name +
627 layer2_name =
"<--- DBL_PHI0 Rpc Phi strip " + layertodraw2_name +
632 if (irpcstationEta > 0) {
638 sector = 2 * irpcstationPhi;
639 if (irpcstationName == 2 || irpcstationName == 4)
641 sprintf(sector_char,
"Sector%.2d", sector);
642 SideSector = sector_char;
644 sector_dphi_layer = SideSector +
"_" + sector_dphi_layer;
646 layersectorside_name.push_back(layer_name);
647 layersectorside_name.push_back(layertodraw1_name);
648 layersectorside_name.push_back(layertodraw2_name);
649 layersectorside_name.push_back(layervslayer_name);
650 layersectorside_name.push_back(layer0_name);
651 layersectorside_name.push_back(layer1_name);
652 layersectorside_name.push_back(layer2_name);
653 layersectorside_name.push_back(layerPhivsEta_name);
654 layersectorside_name.push_back(layerPhivsEtaSector_name);
655 layersectorside_name.push_back(SideSector);
656 layersectorside_name.push_back(layeronly_name);
657 layersectorside_name.push_back(layer_name_panel);
658 layersectorside_name.push_back(sector_dphi_layer);
660 return layersectorside_name;