ATLAS Offline Software
RpcGlobalUtilities.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "RpcGlobalUtilities.h"
6 
7 #include <cmath>
8 #include <cstdlib>
9 #include <iostream>
10 #include <sstream>
11 
15 
16 namespace RpcGM {
17 std::vector<int> RpcStripShift(const MuonGM::MuonDetectorManager* muonMgr,
18  const RpcIdHelper& rpcIdHelper,
19  Identifier prdcoll_id, int irpctriggerInfo) {
20  int irpcstationPhi = int(rpcIdHelper.stationPhi(prdcoll_id));
21  int irpcstationName = int(rpcIdHelper.stationName(prdcoll_id));
22  int irpcstationEta = int(rpcIdHelper.stationEta(prdcoll_id));
23  int irpcdoubletR = int(rpcIdHelper.doubletR(prdcoll_id));
24  int irpcdoubletZ = int(rpcIdHelper.doubletZ(prdcoll_id));
25  int irpcdoubletPhi = int(rpcIdHelper.doubletPhi(prdcoll_id));
26  int irpcgasGap = int(rpcIdHelper.gasGap(prdcoll_id));
27  int irpcmeasuresPhi = int(rpcIdHelper.measuresPhi(prdcoll_id));
28  int irpcstrip = int(rpcIdHelper.strip(prdcoll_id));
29 
30  // get information from geomodel to book and fill rpc histos with the right
31  // max strip number
32 
33  const MuonGM::RpcReadoutElement* descriptor =
34  muonMgr->getRpcReadoutElement(prdcoll_id);
35 
36  std::vector<int> rpcstriptot;
37 
38  int NphiStrips = descriptor->NphiStrips() * 2;
39  int ShiftPhiStrips = descriptor->NphiStrips() * (irpcdoubletPhi - 1);
40  int NetaStrips = 0;
41  int ShiftEtaStrips = 0;
42  int ShiftStrips = 0;
43  int NetaStripsTot = 0;
44  int NetaStripsTotSideA = 0;
45  int NetaStripsTotSideC = 0;
46  int ShiftEtaStripsTot = 0;
47  int Nbin = 0;
48  int EtaStripSign = 0;
49  int SectorLogic = 0;
50  int Side = 0;
51  int PanelIndex = 0;
52  int Settore = 0;
53  int PlaneTipo = 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;
63 
64  // 1***
65  // evaluate sector logic
66  // 2=BML,3=BMS,4=BOL,5=BOS,8=BMF,9=BOF,10=BOG,53=BME
67  SectorLogic = (irpcstationPhi - 1) * 4;
68  SectorLogic += irpcdoubletPhi;
69  Settore = (irpcstationPhi - 1) * 2;
70  if ((irpcstationName == 3 || irpcstationName == 5 || irpcstationName > 7) &&
71  (irpcstationName < 11)) {
72  SectorLogic += 2;
73  Settore++;
74  }
76  Settore = Settore + 1;
77  if (SectorLogic == -1)
78  SectorLogic = 31;
79  if (irpcstationEta > 0) {
80  Side = 1;
81  SectorLogic += 32;
82  }
83 
84  // evaluate plane type
85  // 2=BML,3=BMS,4=BOL,5=BOS,8=BMF,9=BOF,10=BOG,53=BME
86  if (irpcstationName == 2 || irpcstationName == 3 || irpcstationName == 8 ||
87  irpcstationName == 53) {
88  if (irpcdoubletR == 1) {
89  PlaneTipo = 0;
90  } else {
91  PlaneTipo = 1;
92  }
93  } else {
94  PlaneTipo = 2;
95  }
96  // Extension feet Pivot
97  if (irpcdoubletR == 2)
98  PlaneTipo = 1;
99  // BML7 assigned to pivot
100  if (irpcstationName == 2 &&
101  ((std::abs(irpcstationEta) == 7) ||
102  (irpcstationPhi == 7 && std::abs(irpcstationEta) == 6)))
103  PlaneTipo = 1;
104 
105  // evaluate strip shift
106  // 2=BML,3=BMS,4=BOL,5=BOS,8=BMF,9=BOF,10=BOG,53=BME
108  // the eta strip number increases going far away from IP
109  // the phi strip number increases going from HV side to RO side
110 
111  int krpcstationName = irpcstationName;
112  int krpcstationNameMin = irpcstationName;
113  int krpcstationNameMax = irpcstationName;
114  if ((irpcstationName == 2 || irpcstationName == 53) &&
115  irpcstationPhi == 7) { // sector 13 with BME
116  krpcstationNameMin = 1;
117  krpcstationNameMax = 2;
118  }
119  if (irpcstationName >= 9 && irpcstationName <= 10 &&
120  irpcdoubletR == 1) { // feet extension
121  krpcstationNameMin = 9;
122  krpcstationNameMax = 10;
123  }
124  if (irpcstationName >= 8 && irpcstationName <= 10 &&
125  irpcdoubletR == 2) { // feet extension
126  krpcstationNameMin = 8;
127  krpcstationNameMax = 10;
128  }
129 
130  for (int jrpcstationName = krpcstationNameMin;
131  jrpcstationName != krpcstationNameMax + 1; jrpcstationName++) {
132  if (jrpcstationName > 10 && jrpcstationName != 53)
133  continue;
134  krpcstationName = jrpcstationName;
135  if (krpcstationName == 1)
136  krpcstationName = 53; // BME
137 
138  for (int keta = 0; keta != 9; keta++) {
139  int ieta = keta;
140  if (irpcstationEta < 0 && ieta == 0)
141  continue;
142  if (irpcstationEta < 0 && ieta > 0)
143  ieta = -keta; //
144 
145  int krpcdoubletR = irpcdoubletR;
146 
147  if (PlaneTipo == 0) {
148  if (krpcstationName == 2 && std::abs(ieta) == 7)
149  continue;
150  if (krpcstationName == 2 && std::abs(ieta) == 6 &&
151  irpcstationPhi == 7)
152  continue;
153  if (krpcstationName == 4 || krpcstationName == 5 ||
154  krpcstationName == 9 || krpcstationName == 10)
155  continue;
156  } else if (PlaneTipo == 1) {
157  if (krpcstationName == 2 && std::abs(ieta) == 7) {
158  krpcdoubletR = 1;
159  } else if (krpcstationName == 2 && std::abs(ieta) == 6 &&
160  irpcstationPhi == 7) {
161  krpcdoubletR = 1;
162  } else {
163  krpcdoubletR = 2;
164  }
165  } else if (PlaneTipo == 2) {
166  if (krpcstationName == 2 || krpcstationName == 3 ||
167  krpcstationName == 8 || krpcstationName == 53)
168  continue;
169  }
170 
171  for (int idbz = 1; idbz != 4; idbz++) {
172  bool isValid = false;
173  if (krpcstationName > rpcIdHelper.stationNameIndexMax())
174  continue;
175  Identifier rpcId = rpcIdHelper.channelID(
176  krpcstationName, ieta, irpcstationPhi, krpcdoubletR, idbz,
177  1, 1, 1, 1,
178  isValid); // last 5 arguments are: int doubletPhi, int
179  // gasGap, int measuresPhi, int strip, isValid
180  if (!isValid)
181  continue;
182  const MuonGM::RpcReadoutElement* rpc =
183  muonMgr->getRpcReadoutElement(rpcId);
184  if (rpc) {
185  if (idbz != rpc->getDoubletZ())
186  continue;
187 
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;
196  } else {
197  ShiftEtaStripsTot = NetaStripsTotSideA;
198  ShiftPhiTot_db = NphiStripsTotSideA;
199  ShiftEtaPanelsTot = NetaPanelsTotSideA;
200  }
201  }
202  NetaStrips += rpc->NetaStrips();
203  }
204  }
205 
206  NetaStripsTot += rpc->NetaStrips();
207  NetaPanelsTot++;
208  if (irpcstationEta < 0) {
209  NetaStripsTotSideC += rpc->NetaStrips();
210  NphiStripsTotSideC += rpc->NphiStrips();
211  NetaPanelsTotSideC++;
212  } else {
213  NetaStripsTotSideA += rpc->NetaStrips();
214  NphiStripsTotSideA += rpc->NphiStrips();
215  NetaPanelsTotSideA++;
216  }
217 
218  } // check if rpc is nullptr
219  } // for loop in idbz
220  } // for loop in krpcstationName
221  } // for loop in etastation
222 
223  Nbin = NetaStrips;
224  ShiftStrips = ShiftEtaStrips;
225  // re-define for phi view
226  if (irpcmeasuresPhi == 1) {
227  Nbin = NphiStrips;
228  ShiftStrips = ShiftPhiStrips;
229  }
230 
231  EtaStripSign = 1;
232  if (irpcstationEta < 0)
233  EtaStripSign = -1;
234 
235  if (irpcdoubletR == 1) {
236  if (irpcstationName == 2 || irpcstationName == 53) {
237  ShiftStripPhiAtlas = (2 * 48 + 64 * 2) * (irpcstationPhi - 1);
238  } else if (irpcstationName == 3) {
239  ShiftStripPhiAtlas =
240  (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 64;
241  } else if (irpcstationName == 8) {
242  ShiftStripPhiAtlas =
243  (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 64;
244  } else if (irpcstationName == 4) {
245  ShiftStripPhiAtlas = (2 * 64 + 80 * 2) * (irpcstationPhi - 1);
246  } else {
247  ShiftStripPhiAtlas =
248  (2 * 64 + 80 * 2) * (irpcstationPhi - 1) + 2 * 80;
249  }
250  // BML7 assigned to pivot
251  if (irpcstationName == 2 && std::abs(irpcstationEta) == 7) {
252  ShiftStripPhiAtlas = (2 * 48 + 64 * 2) * (irpcstationPhi - 1);
253  if (irpcstationPhi == 8)
254  ShiftStripPhiAtlas += 4 * 16;
255  }
256  if (irpcstationName == 2 && irpcstationPhi == 7 &&
257  std::abs(irpcstationEta) == 6) {
258  ShiftStripPhiAtlas =
259  (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 16;
260  }
261  }
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) {
267  ShiftStripPhiAtlas =
268  (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 64;
269  } else if (irpcstationName >= 8 && irpcstationName <= 10) {
270  ShiftStripPhiAtlas =
271  (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 64;
272  }
273  } else if (irpcstationPhi == 7) {
274  if (irpcstationName == 2 || irpcstationName == 53) {
275  ShiftStripPhiAtlas =
276  (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 16;
277  } else if (irpcstationName >= 8 && irpcstationName <= 10) {
278  ShiftStripPhiAtlas =
279  (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 2 * 16 + 2 * 64;
280  }
281  } else if (irpcstationPhi == 8) {
282  if (irpcstationName == 2) {
283  ShiftStripPhiAtlas =
284  (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 4 * 16;
285  } else if (irpcstationName == 3) {
286  ShiftStripPhiAtlas =
287  (2 * 48 + 64 * 2) * (irpcstationPhi - 1) + 4 * 16 + 2 * 64;
288  }
289  }
290  }
291  // 2***
292  // cool db strip index
293 
294  if (irpcmeasuresPhi == 0) {
295  strip_dbindex = (ShiftEtaStripsTot + irpcstrip) * EtaStripSign;
296  } else {
297  if (irpcstationEta < 0) {
298  strip_dbindex = -NetaStripsTotSideC - ShiftPhiTot_db - irpcstrip;
299  } else {
300  strip_dbindex = NetaStripsTotSideA + ShiftPhiTot_db + irpcstrip;
301  }
302  }
303  if (irpcstationEta >= 0)
304  strip_dbindex = strip_dbindex - 1;
305 
306  // 3***
307  // bin panel number for summary plots
308  int irpcstationName_index = irpcdoubletR - 1; // 0 LowPt, 1 Pivot, 2 HighPt
309  if (irpcstationName != 2 && irpcstationName != 3 && irpcstationName != 8 &&
310  irpcstationName != 53)
311  irpcstationName_index += 2;
312 
313  PanelIndex = irpcmeasuresPhi + (irpcgasGap - 1) * 2 +
314  (irpcdoubletPhi - 1) * 4 + (irpcdoubletZ - 1) * 8 +
315  (irpcstationName_index)*24 + ((std::abs(irpcstationEta))) * 72;
316  // exception station name=53, assume irpcstationEta = 0 ;
317  if (irpcstationName == 53)
318  PanelIndex = irpcmeasuresPhi + (irpcgasGap - 1) * 2 +
319  (irpcdoubletPhi - 1) * 4 + (irpcdoubletZ - 1) * 8 +
320  (irpcstationName_index)*24;
321  // exception for special chambers sectors 12 and 14:
322  if (irpcstationName == 10) {
323  // convention: BOG <-> doubletZ=3 <-> (3-1)*8=16
324  PanelIndex =
325  irpcmeasuresPhi + (irpcgasGap - 1) * 2 + (irpcdoubletPhi - 1) * 4 +
326  16 + (irpcstationName_index)*24 + ((std::abs(irpcstationEta))) * 72;
327  }
328  if ((irpcdoubletR == 2) &&
329  (irpcstationName == 9 || irpcstationName == 10)) {
330  // convention: chambers of RPC upgrade -> eta = eta + 7
331  PanelIndex = PanelIndex + 7 * 72;
332  }
333 
334  if (irpcstationEta < 0)
335  PanelIndex = -PanelIndex;
336 
337  PanelIndex += 1000 * irpctriggerInfo;
338 
339  // 4***
340  // panel and tower consecutive index
341 
342  int tower_dbindex = 0;
343  int panel_dbindex = 0;
344 
345  int lastname = 0;
346  int laststationEta = 0;
347  int lastdoubletZ = 0;
348 
349  // 2=BML,3=BMS,4=BOL,5=BOS,8=BMF,9=BOF,10=BOG,53=BME
350 
351  for (int iphi = 1; iphi != irpcstationPhi + 1; iphi++) {
352  lastname = 10;
353  if (iphi == irpcstationPhi) {
354  lastname = irpcstationName;
355  if (lastname == 53)
356  lastname = 1;
357  }
358 
359  for (int kname = 1; kname != lastname + 1; kname++) {
360  int iname = kname;
361  if (kname == 1)
362  iname = 53;
363  if (iname > 10 && iname != 53)
364  continue;
365  if (iname == 6 || iname == 7)
366  continue;
367  ;
368 
369  laststationEta = 8;
370  if (iname == irpcstationName && iphi == irpcstationPhi) {
371  laststationEta = std::abs(irpcstationEta);
372  }
373 
374  for (int ieta = 0; ieta != laststationEta + 1; ieta++) {
375  if (ieta == 0 && irpcstationEta < 0)
376  continue;
377  int keta = ieta;
378  if (irpcstationEta < 0) {
379  keta = -ieta;
380  }
381 
382  // 2=BML,3=BMS,4=BOL,5=BOS,8=BMF,9=BOF,10=BOG,53=BME
383 
384  int ir = irpcdoubletR;
385 
386  if (PlaneTipo == 0) {
387  if (iname == 2 && ieta == 7)
388  continue;
389  if (iname == 2 && ieta == 6 && iphi == 7)
390  continue;
391  if (iname == 4 || iname == 5 || iname == 9 || iname == 10)
392  continue;
393  } else if (PlaneTipo == 1) {
394  if (irpcstationName == 2 && std::abs(irpcstationEta) == 7)
395  ir = 2;
396  if (irpcstationName == 2 && std::abs(irpcstationEta) == 6 &&
397  irpcstationPhi == 7)
398  ir = 2;
399  if (iname == 2 && ieta == 7)
400  ir = 1;
401  if (iname == 2 && ieta == 6 && iphi == 7)
402  ir = 1;
403  } else if (PlaneTipo == 2) {
404  if (iname == 2 || iname == 3 || iname == 8 || iname == 53)
405  continue;
406  }
407 
408  lastdoubletZ = 3;
409  if (iname == irpcstationName && iphi == irpcstationPhi &&
410  keta == irpcstationEta) {
411  lastdoubletZ = irpcdoubletZ;
412  }
413 
414  for (int iz = 1; iz != lastdoubletZ + 1; iz++) {
415  if (iname > rpcIdHelper.stationNameIndexMax())
416  continue;
417  Identifier rpcId = rpcIdHelper.channelID(
418  iname, keta, iphi, ir, iz, 1, 1, 1,
419  1); // last 4 arguments are: int doubletPhi, int
420  // gasGap, int measuresPhi, int strip
421  if (!rpcId.is_valid())
422  continue;
423  const MuonGM::RpcReadoutElement* rpc =
424  muonMgr->getRpcReadoutElement(rpcId);
425 
426  if (!rpc)
427  continue;
428 
429  panel_dbindex++;
430 
431  if (iz == 1)
432  tower_dbindex++;
433  }
434  }
435  }
436  }
437 
438  rpcstriptot.push_back(NphiStrips); // 0
439  rpcstriptot.push_back(ShiftPhiStrips); // 1
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);
449  rpcstriptot.push_back(SectorLogic);
450 
451  rpcstriptot.push_back(Side);
452  rpcstriptot.push_back(PanelIndex); // 13
453  rpcstriptot.push_back(Settore);
454  rpcstriptot.push_back(PlaneTipo); // 15
455  rpcstriptot.push_back(strip_dbindex); // 16
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); // 22
462  rpcstriptot.push_back(panel_dbindex);
463  rpcstriptot.push_back(tower_dbindex); // 24
464  rpcstriptot.push_back(ShiftStripPhiAtlas); // 25
465 
466  return rpcstriptot;
467 }
468 std::vector<std::string> RpcLayerSectorSideName(const RpcIdHelper& rpcIdHelper,
469  Identifier prdcoll_id,
470  int irpctriggerInfo) {
471  std::string SideSector;
472  int sector;
473  char sector_char[1000];
474  char dblZ_char[100];
475  char dblPhi_char[100];
476 
477  std::vector<std::string> layersectorside_name;
478 
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;
496 
497  int irpcstationPhi = int(rpcIdHelper.stationPhi(prdcoll_id));
498  int irpcstationName = int(rpcIdHelper.stationName(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));
504  int irpcmeasuresPhi = int(rpcIdHelper.measuresPhi(prdcoll_id));
505 
506  sprintf(dblZ_char, "_dblZ%d", irpcdoubletZ);
507  sprintf(dblPhi_char, "_dblPhi%d", irpcdoubletPhi);
508 
509  // 2=BML,3=BMS,4=BOL,5=BOS,8=BMF,9=BOF,10=BOG,53=BME
510  if (irpcstationName == 2 || irpcstationName == 3 || irpcstationName == 8 ||
511  irpcstationName == 53) {
512  if (irpcdoubletR == 1) {
513  layer_name = "LowPt";
514  } else {
515  layer_name = "Pivot";
516  }
517  } else {
518  layer_name = "HighPt";
519  }
520  if (irpcdoubletR == 2)
521  layer_name = "Pivot";
522  // BML7 assigned to pivot
523  if (irpcstationName == 2 &&
524  ((std::abs(irpcstationEta) == 7) ||
525  (irpcstationPhi == 7 && std::abs(irpcstationEta) == 6)))
526  layer_name = "Pivot";
527 
528  if (irpcstationName == 3 || irpcstationName == 5 || irpcstationName == 8 ||
529  irpcstationName == 9 || irpcstationName == 10) {
530  HVorROsideleft = "RO side";
531  HVorROsideright = "HV side";
532  }
533 
534  layer_name_ee_pp = layer_name;
535  // define if rpc hits from gasgap=0,1 or trigger hits
536  if (irpctriggerInfo == 0) {
537  if (irpcgasGap == 1) {
538  layer_name += "0";
539  layertodraw1_name = "GasGap1";
540  layertodraw2_name = "GasGap2";
541  } else {
542  layer_name += "1";
543  }
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";
556  } else {
557  layer_name += "_NotKnown";
558  ;
559  }
560 
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;
565  // sector_dphi_layer.insert(8, "_") ;
566 
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";
574 
576 
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";
585  } else {
586  layervslayer_name = layer_name_ee_pp + "_NotKnown";
587  ;
588  }
589 
591 
592  layer0_name = "<--- IP Rpc Eta strip EC --->";
593  layer1_name =
594  "<--- IP Rpc Eta strip " + layertodraw1_name + " EC --->";
595  layer2_name =
596  "<--- IP Rpc Eta strip " + layertodraw2_name + " EC --->";
597  } else {
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";
606 
608 
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";
617  } else {
618  layervslayer_name = layer_name_ee_pp + "_NotKnown";
619  ;
620  }
621 
623 
624  layerPhivsEtaSector_name = sector_name + layer_name_e_p + "vsEta";
625  layer1_name = "<--- DBL_PHI0 Rpc Phi strip " + layertodraw1_name +
626  " DBL_PHI1 --->";
627  layer2_name = "<--- DBL_PHI0 Rpc Phi strip " + layertodraw2_name +
628  " DBL_PHI1 --->";
629  }
630 
631  // sector
632  if (irpcstationEta > 0) {
633  SideSector = "A";
634  } else {
635  SideSector = "C";
636  }
637 
638  sector = 2 * irpcstationPhi;
639  if (irpcstationName == 2 || irpcstationName == 4)
640  sector--;
641  sprintf(sector_char, "Sector%.2d", sector);
642  SideSector = sector_char;
643 
644  sector_dphi_layer = SideSector + "_" + sector_dphi_layer;
645 
646  layersectorside_name.push_back(layer_name); // 0
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); // 12
659 
660  return layersectorside_name;
661 }
662 } // namespace RpcGM
MuonGM::MuonDetectorManager::getRpcReadoutElement
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:168
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
RpcIdHelper::doubletZ
int doubletZ(const Identifier &id) const
Definition: RpcIdHelper.cxx:1062
RpcIdHelper::measuresPhi
bool measuresPhi(const Identifier &id) const override
Definition: RpcIdHelper.cxx:1068
MuonGM::RpcReadoutElement
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:54
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:804
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
RpcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
Definition: RpcIdHelper.cxx:940
SectorLogic
Definition: SectorLogic.h:96
MuonIdHelper::stationNameIndexMax
int stationNameIndexMax() const
Definition: MuonIdHelper.cxx:824
Identifier::is_valid
bool is_valid() const
Check if id is in a valid state.
RpcGM::RpcStripShift
std::vector< int > RpcStripShift(const MuonGM::MuonDetectorManager *muonMgr, const RpcIdHelper &rpcIdHelper, Identifier prdcoll_id, int irpctriggerInfo)
Definition: RpcGlobalUtilities.cxx:17
RpcIdHelper
Definition: RpcIdHelper.h:51
RpcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: RpcIdHelper.cxx:1066
RpcIdHelper::doubletR
int doubletR(const Identifier &id) const
Definition: RpcIdHelper.cxx:1060
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
MuonGM::RpcReadoutElement::NphiStrips
int NphiStrips() const
returns the number of phi strips
Side
Definition: WaferTree.h:36
RpcIdHelper::strip
int strip(const Identifier &id) const
Definition: RpcIdHelper.cxx:1070
MuonReadoutElement.h
MuonGM::RpcReadoutElement::NetaStrips
int NetaStrips() const
returns the number of eta strips
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:814
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:809
MuonDetectorManager.h
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:49
RpcGlobalUtilities.h
RpcGM
Definition: RpcGlobalUtilities.cxx:16
RpcGM::RpcLayerSectorSideName
std::vector< std::string > RpcLayerSectorSideName(const RpcIdHelper &rpcIdHelper, Identifier prdcoll_id, int irpctriggerInfo)
Definition: RpcGlobalUtilities.cxx:468
MuonGM::RpcReadoutElement::getDoubletZ
int getDoubletZ() const
return DoubletZ value for the given readout element
RpcIdHelper::doubletPhi
int doubletPhi(const Identifier &id) const
Definition: RpcIdHelper.cxx:1064
RpcReadoutElement.h