ATLAS Offline Software
MDTRawDataUtils.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Utils for the main MdtRawDataValAlg.cxx
7 // Part of MdtRawDataValAlg.h
8 // Authors
9 // see MdtRawDataValAlg.cxx
10 // Split off of MdtRawDataValAlg.cxx Nov 2009
12 
13 #include <TBox.h>
14 #include <TColor.h>
15 #include <TError.h>
16 #include <TLine.h>
17 #include <TList.h>
18 #include <TRegexp.h>
19 #include <TString.h>
20 
21 #include <string>
22 
23 #include "MdtRawDataValAlg.h"
26 
27 using std::string;
28 
30  // Set x-axis labels
31  int LowerEta = 0;
32  int UpperEta = 0;
33  if (ecap == 'B') {
34  LowerEta = -8;
35  UpperEta = 8;
36  } else {
37  LowerEta = -6;
38  UpperEta = 6;
39  }
40  TString eta_s;
41  for (int ieta = LowerEta; ieta != UpperEta + 1; ++ieta) {
42  if (ieta == 0 && ecap == 'E') continue;
43  eta_s = ecap;
44  (ieta < 0) ? eta_s += "C" : ((ieta > 0) ? eta_s += "A" : eta_s += "B");
45  eta_s += std::to_string(std::abs(ieta));
46  h->Fill(eta_s, 1, 0);
47  }
48 
49  // Set y-axis labels
50  TString phi_s;
51  for (int iphi = 1; iphi <= 16; iphi++) {
52  if (iphi < 10)
53  phi_s = "0" + std::to_string(iphi);
54  else
55  phi_s = std::to_string(iphi);
56  if (ecap == 'B' && (iphi == 11 || iphi == 15)) {
57  h->Fill(eta_s, "I," + phi_s + ",R", 0);
58  h->Fill(eta_s, "I," + phi_s + ",M", 0);
59  h->Fill(eta_s, "M," + phi_s, 0);
60  h->Fill(eta_s, "O," + phi_s, 0);
61  } else {
62  h->Fill(eta_s, "I," + phi_s, 0);
63  h->Fill(eta_s, "M," + phi_s, 0);
64  h->Fill(eta_s, "O," + phi_s, 0);
65  if (iphi % 2 == 0 && ecap == 'B')
66  h->Fill(eta_s, "E," + phi_s, 0);
67  else if (ecap == 'E')
68  h->Fill(eta_s, "E," + phi_s, 0);
69  }
70  }
71 
72  h->LabelsDeflate("X");
73  h->LabelsDeflate("Y");
74  h->LabelsOption("a", "Y");
75  h->GetYaxis()->SetLabelSize(0.025);
76  h->Reset();
77 
78  // Place Bounding Lines around bins representing actual detector
79  if (ecap == 'B') {
80  // Left Side
81  putBox(h, 0, 0, 6, 16);
82  putLine(h, 6, 0, 6, 16);
83  putLine(h, 2, 16, 6, 16);
84  putBox(h, 0, 16, 2, 18);
85  putLine(h, 2, 16, 2, 18);
86  putLine(h, 0, 18, 2, 18); // 1
87  putBox(h, 0, 20, 2, 22);
88  putLine(h, 2, 20, 2, 22);
89  putLine(h, 0, 20, 2, 20);
90  putLine(h, 0, 22, 2, 22); // 3
91  putBox(h, 0, 24, 2, 26);
92  putLine(h, 2, 24, 2, 26);
93  putLine(h, 0, 24, 2, 24);
94  putLine(h, 0, 26, 2, 26); // 5
95  putBox(h, 0, 28, 2, 30);
96  putLine(h, 2, 28, 2, 30);
97  putLine(h, 0, 28, 2, 28);
98  putLine(h, 0, 30, 2, 30); // 7
99  putBox(h, 0, 32, 2, 34);
100  putLine(h, 2, 32, 2, 34);
101  putLine(h, 0, 32, 2, 32);
102  putLine(h, 0, 34, 2, 34); // 9
103  putBox(h, 0, 36, 3, 38);
104  putLine(h, 3, 36, 3, 38);
105  putLine(h, 0, 36, 3, 36);
106  putLine(h, 2, 38, 3, 38); // 11M
107  putBox(h, 0, 38, 2, 40);
108  putLine(h, 2, 38, 2, 40);
109  putLine(h, 0, 40, 2, 40); // 11R
110  putBox(h, 0, 42, 2, 44);
111  putLine(h, 0, 42, 2, 42);
112  putLine(h, 2, 42, 2, 44);
113  putLine(h, 0, 44, 2, 44); // 13
114  putBox(h, 0, 46, 3, 48);
115  putLine(h, 3, 46, 3, 48);
116  putLine(h, 0, 46, 3, 46);
117  putLine(h, 2, 48, 3, 48); // 15M
118  putBox(h, 0, 48, 2, 50);
119  putLine(h, 2, 48, 2, 50);
120  putLine(h, 0, 50, 2, 50); // 15R
121  putBox(h, 0, 52, 2, 106);
122  putLine(h, 0, 52, 2, 52);
123  putLine(h, 0, 106, 2, 106); // putLine(h,2,48,2,102);
124  putBox(h, 0, 108, 1, 110);
125  putLine(h, 1, 108, 1, 110);
126  putLine(h, 0, 108, 1, 108);
127  putLine(h, 0, 110, 1, 110);
128  putBox(h, 0, 112, 2, 116);
129  putLine(h, 2, 112, 2, 116);
130  putLine(h, 0, 112, 2, 112);
131 
132  putLine(h, 2, 52, 2, 106);
133 
134  // Mid Section
135  putBox(h, 8, 0, 9, 106);
136  putLine(h, 8, 0, 8, 106);
137  putLine(h, 8, 106, 9, 106);
138  putLine(h, 9, 0, 9, 106);
139  putBox(h, 8, 108, 9, 110);
140  putLine(h, 8, 108, 9, 108);
141  putLine(h, 8, 110, 9, 110);
142  putLine(h, 8, 108, 8, 110);
143  putLine(h, 9, 108, 9, 110);
144  putBox(h, 8, 112, 9, 116);
145  putLine(h, 8, 112, 9, 112);
146  putLine(h, 8, 112, 8, 116);
147  putLine(h, 9, 112, 9, 116);
148 
149  // Right Side
150  putBox(h, 11, 0, 17, 16);
151  putLine(h, 11, 0, 11, 16);
152  putLine(h, 11, 16, 15, 16);
153  putBox(h, 15, 16, 17, 18);
154  putLine(h, 15, 16, 15, 18);
155  putLine(h, 15, 18, 17, 18); // 1
156  putBox(h, 15, 20, 17, 22);
157  putLine(h, 15, 20, 15, 22);
158  putLine(h, 15, 20, 17, 20);
159  putLine(h, 15, 22, 17, 22); // 3
160  putBox(h, 15, 24, 17, 26);
161  putLine(h, 15, 24, 15, 26);
162  putLine(h, 15, 24, 17, 24);
163  putLine(h, 15, 26, 17, 26); // 5
164  putBox(h, 15, 28, 17, 30);
165  putLine(h, 15, 28, 15, 30);
166  putLine(h, 15, 28, 17, 28);
167  putLine(h, 15, 30, 17, 30); // 7
168  putBox(h, 15, 32, 17, 34);
169  putLine(h, 15, 32, 15, 34);
170  putLine(h, 15, 32, 17, 32);
171  putLine(h, 15, 34, 17, 34); // 9
172  putBox(h, 14, 36, 17, 38);
173  putLine(h, 14, 36, 14, 38);
174  putLine(h, 14, 36, 17, 36);
175  putLine(h, 14, 38, 15, 38); // 11M
176  putBox(h, 15, 38, 17, 40);
177  putLine(h, 15, 38, 15, 40);
178  putLine(h, 15, 40, 17, 40); // 11R
179  putBox(h, 15, 42, 17, 44);
180  putLine(h, 15, 42, 15, 44);
181  putLine(h, 15, 42, 17, 42);
182  putLine(h, 15, 44, 17, 44); // 13
183  putBox(h, 14, 46, 17, 48);
184  putLine(h, 14, 46, 14, 48);
185  putLine(h, 14, 46, 17, 46);
186  putLine(h, 14, 48, 15, 48); // 15M
187  putBox(h, 15, 48, 17, 50);
188  putLine(h, 15, 48, 15, 50);
189  putLine(h, 15, 50, 17, 50); // 15R
190  putBox(h, 15, 52, 17, 106);
191  putLine(h, 15, 52, 17, 52);
192  putLine(h, 15, 106, 17, 106); // putLine(h,2,48,2,102);
193  putBox(h, 16, 108, 17, 110);
194  putLine(h, 16, 108, 16, 110);
195  putLine(h, 16, 108, 17, 108);
196  putLine(h, 16, 110, 17, 110);
197  putBox(h, 15, 112, 17, 116);
198  putLine(h, 15, 112, 15, 116);
199  putLine(h, 15, 112, 17, 112);
200 
201  putLine(h, 15, 52, 15, 106);
202 
203  // Draw TickMarks
204  for (int i = 0; i < 59; i += 1) {
205  TLine* l = new TLine(0, i, 0.55, i);
206  // l->SetLineColor(kRed);
207  h->GetListOfFunctions()->Add(l);
208  }
209  for (int i = 0; i != 18; ++i) {
210  TLine* l = new TLine(i, 0, i, 0.55 / 17 * 58);
211  // l->SetLineColor(kRed);
212  h->GetListOfFunctions()->Add(l);
213  }
214  TLine* lx = new TLine(0, 0, 0, 58);
215  TLine* ly = new TLine(0, 0, 17, 0);
216  lx->SetLineColor(kBlack);
217  ly->SetLineColor(kBlack);
218  h->GetListOfFunctions()->Add(lx);
219  h->GetListOfFunctions()->Add(ly);
220  }
221 
222  if (ecap == 'E') {
223  // //Bottom: OLD (without new EE chambers)
224  // putBox(h, 0, 0, 12, 8); //phi 1-4
225  // putBox(h, 0, 8, 5, 10); //phi 5
226  // putBox(h, 7, 8, 12, 10); putLine(h, 5, 8, 7, 8); putLine(h, 5, 10, 7, 10); putLine(h, 5, 8, 5, 10); putLine(h, 7, 8, 7,
227  // 10);//phi 5 putBox(h, 0, 10, 12, 20); // phi 6-10 putBox(h, 0, 20, 6, 22); // phi 11 putBox(h, 8, 20, 12, 22); putLine(h, 6,
228  // 20, 8, 20); putLine(h, 6, 22, 8, 22); putLine(h, 6, 20, 6, 22); putLine(h, 8, 20, 8, 22); //phi 11 putBox(h, 0, 22, 12, 24);
229  // // phi 12 putBox(h, 0, 24, 4, 26); // phi 13 putBox(h, 8, 14, 12, 26); putLine(h, 4, 24, 8, 24); putLine(h, 4, 26, 8, 26);
230  // putLine(h, 4, 24, 4, 26); putLine(h, 8, 24, 8, 26); //phi 13 putBox(h, 0, 26, 12, 28); //phi 14 putBox(h, 0, 28, 4, 30);
231  // //phi 15 putBox(h, 6, 28, 12, 30); putLine(h, 4, 28, 6, 28); putLine(h, 4, 30, 6, 30); putLine(h, 4, 28, 4, 30); putLine(h,
232  // 6, 28, 6, 30);//phi 15 putBox(h, 0, 30, 12, 32); //phi 16
233 
234  // Bottom: NEW
235  putBox(h, 0, 0, 4, 32);
236  putBox(h, 4, 8, 5, 10);
237  putLine(h, 4, 0, 4, 8);
238  putLine(h, 4, 8, 5, 8);
239  putLine(h, 5, 8, 5, 10);
240  putLine(h, 4, 10, 5, 10);
241  putLine(h, 4, 10, 4, 32); // Left side
242  putBox(h, 8, 0, 12, 32);
243  putBox(h, 7, 8, 8, 10);
244  putLine(h, 8, 0, 8, 8);
245  putLine(h, 7, 8, 8, 8);
246  putLine(h, 7, 8, 7, 10);
247  putLine(h, 7, 10, 8, 10);
248  putLine(h, 8, 10, 8, 32);
249 
250  // Left
251  putBox(h, 0, 32, 1, 34);
252  putLine(h, 1, 32, 4, 32);
253  putLine(h, 1, 32, 1, 34); // phi 1
254  putBox(h, 0, 34, 4, 36);
255  putLine(h, 1, 34, 4, 34);
256  putLine(h, 4, 34, 4, 36);
257  putLine(h, 2, 36, 4, 36); // phi 2
258  putBox(h, 0, 36, 2, 38);
259  putLine(h, 2, 36, 2, 38); // phi 3
260  putBox(h, 0, 38, 4, 40);
261  putLine(h, 2, 38, 4, 38);
262  putLine(h, 4, 38, 4, 40);
263  putLine(h, 2, 40, 4, 40); // phi 4
264  putBox(h, 0, 40, 2, 42);
265  putLine(h, 2, 40, 2, 42); // phi 5
266  putBox(h, 0, 42, 4, 44);
267  putLine(h, 2, 42, 4, 42);
268  putLine(h, 4, 42, 4, 44);
269  putLine(h, 2, 44, 4, 44); // phi 6
270  putBox(h, 0, 44, 2, 46);
271  putLine(h, 2, 44, 2, 46); // phi 7
272  putBox(h, 0, 46, 4, 48);
273  putLine(h, 2, 46, 4, 46);
274  putLine(h, 4, 46, 4, 48);
275  putLine(h, 1, 48, 4, 48); // phi 8
276  putBox(h, 0, 48, 1, 50);
277  putLine(h, 1, 48, 1, 50); // phi 9
278  putBox(h, 0, 50, 4, 52);
279  putLine(h, 1, 50, 4, 50);
280  putLine(h, 4, 50, 4, 52);
281  putLine(h, 2, 52, 4, 52); // phi 10
282  putBox(h, 0, 52, 2, 54);
283  putLine(h, 2, 52, 2, 54); // phi 11
284  putBox(h, 0, 54, 4, 56);
285  putLine(h, 2, 54, 4, 54);
286  putLine(h, 4, 54, 4, 56);
287  putLine(h, 2, 56, 4, 56); // phi 12
288  putBox(h, 0, 56, 2, 58);
289  putLine(h, 2, 56, 2, 58); // phi 13
290  putBox(h, 0, 58, 4, 60);
291  putLine(h, 2, 58, 4, 58);
292  putLine(h, 4, 58, 4, 60);
293  putLine(h, 2, 60, 4, 60); // phi 14
294  putBox(h, 0, 60, 2, 62);
295  putLine(h, 2, 60, 2, 62); // phi 15
296  putBox(h, 0, 62, 4, 64);
297  putLine(h, 2, 62, 4, 62);
298  putLine(h, 4, 62, 4, 64);
299  putLine(h, 1, 64, 4, 64); // phi 16
300 
301  putBox(h, 0, 64, 1, 96);
302  putLine(h, 1, 64, 1, 96);
303  putLine(h, 0, 96, 1, 96);
304 
305  // Right
306  putBox(h, 11, 32, 12, 34);
307  putLine(h, 8, 32, 11, 32);
308  putLine(h, 11, 32, 11, 34); // phi 1
309  putBox(h, 8, 34, 12, 36);
310  putLine(h, 8, 34, 11, 34);
311  putLine(h, 8, 34, 8, 36);
312  putLine(h, 10, 36, 8, 36); // phi 2
313  putBox(h, 10, 36, 12, 38);
314  putLine(h, 10, 36, 10, 38); // phi 3
315  putBox(h, 8, 38, 12, 40);
316  putLine(h, 10, 38, 8, 38);
317  putLine(h, 8, 38, 8, 40);
318  putLine(h, 10, 40, 8, 40); // phi 4
319  putBox(h, 10, 40, 12, 42);
320  putLine(h, 10, 40, 10, 42); // phi 5
321  putBox(h, 8, 42, 12, 44);
322  putLine(h, 10, 42, 8, 42);
323  putLine(h, 8, 42, 8, 44);
324  putLine(h, 10, 44, 8, 44); // phi 6
325  putBox(h, 10, 44, 12, 46);
326  putLine(h, 10, 44, 10, 46); // phi 7
327  putBox(h, 8, 46, 12, 48);
328  putLine(h, 10, 46, 8, 46);
329  putLine(h, 8, 46, 8, 48);
330  putLine(h, 11, 48, 8, 48); // phi 8
331  putBox(h, 11, 48, 12, 50);
332  putLine(h, 11, 48, 11, 50); // phi 9
333  putBox(h, 8, 50, 12, 52);
334  putLine(h, 11, 50, 8, 50);
335  putLine(h, 8, 50, 8, 52);
336  putLine(h, 10, 52, 8, 52); // phi 10
337  putBox(h, 10, 52, 12, 54);
338  putLine(h, 10, 52, 10, 54); // phi 11
339  putBox(h, 8, 54, 12, 56);
340  putLine(h, 10, 54, 8, 54);
341  putLine(h, 8, 54, 8, 56);
342  putLine(h, 10, 56, 8, 56); // phi 12
343  putBox(h, 10, 56, 12, 58);
344  putLine(h, 10, 56, 10, 58); // phi 13
345  putBox(h, 8, 58, 12, 60);
346  putLine(h, 10, 58, 8, 58);
347  putLine(h, 8, 58, 8, 60);
348  putLine(h, 10, 60, 8, 60); // phi 14
349  putBox(h, 10, 60, 12, 62);
350  putLine(h, 10, 60, 10, 62); // phi 15
351  putBox(h, 8, 62, 12, 64);
352  putLine(h, 10, 62, 8, 62);
353  putLine(h, 8, 62, 8, 64);
354  putLine(h, 11, 64, 8, 64); // phi 16
355 
356  putBox(h, 11, 64, 12, 96);
357  putLine(h, 11, 64, 11, 96);
358  putLine(h, 12, 96, 11, 96);
359 
360  // Draw TickMarks
361  for (int i = 0; i < 65; i++) {
362  TLine* l = new TLine(0, i, 0.55 * 12 / 17, i);
363  // l->SetLineColor(kRed);
364  h->GetListOfFunctions()->Add(l);
365  }
366  for (int i = 0; i != 13; ++i) {
367  TLine* l = new TLine(i, 0, i, 0.55 / 17 * 64);
368  // l->SetLineColor(kRed);
369  h->GetListOfFunctions()->Add(l);
370  }
371 
372  putLine(h, 0, 0, 0, 64);
373  putLine(h, 0, 0, 12, 0);
374  }
375 
376  return StatusCode::SUCCESS;
377 }
378 
381  int LowerEta = -0;
382  int UpperEta = 0;
383  if (xAxis.substr(0, 2) == "BO" || xAxis.substr(0, 2) == "BI") { // Barrel Hit Mutltiplicities
384  LowerEta = -8;
385  UpperEta = 8;
386  } else if (xAxis.substr(0, 2) == "BM" || xAxis.substr(0, 2) == "EO") {
387  LowerEta = -6;
388  UpperEta = 6;
389  } else if (xAxis.substr(0, 2) == "EM" || xAxis.substr(0, 2) == "EI") {
390  LowerEta = -5;
391  UpperEta = 5;
392  } else {
393  LowerEta = -2;
394  UpperEta = 2;
395  }
396 
397  // Set x-axis labels
398  TString eta_s;
399  for (int ieta = LowerEta; ieta != UpperEta + 1; ++ieta) {
400  if (xAxis.substr(2, 1) == "A" && ieta < 0) continue; // A side goes from 1-...
401  if (xAxis.substr(2, 1) == "C" && ieta == 0) break; // C side goes from ...-1
402  if (ieta == 0 && xAxis.substr(0, 2) == "BO")
403  eta_s = "BOB";
404  else if (ieta == 0)
405  continue;
406  else
407  eta_s = xAxis.substr(0, 3);
408  eta_s += std::to_string(std::abs(ieta));
409  h->Fill(eta_s, 1, 0);
410  }
411 
412  bool barrelExtra = (xAxis == "BEA" || xAxis == "BEC");
413  // Set y-axis labels
414  TString phi_s;
415  for (int iphi = 1; iphi <= 16; iphi++) {
416  if (iphi < 10)
417  phi_s = "0" + std::to_string(iphi);
418  else
419  phi_s = std::to_string(iphi);
420  if (!barrelExtra) {
421  // Also uncomment lines in MdtRawDataValAlg.cxx in fillMDTSummaryHistograms() that actually fill these values
422  if (xAxis.substr(0, 2) == "BI" && (iphi == 11 || iphi == 15)) {
423  h->Fill(eta_s, phi_s + ",1,R", 0);
424  h->Fill(eta_s, phi_s + ",2,R", 0);
425  h->Fill(eta_s, phi_s + ",1,M", 0);
426  h->Fill(eta_s, phi_s + ",2,M", 0);
427  } else {
428  h->Fill(eta_s, phi_s + ",1", 0);
429  h->Fill(eta_s, phi_s + ",2", 0);
430  }
431  } else if (iphi % 2 == 0)
432  h->Fill(eta_s, phi_s + ",1", 0);
433  }
434 
435  if (xAxis == "BEA" || xAxis == "BEC" || xAxis == "EMA" || xAxis == "EMC" || xAxis == "EOA" || xAxis == "EOC") {
436  h->GetXaxis()->FindBin(".");
437  }
438 
439  h->LabelsDeflate("X");
440  h->LabelsDeflate("Y");
441  h->Reset();
442 
443  // Make gray boxes
444  if (xAxis == "BOA") {
445  putBox(h, 0, 0, 1, 44);
446  putBox(h, 7, 0, 9, 44);
447  putBox(h, 0, 48, 1, 52);
448  putBox(h, 8, 48, 9, 52);
449  putBox(h, 0, 56, 1, 64);
450  putBox(h, 7, 56, 9, 64);
451 
452  putLine(h, 1, 0, 1, 44);
453  putLine(h, 7, 0, 7, 44);
454  putLine(h, 0, 44, 1, 44);
455  putLine(h, 7, 44, 9, 44);
456  putLine(h, 1, 48, 1, 52);
457  putLine(h, 8, 48, 8, 52);
458  putLine(h, 0, 48, 1, 48);
459  putLine(h, 8, 48, 9, 48);
460  putLine(h, 0, 52, 1, 52);
461  putLine(h, 8, 52, 9, 52);
462  putLine(h, 1, 56, 1, 64);
463  putLine(h, 7, 56, 7, 64);
464  putLine(h, 0, 56, 1, 56);
465  putLine(h, 7, 56, 9, 56);
466  }
467  if (xAxis == "BOC") {
468  putBox(h, 0, 0, 2, 44);
469  putBox(h, 0, 48, 1, 52);
470  putBox(h, 0, 56, 2, 64);
471 
472  putLine(h, 2, 0, 2, 44);
473  putLine(h, 0, 44, 2, 44);
474  putLine(h, 1, 48, 1, 52);
475  putLine(h, 0, 48, 1, 48);
476  putLine(h, 0, 52, 1, 52);
477  putLine(h, 2, 56, 2, 64);
478  putLine(h, 0, 56, 2, 56);
479  }
480  if (xAxis == "BIA") {
481  putBox(h, 6, 0, 8, 4);
482  putLine(h, 6, 0, 8, 0);
483  putLine(h, 6, 0, 6, 4);
484  putLine(h, 6, 4, 8, 4); // phi 1
485  putBox(h, 7, 6, 8, 8);
486  putLine(h, 7, 6, 8, 6);
487  putLine(h, 7, 6, 7, 8); // phi 2
488  putBox(h, 6, 8, 8, 12);
489  putLine(h, 6, 8, 7, 8);
490  putLine(h, 6, 8, 6, 12);
491  putLine(h, 6, 12, 8, 12); // phi 3
492  putBox(h, 7, 14, 8, 16);
493  putLine(h, 7, 14, 8, 14);
494  putLine(h, 7, 14, 7, 16); // phi 4
495  putBox(h, 6, 16, 8, 20);
496  putLine(h, 6, 16, 7, 16);
497  putLine(h, 6, 16, 6, 20);
498  putLine(h, 6, 20, 8, 20); // phi 5
499  putBox(h, 7, 22, 8, 24);
500  putLine(h, 7, 22, 8, 22);
501  putLine(h, 7, 22, 7, 24); // phi 6
502  putBox(h, 6, 24, 8, 28);
503  putLine(h, 6, 24, 7, 24);
504  putLine(h, 6, 24, 6, 28);
505  putLine(h, 6, 28, 8, 28); // phi 7
506  putBox(h, 7, 30, 8, 32);
507  putLine(h, 7, 30, 8, 30);
508  putLine(h, 7, 30, 7, 32); // phi 8
509  putBox(h, 6, 32, 8, 36);
510  putLine(h, 6, 32, 7, 32);
511  putLine(h, 6, 32, 6, 36);
512  putLine(h, 6, 36, 8, 36); // phi 9
513  putBox(h, 7, 38, 8, 40);
514  putLine(h, 7, 38, 8, 38);
515  putLine(h, 7, 38, 7, 40); // phi 10
516  putBox(h, 6, 40, 8, 44);
517  putLine(h, 6, 40, 7, 40);
518  putLine(h, 6, 40, 6, 44); // putLine(h, 6, 40, 5, 44); //phi 11
519  putBox(h, 5, 44, 8, 48);
520  putLine(h, 5, 44, 6, 44);
521  putLine(h, 5, 44, 5, 48);
522  putLine(h, 5, 48, 8, 48); // phi 11 M
523  putBox(h, 7, 50, 8, 52);
524  putLine(h, 7, 50, 8, 50);
525  putLine(h, 7, 50, 7, 52); // phi 12
526  putBox(h, 6, 52, 8, 56);
527  putLine(h, 6, 52, 7, 52);
528  putLine(h, 6, 52, 6, 56);
529  putLine(h, 6, 56, 8, 56); // phi 13
530  putBox(h, 7, 58, 8, 60);
531  putLine(h, 7, 58, 8, 58);
532  putLine(h, 7, 58, 7, 60); // phi 14
533  putBox(h, 6, 60, 8, 64);
534  putLine(h, 6, 60, 7, 60);
535  putLine(h, 6, 60, 6, 64); // putLine(h, 6, 60, 5, 64); //phi 15
536  putBox(h, 5, 64, 8, 68);
537  putLine(h, 5, 64, 6, 64);
538  putLine(h, 5, 64, 5, 68);
539  putLine(h, 5, 68, 8, 68); // phi 15 M
540  putBox(h, 7, 70, 8, 72);
541  putLine(h, 7, 70, 8, 70);
542  putLine(h, 7, 70, 7, 72);
543  putLine(h, 7, 72, 8, 72); // phi 16
544  }
545  if (xAxis == "BIC") {
546  putBox(h, 2, 0, 0, 4);
547  putLine(h, 2, 0, 0, 0);
548  putLine(h, 2, 0, 2, 4);
549  putLine(h, 2, 4, 0, 4); // phi 1
550  putBox(h, 1, 6, 0, 8);
551  putLine(h, 1, 6, 0, 6);
552  putLine(h, 1, 6, 1, 8); // phi 2
553  putBox(h, 2, 8, 0, 12);
554  putLine(h, 2, 8, 1, 8);
555  putLine(h, 2, 8, 2, 12);
556  putLine(h, 2, 12, 0, 12); // phi 3
557  putBox(h, 1, 14, 0, 16);
558  putLine(h, 1, 14, 0, 14);
559  putLine(h, 1, 14, 1, 16); // phi 4
560  putBox(h, 2, 16, 0, 20);
561  putLine(h, 2, 16, 1, 16);
562  putLine(h, 2, 16, 2, 20);
563  putLine(h, 2, 20, 0, 20); // phi 5
564  putBox(h, 1, 22, 0, 24);
565  putLine(h, 1, 22, 0, 22);
566  putLine(h, 1, 22, 1, 24); // phi 6
567  putBox(h, 2, 24, 0, 28);
568  putLine(h, 2, 24, 1, 24);
569  putLine(h, 2, 24, 2, 28);
570  putLine(h, 2, 28, 0, 28); // phi 7
571  putBox(h, 1, 30, 0, 32);
572  putLine(h, 1, 30, 0, 30);
573  putLine(h, 1, 30, 1, 32); // phi 8
574  putBox(h, 2, 32, 0, 36);
575  putLine(h, 2, 32, 1, 32);
576  putLine(h, 2, 32, 2, 36);
577  putLine(h, 2, 36, 0, 36); // phi 9
578  putBox(h, 1, 38, 0, 40);
579  putLine(h, 1, 38, 0, 38);
580  putLine(h, 1, 38, 1, 40); // phi 10
581  putBox(h, 2, 40, 0, 44);
582  putLine(h, 2, 40, 1, 40);
583  putLine(h, 2, 40, 2, 44); // putLine(h, 2, 40, 3, 44); //phi 11
584  putBox(h, 3, 44, 0, 48);
585  putLine(h, 3, 44, 2, 44);
586  putLine(h, 3, 44, 3, 48);
587  putLine(h, 3, 48, 0, 48); // phi 11 M
588  putBox(h, 1, 50, 0, 52);
589  putLine(h, 1, 50, 0, 50);
590  putLine(h, 1, 50, 1, 52); // phi 12
591  putBox(h, 2, 52, 0, 56);
592  putLine(h, 2, 52, 1, 52);
593  putLine(h, 2, 52, 2, 56);
594  putLine(h, 2, 56, 0, 56); // phi 13
595  putBox(h, 1, 58, 0, 60);
596  putLine(h, 1, 58, 0, 58);
597  putLine(h, 1, 58, 1, 60); // phi 14
598  putBox(h, 2, 60, 0, 64);
599  putLine(h, 2, 60, 1, 60);
600  putLine(h, 2, 60, 2, 64); // putLine(h, 2, 60, 3, 64); //phi 15
601  putBox(h, 3, 64, 0, 68);
602  putLine(h, 3, 64, 2, 64);
603  putLine(h, 3, 64, 3, 68);
604  putLine(h, 3, 68, 0, 68); // phi 15 M
605  putBox(h, 1, 70, 0, 72);
606  putLine(h, 1, 70, 0, 70);
607  putLine(h, 1, 70, 1, 72);
608  putLine(h, 1, 72, 0, 72); // phi 16
609  }
610 
611  if (xAxis == "EIA") {
612  putBox(h, 2, 4, 5, 8);
613  putLine(h, 2, 4, 5, 4);
614  putLine(h, 2, 4, 2, 8);
615  putLine(h, 2, 8, 4, 8); // phi 2
616  putBox(h, 4, 8, 5, 12);
617  putLine(h, 4, 8, 4, 12); // phi 3
618  putBox(h, 2, 12, 5, 16);
619  putLine(h, 2, 12, 4, 12);
620  putLine(h, 2, 12, 2, 16);
621  putLine(h, 2, 16, 4, 16); // phi 4
622  putBox(h, 4, 16, 5, 20);
623  putLine(h, 4, 16, 4, 20); // phi 5
624  putBox(h, 2, 20, 5, 24);
625  putLine(h, 2, 20, 4, 20);
626  putLine(h, 2, 20, 2, 24);
627  putLine(h, 2, 24, 4, 24); // phi 6
628  putBox(h, 4, 24, 5, 28);
629  putLine(h, 4, 24, 4, 28); // phi 7
630  putBox(h, 2, 28, 5, 32);
631  putLine(h, 2, 28, 4, 28);
632  putLine(h, 2, 28, 2, 32);
633  putLine(h, 2, 32, 5, 32); // phi 8
634  putBox(h, 2, 36, 5, 40);
635  putLine(h, 2, 36, 5, 36);
636  putLine(h, 2, 36, 2, 40);
637  putLine(h, 2, 40, 4, 40); // phi 10
638  putBox(h, 4, 40, 5, 44);
639  putLine(h, 4, 40, 4, 44); // phi 11
640  putBox(h, 2, 44, 5, 48);
641  putLine(h, 2, 44, 4, 44);
642  putLine(h, 2, 44, 2, 48);
643  putLine(h, 2, 48, 4, 48); // phi 12
644  putBox(h, 4, 48, 5, 52);
645  putLine(h, 4, 48, 4, 52); // phi 13
646  putBox(h, 2, 52, 5, 56);
647  putLine(h, 2, 52, 4, 52);
648  putLine(h, 2, 52, 2, 56);
649  putLine(h, 2, 56, 4, 56); // phi 14
650  putBox(h, 4, 56, 5, 60);
651  putLine(h, 4, 56, 4, 60); // phi 15
652  putBox(h, 2, 60, 5, 64);
653  putLine(h, 2, 60, 4, 60);
654  putLine(h, 2, 60, 2, 64);
655  putLine(h, 2, 64, 5, 64); // phi 16
656  }
657  if (xAxis == "EIC") {
658  putBox(h, 3, 4, 0, 8);
659  putLine(h, 3, 4, 0, 4);
660  putLine(h, 3, 4, 3, 8);
661  putLine(h, 3, 8, 1, 8); // phi 2
662  putBox(h, 1, 8, 0, 12);
663  putLine(h, 1, 8, 1, 12); // phi 3
664  putBox(h, 3, 12, 0, 16);
665  putLine(h, 3, 12, 1, 12);
666  putLine(h, 3, 12, 3, 16);
667  putLine(h, 3, 16, 1, 16); // phi 4
668  putBox(h, 1, 16, 0, 20);
669  putLine(h, 1, 16, 1, 20); // phi 5
670  putBox(h, 3, 20, 0, 24);
671  putLine(h, 3, 20, 1, 20);
672  putLine(h, 3, 20, 3, 24);
673  putLine(h, 3, 24, 1, 24); // phi 6
674  putBox(h, 1, 24, 0, 28);
675  putLine(h, 1, 24, 1, 28); // phi 7
676  putBox(h, 3, 28, 0, 32);
677  putLine(h, 3, 28, 1, 28);
678  putLine(h, 3, 28, 3, 32);
679  putLine(h, 3, 32, 0, 32); // phi 8
680  putBox(h, 3, 36, 0, 40);
681  putLine(h, 3, 36, 0, 36);
682  putLine(h, 3, 36, 3, 40);
683  putLine(h, 3, 40, 1, 40); // phi 10
684  putBox(h, 1, 40, 0, 44);
685  putLine(h, 1, 40, 1, 44); // phi 11
686  putBox(h, 3, 44, 0, 48);
687  putLine(h, 3, 44, 1, 44);
688  putLine(h, 3, 44, 3, 48);
689  putLine(h, 3, 48, 1, 48); // phi 12
690  putBox(h, 1, 48, 0, 52);
691  putLine(h, 1, 48, 1, 52); // phi 13
692  putBox(h, 3, 52, 0, 56);
693  putLine(h, 3, 52, 1, 52);
694  putLine(h, 3, 52, 3, 56);
695  putLine(h, 3, 56, 1, 56); // phi 14
696  putBox(h, 1, 56, 0, 60);
697  putLine(h, 1, 56, 1, 60); // phi 15
698  putBox(h, 3, 60, 0, 64);
699  putLine(h, 3, 60, 1, 60);
700  putLine(h, 3, 60, 3, 64);
701  putLine(h, 3, 64, 0, 64); // phi 16
702  }
703 
704  if (xAxis == "EEA") {
705  putBox(h, 1, 16, 2, 20);
706  putLine(h, 1, 16, 2, 16);
707  putLine(h, 1, 16, 1, 20);
708  putLine(h, 1, 20, 2, 20);
709  }
710 
711  if (xAxis == "EEC") {
712  putBox(h, 0, 16, 1, 20);
713  putLine(h, 0, 16, 1, 16);
714  putLine(h, 1, 16, 1, 20);
715  putLine(h, 0, 20, 1, 20);
716  }
717 
718  if (xAxis == "BEA" || xAxis == "BEC") {
719  putBox(h, 2, 0, 3, 16);
720  putLine(h, 2, 0, 2, 16);
721  }
722 
723  if (xAxis == "EMA" || xAxis == "EMC") {
724  putBox(h, 5, 0, 6, 64);
725  putLine(h, 5, 0, 5, 64);
726  }
727 
728  if (xAxis == "EOA" || xAxis == "EOC") {
729  putBox(h, 6, 0, 7, 64);
730  putLine(h, 6, 0, 6, 64);
731  }
732 
733  if (xAxis.substr(0, 2) == "EE" || xAxis.substr(0, 2) == "BI" || xAxis.substr(0, 2) == "EI" || xAxis.substr(0, 2) == "BM" ||
734  xAxis.substr(0, 2) == "BO") {
735  // Draw TickMarks
736  for (int i = 0; i != h->GetNbinsY() + 1; i++) {
737  TLine* l = new TLine(0, i, 0.55 * h->GetNbinsX() / 17, i);
738  h->GetListOfFunctions()->Add(l);
739  }
740  for (int i = 0; i != h->GetNbinsX() + 1; ++i) {
741  TLine* l = new TLine(i, 0, i, 0.55 / 17 * h->GetNbinsY());
742  h->GetListOfFunctions()->Add(l);
743  }
744 
745  TLine* lx = new TLine(0, 0, h->GetNbinsX(), 0);
746  TLine* ly = new TLine(0, 0, 0, h->GetNbinsY());
747  lx->SetLineColor(kBlack);
748  ly->SetLineColor(kBlack);
749  h->GetListOfFunctions()->Add(lx);
750  h->GetListOfFunctions()->Add(ly);
751  }
752 
753  return StatusCode::SUCCESS;
754 }
755 
756 StatusCode MdtRawDataValAlg::binMdtGlobal_byLayer(TH2* nHits_In, TH2* nHits_Mid, TH2* nHits_Out) {
757  for (int iPhi = 1; iPhi != 17; ++iPhi) {
758  TString phiString = "";
759  if (iPhi < 10)
760  phiString = "0" + std::to_string(iPhi);
761  else
762  phiString = std::to_string(iPhi);
763  TString phiString_ml1 = phiString + ",1";
764  TString phiString_ml2 = phiString + ",2";
765  if (iPhi == 11 || iPhi == 15) {
766  TString phiString_ml1_BIR = phiString + ",1,R";
767  TString phiString_ml2_BIR = phiString + ",2,R";
768  nHits_In->Fill("EIC5", phiString_ml1_BIR, 0.);
769  nHits_In->Fill("EIC5", phiString_ml2_BIR, 0.);
770  TString phiString_ml1_BIM = phiString + ",1,M";
771  TString phiString_ml2_BIM = phiString + ",2,M";
772  nHits_In->Fill("EIC5", phiString_ml1_BIM, 0.);
773  nHits_In->Fill("EIC5", phiString_ml2_BIM, 0.);
774  } else {
775  nHits_In->Fill("EIC5", phiString_ml1, 0.);
776  nHits_In->Fill("EIC5", phiString_ml2, 0.);
777  }
778  nHits_Mid->Fill("EMC5", phiString_ml1, 0.);
779  nHits_Mid->Fill("EMC5", phiString_ml2, 0.);
780  nHits_Out->Fill("EOC6", phiString_ml1, 0.);
781  nHits_Out->Fill("EOC6", phiString_ml2, 0.);
782  }
783  for (int iEta = 6; iEta != -2; --iEta) {
784  TString etaIn = "EIC" + std::to_string(iEta);
785  TString etaMid = "EMC" + std::to_string(iEta);
786  TString etaOut = "EOC" + std::to_string(iEta);
787  if (iEta > 0) {
788  if (iEta < 6) {
789  nHits_In->Fill(etaIn, "01,1", 0);
790  nHits_Mid->Fill(etaMid, "01,1", 0);
791  }
792  nHits_Out->Fill(etaOut, "01,1", 0);
793  } else {
794  nHits_In->Fill("", "01,1", 0);
795  nHits_Mid->Fill("", "01,1", 0);
796  nHits_Out->Fill("", "01,1", 0);
797  }
798  }
799  // Add BIR11/15 separately at a higher eta station
800 
801  // BEE, EE chambers on inner plots
802  for (int iEta = -4; iEta != 1; ++iEta) {
803  TString etaIn = "";
804  if (iEta < -2) {
805  etaIn = "EEC" + std::to_string(std::abs(iEta + 2));
806  nHits_In->Fill(etaIn, "01,1", 0);
807  } else if (iEta < 0) {
808  etaIn = "BEC" + std::to_string(std::abs(iEta));
809  nHits_In->Fill(etaIn, "01,1", 0);
810  } else
811  nHits_In->Fill(" ", "01,1", 0);
812  }
813 
814  for (int iEta = -8; iEta != 11; ++iEta) {
815  TString etaIn = "";
816  TString etaMid = "";
817  TString etaOut = "";
818  if (iEta < 0) {
819  etaIn = "BIC" + std::to_string(std::abs(iEta));
820  etaOut = "BOC" + std::to_string(std::abs(iEta));
821  if (iEta > -7) { etaMid = "BMC" + std::to_string(std::abs(iEta)); }
822  } else if (iEta == 0) {
823  etaOut = "BOB" + std::to_string(iEta);
824  } else if (iEta < 9) {
825  etaIn = "BIA" + std::to_string(iEta);
826  etaOut = "BOA" + std::to_string(iEta);
827  if (iEta < 7) { etaMid = "BMA" + std::to_string(iEta); }
828  }
829  if (iEta < 9) {
830  nHits_In->Fill(etaIn, "01,1", 0);
831  nHits_Mid->Fill(etaMid, "01,1", 0);
832  nHits_Out->Fill(etaOut, "01,1", 0);
833  } else {
834  nHits_In->Fill(" ", "01,1", 0);
835  nHits_Mid->Fill(" ", "01,1", 0);
836  nHits_Out->Fill(" ", "01,1", 0);
837  }
838  }
839 
840  // BEE, EE chambers on inner plots
841  for (int iEta = 1; iEta != 6; ++iEta) {
842  TString etaIn = "";
843  if (iEta < 3) {
844  etaIn = "BEA" + std::to_string(std::abs(iEta));
845  nHits_In->Fill(etaIn, "01,1", 0);
846  } else if (iEta < 5) {
847  etaIn = "EEA" + std::to_string(std::abs(iEta - 2));
848  nHits_In->Fill(etaIn, "01,1", 0);
849  } else
850  nHits_In->Fill(" ", "01,1", 0);
851  }
852 
853  for (int iEta = 1; iEta != 7; ++iEta) {
854  TString etaIn = "EIA" + std::to_string(iEta);
855  TString etaMid = "EMA" + std::to_string(iEta);
856  TString etaOut = "EOA" + std::to_string(iEta);
857  if (iEta < 6) {
858  nHits_In->Fill(etaIn, "01,1", 0);
859  nHits_Mid->Fill(etaMid, "01,1", 0);
860  }
861  nHits_Out->Fill(etaOut, "01,1", 0);
862  }
863 
864  nHits_In->LabelsDeflate("X");
865  nHits_In->LabelsDeflate("Y");
866  nHits_In->LabelsOption("v", "x");
867  nHits_In->Reset();
868  nHits_Mid->LabelsDeflate("X");
869  nHits_Mid->LabelsDeflate("Y");
870  nHits_Mid->LabelsOption("v", "x");
871  nHits_Mid->Reset();
872  nHits_Out->LabelsDeflate("X");
873  nHits_Out->LabelsDeflate("Y");
874  nHits_Out->LabelsOption("v", "x");
875  nHits_Out->Reset();
876 
877  return StatusCode::SUCCESS;
878 }
879 
880 void MdtRawDataValAlg::TubeID_to_ID_L_ML(int& tubeID, std::string_view hardware_name, int& derived_tube, int& derived_layer,
881  int& derived_ML, int totalTubes) {
882  derived_tube = 1;
883  derived_layer = 1;
884  derived_ML = 1;
885 
886  // Get Number of X
887  int derived_NumTubePerLayer = 1;
888  int derived_NumTubePerML = 1;
889  int derived_NumLayer = 1;
890  int derived_NumLayerPerML = 1;
891  int derived_NumML = 1;
892  if (hardware_name.substr(0, 4) == "BIS8" /*&& hardware_name.substr(5,2) == "12"*/) {
893  derived_NumLayerPerML = 3;
894  derived_NumML = 1;
895  } else if (/*hardware_name.substr(0,4) == "BIS8" ||*/ hardware_name.substr(0, 3) == "BEE") {
896  derived_NumLayerPerML = 4;
897  derived_NumML = 1;
898  } else if (hardware_name.substr(0, 2) == "BI" ||
899  hardware_name.substr(0, 2) == "EI" /*|| (hardware_name.substr(0,4) == "EEL1" && hardware_name.substr(5,2) == "05")*/) {
900  derived_NumLayerPerML = 4;
901  derived_NumML = 2;
902  } else {
903  derived_NumLayerPerML = 3;
904  derived_NumML = 2;
905  }
906 
907  derived_NumLayer = derived_NumLayerPerML * derived_NumML;
908  derived_NumTubePerML = totalTubes / derived_NumML;
909  derived_NumTubePerLayer = totalTubes / derived_NumLayer;
910 
911  // Corrections for derived_NumTubePerLayer
912  if (hardware_name.substr(0, 4) == "BMS4" || hardware_name.substr(0, 4) == "BMS6") derived_NumTubePerLayer = 48;
913  if ((hardware_name.substr(5, 2) == "11" || hardware_name.substr(5, 2) == "15")) {
914  if (hardware_name.substr(0, 4) == "BIR1") derived_NumTubePerLayer = 30;
915  if (hardware_name.substr(0, 4) == "BIR2") derived_NumTubePerLayer = 30;
916  if (hardware_name.substr(0, 4) == "BIR3") derived_NumTubePerLayer = 36;
917  if (hardware_name.substr(0, 4) == "BIR4") derived_NumTubePerLayer = 30;
918  if (hardware_name.substr(0, 4) == "BIR5") derived_NumTubePerLayer = 24;
919  }
920 
921  // Now get X
922  derived_ML = (tubeID - 1) / derived_NumTubePerML + 1;
923  derived_layer = (tubeID - 1) / derived_NumTubePerLayer + 1;
924  derived_tube = tubeID - (derived_layer - 1) * derived_NumTubePerLayer;
925  if (derived_ML == 2) derived_layer -= derived_NumLayerPerML;
926 }
927 
928 // Correct for CutOuts
929 void MdtRawDataValAlg::ChamberTubeNumberCorrection(int& tubeNum, std::string_view hardware_name, int tubePos, int numLayers) {
930  // numLayers should be mdt_layer-1 so numLayers = 0 implies layer 1 ML 1 or mdt_layer==1
931  if (hardware_name.substr(0, 4) == "BMS4" || hardware_name.substr(0, 4) == "BMS6") { // layer 1-4 tubeId 41-48 cut out
932  if (numLayers <= 2) tubeNum = tubePos + numLayers * 48;
933  }
934  if (hardware_name.substr(0, 3) == "BIR" && numLayers <= 3) {
935  if (hardware_name.substr(5, 2) == "11" || hardware_name.substr(5, 2) == "15") {
936  if (hardware_name.substr(3, 1) == "1") tubeNum = tubePos + 6 + numLayers * 30; // layer 1-4 tube id 1-6 cut out
937  if (hardware_name.substr(3, 1) == "2") tubeNum = tubePos + numLayers * 30; // layer 1-4 tube id 28-30 cut out
938  if (hardware_name.substr(3, 1) == "4") tubeNum = tubePos + 3 + numLayers * 30; // layer 1-4 tube id 1-3 cut out
939  if (hardware_name.substr(3, 1) == "5") tubeNum = tubePos + numLayers * 24; // layer 1-4 tube id 22-24 cut out
940  }
941  }
942  if (hardware_name.substr(0, 3) == "BIR" && hardware_name.substr(3, 1) == "3") tubeNum = tubePos + numLayers * 36; // cut out on both ML
943  if (hardware_name == "EEL1A05" || hardware_name == "EEL1C05")
944  tubeNum = tubePos + numLayers * 48; // mdtIdHelper gives wrong #tubes/layer (incidentally also wrong #layers)
945 }
946 
947 // Correct for F@#!ing mdtIdHelper
948 void MdtRawDataValAlg::CorrectTubeMax(const std::string& hardware_name, int& numTubes) {
949  if (hardware_name == "EEL1A05" || hardware_name == "EEL1C05") numTubes = 48;
950 }
951 
952 // Correct for F@#!ing mdtIdHelper
953 void MdtRawDataValAlg::CorrectLayerMax(const std::string& hardware_name, int& numLayers) {
954  if (hardware_name == "EEL1A05" || hardware_name == "EEL1C05") numLayers = 3;
955 }
956 
957 StatusCode MdtRawDataValAlg::bookMDTHisto_overview(TH1*& h, TString h_title, TString xtit, TString ytit, int nbin, float xi, float xf,
958  MonGroup& mgrp) {
959  h = new TH1F(h_title, h_title, nbin, xi, xf);
960  h->SetFillColor(42);
961  h->SetTitleSize(0.3, "y");
962  h->GetXaxis()->SetTitle(xtit);
963  h->GetYaxis()->SetTitle(ytit);
964  ATH_MSG_DEBUG("INSIDE bookMDTHisto: " << h << " " << h_title);
965  StatusCode sc = mgrp.regHist(h);
966  if (sc.isFailure()) ATH_MSG_WARNING("couldn't register " << h_title << " hist to MonGroup");
967  return sc;
968 }
969 
970 StatusCode MdtRawDataValAlg::bookMDTHisto_chambers(TH1F_LW*& h, TString h_title, TString xtit, TString ytit, int nbin, float xi, float xf,
971  MonGroup& mgrp) {
972  h = TH1F_LW::create(h_title, h_title, nbin, xi, xf);
973  h->GetXaxis()->SetTitle(xtit);
974  h->GetYaxis()->SetTitle(ytit);
975  ATH_MSG_VERBOSE("INSIDE bookMDTHisto: " << h << " " << h_title);
976  StatusCode sc = mgrp.regHist(h);
977  if (sc.isFailure()) ATH_MSG_WARNING("couldn't register " << h_title << " hist to MonGroup");
978  return sc;
979 }
980 
981 StatusCode MdtRawDataValAlg::bookMDTHisto_overview_2D(TH2*& h, TString h_title, TString xtit, TString ytit, int nbin1, float xi1, float xf1,
982  int nbin2, float xi2, float xf2, MonGroup& mgrp) {
983  h = new TH2F(h_title, h_title, nbin1, xi1, xf1, nbin2, xi2, xf2);
984  h->SetOption("COLZ");
985  h->SetMarkerColor(1);
986  h->SetMarkerStyle(21);
987  h->SetMarkerSize(0.2);
988  h->GetXaxis()->SetTitle(xtit);
989  h->GetYaxis()->SetTitle(ytit);
990  ATH_MSG_DEBUG("INSIDE bookMDTHisto: " << h << " " << h_title);
991  StatusCode sc = mgrp.regHist(h);
992  if (sc.isFailure()) ATH_MSG_WARNING("couldn't register " << h_title << " hist to MonGroup");
993  return sc;
994 }
995 
996 StatusCode MdtRawDataValAlg::bookMDTHisto_chambers_2D(TH2F_LW*& h, TString h_title, TString xtit, TString ytit, int nbin1, float xi1,
997  float xf1, int nbin2, float xi2, float xf2, MonGroup& mgrp) {
998  h = TH2F_LW::create(h_title, h_title, nbin1, xi1, xf1, nbin2, xi2, xf2);
999  h->SetOption("COLZ");
1000  // h->SetFillColor(42);
1001  h->SetMarkerColor(1);
1002  h->SetMarkerStyle(21);
1003  h->SetMarkerSize(0.2);
1004  h->GetXaxis()->SetTitle(xtit);
1005  h->GetYaxis()->SetTitle(ytit);
1006  ATH_MSG_VERBOSE("INSIDE bookMDTHisto: " << h << " " << h_title);
1007  StatusCode sc = mgrp.regHist(h);
1008  if (sc.isFailure()) ATH_MSG_WARNING("couldn't register " << h_title << " hist to MonGroup");
1009  return sc;
1010 }
1011 
1012 StatusCode MdtRawDataValAlg::bookMDTHisto_OccVsLB(TH2*& h, TString h_title, TString xtit, TString ytit, int nbin1, float xi1, float xf1,
1013  int nbin2, float xi2, float xf2, MonGroup& mgrp) {
1014  h = new TH2F(h_title, h_title, nbin1, xi1, xf1, nbin2, xi2, xf2);
1015  h->SetOption("COLZ");
1016  h->SetMarkerColor(1);
1017  h->SetMarkerStyle(21);
1018  h->SetMarkerSize(0.2);
1019  h->GetXaxis()->SetTitle(xtit);
1020  h->GetYaxis()->SetTitle(ytit);
1021  ATH_MSG_DEBUG("INSIDE bookMDTHisto_OccVsLB: " << h << " " << h_title);
1022  StatusCode sc = mgrp.regHist(h);
1023  if (sc.isFailure()) ATH_MSG_WARNING("couldn't register " << h_title << " hist to MonGroup");
1024  return sc;
1025 }
1026 
1027 StatusCode MdtRawDataValAlg::fillMDTMaskedTubes(IdentifierHash idHash, const std::string& hardware_name, TH1F_LW*& h) {
1028  // Loop Over all mdt identifiers
1029  if (!m_masked_tubes) {
1030  ATH_MSG_WARNING("Could Not Fill masked tubes noise map not set!");
1031  return StatusCode::SUCCESS;
1032  }
1033 
1034  std::set<Identifier> noisyTubes = m_masked_tubes->getNoiseList(idHash);
1035  for (auto digcoll_id : noisyTubes) {
1036  int mdtlayer = m_idHelperSvc->mdtIdHelper().tubeLayer(digcoll_id);
1037  if (m_idHelperSvc->mdtIdHelper().multilayer(digcoll_id) == 2) {
1038  if (hardware_name.at(1) == 'I' && hardware_name.at(3) != '8')
1039  mdtlayer += 4;
1040  else
1041  mdtlayer += 3;
1042  }
1043  int tubeMax = m_idHelperSvc->mdtIdHelper().tubeMax(digcoll_id);
1044  int mdttube = m_idHelperSvc->mdtIdHelper().tube(digcoll_id) + (mdtlayer - 1) * tubeMax;
1045  ChamberTubeNumberCorrection(mdttube, hardware_name, m_idHelperSvc->mdtIdHelper().tube(digcoll_id), mdtlayer - 1);
1046  h->Fill(mdttube, 1);
1047  }
1048  return StatusCode::SUCCESS;
1049 }
1050 
1051 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1052 // Private function to select mdt chambersId of the spectrometer
1053 
1055  ATH_MSG_DEBUG("in MDT ChambersIDvector");
1056 
1057  std::vector<Identifier>::const_iterator idfirst = m_idHelperSvc->mdtIdHelper().module_begin();
1058  std::vector<Identifier>::const_iterator idlast = m_idHelperSvc->mdtIdHelper().module_end();
1059 
1060  IdContext mdtModuleContext = m_idHelperSvc->mdtIdHelper().module_context();
1061  Identifier Id;
1062  IdentifierHash Idhash;
1063  for (std::vector<Identifier>::const_iterator i = idfirst; i != idlast; ++i) {
1064  Id = *i;
1065  int gethash_code = m_idHelperSvc->mdtIdHelper().get_hash(Id, Idhash, &mdtModuleContext);
1066  m_chambersId.push_back(Id);
1067  m_chambersIdHash.push_back(Idhash);
1068 
1069  std::string extid = m_idHelperSvc->mdtIdHelper().show_to_string(Id);
1070  ATH_MSG_DEBUG("Adding the chamber Identifier: " << extid);
1071  if (gethash_code == 0) {
1072  ATH_MSG_DEBUG(" its hash Id is " << Idhash);
1073  } else {
1074  ATH_MSG_DEBUG(" hash Id NOT computed " << Idhash);
1075  }
1076  }
1077  m_hist_hash_list.resize(m_chambersIdHash.size());
1078 }
1079 
1080 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1081 int MdtRawDataValAlg::mezzmdt(Identifier digcoll_id) { // int mezz_chamber, int mezz_eta, int mezz_ml, int mezz_tube, int max_tube) {
1082  int TotmezzTubes = 8;
1083  int tubeLayerMax = m_idHelperSvc->mdtIdHelper().tubeLayerMax(digcoll_id);
1084  int tubeMax = m_idHelperSvc->mdtIdHelper().tubeMax(digcoll_id);
1085  if (tubeLayerMax == 4) TotmezzTubes = 6;
1086  int Imezz = (int)((m_idHelperSvc->mdtIdHelper().tube(digcoll_id) - 1) / TotmezzTubes) +
1087  (int)((m_idHelperSvc->mdtIdHelper().multilayer(digcoll_id) - 1) *
1088  (tubeMax / TotmezzTubes));
1089 
1090  return Imezz;
1091 }
1092 
1093 // Get the Maximum # of tubes in the chamber
1094 // the 'if' statements are for chambers with ML1 != ML2
1095 // except for BIS8 -- mdtIdHelper gets the # layers wrong in this instance
1096 int MdtRawDataValAlg::GetTubeMax(const Identifier& digcoll_id, std::string_view hardware_name) {
1097  int numtubes = m_idHelperSvc->mdtIdHelper().tubeMax(digcoll_id);
1098  int numlayers = m_idHelperSvc->mdtIdHelper().tubeLayerMax(digcoll_id);
1099  int numML = m_idHelperSvc->mdtIdHelper().numberOfMultilayers(digcoll_id);
1100  int tubeMax = numtubes * numlayers * numML;
1101 
1102  if (hardware_name.substr(0, 4) == "BIS8") // Why does mdtIdHelper get this one wrong?
1103  tubeMax = 16 * 3;
1104  if (hardware_name.substr(0, 4) == "BIR5")
1105  // tubeMax = 21*4 + 24*4;
1106  tubeMax = 24 * 4 + 24 * 4;
1107  if (hardware_name.substr(0, 4) == "BIR2" || hardware_name.substr(0, 4) == "BIR4")
1108  // tubeMax = 27*4 + 30*4;
1109  tubeMax = 30 * 4 + 30 * 4;
1110  if (hardware_name.substr(0, 4) == "BIR3") tubeMax = 36 * 4 + 36 * 4;
1111  if (hardware_name.substr(0, 4) == "BIR1")
1112  // tubeMax = 24*4 + 30*4;
1113  tubeMax = 30 * 4 + 30 * 4;
1114  if (hardware_name.substr(0, 4) == "BMS4" || hardware_name.substr(0, 4) == "BMS6")
1115  // tubeMax = 40*3 + 48*3;
1116  tubeMax = 48 * 3 + 48 * 3;
1117  if (hardware_name == "EEL1A05" || hardware_name == "EEL1C05") tubeMax = 48 * 3 + 48 * 3;
1118  if (hardware_name.substr(0, 3) == "BME") tubeMax = 546;
1119 
1120  std::string hardware_namestr(hardware_name);
1121  std::map<string, float>::iterator iter_tubesperchamber = m_tubesperchamber_map.find(hardware_namestr);
1122  if (iter_tubesperchamber == m_tubesperchamber_map.end()) {
1123  m_tubesperchamber_map.insert(make_pair(hardware_namestr, tubeMax));
1124  ATH_MSG_DEBUG("Chamber " << hardware_name << " has " << tubeMax << " tubes.");
1125  } else {
1126  ATH_MSG_WARNING("GetTubeMax: computing tubes per chamber twice for this chamber!");
1127  }
1128 
1129  return tubeMax;
1130 }
1131 
1132 bool MdtRawDataValAlg::AinB(int A, std::vector<int>& B) {
1133  for (int i : B) {
1134  if (i == A) return true;
1135  }
1136  return false;
1137 }
1138 
1140  m_time = -1;
1141 
1143  m_time = (1000000000L * (uint64_t)evt->timeStamp() + evt->timeStampNSOffset()) * 0.000000001;
1144 
1145  // protection against simulated cosmics when the trigger_info() of the event_info is not filled and returns a null pointer.
1146  // trigtype = eventInfo->level1TriggerType();
1147 
1148  return StatusCode::SUCCESS;
1149 }
1150 
1152  m_trigtype = type;
1153  if (m_trigtype == L1_BARREL) m_trig_BARREL = true;
1154  if (m_trigtype == L1_ENDCAP) m_trig_ENDCAP = true;
1155 }
1156 
1158  bool filterresult(true);
1159  if (!m_MdtDQFilterTools.empty()) {
1160  ToolHandleArray<IDQFilterTool>::const_iterator ifilter(m_MdtDQFilterTools.begin()), filterend(m_MdtDQFilterTools.end());
1161  for (; filterresult && (ifilter != filterend); ++ifilter) { filterresult = (filterresult && (*ifilter)->accept()); }
1162  }
1163  m_atlas_ready = filterresult;
1164 }
1165 
1167  m_lumiblock = -1;
1168 
1170 
1171  m_lumiblock = evt->lumiBlock();
1172 
1173  return StatusCode::SUCCESS;
1174 }
1176  m_eventNum = -1;
1177 
1179 
1180  m_eventNum = evt->eventNumber();
1181 
1182  return StatusCode::SUCCESS;
1183 }
1184 
1185 void MdtRawDataValAlg::putBox(TH2* h, float x1, float y1, float x2, float y2) {
1186  TBox* box = new TBox(x1, y1 * 0.5, x2, y2 * 0.5);
1187  // box->SetFillColor(kGray+1);
1188  // box->SetLineColor(kGray+1);
1189  // box->SetFillStyle(3013);
1190  // box->SetFillStyle(3004);
1191 
1192  box->SetFillColor(kGray);
1193  box->SetLineColor(kGray);
1194 
1195  // box->SetLineStyle(3);
1196 
1197  (h->GetListOfFunctions())->Add(box);
1198  // // delete box; // will cause crash or not save box // is deleted along with h
1199 }
1200 
1201 void MdtRawDataValAlg::putLine(TH2* h, float x1, float y1, float x2, float y2, Color_t c) {
1202  TLine* line = new TLine(x1, y1 * 0.5, x2, y2 * 0.5);
1203  line->SetLineColor(c);
1204 
1205  (h->GetListOfFunctions())->Add(line);
1206  // // delete line; // will cause crash or not save box // is deleted along with h
1207 }
1208 
1210 
1212  IdentifierHash idHash{0};
1213  const MdtIdHelper& id_helper = m_idHelperSvc->mdtIdHelper();
1214  id_helper.get_module_hash(id, idHash);
1215  MDTChamber* chamber{nullptr};
1216  if (getChamber(idHash, chamber).isSuccess()) return chamber->getName();
1217  return convertChamberName(id_helper.stationName(id), id_helper.stationEta(id), id_helper.stationPhi(id), "MDT");
1218 }
1219 
1221  if (id >= m_hist_hash_list.size()) return StatusCode::FAILURE;
1222 
1223  chamber = m_hist_hash_list[id].get();
1224  if (!chamber) return StatusCode::FAILURE;
1225 
1226  return StatusCode::SUCCESS;
1227 }
1228 
1229 int MdtRawDataValAlg::get_bin_for_LB_hist(int region, int layer, int phi, int eta, bool isBIM) {
1230  if (region == 0 || region == 1) { // Barrel
1231 
1232  if (layer == 0) { // Inner
1233  if (eta < 6) {
1234  if (phi < 11 && !isBIM)
1235  return 18 * (eta - 1) + phi;
1236  else if ((phi == 10 && isBIM) || (phi < 15 && !isBIM))
1237  return 18 * (eta - 1) + phi + 1;
1238  else
1239  return 18 * (eta - 1) + phi + 2;
1240  } else if (eta == 6)
1241  return 90 + phi;
1242  else if (eta == 7)
1243  return 106 + (phi / 2);
1244  else if (eta == 8)
1245  return 114 + (phi / 2);
1246  }
1247 
1248  else if (layer == 1) { // Middle
1249  // 95 = 1 + 16 + 16 + 16 + 16 + 16 + 14 total number of phi sectors (+1)
1250  // in the last eta-sector (6) there is no phi-sector 13; ie there are no chambers BML6A13 and BML6C13, so there are only 14 phi
1251  // sectos we move the bin of phi=14 directly above phi=12 so there is no white line in the histogram
1252  if (eta == 6 && phi > 11)
1253  return 16 * (eta - 1) + phi - 1;
1254  else
1255  return 16 * (eta - 1) + phi;
1256 
1257  } else if (layer == 2 && region == 0) { // Outer, side A (must be separated due to presence of eta=0 chambers)
1258  if (eta == 0 && phi == 11)
1259  return 0;
1260  else if (eta == 0 && phi == 13)
1261  return 1;
1262  else if (eta < 7)
1263  return 16 * (eta - 1) + phi + 2;
1264  else if (eta == 7 && phi == 11)
1265  return 98;
1266  else if (eta == 7 && phi == 13)
1267  return 99;
1268  else if (eta == 8 && phi == 11)
1269  return 100;
1270  else if (eta == 8 && phi == 13)
1271  return 101;
1272  } else if (layer == 3 && region == 0) { // Extra: put with outer
1273  return 102 + 8 * (eta - 1) + (phi - 1) / 2;
1274  } else if (layer == 2 && region == 1) { // Outer, side C
1275  if (eta < 7)
1276  return 16 * (eta - 1) + phi;
1277  else if (eta == 7 && phi == 11)
1278  return 96;
1279  else if (eta == 7 && phi == 13)
1280  return 97;
1281  else if (eta == 8 && phi == 11)
1282  return 98;
1283  else if (eta == 8 && phi == 13)
1284  return 99;
1285  } else if (layer == 3 && region == 1) { // Extra: put with outer
1286  return 100 + 8 * (eta - 1) + (phi - 1) / 2;
1287  }
1288 
1289  }
1290 
1291  else { // Endcap
1292  if (layer == 0) { // Inner
1293  if (eta < 3)
1294  return 16 * (eta - 1) + phi;
1295  else if (eta == 3)
1296  return 32 + phi / 2;
1297  else if (eta == 4)
1298  return 40 + phi / 2;
1299  else if (eta == 5)
1300  return 48 + phi / 8;
1301  } else if (layer == 1) { // Middle
1302  return 16 * (eta - 1) + phi;
1303  } else if (layer == 2) { // Outer
1304  return 16 * (eta - 1) + phi;
1305  } else if (layer == 3 && region == 2) { // Extra A: put with outer. Asymmetry between A and C
1306  if (eta == 1 && phi == 2) return 96;
1307  if (eta == 1 && phi == 4) return 97;
1308  if (eta == 1 && phi == 10) return 98;
1309  if (eta == 1 && phi == 12) return 99;
1310  if (eta == 2 && phi == 2) return 100;
1311  if (eta == 2 && phi == 10) return 101;
1312  if (eta == 2 && phi == 12) return 102;
1313  } else if (layer == 3 && region == 3) { // Extra C: put with outer.
1314  if (eta == 1 || phi < 5)
1315  return 80 + 16 * eta + phi;
1316  else
1317  return 79 + 16 * eta + phi; //(missing eta = 2, phi = 5)
1318  }
1319  }
1320 
1321  return -1;
1322 }
1323 
1325  if (region == 0 || region == 1) { // Barrel
1326  if (layer == 0) { // Inner
1327  // Add Labels
1328  h->SetBins(834, 1, 2502, 122, 0, 122);
1329  h->GetYaxis()->SetBinLabel(1, "BI1");
1330  h->GetYaxis()->SetBinLabel(19, "BI2");
1331  h->GetYaxis()->SetBinLabel(37, "BI3");
1332  h->GetYaxis()->SetBinLabel(55, "BI4");
1333  h->GetYaxis()->SetBinLabel(73, "BI5");
1334  h->GetYaxis()->SetBinLabel(91, "BI6");
1335  h->GetYaxis()->SetBinLabel(107, "BI7");
1336  h->GetYaxis()->SetBinLabel(115, "BI8");
1337  // Add lines
1338  h->GetYaxis()->SetTickLength(0);
1339  for (int i = 0; i < 6; i++) {
1340  TLine* l = new TLine(1, 18 * i, 50, 18 * i);
1341  h->GetListOfFunctions()->Add(l);
1342  }
1343  TLine* l2 = new TLine(1, 106, 50, 106);
1344  h->GetListOfFunctions()->Add(l2);
1345  TLine* l3 = new TLine(1, 114, 50, 114);
1346  h->GetListOfFunctions()->Add(l3);
1347  for (int i = 1; i < 122; i++) {
1348  if (i < 90 && (i % 18 == 11 || i % 18 == 16)) {
1349  TLine* l = new TLine(1, i, 10, i);
1350  h->GetListOfFunctions()->Add(l);
1351  } else {
1352  TLine* l = new TLine(1, i, 20, i);
1353  h->GetListOfFunctions()->Add(l);
1354  }
1355  }
1356  }
1357 
1358  else if (layer == 1) { // Middle
1359  h->SetBins(834, 1, 2502, 95, 0, 95); // 95 = 1 + 16 + 16 + 16 + 16 + 16 + 14 total number of phi sectors (+1)
1360  // in the last eta-sector (6) there is no phi-sector 13; ie there arent chambers BML6A13
1361  // and BML6C13 so there are only 14 phi sectors
1362  // Add Labels
1363  h->GetYaxis()->SetBinLabel(1, "BM1");
1364  h->GetYaxis()->SetBinLabel(17, "BM2");
1365  h->GetYaxis()->SetBinLabel(33, "BM3");
1366  h->GetYaxis()->SetBinLabel(49, "BM4");
1367  h->GetYaxis()->SetBinLabel(65, "BM5");
1368  h->GetYaxis()->SetBinLabel(81, "BM6");
1369  // Add lines
1370  h->GetYaxis()->SetTickLength(0);
1371  for (int i = 1; i < 95; i++) {
1372  TLine* l = new TLine(1, i, 20, i);
1373  h->GetListOfFunctions()->Add(l);
1374  }
1375  TLine* l1 = new TLine(1, 16, 50, 16);
1376  h->GetListOfFunctions()->Add(l1);
1377  TLine* l2 = new TLine(1, 32, 50, 32);
1378  h->GetListOfFunctions()->Add(l2);
1379  TLine* l3 = new TLine(1, 48, 50, 48);
1380  h->GetListOfFunctions()->Add(l3);
1381  TLine* l4 = new TLine(1, 64, 50, 64);
1382  h->GetListOfFunctions()->Add(l4);
1383  TLine* l5 = new TLine(1, 80, 50, 80);
1384  h->GetListOfFunctions()->Add(l5);
1385  }
1386 
1387  else if (layer == 2 && region == 0) { // Outer, side A
1388  h->SetBins(834, 1, 2502, 118, 0, 118);
1389  // Add labels
1390  h->GetYaxis()->SetBinLabel(1, "BO0");
1391  h->GetYaxis()->SetBinLabel(4, "BO1");
1392  h->GetYaxis()->SetBinLabel(19, "BO2");
1393  h->GetYaxis()->SetBinLabel(35, "BO3");
1394  h->GetYaxis()->SetBinLabel(51, "BO4");
1395  h->GetYaxis()->SetBinLabel(67, "BO5");
1396  h->GetYaxis()->SetBinLabel(83, "BO6");
1397  h->GetYaxis()->SetBinLabel(99, "BO7,8");
1398  // h->GetYaxis()->SetBinLabel(101,"BO8");
1399  h->GetYaxis()->SetBinLabel(103, "BE1");
1400  h->GetYaxis()->SetBinLabel(111, "BE2");
1401  // Add lines
1402  h->GetYaxis()->SetTickLength(0);
1403  for (int i = 1; i < 118; i++) {
1404  TLine* l = new TLine(1, i, 20, i);
1405  h->GetListOfFunctions()->Add(l);
1406  }
1407  TLine* l1 = new TLine(1, 2, 50, 2);
1408  h->GetListOfFunctions()->Add(l1);
1409  TLine* l2 = new TLine(1, 18, 50, 18);
1410  h->GetListOfFunctions()->Add(l2);
1411  TLine* l3 = new TLine(1, 34, 50, 34);
1412  h->GetListOfFunctions()->Add(l3);
1413  TLine* l4 = new TLine(1, 50, 50, 50);
1414  h->GetListOfFunctions()->Add(l4);
1415  TLine* l5 = new TLine(1, 66, 50, 66);
1416  h->GetListOfFunctions()->Add(l5);
1417  TLine* l6 = new TLine(1, 82, 50, 82);
1418  h->GetListOfFunctions()->Add(l6);
1419  TLine* l7 = new TLine(1, 98, 50, 98);
1420  h->GetListOfFunctions()->Add(l7);
1421  TLine* l8 = new TLine(1, 100, 50, 100);
1422  h->GetListOfFunctions()->Add(l8);
1423  TLine* l9 = new TLine(1, 102, 50, 102);
1424  h->GetListOfFunctions()->Add(l9);
1425  TLine* l10 = new TLine(1, 110, 50, 110);
1426  h->GetListOfFunctions()->Add(l10);
1427  }
1428 
1429  else if (layer == 2 && region == 1) { // Outer, side C (no eta = 0)
1430  h->SetBins(834, 1, 2502, 116, 0, 116);
1431  // Add labels
1432  h->GetYaxis()->SetBinLabel(1, "BO1");
1433  h->GetYaxis()->SetBinLabel(17, "BO2");
1434  h->GetYaxis()->SetBinLabel(33, "BO3");
1435  h->GetYaxis()->SetBinLabel(49, "BO4");
1436  h->GetYaxis()->SetBinLabel(65, "BO5");
1437  h->GetYaxis()->SetBinLabel(81, "BO6");
1438  h->GetYaxis()->SetBinLabel(97, "BO7,8");
1439  // h->GetYaxis()->SetBinLabel(101,"BO8");
1440  h->GetYaxis()->SetBinLabel(101, "BE1");
1441  h->GetYaxis()->SetBinLabel(109, "BE2");
1442  // Add lines
1443  h->GetYaxis()->SetTickLength(0);
1444  for (int i = 1; i < 116; i++) {
1445  TLine* l = new TLine(1, i, 20, i);
1446  h->GetListOfFunctions()->Add(l);
1447  }
1448  TLine* l1 = new TLine(1, 16, 50, 16);
1449  h->GetListOfFunctions()->Add(l1);
1450  TLine* l2 = new TLine(1, 32, 50, 32);
1451  h->GetListOfFunctions()->Add(l2);
1452  TLine* l3 = new TLine(1, 48, 50, 48);
1453  h->GetListOfFunctions()->Add(l3);
1454  TLine* l4 = new TLine(1, 64, 50, 64);
1455  h->GetListOfFunctions()->Add(l4);
1456  TLine* l5 = new TLine(1, 80, 50, 80);
1457  h->GetListOfFunctions()->Add(l5);
1458  TLine* l6 = new TLine(1, 96, 50, 96);
1459  h->GetListOfFunctions()->Add(l6);
1460  TLine* l7 = new TLine(1, 98, 50, 98);
1461  h->GetListOfFunctions()->Add(l7);
1462  TLine* l8 = new TLine(1, 100, 50, 100);
1463  h->GetListOfFunctions()->Add(l8);
1464  TLine* l9 = new TLine(1, 108, 50, 108);
1465  h->GetListOfFunctions()->Add(l9);
1466  }
1467  }
1468 
1469  else { // Endcap
1470  if (layer == 0) { // Inner
1471  h->SetBins(834, 1, 2502, 50, 0, 50);
1472  // Add labels
1473  h->GetYaxis()->SetBinLabel(1, "EI1");
1474  h->GetYaxis()->SetBinLabel(17, "EI2");
1475  h->GetYaxis()->SetBinLabel(33, "EI3");
1476  h->GetYaxis()->SetBinLabel(41, "EI4");
1477  h->GetYaxis()->SetBinLabel(49, "EI5");
1478  // Add lines
1479  h->GetYaxis()->SetTickLength(0);
1480  for (int i = 1; i < 50; i++) {
1481  TLine* l = new TLine(1, i, 20, i);
1482  h->GetListOfFunctions()->Add(l);
1483  }
1484  TLine* l1 = new TLine(1, 16, 50, 16);
1485  h->GetListOfFunctions()->Add(l1);
1486  TLine* l2 = new TLine(1, 32, 50, 32);
1487  h->GetListOfFunctions()->Add(l2);
1488  TLine* l3 = new TLine(1, 40, 50, 40);
1489  h->GetListOfFunctions()->Add(l3);
1490  TLine* l4 = new TLine(1, 48, 50, 48);
1491  h->GetListOfFunctions()->Add(l4);
1492  }
1493 
1494  else if (layer == 1) { // Middle
1495  h->SetBins(834, 1, 2502, 80, 0, 80);
1496  // Add labels
1497  h->GetYaxis()->SetBinLabel(1, "EM1");
1498  h->GetYaxis()->SetBinLabel(17, "EM2");
1499  h->GetYaxis()->SetBinLabel(33, "EM3");
1500  h->GetYaxis()->SetBinLabel(49, "EM4");
1501  h->GetYaxis()->SetBinLabel(65, "EM5");
1502  // Add lines
1503  h->GetYaxis()->SetTickLength(0);
1504  for (int i = 1; i < 80; i++) {
1505  TLine* l = new TLine(1, i, 20, i);
1506  h->GetListOfFunctions()->Add(l);
1507  }
1508  TLine* l1 = new TLine(1, 16, 50, 16);
1509  h->GetListOfFunctions()->Add(l1);
1510  TLine* l2 = new TLine(1, 32, 50, 32);
1511  h->GetListOfFunctions()->Add(l2);
1512  TLine* l3 = new TLine(1, 48, 50, 48);
1513  h->GetListOfFunctions()->Add(l3);
1514  TLine* l4 = new TLine(1, 64, 50, 64);
1515  h->GetListOfFunctions()->Add(l4);
1516  }
1517 
1518  else if (layer == 2) { // Outer + extra
1519 
1520  if (region == 2) { // side A
1521  h->SetBins(834, 1, 2502, 103, 0, 103);
1522  // Add labels
1523  h->GetYaxis()->SetBinLabel(1, "EO1");
1524  h->GetYaxis()->SetBinLabel(17, "EO2");
1525  h->GetYaxis()->SetBinLabel(33, "EO3");
1526  h->GetYaxis()->SetBinLabel(49, "EO4");
1527  h->GetYaxis()->SetBinLabel(65, "EO5");
1528  h->GetYaxis()->SetBinLabel(81, "EO6");
1529  h->GetYaxis()->SetBinLabel(97, "EE1,2");
1530  // Add lines
1531  h->GetYaxis()->SetTickLength(0);
1532  for (int i = 1; i < 103; i++) {
1533  TLine* l = new TLine(1, i, 20, i);
1534  h->GetListOfFunctions()->Add(l);
1535  }
1536  TLine* l1 = new TLine(1, 16, 50, 16);
1537  h->GetListOfFunctions()->Add(l1);
1538  TLine* l2 = new TLine(1, 32, 50, 32);
1539  h->GetListOfFunctions()->Add(l2);
1540  TLine* l3 = new TLine(1, 48, 50, 48);
1541  h->GetListOfFunctions()->Add(l3);
1542  TLine* l4 = new TLine(1, 64, 50, 64);
1543  h->GetListOfFunctions()->Add(l4);
1544  TLine* l5 = new TLine(1, 80, 50, 80);
1545  h->GetListOfFunctions()->Add(l5);
1546  TLine* l6 = new TLine(1, 96, 50, 96);
1547  h->GetListOfFunctions()->Add(l6);
1548  TLine* l7 = new TLine(1, 100, 50, 100);
1549  h->GetListOfFunctions()->Add(l7);
1550  } else if (region == 3) { // side C
1551  h->SetBins(834, 1, 2502, 127, 0, 127);
1552  // Add labels
1553  h->GetYaxis()->SetBinLabel(1, "EO1");
1554  h->GetYaxis()->SetBinLabel(17, "EO2");
1555  h->GetYaxis()->SetBinLabel(33, "EO3");
1556  h->GetYaxis()->SetBinLabel(49, "EO4");
1557  h->GetYaxis()->SetBinLabel(65, "EO5");
1558  h->GetYaxis()->SetBinLabel(81, "EO6");
1559  h->GetYaxis()->SetBinLabel(97, "EE1");
1560  h->GetYaxis()->SetBinLabel(113, "EE2");
1561  // Add lines
1562  h->GetYaxis()->SetTickLength(0);
1563  for (int i = 1; i < 127; i++) {
1564  TLine* l = new TLine(1, i, 20, i);
1565  h->GetListOfFunctions()->Add(l);
1566  }
1567  TLine* l1 = new TLine(1, 16, 50, 16);
1568  h->GetListOfFunctions()->Add(l1);
1569  TLine* l2 = new TLine(1, 32, 50, 32);
1570  h->GetListOfFunctions()->Add(l2);
1571  TLine* l3 = new TLine(1, 48, 50, 48);
1572  h->GetListOfFunctions()->Add(l3);
1573  TLine* l4 = new TLine(1, 64, 50, 64);
1574  h->GetListOfFunctions()->Add(l4);
1575  TLine* l5 = new TLine(1, 80, 50, 80);
1576  h->GetListOfFunctions()->Add(l5);
1577  TLine* l6 = new TLine(1, 96, 50, 96);
1578  h->GetListOfFunctions()->Add(l6);
1579  TLine* l7 = new TLine(1, 112, 50, 112);
1580  h->GetListOfFunctions()->Add(l7);
1581  }
1582  }
1583  }
1584 
1585  return StatusCode::SUCCESS;
1586 }
1587 
1589  if (region == 0 || region == 1) { // Barrel
1590  if (crate == 0) { // Crate BA01 or BC01
1591  // Add Labels
1592  h->SetBins(834, 1, 2502, 73, 0, 73);
1593  h->GetYaxis()->SetBinLabel(1, "BIL");
1594  h->GetYaxis()->SetBinLabel(13, "BIS");
1595  h->GetYaxis()->SetBinLabel(25, "BME");
1596  h->GetYaxis()->SetBinLabel(26, "BML");
1597  h->GetYaxis()->SetBinLabel(38, "BMS");
1598  h->GetYaxis()->SetBinLabel(50, "BOL");
1599  h->GetYaxis()->SetBinLabel(62, "BOS");
1600  // Add lines
1601  h->GetYaxis()->SetTickLength(0);
1602  for (int i = 0; i < 73; i++) {
1603  TLine* l = new TLine(1, i, 20, i);
1604  h->GetListOfFunctions()->Add(l);
1605  }
1606  TLine* l2 = new TLine(1, 0, 50, 0);
1607  h->GetListOfFunctions()->Add(l2);
1608  TLine* l3 = new TLine(1, 12, 50, 12);
1609  h->GetListOfFunctions()->Add(l3);
1610  TLine* l4 = new TLine(1, 24, 50, 24);
1611  h->GetListOfFunctions()->Add(l4);
1612  TLine* l5 = new TLine(1, 25, 50, 25);
1613  h->GetListOfFunctions()->Add(l5);
1614  TLine* l6 = new TLine(1, 37, 50, 37);
1615  h->GetListOfFunctions()->Add(l6);
1616  TLine* l8 = new TLine(1, 49, 50, 49);
1617  h->GetListOfFunctions()->Add(l8);
1618  TLine* l9 = new TLine(1, 61, 50, 61);
1619  h->GetListOfFunctions()->Add(l9);
1620  }
1621 
1622  else if (crate == 1) { // BA02, BC02
1623  h->SetBins(834, 1, 2502, 73, 0, 73);
1624  // Add Labels
1625  h->GetYaxis()->SetBinLabel(1, "BIL");
1626  h->GetYaxis()->SetBinLabel(13, "BIS");
1627  h->GetYaxis()->SetBinLabel(25, "BME");
1628  h->GetYaxis()->SetBinLabel(37, "BMS");
1629  h->GetYaxis()->SetBinLabel(49, "BOL");
1630  h->GetYaxis()->SetBinLabel(61, "BOS");
1631  // Add lines
1632  h->GetYaxis()->SetTickLength(0);
1633  for (int i = 1; i < 73; i++) {
1634  TLine* l = new TLine(1, i, 20, i);
1635  h->GetListOfFunctions()->Add(l);
1636  }
1637  TLine* l1 = new TLine(1, 12, 50, 12);
1638  h->GetListOfFunctions()->Add(l1);
1639  TLine* l2 = new TLine(1, 24, 50, 24);
1640  h->GetListOfFunctions()->Add(l2);
1641  TLine* l3 = new TLine(1, 36, 50, 36);
1642  h->GetListOfFunctions()->Add(l3);
1643  TLine* l4 = new TLine(1, 48, 50, 48);
1644  h->GetListOfFunctions()->Add(l4);
1645  TLine* l6 = new TLine(1, 60, 50, 60);
1646  h->GetListOfFunctions()->Add(l6);
1647 
1648  } else if (crate == 2) { // BA03, BC03
1649  // Add Labels
1650  h->SetBins(834, 1, 2502, 80, 0, 80);
1651  h->GetYaxis()->SetBinLabel(1, "BIL");
1652  h->GetYaxis()->SetBinLabel(7, "BIM");
1653  h->GetYaxis()->SetBinLabel(12, "BIR");
1654  h->GetYaxis()->SetBinLabel(18, "BIS");
1655  h->GetYaxis()->SetBinLabel(30, "BMF");
1656  h->GetYaxis()->SetBinLabel(33, "BMG");
1657  h->GetYaxis()->SetBinLabel(36, "BML");
1658  h->GetYaxis()->SetBinLabel(48, "BMS");
1659  h->GetYaxis()->SetBinLabel(54, "BOF");
1660  h->GetYaxis()->SetBinLabel(58, "BOG");
1661  if (region == 0) {
1662  h->GetYaxis()->SetBinLabel(63, "BOL");
1663  h->GetYaxis()->SetBinLabel(75, "BOS");
1664  } else if (region == 1) {
1665  h->GetYaxis()->SetBinLabel(62, "BOL");
1666  h->GetYaxis()->SetBinLabel(74, "BOS");
1667  }
1668  // Add lines
1669  h->GetYaxis()->SetTickLength(0);
1670  for (int i = 0; i < 80; i++) {
1671  TLine* l = new TLine(1, i, 20, i);
1672  h->GetListOfFunctions()->Add(l);
1673  }
1674  TLine* l2 = new TLine(1, 6, 50, 6);
1675  h->GetListOfFunctions()->Add(l2);
1676  TLine* l3 = new TLine(1, 11, 50, 11);
1677  h->GetListOfFunctions()->Add(l3);
1678  TLine* l3b = new TLine(1, 17, 50, 17);
1679  h->GetListOfFunctions()->Add(l3b);
1680  // TLine* l4 = new TLine(1,26,50,26); h->GetListOfFunctions()->Add(l4); //removed this line because it doesnt correspond to
1681  // anything
1682  TLine* l5 = new TLine(1, 29, 50, 29);
1683  h->GetListOfFunctions()->Add(l5);
1684  TLine* l6 = new TLine(1, 32, 50, 32);
1685  h->GetListOfFunctions()->Add(l6);
1686  TLine* l7 = new TLine(1, 35, 50, 35);
1687  h->GetListOfFunctions()->Add(l7);
1688  TLine* l8 = new TLine(1, 47, 50, 47);
1689  h->GetListOfFunctions()->Add(l8);
1690  TLine* l9 = new TLine(1, 53, 50, 53);
1691  h->GetListOfFunctions()->Add(l9);
1692  TLine* l9b = new TLine(1, 57, 50, 57);
1693  h->GetListOfFunctions()->Add(l9b);
1694  if (region == 0) {
1695  TLine* l10 = new TLine(1, 62, 50, 62);
1696  h->GetListOfFunctions()->Add(l10);
1697  TLine* l11 = new TLine(1, 74, 50, 74);
1698  h->GetListOfFunctions()->Add(l11);
1699  } else if (region == 1) {
1700  TLine* l10 = new TLine(1, 61, 50, 61);
1701  h->GetListOfFunctions()->Add(l10);
1702  TLine* l11 = new TLine(1, 73, 50, 73);
1703  h->GetListOfFunctions()->Add(l11);
1704  }
1705  }
1706 
1707  else if (crate == 3) { // BA04, BC04
1708  // Add Labels
1709  h->SetBins(834, 1, 2502, 79, 0, 79);
1710  h->GetYaxis()->SetBinLabel(1, "BIL");
1711  h->GetYaxis()->SetBinLabel(7, "BIM");
1712  h->GetYaxis()->SetBinLabel(12, "BIR");
1713  h->GetYaxis()->SetBinLabel(18, "BIS");
1714  h->GetYaxis()->SetBinLabel(30, "BMF");
1715  h->GetYaxis()->SetBinLabel(33, "BMG");
1716  h->GetYaxis()->SetBinLabel(36, "BML");
1717  h->GetYaxis()->SetBinLabel(47, "BMS");
1718  h->GetYaxis()->SetBinLabel(53, "BOF");
1719  h->GetYaxis()->SetBinLabel(57, "BOG");
1720  if (region == 0) {
1721  h->GetYaxis()->SetBinLabel(62, "BOL");
1722  h->GetYaxis()->SetBinLabel(75, "BOS");
1723  } else if (region == 1) {
1724  h->GetYaxis()->SetBinLabel(61, "BOL");
1725  h->GetYaxis()->SetBinLabel(74, "BOS");
1726  }
1727 
1728  // Add lines
1729  h->GetYaxis()->SetTickLength(0);
1730  for (int i = 0; i < 79; i++) {
1731  TLine* l = new TLine(1, i, 20, i);
1732  h->GetListOfFunctions()->Add(l);
1733  }
1734  TLine* l2 = new TLine(1, 6, 50, 6);
1735  h->GetListOfFunctions()->Add(l2);
1736  TLine* l3 = new TLine(1, 11, 50, 11);
1737  h->GetListOfFunctions()->Add(l3);
1738  TLine* l3b = new TLine(1, 17, 50, 17);
1739  h->GetListOfFunctions()->Add(l3b);
1740  // TLine* l4 = new TLine(1,26,50,26); h->GetListOfFunctions()->Add(l4);//removed this line because it doesnt correspond to
1741  // anything
1742  TLine* l5 = new TLine(1, 29, 50, 29);
1743  h->GetListOfFunctions()->Add(l5);
1744  TLine* l6 = new TLine(1, 32, 50, 32);
1745  h->GetListOfFunctions()->Add(l6);
1746  TLine* l7 = new TLine(1, 35, 50, 35);
1747  h->GetListOfFunctions()->Add(l7);
1748  TLine* l8 = new TLine(1, 46, 50, 46);
1749  h->GetListOfFunctions()->Add(l8);
1750  TLine* l9 = new TLine(1, 52, 50, 52);
1751  h->GetListOfFunctions()->Add(l9);
1752  TLine* l9b = new TLine(1, 56, 50, 56);
1753  h->GetListOfFunctions()->Add(l9b);
1754  if (region == 0) {
1755  TLine* l10 = new TLine(1, 61, 50, 61);
1756  h->GetListOfFunctions()->Add(l10);
1757  TLine* l11 = new TLine(1, 74, 50, 74);
1758  h->GetListOfFunctions()->Add(l11);
1759  } else if (region == 1) {
1760  TLine* l10 = new TLine(1, 60, 50, 60);
1761  h->GetListOfFunctions()->Add(l10);
1762  TLine* l11 = new TLine(1, 73, 50, 73);
1763  h->GetListOfFunctions()->Add(l11);
1764  }
1765  }
1766  }
1767 
1768  else { // Endcap
1769  if (crate == 0 || crate == 2) { // EA01, EC01 and EA03, EC03 are the same
1770  h->SetBins(834, 1, 2502, 73, 0, 73);
1771  // Add labels
1772  h->GetYaxis()->SetBinLabel(1, "BEE");
1773  h->GetYaxis()->SetBinLabel(5, "BIS");
1774  h->GetYaxis()->SetBinLabel(9, "EEL");
1775  h->GetYaxis()->SetBinLabel(13, "EES");
1776  h->GetYaxis()->SetBinLabel(17, "EIL");
1777  h->GetYaxis()->SetBinLabel(26, "EIS");
1778  h->GetYaxis()->SetBinLabel(30, "EML");
1779  h->GetYaxis()->SetBinLabel(40, "EMS");
1780  h->GetYaxis()->SetBinLabel(50, "EOL");
1781  h->GetYaxis()->SetBinLabel(62, "EOS");
1782  // Add lines
1783  h->GetYaxis()->SetTickLength(0);
1784  for (int i = 1; i < 73; i++) {
1785  TLine* l = new TLine(1, i, 20, i);
1786  h->GetListOfFunctions()->Add(l);
1787  }
1788  TLine* l2 = new TLine(1, 4, 50, 4);
1789  h->GetListOfFunctions()->Add(l2);
1790  TLine* l3 = new TLine(1, 8, 50, 8);
1791  h->GetListOfFunctions()->Add(l3);
1792  TLine* l4 = new TLine(1, 12, 50, 12);
1793  h->GetListOfFunctions()->Add(l4);
1794  TLine* l5 = new TLine(1, 16, 50, 16);
1795  h->GetListOfFunctions()->Add(l5);
1796  TLine* l6 = new TLine(1, 25, 50, 25);
1797  h->GetListOfFunctions()->Add(l6);
1798  TLine* l7 = new TLine(1, 29, 50, 29);
1799  h->GetListOfFunctions()->Add(l7);
1800  TLine* l8 = new TLine(1, 39, 50, 39);
1801  h->GetListOfFunctions()->Add(l8);
1802  TLine* l9 = new TLine(1, 49, 50, 49);
1803  h->GetListOfFunctions()->Add(l9);
1804  TLine* l10 = new TLine(1, 61, 50, 61);
1805  h->GetListOfFunctions()->Add(l10);
1806  } else if (crate == 1) { // EA02, EC02
1807  h->SetBins(834, 1, 2502, 71, 0, 71);
1808  // Add labels
1809  h->GetYaxis()->SetBinLabel(1, "BEE");
1810  h->GetYaxis()->SetBinLabel(5, "BIS");
1811  h->GetYaxis()->SetBinLabel(9, "EEL");
1812  h->GetYaxis()->SetBinLabel(12, "EES");
1813  h->GetYaxis()->SetBinLabel(16, "EIL");
1814  h->GetYaxis()->SetBinLabel(24, "EIS");
1815  h->GetYaxis()->SetBinLabel(28, "EML");
1816  h->GetYaxis()->SetBinLabel(38, "EMS");
1817  h->GetYaxis()->SetBinLabel(48, "EOL");
1818  h->GetYaxis()->SetBinLabel(60, "EOS");
1819  // Add lines
1820  h->GetYaxis()->SetTickLength(0);
1821  for (int i = 1; i < 71; i++) {
1822  TLine* l = new TLine(1, i, 20, i);
1823  h->GetListOfFunctions()->Add(l);
1824  }
1825  TLine* l2 = new TLine(1, 4, 50, 4);
1826  h->GetListOfFunctions()->Add(l2);
1827  TLine* l3 = new TLine(1, 8, 50, 8);
1828  h->GetListOfFunctions()->Add(l3);
1829  TLine* l4 = new TLine(1, 11, 50, 11);
1830  h->GetListOfFunctions()->Add(l4);
1831  TLine* l5 = new TLine(1, 15, 50, 15);
1832  h->GetListOfFunctions()->Add(l5);
1833  TLine* l6 = new TLine(1, 23, 50, 23);
1834  h->GetListOfFunctions()->Add(l6);
1835  TLine* l7 = new TLine(1, 27, 50, 27);
1836  h->GetListOfFunctions()->Add(l7);
1837  TLine* l8 = new TLine(1, 37, 50, 37);
1838  h->GetListOfFunctions()->Add(l8);
1839  TLine* l9 = new TLine(1, 47, 50, 47);
1840  h->GetListOfFunctions()->Add(l9);
1841  TLine* l10 = new TLine(1, 59, 50, 59);
1842  h->GetListOfFunctions()->Add(l10);
1843  } else if (crate == 3) { // EA04, EC04
1844  h->SetBins(834, 1, 2502, 72, 0, 72);
1845  // Add labels
1846  h->GetYaxis()->SetBinLabel(1, "BEE");
1847  h->GetYaxis()->SetBinLabel(5, "BIS");
1848  h->GetYaxis()->SetBinLabel(9, "EEL");
1849  h->GetYaxis()->SetBinLabel(13, "EES");
1850  h->GetYaxis()->SetBinLabel(17, "EIL");
1851  h->GetYaxis()->SetBinLabel(25, "EIS");
1852  h->GetYaxis()->SetBinLabel(29, "EML");
1853  h->GetYaxis()->SetBinLabel(39, "EMS");
1854  h->GetYaxis()->SetBinLabel(49, "EOL");
1855  h->GetYaxis()->SetBinLabel(61, "EOS");
1856  // Add lines
1857  h->GetYaxis()->SetTickLength(0);
1858  for (int i = 1; i < 72; i++) {
1859  TLine* l = new TLine(1, i, 20, i);
1860  h->GetListOfFunctions()->Add(l);
1861  }
1862  TLine* l2 = new TLine(1, 4, 50, 4);
1863  h->GetListOfFunctions()->Add(l2);
1864  TLine* l3 = new TLine(1, 8, 50, 8);
1865  h->GetListOfFunctions()->Add(l3);
1866  TLine* l4 = new TLine(1, 12, 50, 12);
1867  h->GetListOfFunctions()->Add(l4);
1868  TLine* l5 = new TLine(1, 16, 50, 16);
1869  h->GetListOfFunctions()->Add(l5);
1870  TLine* l6 = new TLine(1, 24, 50, 24);
1871  h->GetListOfFunctions()->Add(l6);
1872  TLine* l7 = new TLine(1, 28, 50, 28);
1873  h->GetListOfFunctions()->Add(l7);
1874  TLine* l8 = new TLine(1, 38, 50, 38);
1875  h->GetListOfFunctions()->Add(l8);
1876  TLine* l9 = new TLine(1, 48, 50, 48);
1877  h->GetListOfFunctions()->Add(l9);
1878  TLine* l10 = new TLine(1, 60, 50, 60);
1879  h->GetListOfFunctions()->Add(l10);
1880  }
1881  }
1882 
1883  return StatusCode::SUCCESS;
1884 }
1885 
1886 int MdtRawDataValAlg::get_bin_for_LB_crate_hist(int region, int crate, int phi, int eta, std::string_view chamber) {
1887  int binNum = 999;
1888 
1889  if (region == 0 || region == 1) { // Barrel
1890  if (crate == 1) { // BA01, BC01
1891  if (chamber.substr(0, 3) == "BIL")
1892  binNum = 2 * eta + (phi - 1) / 2 - 1;
1893  else if (chamber.substr(0, 3) == "BIS")
1894  binNum = 12 + 2 * eta + (phi - 2) / 2 - 1;
1895  else if (chamber.substr(0, 3) == "BME")
1896  binNum = 25;
1897  else if (chamber.substr(0, 3) == "BML")
1898  binNum = 25 + 2 * eta + (phi - 1) / 2 - 1;
1899  else if (chamber.substr(0, 3) == "BMS")
1900  binNum = 37 + 2 * eta + (phi - 2) / 2 - 1;
1901  else if (chamber.substr(0, 3) == "BOL")
1902  binNum = 49 + 2 * eta + (phi - 1) / 2 - 1;
1903  else if (chamber.substr(0, 3) == "BOS")
1904  binNum = 61 + 2 * eta + (phi - 2) / 2 - 1;
1905  else
1906  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Bx01");
1907  return binNum - 1;
1908  } else if (crate == 2) { // BA02, BC02
1909 
1910  if (chamber.substr(0, 3) == "BIL")
1911  binNum = 2 * eta + (phi - 5) / 2 - 1;
1912  else if (chamber.substr(0, 3) == "BIS")
1913  binNum = 12 + 2 * eta + (phi - 6) / 2 - 1;
1914  else if (chamber.substr(0, 3) == "BML")
1915  binNum = 24 + 2 * eta + (phi - 5) / 2 - 1;
1916  else if (chamber.substr(0, 3) == "BMS")
1917  binNum = 36 + 2 * eta + (phi - 6) / 2 - 1;
1918  else if (chamber.substr(0, 3) == "BOL")
1919  binNum = 48 + 2 * eta + (phi - 5) / 2 - 1;
1920  else if (chamber.substr(0, 3) == "BOS")
1921  binNum = 60 + 2 * eta + (phi - 6) / 2 - 1;
1922  else
1923  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Bx02");
1924  return binNum - 1;
1925  } else if (crate == 3) { // BA03,BC03
1926  if (chamber.substr(0, 3) == "BIL")
1927  binNum = eta;
1928  else if (chamber.substr(0, 3) == "BIM")
1929  binNum = 6 + eta;
1930  else if (chamber.substr(0, 3) == "BIR")
1931  binNum = 11 + eta;
1932  else if (chamber.substr(0, 3) == "BIS")
1933  binNum = 17 + 2 * eta + (phi - 10) / 2 - 1;
1934  else if (chamber.substr(0, 3) == "BMF")
1935  binNum = 29 + (eta + 1) / 2;
1936  else if (chamber.substr(0, 3) == "BMG")
1937  binNum = 32 + eta / 2;
1938  else if (chamber.substr(0, 3) == "BML")
1939  binNum = 35 + 2 * eta + (phi - 9) / 2 - 1;
1940  else if (chamber.substr(0, 3) == "BMS")
1941  binNum = 47 + eta;
1942  else if (chamber.substr(0, 3) == "BOF")
1943  binNum = 53 + (eta + 1) / 2;
1944  else if (chamber.substr(0, 4) == "BOG0" && region == 0)
1945  binNum = 58;
1946  else if (chamber.substr(0, 3) == "BOG")
1947  binNum = 58 + eta / 2 - region;
1948  else if (chamber.substr(0, 3) == "BOL")
1949  binNum = 62 + 2 * eta + (phi - 9) / 2 - 1 - region;
1950  else if (chamber.substr(0, 3) == "BOS")
1951  binNum = 74 + eta - region;
1952  else
1953  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Bx03");
1954  return binNum - 1;
1955  } else if (crate == 4) { // BA04, BC04
1956 
1957  if (chamber.substr(0, 3) == "BIL")
1958  binNum = eta;
1959  else if (chamber.substr(0, 3) == "BIM")
1960  binNum = 6 + eta;
1961  else if (chamber.substr(0, 3) == "BIR")
1962  binNum = 11 + eta;
1963  else if (chamber.substr(0, 3) == "BIS")
1964  binNum = 17 + 2 * eta + (phi - 14) / 2 - 1;
1965  else if (chamber.substr(0, 3) == "BMF")
1966  binNum = 29 + (eta + 1) / 2;
1967  else if (chamber.substr(0, 3) == "BMG")
1968  binNum = 32 + eta / 2;
1969  else if (chamber.substr(0, 3) == "BML" && eta < 6)
1970  binNum = 35 + 2 * eta + (phi - 13) / 2 - 1;
1971  else if (chamber.substr(0, 7) == "BML6A15" || chamber.substr(0, 7) == "BML6C15")
1972  binNum = 46;
1973  else if (chamber.substr(0, 3) == "BMS")
1974  binNum = 46 + eta;
1975  else if (chamber.substr(0, 3) == "BOF")
1976  binNum = 52 + (eta + 1) / 2;
1977  else if (chamber.substr(0, 4) == "BOG0" && region == 0)
1978  binNum = 57;
1979  else if (chamber.substr(0, 3) == "BOG")
1980  binNum = 57 + eta / 2 - region;
1981  else if (chamber.substr(0, 3) == "BOL")
1982  binNum = 61 + 2 * eta + (phi - 13) / 2 - 1 - region;
1983  else if (chamber.substr(0, 3) == "BOS")
1984  binNum = 74 + eta - region;
1985  else
1986  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Bx04");
1987  return binNum - 1;
1988  }
1989  } else if (region == 2 || region == 3) {
1990  if (crate == 1) { // EA01, EC01
1991  if (chamber.substr(0, 3) == "BEE")
1992  binNum = 2 * eta + (phi - 2) / 2 - 1;
1993  else if (chamber.substr(0, 3) == "BIS")
1994  binNum = 4 + 2 * (eta - 6) + (phi - 2) / 2 - 1;
1995  else if (chamber.substr(0, 3) == "EEL")
1996  binNum = 8 + 2 * eta + (phi - 1) / 2 - 1;
1997  else if (chamber.substr(0, 3) == "EES")
1998  binNum = 12 + 2 * eta + (phi - 2) / 2 - 1;
1999  else if (chamber.substr(0, 3) == "EIL" && eta < 5)
2000  binNum = 16 + 2 * eta + (phi - 1) / 2 - 1;
2001  else if (chamber.substr(0, 3) == "EIL" && eta == 5)
2002  binNum = 25;
2003  else if (chamber.substr(0, 3) == "EIS")
2004  binNum = 25 + 2 * eta + (phi - 2) / 2 - 1;
2005  else if (chamber.substr(0, 3) == "EML")
2006  binNum = 29 + 2 * eta + (phi - 1) / 2 - 1;
2007  else if (chamber.substr(0, 3) == "EMS")
2008  binNum = 39 + 2 * eta + (phi - 2) / 2 - 1;
2009  else if (chamber.substr(0, 3) == "EOL")
2010  binNum = 49 + 2 * eta + (phi - 1) / 2 - 1;
2011  else if (chamber.substr(0, 3) == "EOS")
2012  binNum = 61 + 2 * eta + (phi - 2) / 2 - 1;
2013  else
2014  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Ex01");
2015  return binNum - 1;
2016  } else if (crate == 2) { // EA02, EC02
2017  if (chamber.substr(0, 3) == "BEE")
2018  binNum = 2 * eta + (phi - 6) / 2 - 1;
2019  else if (chamber.substr(0, 3) == "BIS")
2020  binNum = 4 + 2 * (eta - 6) + (phi - 6) / 2 - 1;
2021  else if (chamber.substr(0, 4) == "EEL1")
2022  binNum = 9 + (phi - 3) / 2 - 1;
2023  else if (chamber.substr(0, 4) == "EEL2")
2024  binNum = 11;
2025  else if (chamber.substr(0, 3) == "EES")
2026  binNum = 11 + 2 * eta + (phi - 6) / 2 - 1;
2027  else if (chamber.substr(0, 3) == "EIL")
2028  binNum = 15 + 2 * eta + (phi - 5) / 2 - 1;
2029  else if (chamber.substr(0, 3) == "EIS")
2030  binNum = 23 + 2 * eta + (phi - 6) / 2 - 1;
2031  else if (chamber.substr(0, 3) == "EML")
2032  binNum = 27 + 2 * eta + (phi - 5) / 2 - 1;
2033  else if (chamber.substr(0, 3) == "EMS")
2034  binNum = 37 + 2 * eta + (phi - 6) / 2 - 1;
2035  else if (chamber.substr(0, 3) == "EOL")
2036  binNum = 47 + 2 * eta + (phi - 5) / 2 - 1;
2037  else if (chamber.substr(0, 3) == "EOS")
2038  binNum = 59 + 2 * eta + (phi - 6) / 2 - 1;
2039  else
2040  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Ex02");
2041  return binNum - 1;
2042  } else if (crate == 3) { // EA03, EC03
2043 
2044  if (chamber.substr(0, 3) == "BEE")
2045  binNum = 2 * eta + (phi - 10) / 2 - 1;
2046  else if (chamber.substr(0, 3) == "BIS")
2047  binNum = 4 + 2 * (eta - 6) + (phi - 10) / 2 - 1;
2048  else if (chamber.substr(0, 3) == "EEL")
2049  binNum = 8 + 2 * eta + (phi - 9) / 2 - 1;
2050  else if (chamber.substr(0, 3) == "EES")
2051  binNum = 12 + 2 * eta + (phi - 10) / 2 - 1;
2052  else if (chamber.substr(0, 3) == "EIL" && eta < 5)
2053  binNum = 16 + 2 * eta + (phi - 9) / 2 - 1;
2054  else if (chamber.substr(0, 4) == "EIL5")
2055  binNum = 25;
2056  else if (chamber.substr(0, 3) == "EIS")
2057  binNum = 25 + 2 * eta + (phi - 10) / 2 - 1;
2058  else if (chamber.substr(0, 3) == "EML")
2059  binNum = 29 + 2 * eta + (phi - 9) / 2 - 1;
2060  else if (chamber.substr(0, 3) == "EMS")
2061  binNum = 39 + 2 * eta + (phi - 10) / 2 - 1;
2062  else if (chamber.substr(0, 3) == "EOL")
2063  binNum = 49 + 2 * eta + (phi - 9) / 2 - 1;
2064  else if (chamber.substr(0, 3) == "EOS")
2065  binNum = 61 + 2 * eta + (phi - 10) / 2 - 1;
2066  else
2067  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Ex03");
2068  return binNum - 1;
2069  } else if (crate == 4) { // EA04, EC04
2070  if (chamber.substr(0, 3) == "BEE")
2071  binNum = 2 * eta + (phi - 14) / 2 - 1;
2072  else if (chamber.substr(0, 3) == "BIS")
2073  binNum = 4 + 2 * (eta - 6) + (phi - 14) / 2 - 1;
2074  else if (chamber.substr(0, 3) == "EEL")
2075  binNum = 8 + 2 * eta + (phi - 13) / 2 - 1;
2076  else if (chamber.substr(0, 3) == "EES")
2077  binNum = 12 + 2 * eta + (phi - 14) / 2 - 1;
2078  else if (chamber.substr(0, 3) == "EIL")
2079  binNum = 16 + 2 * eta + (phi - 13) / 2 - 1;
2080  else if (chamber.substr(0, 3) == "EIS")
2081  binNum = 24 + 2 * eta + (phi - 14) / 2 - 1;
2082  else if (chamber.substr(0, 3) == "EML")
2083  binNum = 28 + 2 * eta + (phi - 13) / 2 - 1;
2084  else if (chamber.substr(0, 3) == "EMS")
2085  binNum = 38 + 2 * eta + (phi - 14) / 2 - 1;
2086  else if (chamber.substr(0, 3) == "EOL")
2087  binNum = 48 + 2 * eta + (phi - 13) / 2 - 1;
2088  else if (chamber.substr(0, 3) == "EOS")
2089  binNum = 60 + 2 * eta + (phi - 14) / 2 - 1;
2090  else
2091  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Ex04");
2092  return binNum - 1;
2093  }
2094  }
2095  return -1;
2096 }
2099  return roe ? roe->getNtubesperlayer() : -1;
2100 }
2103  return roe ? roe->getNLayers() : -1;
2104 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
MdtRawDataValAlg::ChamberTubeNumberCorrection
static void ChamberTubeNumberCorrection(int &tubeNum, std::string_view hardware_name, int tubePos, int numLayers)
Definition: MDTRawDataUtils.cxx:929
MdtRawDataValAlg::m_chambersIdHash
std::vector< IdentifierHash > m_chambersIdHash
Definition: MdtRawDataValAlg.h:186
MdtRawDataValAlg::binMdtOccVsLB_Crate
virtual StatusCode binMdtOccVsLB_Crate(TH2 *&h, int region, int crate)
Definition: MDTRawDataUtils.cxx:1588
MdtRawDataValAlg::bookMDTHisto_chambers_2D
virtual StatusCode bookMDTHisto_chambers_2D(TH2F_LW *&h, TString, TString, TString, int, float, float, int, float, float, MonGroup &)
Definition: MDTRawDataUtils.cxx:996
TH2::Fill
int Fill(double, double)
Definition: rootspy.cxx:382
MdtRawDataValAlg::m_eventNum
int m_eventNum
Definition: MdtRawDataValAlg.h:170
convertChamberName
std::string convertChamberName(int, int, int, const std::string &)
Definition: MuonDQA/MuonDQAUtils/src/MuonChamberNameConverter.cxx:10
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
MdtReadoutElement.h
MdtRawDataValAlg::m_hist_hash_list
std::vector< std::unique_ptr< MDTChamber > > m_hist_hash_list
Definition: MdtRawDataValAlg.h:283
MuonGM::MdtReadoutElement::getNLayers
int getNLayers() const
Returns the number of tube layers inside the multilayer.
checkFileSG.line
line
Definition: checkFileSG.py:75
MdtRawDataValAlg::setIsATLASReady
void setIsATLASReady()
Definition: MDTRawDataUtils.cxx:1157
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MdtRawDataValAlg::m_chambersId
std::vector< Identifier > m_chambersId
Definition: MdtRawDataValAlg.h:185
TH1F_LW::create
static TH1F_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xlow, const double &xup)
Definition: TH1F_LW.cxx:33
MdtRawDataValAlg::CorrectLayerMax
static void CorrectLayerMax(const std::string &hardware_name, int &numLayers)
Definition: MDTRawDataUtils.cxx:953
calibdata.chamber
chamber
Definition: calibdata.py:32
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
MdtRawDataValAlg::m_masked_tubes
std::unique_ptr< MDTNoisyTubes > m_masked_tubes
Definition: MdtRawDataValAlg.h:116
MdtRawDataValAlg::get_bin_for_LB_hist
static int get_bin_for_LB_hist(int region, int layer, int phi, int eta, bool isBIM)
Definition: MDTRawDataUtils.cxx:1229
MdtRawDataValAlg::mdtchamberId
void mdtchamberId()
Definition: MDTRawDataUtils.cxx:1054
MdtRawDataValAlg::m_atlas_ready
bool m_atlas_ready
Definition: MdtRawDataValAlg.h:111
L1_ENDCAP
@ L1_ENDCAP
Definition: MdtRawDataValAlg.h:62
MdtRawDataValAlg::getChamber
StatusCode getChamber(IdentifierHash id, MDTChamber *&chamber)
Definition: MDTRawDataUtils.cxx:1220
MdtRawDataValAlg::CorrectTubeMax
static void CorrectTubeMax(const std::string &hardware_name, int &numTubes)
Definition: MDTRawDataUtils.cxx:948
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:804
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MdtRawDataValAlg::cachedTubeLayerMax
int cachedTubeLayerMax(const Identifier &id) const
Definition: MDTRawDataUtils.cxx:2101
MdtRawDataValAlg::m_MdtDQFilterTools
ToolHandleArray< IDQFilterTool > m_MdtDQFilterTools
Definition: MdtRawDataValAlg.h:168
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
MdtRawDataValAlg::AinB
static bool AinB(int A, std::vector< int > &B)
Definition: MDTRawDataUtils.cxx:1132
MdtRawDataValAlg::getChamberName
std::string getChamberName(const Muon::MdtPrepData *)
Definition: MDTRawDataUtils.cxx:1209
MdtRawDataValAlg::GetTubeMax
int GetTubeMax(const Identifier &digcoll_id, std::string_view hardware_name)
Definition: MDTRawDataUtils.cxx:1096
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
MuonChamberNameConverter.h
MdtRawDataValAlg::bookMDTHisto_OccVsLB
virtual StatusCode bookMDTHisto_OccVsLB(TH2 *&h, TString, TString, TString, int, float, float, int, float, float, MonGroup &)
Definition: MDTRawDataUtils.cxx:1012
MdtRawDataValAlg::m_trig_BARREL
bool m_trig_BARREL
Definition: MdtRawDataValAlg.h:212
MdtRawDataValAlg::bookMDTHisto_overview
virtual StatusCode bookMDTHisto_overview(TH1 *&, TString, TString, TString, int, float, float, MonGroup &)
Definition: MDTRawDataUtils.cxx:957
dqt_zlumi_alleff_HIST.A
A
Definition: dqt_zlumi_alleff_HIST.py:110
tubeMax
double tubeMax
Definition: MDT_ResponseTest.cxx:31
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:138
skel.l2
l2
Definition: skel.GENtoEVGEN.py:426
MdtRawDataValAlg::m_detMgr
const MuonGM::MuonDetectorManager * m_detMgr
Definition: MdtRawDataValAlg.h:330
MdtRawDataValAlg::cachedTubeMax
int cachedTubeMax(const Identifier &id) const
Definition: MDTRawDataUtils.cxx:2097
TH1F_LW
Definition: TH1F_LW.h:23
MDTChamber
Definition: MDTChamber.h:22
MuonGM::MuonDetectorManager::getMdtReadoutElement
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:204
MdtRawDataValAlg::GetEventNum
StatusCode GetEventNum()
Definition: MDTRawDataUtils.cxx:1175
L1_BARREL
@ L1_BARREL
Definition: MdtRawDataValAlg.h:62
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:50
lumiFormat.i
int i
Definition: lumiFormat.py:92
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
MdtRawDataValAlg::get_bin_for_LB_crate_hist
int get_bin_for_LB_crate_hist(int region, int layer, int phi, int eta, std::string_view chamber)
Definition: MDTRawDataUtils.cxx:1886
MdtIdHelper
Definition: MdtIdHelper.h:61
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
MdtRawDataValAlg::binMdtGlobal_byLayer
virtual StatusCode binMdtGlobal_byLayer(TH2 *, TH2 *, TH2 *)
Definition: MDTRawDataUtils.cxx:756
MdtRawDataValAlg::bookMDTHisto_chambers
virtual StatusCode bookMDTHisto_chambers(TH1F_LW *&, TString, TString, TString, int, float, float, MonGroup &)
Definition: MDTRawDataUtils.cxx:970
TH2
Definition: rootspy.cxx:373
MdtRawDataValAlg::m_lumiblock
int m_lumiblock
Definition: MdtRawDataValAlg.h:169
MdtRawDataValAlg::fillMDTMaskedTubes
virtual StatusCode fillMDTMaskedTubes(IdentifierHash, const std::string &, TH1F_LW *&h)
Definition: MDTRawDataUtils.cxx:1027
ManagedMonitorToolBase::MonGroup::regHist
StatusCode regHist(TH1 *h)
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
Definition: ManagedMonitorToolBase.cxx:195
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:814
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
MdtRawDataValAlg::binMdtOccVsLB
virtual StatusCode binMdtOccVsLB(TH2 *&h, int region, int layer)
Definition: MDTRawDataUtils.cxx:1324
MdtRawDataValAlg::binMdtRegional
virtual StatusCode binMdtRegional(TH2 *, std::string_view xAxis)
Definition: MDTRawDataUtils.cxx:379
python.grid.Add
def Add(name)
Definition: grid.py:41
MdtRawDataValAlg::mezzmdt
int mezzmdt(Identifier)
Definition: MDTRawDataUtils.cxx:1081
MdtRawDataValAlg.h
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
TH2F_LW::create
static TH2F_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xmin, const double &xmax, unsigned nbinsy, const double &ymin, const double &ymax)
Definition: TH2F_LW.cxx:33
MdtRawDataValAlg::putBox
static void putBox(TH2 *h, float x1, float y1, float x2, float y2)
Definition: MDTRawDataUtils.cxx:1185
dqt_zlumi_alleff_HIST.B
B
Definition: dqt_zlumi_alleff_HIST.py:110
HI::TowerBins::numLayers
constexpr unsigned int numLayers()
Definition: HIEventDefs.h:23
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:809
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:37
MdtRawDataValAlg::bookMDTHisto_overview_2D
virtual StatusCode bookMDTHisto_overview_2D(TH2 *&h, TString, TString, TString, int, float, float, int, float, float, MonGroup &)
Definition: MDTRawDataUtils.cxx:981
MdtRawDataValAlg::StoreTriggerType
StatusCode StoreTriggerType()
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:53
MdtRawDataValAlg::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Definition: MdtRawDataValAlg.h:207
MdtRawDataValAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtRawDataValAlg.h:118
h
MdtRawDataValAlg::m_trig_ENDCAP
bool m_trig_ENDCAP
Definition: MdtRawDataValAlg.h:213
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MdtRawDataValAlg::fillLumiBlock
StatusCode fillLumiBlock()
Definition: MDTRawDataUtils.cxx:1166
MdtRawDataValAlg::m_tubesperchamber_map
std::map< std::string, float > m_tubesperchamber_map
Definition: MdtRawDataValAlg.h:191
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TH1
Definition: rootspy.cxx:268
MdtRawDataValAlg::TubeID_to_ID_L_ML
static void TubeID_to_ID_L_ML(int &tubeID, std::string_view hardware_name, int &tube, int &layer, int &ML, int max)
Definition: MDTRawDataUtils.cxx:880
MdtRawDataValAlg::m_trigtype
int m_trigtype
Definition: MdtRawDataValAlg.h:211
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
TH2F_LW
Definition: TH2F_LW.h:23
skel.l1
l1
Definition: skel.GENtoEVGEN.py:425
MdtRawDataValAlg::binMdtGlobal
virtual StatusCode binMdtGlobal(TH2 *, char ecap)
Definition: MDTRawDataUtils.cxx:29
MdtIdHelper::get_module_hash
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override
Definition: MdtIdHelper.cxx:318
MdtRawDataValAlg::m_time
uint32_t m_time
Definition: MdtRawDataValAlg.h:172
IdentifierHash
Definition: IdentifierHash.h:38
MuonGM::MdtReadoutElement::getNtubesperlayer
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:74
IdContext
class IdContext
Definition: IdContext.h:34
python.compressB64.c
def c
Definition: compressB64.py:93
MdtRawDataValAlg::GetTimingInfo
StatusCode GetTimingInfo()
Definition: MDTRawDataUtils.cxx:1139
MdtRawDataValAlg::putLine
static void putLine(TH2 *h, float x1, float y1, float x2, float y2, Color_t c=kBlack)
Definition: MDTRawDataUtils.cxx:1201