ATLAS Offline Software
MDTRawDataUtilsRun3.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 MdtRawDataMonAlg.cxx
7 // Part of MdtRawDataMonAlg.h
8 // Authors
9 // see MdtRawDataMonAlg.cxx
11 
12 #include <TBox.h>
13 #include <TColor.h>
14 #include <TError.h>
15 #include <TLine.h>
16 #include <TList.h>
17 #include <TRegexp.h>
18 #include <TString.h>
19 
20 #include <string>
21 
22 #include "MdtRawDataMonAlg.h"
25 
26 using std::string;
27 
29  // Set x-axis labels
30  int LowerEta = 0;
31  int UpperEta = 0;
32  if (ecap == 'B') {
33  LowerEta = -8;
34  UpperEta = 8;
35  } else {
36  LowerEta = -6;
37  UpperEta = 6;
38  }
39  TString eta_s;
40  for (int ieta = LowerEta; ieta != UpperEta + 1; ++ieta) {
41  if (ieta == 0 && ecap == 'E') continue;
42  eta_s = ecap;
43  (ieta < 0) ? eta_s += "C" : ((ieta > 0) ? eta_s += "A" : eta_s += "B");
44  eta_s += std::to_string(std::abs(ieta));
45  h->Fill(eta_s, 1, 0);
46  }
47 
48  // Set y-axis labels
49  TString phi_s;
50  for (int iphi = 1; iphi <= 16; iphi++) {
51  if (iphi < 10)
52  phi_s = "0" + std::to_string(iphi);
53  else
54  phi_s = std::to_string(iphi);
55  if (ecap == 'B' && (iphi == 11 || iphi == 15)) {
56  h->Fill(eta_s, "I," + phi_s + ",R", 0);
57  h->Fill(eta_s, "I," + phi_s + ",M", 0);
58  h->Fill(eta_s, "M," + phi_s, 0);
59  h->Fill(eta_s, "O," + phi_s, 0);
60  } else {
61  h->Fill(eta_s, "I," + phi_s, 0);
62  h->Fill(eta_s, "M," + phi_s, 0);
63  h->Fill(eta_s, "O," + phi_s, 0);
64  if (iphi % 2 == 0 && ecap == 'B')
65  h->Fill(eta_s, "E," + phi_s, 0);
66  else if (ecap == 'E')
67  h->Fill(eta_s, "E," + phi_s, 0);
68  }
69  }
70 
71  h->LabelsDeflate("X");
72  h->LabelsDeflate("Y");
73  h->LabelsOption("a", "Y");
74  h->Reset();
75 
76  return StatusCode::SUCCESS;
77 }
78 
79 StatusCode MdtRawDataMonAlg::binMdtRegional(TH2* h, std::string_view xAxis) {
81  int LowerEta = -0;
82  int UpperEta = 0;
83  if (xAxis.substr(0, 2) == "BO" || xAxis.substr(0, 2) == "BI") { // Barrel Hit Mutltiplicities
84  LowerEta = -8;
85  UpperEta = 8;
86  } else if (xAxis.substr(0, 2) == "BM" || xAxis.substr(0, 2) == "EO") {
87  LowerEta = -6;
88  UpperEta = 6;
89  } else if (xAxis.substr(0, 2) == "EM" || xAxis.substr(0, 2) == "EI") {
90  LowerEta = -5;
91  UpperEta = 5;
92  } else {
93  LowerEta = -2;
94  UpperEta = 2;
95  }
96 
97  // Set x-axis labels
98  TString eta_s;
99  for (int ieta = LowerEta; ieta != UpperEta + 1; ++ieta) {
100  if (xAxis.substr(2, 1) == "A" && ieta < 0) continue; // A side goes from 1-...
101  if (xAxis.substr(2, 1) == "C" && ieta == 0) break; // C side goes from ...-1
102  if (ieta == 0 && xAxis.substr(0, 2) == "BO")
103  eta_s = "BOB";
104  else if (ieta == 0)
105  continue;
106  else
107  eta_s = xAxis.substr(0, 3);
108  eta_s += std::to_string(std::abs(ieta));
109  h->Fill(eta_s, 1, 0);
110  }
111 
112  bool barrelExtra = (xAxis == "BEA" || xAxis == "BEC");
113  // Set y-axis labels
114  TString phi_s;
115  for (int iphi = 1; iphi <= 16; iphi++) {
116  if (iphi < 10)
117  phi_s = "0" + std::to_string(iphi);
118  else
119  phi_s = std::to_string(iphi);
120  if (!barrelExtra) {
121  // Also uncomment lines in MdtRawDataValAlg.cxx in fillMDTSummaryHistograms() that actually fill these values
122  if (xAxis.substr(0, 2) == "BI" && (iphi == 11 || iphi == 15)) {
123  h->Fill(eta_s, phi_s + ",1,R", 0);
124  h->Fill(eta_s, phi_s + ",2,R", 0);
125  h->Fill(eta_s, phi_s + ",1,M", 0);
126  h->Fill(eta_s, phi_s + ",2,M", 0);
127  } else {
128  h->Fill(eta_s, phi_s + ",1", 0);
129  h->Fill(eta_s, phi_s + ",2", 0);
130  }
131  } else if (iphi % 2 == 0)
132  h->Fill(eta_s, phi_s + ",1", 0);
133  } // loop over phi
134 
135  h->LabelsDeflate("X");
136  h->LabelsDeflate("Y");
137  h->Reset();
138 
139  return StatusCode::SUCCESS;
140 }
141 
142 StatusCode MdtRawDataMonAlg::binMdtGlobal_byLayer(TH2* nHits_In, TH2* nHits_Mid, TH2* nHits_Out) {
143  for (int iPhi = 1; iPhi != 17; ++iPhi) {
144  TString phiString = "";
145  if (iPhi < 10)
146  phiString = "0" + std::to_string(iPhi);
147  else
148  phiString = std::to_string(iPhi);
149  TString phiString_ml1 = phiString + ",1";
150  TString phiString_ml2 = phiString + ",2";
151  if (iPhi == 11 || iPhi == 15) {
152  TString phiString_ml1_BIR = phiString + ",1,R";
153  TString phiString_ml2_BIR = phiString + ",2,R";
154  nHits_In->Fill("EIC5", phiString_ml1_BIR, 0.);
155  nHits_In->Fill("EIC5", phiString_ml2_BIR, 0.);
156  TString phiString_ml1_BIM = phiString + ",1,M";
157  TString phiString_ml2_BIM = phiString + ",2,M";
158  nHits_In->Fill("EIC5", phiString_ml1_BIM, 0.);
159  nHits_In->Fill("EIC5", phiString_ml2_BIM, 0.);
160  } else {
161  nHits_In->Fill("EIC5", phiString_ml1, 0.);
162  nHits_In->Fill("EIC5", phiString_ml2, 0.);
163  }
164  nHits_Mid->Fill("EMC5", phiString_ml1, 0.);
165  nHits_Mid->Fill("EMC5", phiString_ml2, 0.);
166  nHits_Out->Fill("EOC6", phiString_ml1, 0.);
167  nHits_Out->Fill("EOC6", phiString_ml2, 0.);
168  }
169  for (int iEta = 6; iEta != -2; --iEta) {
170  TString etaIn = "EIC" + std::to_string(iEta);
171  TString etaMid = "EMC" + std::to_string(iEta);
172  TString etaOut = "EOC" + std::to_string(iEta);
173  if (iEta > 0) {
174  if (iEta < 6) {
175  nHits_In->Fill(etaIn, "01,1", 0);
176  nHits_Mid->Fill(etaMid, "01,1", 0);
177  }
178  nHits_Out->Fill(etaOut, "01,1", 0);
179  } else {
180  nHits_In->Fill("", "01,1", 0);
181  nHits_Mid->Fill("", "01,1", 0);
182  nHits_Out->Fill("", "01,1", 0);
183  }
184  }
185  // Add BIR11/15 separately at a higher eta station
186 
187  // BEE, EE chambers on inner plots
188  for (int iEta = -4; iEta != 1; ++iEta) {
189  TString etaIn = "";
190  if (iEta < -2) {
191  etaIn = "EEC" + std::to_string(std::abs(iEta + 2));
192  nHits_In->Fill(etaIn, "01,1", 0);
193  } else if (iEta < 0) {
194  etaIn = "BEC" + std::to_string(std::abs(iEta));
195  nHits_In->Fill(etaIn, "01,1", 0);
196  } else
197  nHits_In->Fill(" ", "01,1", 0);
198  }
199 
200  for (int iEta = -8; iEta != 11; ++iEta) {
201  TString etaIn = "";
202  TString etaMid = "";
203  TString etaOut = "";
204  if (iEta < 0) {
205  etaIn = "BIC" + std::to_string(std::abs(iEta));
206  etaOut = "BOC" + std::to_string(std::abs(iEta));
207  if (iEta > -7) { etaMid = "BMC" + std::to_string(std::abs(iEta)); }
208  } else if (iEta == 0) {
209  etaOut = "BOB" + std::to_string(iEta);
210  } else if (iEta < 9) {
211  etaIn = "BIA" + std::to_string(iEta);
212  etaOut = "BOA" + std::to_string(iEta);
213  if (iEta < 7) { etaMid = "BMA" + std::to_string(iEta); }
214  }
215  if (iEta < 9) {
216  nHits_In->Fill(etaIn, "01,1", 0);
217  nHits_Mid->Fill(etaMid, "01,1", 0);
218  nHits_Out->Fill(etaOut, "01,1", 0);
219  } else {
220  nHits_In->Fill(" ", "01,1", 0);
221  nHits_Mid->Fill(" ", "01,1", 0);
222  nHits_Out->Fill(" ", "01,1", 0);
223  }
224  }
225 
226  // BEE, EE chambers on inner plots
227  for (int iEta = 1; iEta != 6; ++iEta) {
228  TString etaIn = "";
229  if (iEta < 3) {
230  etaIn = "BEA" + std::to_string(std::abs(iEta));
231  nHits_In->Fill(etaIn, "01,1", 0);
232  } else if (iEta < 5) {
233  etaIn = "EEA" + std::to_string(std::abs(iEta - 2));
234  nHits_In->Fill(etaIn, "01,1", 0);
235  } else
236  nHits_In->Fill(" ", "01,1", 0);
237  }
238 
239  for (int iEta = 1; iEta != 7; ++iEta) {
240  TString etaIn = "EIA" + std::to_string(iEta);
241  TString etaMid = "EMA" + std::to_string(iEta);
242  TString etaOut = "EOA" + std::to_string(iEta);
243  if (iEta < 6) {
244  nHits_In->Fill(etaIn, "01,1", 0);
245  nHits_Mid->Fill(etaMid, "01,1", 0);
246  }
247  nHits_Out->Fill(etaOut, "01,1", 0);
248  }
249 
250  nHits_In->LabelsDeflate("X");
251  nHits_In->LabelsDeflate("Y");
252  nHits_In->LabelsOption("v", "x");
253  nHits_In->Reset();
254  nHits_Mid->LabelsDeflate("X");
255  nHits_Mid->LabelsDeflate("Y");
256  nHits_Mid->LabelsOption("v", "x");
257  nHits_Mid->Reset();
258  nHits_Out->LabelsDeflate("X");
259  nHits_Out->LabelsDeflate("Y");
260  nHits_Out->LabelsOption("v", "x");
261  nHits_Out->Reset();
262 
263  return StatusCode::SUCCESS;
264 }
265 
266 // Correct for CutOuts
267 void MdtRawDataMonAlg::ChamberTubeNumberCorrection(int& tubeNum, std::string_view hardware_name, int tubePos, int numLayers) {
268  // numLayers should be mdt_layer-1 so numLayers = 0 implies layer 1 ML 1 or mdt_layer==1
269  if (hardware_name.substr(0, 4) == "BMS4" || hardware_name.substr(0, 4) == "BMS6") { // layer 1-4 tubeId 41-48 cut out
270  if (numLayers <= 2) tubeNum = tubePos + numLayers * 48;
271  }
272  if (hardware_name.substr(0, 3) == "BIR" && numLayers <= 3) {
273  if (hardware_name.substr(5, 2) == "11" || hardware_name.substr(5, 2) == "15") {
274  if (hardware_name.substr(3, 1) == "1") tubeNum = tubePos + 6 + numLayers * 30; // layer 1-4 tube id 1-6 cut out
275  if (hardware_name.substr(3, 1) == "2") tubeNum = tubePos + numLayers * 30; // layer 1-4 tube id 28-30 cut out
276  if (hardware_name.substr(3, 1) == "4") tubeNum = tubePos + 3 + numLayers * 30; // layer 1-4 tube id 1-3 cut out
277  if (hardware_name.substr(3, 1) == "5") tubeNum = tubePos + numLayers * 24; // layer 1-4 tube id 22-24 cut out
278  }
279  }
280  if (hardware_name.substr(0, 3) == "BIR" && hardware_name.substr(3, 1) == "3") tubeNum = tubePos + numLayers * 36; // cut out on both ML
281  if (hardware_name == "EEL1A05" || hardware_name == "EEL1C05")
282  tubeNum = tubePos + numLayers * 48; // mdtIdHelper gives wrong #tubes/layer (incidentally also wrong #layers)
283 }
284 
285 // Correct for F@#!ing mdtIdHelper
286 void MdtRawDataMonAlg::CorrectTubeMax(const std::string& hardware_name, int& numTubes) {
287  if (hardware_name == "EEL1A05" || hardware_name == "EEL1C05") numTubes = 48;
288 }
289 
290 // Correct for F@#!ing mdtIdHelper
291 void MdtRawDataMonAlg::CorrectLayerMax(const std::string& hardware_name, int& numLayers) {
292  if (hardware_name == "EEL1A05" || hardware_name == "EEL1C05") numLayers = 3;
293 }
294 
295 /*DEV
296 StatusCode MdtRawDataValAlg::bookMDTHisto_overview( TH1*& h, TString h_title, TString xtit, TString ytit, int nbin, float xi, float xf,
297 MonGroup& mgrp) { h = new TH1F(h_title, h_title, nbin, xi, xf); h->SetFillColor(42); h->SetTitleSize(0.3, "y");
298  h->GetXaxis()->SetTitle(xtit);
299  h->GetYaxis()->SetTitle(ytit);
300  ATH_MSG_DEBUG("INSIDE bookMDTHisto: " << h << " " << h_title );
301  StatusCode sc = mgrp.regHist( h );
302  if(sc.isFailure()) ATH_MSG_WARNING("couldn't register " << h_title << " hist to MonGroup" );
303  return sc;
304 }
305 
306 StatusCode MdtRawDataValAlg::bookMDTHisto_chambers( TH1F_LW*& h, TString h_title, TString xtit, TString ytit, int nbin, float xi, float xf,
307 MonGroup& mgrp) { h = TH1F_LW::create(h_title, h_title, nbin, xi, xf); h->GetXaxis()->SetTitle(xtit); h->GetYaxis()->SetTitle(ytit);
308  ATH_MSG_VERBOSE("INSIDE bookMDTHisto: " << h << " " << h_title );
309  StatusCode sc = mgrp.regHist( h );
310  if(sc.isFailure()) ATH_MSG_WARNING("couldn't register " << h_title << " hist to MonGroup" );
311  return sc;
312 }
313 
314 StatusCode MdtRawDataValAlg::bookMDTHisto_overview_2D( TH2*& h, TString h_title, TString xtit, TString ytit, int nbin1, float xi1, float
315 xf1, int nbin2, float xi2, float xf2, MonGroup& mgrp) { h = new TH2F(h_title, h_title, nbin1, xi1, xf1, nbin2, xi2, xf2);
316  h->SetOption("COLZ");
317  h->SetMarkerColor(1);
318  h->SetMarkerStyle(21);
319  h->SetMarkerSize(0.2);
320  h->GetXaxis()->SetTitle(xtit);
321  h->GetYaxis()->SetTitle(ytit);
322  ATH_MSG_DEBUG("INSIDE bookMDTHisto: " << h << " " << h_title );
323  StatusCode sc = mgrp.regHist( h );
324  if(sc.isFailure()) ATH_MSG_WARNING("couldn't register " << h_title << " hist to MonGroup" );
325  return sc;
326 }
327 
328 StatusCode MdtRawDataValAlg::bookMDTHisto_chambers_2D( TH2F_LW*& h, TString h_title, TString xtit, TString ytit, int nbin1, float xi1, float
329 xf1, int nbin2, float xi2, float xf2, MonGroup& mgrp) { h = TH2F_LW::create(h_title, h_title, nbin1, xi1, xf1, nbin2, xi2, xf2);
330  h->SetOption("COLZ");
331  // h->SetFillColor(42);
332  h->SetMarkerColor(1);
333  h->SetMarkerStyle(21);
334  h->SetMarkerSize(0.2);
335  h->GetXaxis()->SetTitle(xtit);
336  h->GetYaxis()->SetTitle(ytit);
337  ATH_MSG_VERBOSE("INSIDE bookMDTHisto: " << h << " " << h_title );
338  StatusCode sc = mgrp.regHist( h );
339  if(sc.isFailure()) ATH_MSG_WARNING("couldn't register " << h_title << " hist to MonGroup" );
340  return sc;
341 }
342 
343 StatusCode MdtRawDataValAlg::bookMDTHisto_OccVsLB( TH2*& h, TString h_title, TString xtit, TString ytit, int nbin1, float xi1, float xf1,
344 int nbin2, float xi2, float xf2, MonGroup& mgrp){ h = new TH2F(h_title, h_title, nbin1, xi1, xf1, nbin2, xi2, xf2); h->SetOption("COLZ");
345  h->SetMarkerColor(1);
346  h->SetMarkerStyle(21);
347  h->SetMarkerSize(0.2);
348  h->GetXaxis()->SetTitle(xtit);
349  h->GetYaxis()->SetTitle(ytit);
350  ATH_MSG_DEBUG("INSIDE bookMDTHisto_OccVsLB: " << h << " " << h_title );
351  StatusCode sc = mgrp.regHist( h );
352  if(sc.isFailure()) ATH_MSG_WARNING("couldn't register " << h_title << " hist to MonGroup" );
353  return sc;
354 }
355 */
356 
357 StatusCode MdtRawDataMonAlg::fillMDTMaskedTubes(IdentifierHash idHash, const std::string& hardware_name, TH1F_LW*& h) {
358  // Loop Over all mdt identifiers
359  if (!m_masked_tubes) {
360  ATH_MSG_WARNING("Could Not Fill masked tubes noise map not set!");
361  return StatusCode::SUCCESS;
362  }
363 
364  std::set<Identifier> noisyTubes = m_masked_tubes->getNoiseList(idHash);
365  for (auto digcoll_id : noisyTubes) {
366  int mdtlayer = m_idHelperSvc->mdtIdHelper().tubeLayer(digcoll_id);
367  if (m_idHelperSvc->mdtIdHelper().multilayer(digcoll_id) == 2) {
368  if (hardware_name.at(1) == 'I' && hardware_name.at(3) != '8')
369  mdtlayer += 4;
370  else
371  mdtlayer += 3;
372  }
373  int tubeMax = m_idHelperSvc->mdtIdHelper().tubeMax(digcoll_id);
374  int mdttube = m_idHelperSvc->mdtIdHelper().tube(digcoll_id) + (mdtlayer - 1) * tubeMax;
375  ChamberTubeNumberCorrection(mdttube, hardware_name, m_idHelperSvc->mdtIdHelper().tube(digcoll_id), mdtlayer - 1);
376  h->Fill(mdttube, 1);
377  }
378  return StatusCode::SUCCESS;
379 }
380 
381 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
382 // Private function to select mdt chambersId of the spectrometer
383 
385  ATH_MSG_DEBUG("in MDT ChambersIDvector");
386 
387  std::vector<Identifier>::const_iterator idfirst = m_idHelperSvc->mdtIdHelper().module_begin();
388  std::vector<Identifier>::const_iterator idlast = m_idHelperSvc->mdtIdHelper().module_end();
389 
390  IdContext mdtModuleContext = m_idHelperSvc->mdtIdHelper().module_context();
391  Identifier Id;
392  IdentifierHash Idhash;
393  for (std::vector<Identifier>::const_iterator i = idfirst; i != idlast; ++i) {
394  Id = *i;
395  int gethash_code = m_idHelperSvc->mdtIdHelper().get_hash(Id, Idhash, &mdtModuleContext);
396  m_chambersId.push_back(Id);
397  m_chambersIdHash.push_back(Idhash);
398 
399  std::string extid = m_idHelperSvc->mdtIdHelper().show_to_string(Id);
400  ATH_MSG_DEBUG("Adding the chamber Identifier: " << extid);
401  if (gethash_code == 0) {
402  ATH_MSG_VERBOSE(" its hash Id is " << Idhash);
403  } else {
404  ATH_MSG_VERBOSE(" hash Id NOT computed " << Idhash);
405  }
406  }
407  m_hist_hash_list.resize(m_chambersIdHash.size());
408 }
409 
410 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
411 int MdtRawDataMonAlg::mezzmdt(const Identifier& digcoll_id) const {
412  int TotmezzTubes = 8;
413  if (cachedTubeLayerMax(digcoll_id) == 4) TotmezzTubes = 6;
414  int Imezz = (int)((m_idHelperSvc->mdtIdHelper().tube(digcoll_id) - 1) / TotmezzTubes) +
415  (int)((m_idHelperSvc->mdtIdHelper().multilayer(digcoll_id) - 1) * ((cachedTubeMax(digcoll_id)) / TotmezzTubes));
416 
417  return Imezz;
418 }
419 
420 // Get the Maximum # of tubes in the chamber
421 // the 'if' statements are for chambers with ML1 != ML2
422 // except for BIS8 -- mdtIdHelper gets the # layers wrong in this instance
423 int MdtRawDataMonAlg::GetTubeMax(const Identifier& digcoll_id, std::string_view hardware_name) {
424  int tubeMax(0);
425  if (hardware_name.substr(0, 4) == "BIS8") { // Why does mdtIdHelper get this one wrong?
426  tubeMax = 16 * 3;
427  } else if (hardware_name.substr(0, 4) == "BIR5") {
428  // tubeMax = 21*4 + 24*4;
429  tubeMax = 24 * 4 + 24 * 4;
430  } else if (hardware_name.substr(0, 4) == "BIR2" || hardware_name.substr(0, 4) == "BIR4") {
431  // tubeMax = 27*4 + 30*4;
432  tubeMax = 30 * 4 + 30 * 4;
433  } else if (hardware_name.substr(0, 4) == "BIR3") {
434  tubeMax = 36 * 4 + 36 * 4;
435  } else if (hardware_name.substr(0, 4) == "BIR1") {
436  // tubeMax = 24*4 + 30*4;
437  tubeMax = 30 * 4 + 30 * 4;
438  } else if (hardware_name.substr(0, 4) == "BMS4" || hardware_name.substr(0, 4) == "BMS6") {
439  // tubeMax = 40*3 + 48*3;
440  tubeMax = 48 * 3 + 48 * 3;
441  } else if (hardware_name == "EEL1A05" || hardware_name == "EEL1C05") {
442  tubeMax = 48 * 3 + 48 * 3;
443  } else if (hardware_name.substr(0, 3) == "BME") {
444  tubeMax = 546;
445  } else {
446  int numtubes = m_idHelperSvc->mdtIdHelper().tubeMax(digcoll_id);
447  int numlayers = m_idHelperSvc->mdtIdHelper().tubeLayerMax(digcoll_id);
448  int numML = m_idHelperSvc->mdtIdHelper().numberOfMultilayers(digcoll_id);
449  tubeMax = numtubes * numlayers * numML;
450  }
451  return tubeMax;
452 }
453 
454 bool MdtRawDataMonAlg::AinB(int A, std::vector<int>& B) {
455  for (int i : B) {
456  if (i == A) return true;
457  }
458  return false;
459 }
460 
461 // StatusCode MdtRawDataMonAlg::GetTimingInfo() {
462 // m_time = -1;
463 
464 // SG::ReadHandle<xAOD::EventInfo> evt(m_eventInfo);
465 // m_time = (1000000000L*(uint64_t)evt->timeStamp()+evt->timeStampNSOffset()) * 0.000000001;
466 
467 // // protection against simulated cosmics when the trigger_info() of the event_info is not filled and returns a null pointer.
468 // //trigtype = eventInfo->level1TriggerType();
469 
471  bool filterresult(true);
472  if (!m_DQFilterTools.empty()) {
473  ToolHandleArray<IDQFilterTool>::const_iterator ifilter(m_DQFilterTools.begin()), filterend(m_DQFilterTools.end());
474  for (; filterresult && (ifilter != filterend); ++ifilter) { filterresult = (filterresult && (*ifilter)->accept()); }
475  }
476  m_atlas_ready = filterresult;
477 }
478 
479 std::string MdtRawDataMonAlg::getChamberName(const Muon::MdtPrepData* hit) const { return getChamberName(hit->identify()); }
480 
481 std::string MdtRawDataMonAlg::getChamberName(const Identifier& id) const {
482  IdentifierHash idHash{0};
483  const MdtIdHelper& id_helper = m_idHelperSvc->mdtIdHelper();
484  id_helper.get_module_hash(id, idHash);
485  MDTChamber* chamber{nullptr};
486  if (getChamber(idHash, chamber).isSuccess()) return chamber->getName();
487  return convertChamberName(id_helper.stationName(id), id_helper.stationEta(id), id_helper.stationPhi(id), "MDT");
488 }
489 
491  if (id >= m_hist_hash_list.size()) return StatusCode::FAILURE;
492  chamber = m_hist_hash_list[id].get();
493  if (!chamber) return StatusCode::FAILURE;
494 
495  return StatusCode::SUCCESS;
496 }
497 
498 int MdtRawDataMonAlg::get_bin_for_LB_hist(int region, int layer, int phi, int eta, bool isBIM) const {
499  if (region == 0 || region == 1) { // Barrel
500 
501  if (layer == 0) { // Inner
502  if (eta < 6) {
503  if (phi < 11 && !isBIM)
504  return 18 * (eta - 1) + phi;
505  else if ((phi == 10 && isBIM) || (phi < 15 && !isBIM))
506  return 18 * (eta - 1) + phi + 1;
507  else
508  return 18 * (eta - 1) + phi + 2;
509  } else if (eta == 6)
510  return 90 + phi;
511  else if (eta == 7)
512  return 106 + (phi / 2);
513  else if (eta == 8)
514  return 114 + (phi / 2);
515  }
516 
517  else if (layer == 1) { // Middle
518  // 95 = 1 + 16 + 16 + 16 + 16 + 16 + 14 total number of phi sectors (+1)
519  // 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
520  // sectos we move the bin of phi=14 directly above phi=12 so there is no white line in the histogram
521  if (eta == 6 && phi > 11)
522  return 16 * (eta - 1) + phi - 1;
523  else
524  return 16 * (eta - 1) + phi;
525 
526  } else if (layer == 2 && region == 0) { // Outer, side A (must be separated due to presence of eta=0 chambers)
527  if (eta == 0 && phi == 11)
528  return 0;
529  else if (eta == 0 && phi == 13)
530  return 1;
531  else if (eta < 7)
532  return 16 * (eta - 1) + phi + 2;
533  else if (eta == 7 && phi == 11)
534  return 98;
535  else if (eta == 7 && phi == 13)
536  return 99;
537  else if (eta == 8 && phi == 11)
538  return 100;
539  else if (eta == 8 && phi == 13)
540  return 101;
541  } else if (layer == 3 && region == 0) { // Extra: put with outer
542  return 102 + 8 * (eta - 1) + (phi - 1) / 2;
543  } else if (layer == 2 && region == 1) { // Outer, side C
544  if (eta < 7)
545  return 16 * (eta - 1) + phi;
546  else if (eta == 7 && phi == 11)
547  return 96;
548  else if (eta == 7 && phi == 13)
549  return 97;
550  else if (eta == 8 && phi == 11)
551  return 98;
552  else if (eta == 8 && phi == 13)
553  return 99;
554  } else if (layer == 3 && region == 1) { // Extra: put with outer
555  return 100 + 8 * (eta - 1) + (phi - 1) / 2;
556  }
557 
558  }
559 
560  else { // Endcap
561  if (layer == 0) { // Inner
562  int run3_offset = 0;
563  if (m_do_run3Geometry) run3_offset = 40;
564  if (eta < 3)
565  return 16 * (eta - 1) + phi - run3_offset;
566  else if (eta == 3)
567  return 32 + phi / 2 - run3_offset;
568  else if (eta == 4)
569  return 40 + phi / 2 - run3_offset;
570  else if (eta == 5)
571  return 48 + phi / 8 - run3_offset;
572 
573  } else if (layer == 1) { // Middle
574  return 16 * (eta - 1) + phi;
575  } else if (layer == 2) { // Outer
576  return 16 * (eta - 1) + phi;
577  } else if (layer == 3 && region == 2) { // Extra A: put with outer. Asymmetry between A and C
578  if (eta == 1 && phi == 2) return 96;
579  if (eta == 1 && phi == 4) return 97;
580  if (eta == 1 && phi == 10) return 98;
581  if (eta == 1 && phi == 12) return 99;
582  if (eta == 2 && phi == 2) return 100;
583  if (eta == 2 && phi == 10) return 101;
584  if (eta == 2 && phi == 12) return 102;
585  } else if (layer == 3 && region == 3) { // Extra C: put with outer.
586  if (eta == 1 || phi < 5)
587  return 80 + 16 * eta + phi;
588  else
589  return 79 + 16 * eta + phi; //(missing eta = 2, phi = 5)
590  }
591  }
592 
593  return -1;
594 }
595 
597  if (region == 0 || region == 1) { // Barrel
598  if (layer == 0) { // Inner
599  // Add Labels
600  h->SetBins(834, 1, 2502, 122, 0, 122);
601  h->GetYaxis()->SetBinLabel(1, "BI1");
602  h->GetYaxis()->SetBinLabel(19, "BI2");
603  h->GetYaxis()->SetBinLabel(37, "BI3");
604  h->GetYaxis()->SetBinLabel(55, "BI4");
605  h->GetYaxis()->SetBinLabel(73, "BI5");
606  h->GetYaxis()->SetBinLabel(91, "BI6");
607  h->GetYaxis()->SetBinLabel(107, "BI7");
608  h->GetYaxis()->SetBinLabel(115, "BI8");
609  // Add lines
610  h->GetYaxis()->SetTickLength(0);
611  for (int i = 0; i < 6; i++) {
612  TLine* l = new TLine(1, 18 * i, 50, 18 * i);
613  h->GetListOfFunctions()->Add(l);
614  }
615  TLine* l2 = new TLine(1, 106, 50, 106);
616  h->GetListOfFunctions()->Add(l2);
617  TLine* l3 = new TLine(1, 114, 50, 114);
618  h->GetListOfFunctions()->Add(l3);
619  for (int i = 1; i < 122; i++) {
620  if (i < 90 && (i % 18 == 11 || i % 18 == 16)) {
621  TLine* l = new TLine(1, i, 10, i);
622  h->GetListOfFunctions()->Add(l);
623  } else {
624  TLine* l = new TLine(1, i, 20, i);
625  h->GetListOfFunctions()->Add(l);
626  }
627  }
628  }
629 
630  else if (layer == 1) { // Middle
631  h->SetBins(834, 1, 2502, 95, 0, 95); // 95 = 1 + 16 + 16 + 16 + 16 + 16 + 14 total number of phi sectors (+1)
632  // in the last eta-sector (6) there is no phi-sector 13; ie there arent chambers BML6A13
633  // and BML6C13 so there are only 14 phi sectors
634  // Add Labels
635  h->GetYaxis()->SetBinLabel(1, "BM1");
636  h->GetYaxis()->SetBinLabel(17, "BM2");
637  h->GetYaxis()->SetBinLabel(33, "BM3");
638  h->GetYaxis()->SetBinLabel(49, "BM4");
639  h->GetYaxis()->SetBinLabel(65, "BM5");
640  h->GetYaxis()->SetBinLabel(81, "BM6");
641  // Add lines
642  h->GetYaxis()->SetTickLength(0);
643  for (int i = 1; i < 95; i++) {
644  TLine* l = new TLine(1, i, 20, i);
645  h->GetListOfFunctions()->Add(l);
646  }
647  TLine* l1 = new TLine(1, 16, 50, 16);
648  h->GetListOfFunctions()->Add(l1);
649  TLine* l2 = new TLine(1, 32, 50, 32);
650  h->GetListOfFunctions()->Add(l2);
651  TLine* l3 = new TLine(1, 48, 50, 48);
652  h->GetListOfFunctions()->Add(l3);
653  TLine* l4 = new TLine(1, 64, 50, 64);
654  h->GetListOfFunctions()->Add(l4);
655  TLine* l5 = new TLine(1, 80, 50, 80);
656  h->GetListOfFunctions()->Add(l5);
657  }
658 
659  else if (layer == 2 && region == 0) { // Outer, side A
660  h->SetBins(834, 1, 2502, 118, 0, 118);
661  // Add labels
662  h->GetYaxis()->SetBinLabel(1, "BO0");
663  h->GetYaxis()->SetBinLabel(4, "BO1");
664  h->GetYaxis()->SetBinLabel(19, "BO2");
665  h->GetYaxis()->SetBinLabel(35, "BO3");
666  h->GetYaxis()->SetBinLabel(51, "BO4");
667  h->GetYaxis()->SetBinLabel(67, "BO5");
668  h->GetYaxis()->SetBinLabel(83, "BO6");
669  h->GetYaxis()->SetBinLabel(99, "BO7,8");
670  // h->GetYaxis()->SetBinLabel(101,"BO8");
671  h->GetYaxis()->SetBinLabel(103, "BE1");
672  h->GetYaxis()->SetBinLabel(111, "BE2");
673  // Add lines
674  h->GetYaxis()->SetTickLength(0);
675  for (int i = 1; i < 118; i++) {
676  TLine* l = new TLine(1, i, 20, i);
677  h->GetListOfFunctions()->Add(l);
678  }
679  TLine* l1 = new TLine(1, 2, 50, 2);
680  h->GetListOfFunctions()->Add(l1);
681  TLine* l2 = new TLine(1, 18, 50, 18);
682  h->GetListOfFunctions()->Add(l2);
683  TLine* l3 = new TLine(1, 34, 50, 34);
684  h->GetListOfFunctions()->Add(l3);
685  TLine* l4 = new TLine(1, 50, 50, 50);
686  h->GetListOfFunctions()->Add(l4);
687  TLine* l5 = new TLine(1, 66, 50, 66);
688  h->GetListOfFunctions()->Add(l5);
689  TLine* l6 = new TLine(1, 82, 50, 82);
690  h->GetListOfFunctions()->Add(l6);
691  TLine* l7 = new TLine(1, 98, 50, 98);
692  h->GetListOfFunctions()->Add(l7);
693  TLine* l8 = new TLine(1, 100, 50, 100);
694  h->GetListOfFunctions()->Add(l8);
695  TLine* l9 = new TLine(1, 102, 50, 102);
696  h->GetListOfFunctions()->Add(l9);
697  TLine* l10 = new TLine(1, 110, 50, 110);
698  h->GetListOfFunctions()->Add(l10);
699  }
700 
701  else if (layer == 2 && region == 1) { // Outer, side C (no eta = 0)
702  h->SetBins(834, 1, 2502, 116, 0, 116);
703  // Add labels
704  h->GetYaxis()->SetBinLabel(1, "BO1");
705  h->GetYaxis()->SetBinLabel(17, "BO2");
706  h->GetYaxis()->SetBinLabel(33, "BO3");
707  h->GetYaxis()->SetBinLabel(49, "BO4");
708  h->GetYaxis()->SetBinLabel(65, "BO5");
709  h->GetYaxis()->SetBinLabel(81, "BO6");
710  h->GetYaxis()->SetBinLabel(97, "BO7,8");
711  // h->GetYaxis()->SetBinLabel(101,"BO8");
712  h->GetYaxis()->SetBinLabel(101, "BE1");
713  h->GetYaxis()->SetBinLabel(109, "BE2");
714  // Add lines
715  h->GetYaxis()->SetTickLength(0);
716  for (int i = 1; i < 116; i++) {
717  TLine* l = new TLine(1, i, 20, i);
718  h->GetListOfFunctions()->Add(l);
719  }
720  TLine* l1 = new TLine(1, 16, 50, 16);
721  h->GetListOfFunctions()->Add(l1);
722  TLine* l2 = new TLine(1, 32, 50, 32);
723  h->GetListOfFunctions()->Add(l2);
724  TLine* l3 = new TLine(1, 48, 50, 48);
725  h->GetListOfFunctions()->Add(l3);
726  TLine* l4 = new TLine(1, 64, 50, 64);
727  h->GetListOfFunctions()->Add(l4);
728  TLine* l5 = new TLine(1, 80, 50, 80);
729  h->GetListOfFunctions()->Add(l5);
730  TLine* l6 = new TLine(1, 96, 50, 96);
731  h->GetListOfFunctions()->Add(l6);
732  TLine* l7 = new TLine(1, 98, 50, 98);
733  h->GetListOfFunctions()->Add(l7);
734  TLine* l8 = new TLine(1, 100, 50, 100);
735  h->GetListOfFunctions()->Add(l8);
736  TLine* l9 = new TLine(1, 108, 50, 108);
737  h->GetListOfFunctions()->Add(l9);
738  }
739  }
740 
741  else { // Endcap
742  if (layer == 0) { // Inner
743  h->SetBins(834, 1, 2502, 50, 0, 50);
744  // Add labels
745  h->GetYaxis()->SetBinLabel(1, "EI1");
746  h->GetYaxis()->SetBinLabel(17, "EI2");
747  h->GetYaxis()->SetBinLabel(33, "EI3");
748  h->GetYaxis()->SetBinLabel(41, "EI4");
749  h->GetYaxis()->SetBinLabel(49, "EI5");
750  // Add lines
751  h->GetYaxis()->SetTickLength(0);
752  for (int i = 1; i < 50; i++) {
753  TLine* l = new TLine(1, i, 20, i);
754  h->GetListOfFunctions()->Add(l);
755  }
756  TLine* l1 = new TLine(1, 16, 50, 16);
757  h->GetListOfFunctions()->Add(l1);
758  TLine* l2 = new TLine(1, 32, 50, 32);
759  h->GetListOfFunctions()->Add(l2);
760  TLine* l3 = new TLine(1, 40, 50, 40);
761  h->GetListOfFunctions()->Add(l3);
762  TLine* l4 = new TLine(1, 48, 50, 48);
763  h->GetListOfFunctions()->Add(l4);
764  }
765 
766  else if (layer == 1) { // Middle
767  h->SetBins(834, 1, 2502, 80, 0, 80);
768  // Add labels
769  h->GetYaxis()->SetBinLabel(1, "EM1");
770  h->GetYaxis()->SetBinLabel(17, "EM2");
771  h->GetYaxis()->SetBinLabel(33, "EM3");
772  h->GetYaxis()->SetBinLabel(49, "EM4");
773  h->GetYaxis()->SetBinLabel(65, "EM5");
774  // Add lines
775  h->GetYaxis()->SetTickLength(0);
776  for (int i = 1; i < 80; i++) {
777  TLine* l = new TLine(1, i, 20, i);
778  h->GetListOfFunctions()->Add(l);
779  }
780  TLine* l1 = new TLine(1, 16, 50, 16);
781  h->GetListOfFunctions()->Add(l1);
782  TLine* l2 = new TLine(1, 32, 50, 32);
783  h->GetListOfFunctions()->Add(l2);
784  TLine* l3 = new TLine(1, 48, 50, 48);
785  h->GetListOfFunctions()->Add(l3);
786  TLine* l4 = new TLine(1, 64, 50, 64);
787  h->GetListOfFunctions()->Add(l4);
788  }
789 
790  else if (layer == 2) { // Outer + extra
791 
792  if (region == 2) { // side A
793  h->SetBins(834, 1, 2502, 103, 0, 103);
794  // Add labels
795  h->GetYaxis()->SetBinLabel(1, "EO1");
796  h->GetYaxis()->SetBinLabel(17, "EO2");
797  h->GetYaxis()->SetBinLabel(33, "EO3");
798  h->GetYaxis()->SetBinLabel(49, "EO4");
799  h->GetYaxis()->SetBinLabel(65, "EO5");
800  h->GetYaxis()->SetBinLabel(81, "EO6");
801  h->GetYaxis()->SetBinLabel(97, "EE1,2");
802  // Add lines
803  h->GetYaxis()->SetTickLength(0);
804  for (int i = 1; i < 103; i++) {
805  TLine* l = new TLine(1, i, 20, i);
806  h->GetListOfFunctions()->Add(l);
807  }
808  TLine* l1 = new TLine(1, 16, 50, 16);
809  h->GetListOfFunctions()->Add(l1);
810  TLine* l2 = new TLine(1, 32, 50, 32);
811  h->GetListOfFunctions()->Add(l2);
812  TLine* l3 = new TLine(1, 48, 50, 48);
813  h->GetListOfFunctions()->Add(l3);
814  TLine* l4 = new TLine(1, 64, 50, 64);
815  h->GetListOfFunctions()->Add(l4);
816  TLine* l5 = new TLine(1, 80, 50, 80);
817  h->GetListOfFunctions()->Add(l5);
818  TLine* l6 = new TLine(1, 96, 50, 96);
819  h->GetListOfFunctions()->Add(l6);
820  TLine* l7 = new TLine(1, 100, 50, 100);
821  h->GetListOfFunctions()->Add(l7);
822  } else if (region == 3) { // side C
823  h->SetBins(834, 1, 2502, 127, 0, 127);
824  // Add labels
825  h->GetYaxis()->SetBinLabel(1, "EO1");
826  h->GetYaxis()->SetBinLabel(17, "EO2");
827  h->GetYaxis()->SetBinLabel(33, "EO3");
828  h->GetYaxis()->SetBinLabel(49, "EO4");
829  h->GetYaxis()->SetBinLabel(65, "EO5");
830  h->GetYaxis()->SetBinLabel(81, "EO6");
831  h->GetYaxis()->SetBinLabel(97, "EE1");
832  h->GetYaxis()->SetBinLabel(113, "EE2");
833  // Add lines
834  h->GetYaxis()->SetTickLength(0);
835  for (int i = 1; i < 127; i++) {
836  TLine* l = new TLine(1, i, 20, i);
837  h->GetListOfFunctions()->Add(l);
838  }
839  TLine* l1 = new TLine(1, 16, 50, 16);
840  h->GetListOfFunctions()->Add(l1);
841  TLine* l2 = new TLine(1, 32, 50, 32);
842  h->GetListOfFunctions()->Add(l2);
843  TLine* l3 = new TLine(1, 48, 50, 48);
844  h->GetListOfFunctions()->Add(l3);
845  TLine* l4 = new TLine(1, 64, 50, 64);
846  h->GetListOfFunctions()->Add(l4);
847  TLine* l5 = new TLine(1, 80, 50, 80);
848  h->GetListOfFunctions()->Add(l5);
849  TLine* l6 = new TLine(1, 96, 50, 96);
850  h->GetListOfFunctions()->Add(l6);
851  TLine* l7 = new TLine(1, 112, 50, 112);
852  h->GetListOfFunctions()->Add(l7);
853  }
854  }
855  }
856 
857  return StatusCode::SUCCESS;
858 }
859 
861  if (region == 0 || region == 1) { // Barrel
862  if (crate == 0) { // Crate BA01 or BC01
863  // Add Labels
864  h->SetBins(834, 1, 2502, 73, 0, 73);
865  h->GetYaxis()->SetBinLabel(1, "BIL");
866  h->GetYaxis()->SetBinLabel(13, "BIS");
867  h->GetYaxis()->SetBinLabel(25, "BME");
868  h->GetYaxis()->SetBinLabel(26, "BML");
869  h->GetYaxis()->SetBinLabel(38, "BMS");
870  h->GetYaxis()->SetBinLabel(50, "BOL");
871  h->GetYaxis()->SetBinLabel(62, "BOS");
872  // Add lines
873  h->GetYaxis()->SetTickLength(0);
874  for (int i = 0; i < 73; i++) {
875  TLine* l = new TLine(1, i, 20, i);
876  h->GetListOfFunctions()->Add(l);
877  }
878  TLine* l2 = new TLine(1, 0, 50, 0);
879  h->GetListOfFunctions()->Add(l2);
880  TLine* l3 = new TLine(1, 12, 50, 12);
881  h->GetListOfFunctions()->Add(l3);
882  TLine* l4 = new TLine(1, 24, 50, 24);
883  h->GetListOfFunctions()->Add(l4);
884  TLine* l5 = new TLine(1, 25, 50, 25);
885  h->GetListOfFunctions()->Add(l5);
886  TLine* l6 = new TLine(1, 37, 50, 37);
887  h->GetListOfFunctions()->Add(l6);
888  TLine* l8 = new TLine(1, 49, 50, 49);
889  h->GetListOfFunctions()->Add(l8);
890  TLine* l9 = new TLine(1, 61, 50, 61);
891  h->GetListOfFunctions()->Add(l9);
892  }
893 
894  else if (crate == 1) { // BA02, BC02
895  h->SetBins(834, 1, 2502, 73, 0, 73);
896  // Add Labels
897  h->GetYaxis()->SetBinLabel(1, "BIL");
898  h->GetYaxis()->SetBinLabel(13, "BIS");
899  h->GetYaxis()->SetBinLabel(25, "BME");
900  h->GetYaxis()->SetBinLabel(37, "BMS");
901  h->GetYaxis()->SetBinLabel(49, "BOL");
902  h->GetYaxis()->SetBinLabel(61, "BOS");
903  // Add lines
904  h->GetYaxis()->SetTickLength(0);
905  for (int i = 1; i < 73; i++) {
906  TLine* l = new TLine(1, i, 20, i);
907  h->GetListOfFunctions()->Add(l);
908  }
909  TLine* l1 = new TLine(1, 12, 50, 12);
910  h->GetListOfFunctions()->Add(l1);
911  TLine* l2 = new TLine(1, 24, 50, 24);
912  h->GetListOfFunctions()->Add(l2);
913  TLine* l3 = new TLine(1, 36, 50, 36);
914  h->GetListOfFunctions()->Add(l3);
915  TLine* l4 = new TLine(1, 48, 50, 48);
916  h->GetListOfFunctions()->Add(l4);
917  TLine* l6 = new TLine(1, 60, 50, 60);
918  h->GetListOfFunctions()->Add(l6);
919 
920  } else if (crate == 2) { // BA03, BC03
921  // Add Labels
922  h->SetBins(834, 1, 2502, 80, 0, 80);
923  h->GetYaxis()->SetBinLabel(1, "BIL");
924  h->GetYaxis()->SetBinLabel(7, "BIM");
925  h->GetYaxis()->SetBinLabel(12, "BIR");
926  h->GetYaxis()->SetBinLabel(18, "BIS");
927  h->GetYaxis()->SetBinLabel(30, "BMF");
928  h->GetYaxis()->SetBinLabel(33, "BMG");
929  h->GetYaxis()->SetBinLabel(36, "BML");
930  h->GetYaxis()->SetBinLabel(48, "BMS");
931  h->GetYaxis()->SetBinLabel(54, "BOF");
932  h->GetYaxis()->SetBinLabel(58, "BOG");
933  if (region == 0) {
934  h->GetYaxis()->SetBinLabel(63, "BOL");
935  h->GetYaxis()->SetBinLabel(75, "BOS");
936  } else if (region == 1) {
937  h->GetYaxis()->SetBinLabel(62, "BOL");
938  h->GetYaxis()->SetBinLabel(74, "BOS");
939  }
940  // Add lines
941  h->GetYaxis()->SetTickLength(0);
942  for (int i = 0; i < 80; i++) {
943  TLine* l = new TLine(1, i, 20, i);
944  h->GetListOfFunctions()->Add(l);
945  }
946  TLine* l2 = new TLine(1, 6, 50, 6);
947  h->GetListOfFunctions()->Add(l2);
948  TLine* l3 = new TLine(1, 11, 50, 11);
949  h->GetListOfFunctions()->Add(l3);
950  TLine* l3b = new TLine(1, 17, 50, 17);
951  h->GetListOfFunctions()->Add(l3b);
952  // TLine* l4 = new TLine(1,26,50,26); h->GetListOfFunctions()->Add(l4); //removed this line because it doesnt correspond to
953  // anything
954  TLine* l5 = new TLine(1, 29, 50, 29);
955  h->GetListOfFunctions()->Add(l5);
956  TLine* l6 = new TLine(1, 32, 50, 32);
957  h->GetListOfFunctions()->Add(l6);
958  TLine* l7 = new TLine(1, 35, 50, 35);
959  h->GetListOfFunctions()->Add(l7);
960  TLine* l8 = new TLine(1, 47, 50, 47);
961  h->GetListOfFunctions()->Add(l8);
962  TLine* l9 = new TLine(1, 53, 50, 53);
963  h->GetListOfFunctions()->Add(l9);
964  TLine* l9b = new TLine(1, 57, 50, 57);
965  h->GetListOfFunctions()->Add(l9b);
966  if (region == 0) {
967  TLine* l10 = new TLine(1, 62, 50, 62);
968  h->GetListOfFunctions()->Add(l10);
969  TLine* l11 = new TLine(1, 74, 50, 74);
970  h->GetListOfFunctions()->Add(l11);
971  } else if (region == 1) {
972  TLine* l10 = new TLine(1, 61, 50, 61);
973  h->GetListOfFunctions()->Add(l10);
974  TLine* l11 = new TLine(1, 73, 50, 73);
975  h->GetListOfFunctions()->Add(l11);
976  }
977  }
978 
979  else if (crate == 3) { // BA04, BC04
980  // Add Labels
981  h->SetBins(834, 1, 2502, 79, 0, 79);
982  h->GetYaxis()->SetBinLabel(1, "BIL");
983  h->GetYaxis()->SetBinLabel(7, "BIM");
984  h->GetYaxis()->SetBinLabel(12, "BIR");
985  h->GetYaxis()->SetBinLabel(18, "BIS");
986  h->GetYaxis()->SetBinLabel(30, "BMF");
987  h->GetYaxis()->SetBinLabel(33, "BMG");
988  h->GetYaxis()->SetBinLabel(36, "BML");
989  h->GetYaxis()->SetBinLabel(47, "BMS");
990  h->GetYaxis()->SetBinLabel(53, "BOF");
991  h->GetYaxis()->SetBinLabel(57, "BOG");
992  if (region == 0) {
993  h->GetYaxis()->SetBinLabel(62, "BOL");
994  h->GetYaxis()->SetBinLabel(75, "BOS");
995  } else if (region == 1) {
996  h->GetYaxis()->SetBinLabel(61, "BOL");
997  h->GetYaxis()->SetBinLabel(74, "BOS");
998  }
999 
1000  // Add lines
1001  h->GetYaxis()->SetTickLength(0);
1002  for (int i = 0; i < 79; i++) {
1003  TLine* l = new TLine(1, i, 20, i);
1004  h->GetListOfFunctions()->Add(l);
1005  }
1006  TLine* l2 = new TLine(1, 6, 50, 6);
1007  h->GetListOfFunctions()->Add(l2);
1008  TLine* l3 = new TLine(1, 11, 50, 11);
1009  h->GetListOfFunctions()->Add(l3);
1010  TLine* l3b = new TLine(1, 17, 50, 17);
1011  h->GetListOfFunctions()->Add(l3b);
1012  // TLine* l4 = new TLine(1,26,50,26); h->GetListOfFunctions()->Add(l4);//removed this line because it doesnt correspond to
1013  // anything
1014  TLine* l5 = new TLine(1, 29, 50, 29);
1015  h->GetListOfFunctions()->Add(l5);
1016  TLine* l6 = new TLine(1, 32, 50, 32);
1017  h->GetListOfFunctions()->Add(l6);
1018  TLine* l7 = new TLine(1, 35, 50, 35);
1019  h->GetListOfFunctions()->Add(l7);
1020  TLine* l8 = new TLine(1, 46, 50, 46);
1021  h->GetListOfFunctions()->Add(l8);
1022  TLine* l9 = new TLine(1, 52, 50, 52);
1023  h->GetListOfFunctions()->Add(l9);
1024  TLine* l9b = new TLine(1, 56, 50, 56);
1025  h->GetListOfFunctions()->Add(l9b);
1026  if (region == 0) {
1027  TLine* l10 = new TLine(1, 61, 50, 61);
1028  h->GetListOfFunctions()->Add(l10);
1029  TLine* l11 = new TLine(1, 74, 50, 74);
1030  h->GetListOfFunctions()->Add(l11);
1031  } else if (region == 1) {
1032  TLine* l10 = new TLine(1, 60, 50, 60);
1033  h->GetListOfFunctions()->Add(l10);
1034  TLine* l11 = new TLine(1, 73, 50, 73);
1035  h->GetListOfFunctions()->Add(l11);
1036  }
1037  }
1038  }
1039 
1040  else { // Endcap
1041  if (crate == 0 || crate == 2) { // EA01, EC01 and EA03, EC03 are the same
1042  h->SetBins(834, 1, 2502, 73, 0, 73);
1043  // Add labels
1044  h->GetYaxis()->SetBinLabel(1, "BEE");
1045  h->GetYaxis()->SetBinLabel(5, "BIS");
1046  h->GetYaxis()->SetBinLabel(9, "EEL");
1047  h->GetYaxis()->SetBinLabel(13, "EES");
1048  h->GetYaxis()->SetBinLabel(17, "EIL");
1049  h->GetYaxis()->SetBinLabel(26, "EIS");
1050  h->GetYaxis()->SetBinLabel(30, "EML");
1051  h->GetYaxis()->SetBinLabel(40, "EMS");
1052  h->GetYaxis()->SetBinLabel(50, "EOL");
1053  h->GetYaxis()->SetBinLabel(62, "EOS");
1054  // Add lines
1055  h->GetYaxis()->SetTickLength(0);
1056  for (int i = 1; i < 73; i++) {
1057  TLine* l = new TLine(1, i, 20, i);
1058  h->GetListOfFunctions()->Add(l);
1059  }
1060  TLine* l2 = new TLine(1, 4, 50, 4);
1061  h->GetListOfFunctions()->Add(l2);
1062  TLine* l3 = new TLine(1, 8, 50, 8);
1063  h->GetListOfFunctions()->Add(l3);
1064  TLine* l4 = new TLine(1, 12, 50, 12);
1065  h->GetListOfFunctions()->Add(l4);
1066  TLine* l5 = new TLine(1, 16, 50, 16);
1067  h->GetListOfFunctions()->Add(l5);
1068  TLine* l6 = new TLine(1, 25, 50, 25);
1069  h->GetListOfFunctions()->Add(l6);
1070  TLine* l7 = new TLine(1, 29, 50, 29);
1071  h->GetListOfFunctions()->Add(l7);
1072  TLine* l8 = new TLine(1, 39, 50, 39);
1073  h->GetListOfFunctions()->Add(l8);
1074  TLine* l9 = new TLine(1, 49, 50, 49);
1075  h->GetListOfFunctions()->Add(l9);
1076  TLine* l10 = new TLine(1, 61, 50, 61);
1077  h->GetListOfFunctions()->Add(l10);
1078  } else if (crate == 1) { // EA02, EC02
1079  h->SetBins(834, 1, 2502, 71, 0, 71);
1080  // Add labels
1081  h->GetYaxis()->SetBinLabel(1, "BEE");
1082  h->GetYaxis()->SetBinLabel(5, "BIS");
1083  h->GetYaxis()->SetBinLabel(9, "EEL");
1084  h->GetYaxis()->SetBinLabel(12, "EES");
1085  h->GetYaxis()->SetBinLabel(16, "EIL");
1086  h->GetYaxis()->SetBinLabel(24, "EIS");
1087  h->GetYaxis()->SetBinLabel(28, "EML");
1088  h->GetYaxis()->SetBinLabel(38, "EMS");
1089  h->GetYaxis()->SetBinLabel(48, "EOL");
1090  h->GetYaxis()->SetBinLabel(60, "EOS");
1091  // Add lines
1092  h->GetYaxis()->SetTickLength(0);
1093  for (int i = 1; i < 71; i++) {
1094  TLine* l = new TLine(1, i, 20, i);
1095  h->GetListOfFunctions()->Add(l);
1096  }
1097  TLine* l2 = new TLine(1, 4, 50, 4);
1098  h->GetListOfFunctions()->Add(l2);
1099  TLine* l3 = new TLine(1, 8, 50, 8);
1100  h->GetListOfFunctions()->Add(l3);
1101  TLine* l4 = new TLine(1, 11, 50, 11);
1102  h->GetListOfFunctions()->Add(l4);
1103  TLine* l5 = new TLine(1, 15, 50, 15);
1104  h->GetListOfFunctions()->Add(l5);
1105  TLine* l6 = new TLine(1, 23, 50, 23);
1106  h->GetListOfFunctions()->Add(l6);
1107  TLine* l7 = new TLine(1, 27, 50, 27);
1108  h->GetListOfFunctions()->Add(l7);
1109  TLine* l8 = new TLine(1, 37, 50, 37);
1110  h->GetListOfFunctions()->Add(l8);
1111  TLine* l9 = new TLine(1, 47, 50, 47);
1112  h->GetListOfFunctions()->Add(l9);
1113  TLine* l10 = new TLine(1, 59, 50, 59);
1114  h->GetListOfFunctions()->Add(l10);
1115  } else if (crate == 3) { // EA04, EC04
1116  h->SetBins(834, 1, 2502, 72, 0, 72);
1117  // Add labels
1118  h->GetYaxis()->SetBinLabel(1, "BEE");
1119  h->GetYaxis()->SetBinLabel(5, "BIS");
1120  h->GetYaxis()->SetBinLabel(9, "EEL");
1121  h->GetYaxis()->SetBinLabel(13, "EES");
1122  h->GetYaxis()->SetBinLabel(17, "EIL");
1123  h->GetYaxis()->SetBinLabel(25, "EIS");
1124  h->GetYaxis()->SetBinLabel(29, "EML");
1125  h->GetYaxis()->SetBinLabel(39, "EMS");
1126  h->GetYaxis()->SetBinLabel(49, "EOL");
1127  h->GetYaxis()->SetBinLabel(61, "EOS");
1128  // Add lines
1129  h->GetYaxis()->SetTickLength(0);
1130  for (int i = 1; i < 72; i++) {
1131  TLine* l = new TLine(1, i, 20, i);
1132  h->GetListOfFunctions()->Add(l);
1133  }
1134  TLine* l2 = new TLine(1, 4, 50, 4);
1135  h->GetListOfFunctions()->Add(l2);
1136  TLine* l3 = new TLine(1, 8, 50, 8);
1137  h->GetListOfFunctions()->Add(l3);
1138  TLine* l4 = new TLine(1, 12, 50, 12);
1139  h->GetListOfFunctions()->Add(l4);
1140  TLine* l5 = new TLine(1, 16, 50, 16);
1141  h->GetListOfFunctions()->Add(l5);
1142  TLine* l6 = new TLine(1, 24, 50, 24);
1143  h->GetListOfFunctions()->Add(l6);
1144  TLine* l7 = new TLine(1, 28, 50, 28);
1145  h->GetListOfFunctions()->Add(l7);
1146  TLine* l8 = new TLine(1, 38, 50, 38);
1147  h->GetListOfFunctions()->Add(l8);
1148  TLine* l9 = new TLine(1, 48, 50, 48);
1149  h->GetListOfFunctions()->Add(l9);
1150  TLine* l10 = new TLine(1, 60, 50, 60);
1151  h->GetListOfFunctions()->Add(l10);
1152  }
1153  }
1154 
1155  return StatusCode::SUCCESS;
1156 }
1157 
1158 int MdtRawDataMonAlg::get_bin_for_LB_crate_hist(int region, int crate, int phi, int eta, std::string_view chamber) const {
1159  int binNum = 999;
1160  std::string_view stName = chamber.substr(0, 3);
1161  if (region == 0 || region == 1) { // Barrel
1162  if (crate == 1) { // BA01, BC01
1163  if (stName == "BIL")
1164  binNum = 2 * eta + (phi - 1) / 2 - 1;
1165  else if (stName == "BIS")
1166  binNum = 12 + 2 * eta + (phi - 2) / 2 - 1;
1167  else if (stName == "BME")
1168  binNum = 25;
1169  else if (stName == "BML")
1170  binNum = 25 + 2 * eta + (phi - 1) / 2 - 1;
1171  else if (stName == "BMS")
1172  binNum = 37 + 2 * eta + (phi - 2) / 2 - 1;
1173  else if (stName == "BOL")
1174  binNum = 49 + 2 * eta + (phi - 1) / 2 - 1;
1175  else if (stName == "BOS")
1176  binNum = 61 + 2 * eta + (phi - 2) / 2 - 1;
1177  else
1178  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Bx01");
1179  return binNum - 1;
1180  } else if (crate == 2) { // BA02, BC02
1181 
1182  if (stName == "BIL")
1183  binNum = 2 * eta + (phi - 5) / 2 - 1;
1184  else if (stName == "BIS")
1185  binNum = 12 + 2 * eta + (phi - 6) / 2 - 1;
1186  else if (stName == "BML")
1187  binNum = 24 + 2 * eta + (phi - 5) / 2 - 1;
1188  else if (stName == "BMS")
1189  binNum = 36 + 2 * eta + (phi - 6) / 2 - 1;
1190  else if (stName == "BOL")
1191  binNum = 48 + 2 * eta + (phi - 5) / 2 - 1;
1192  else if (stName == "BOS")
1193  binNum = 60 + 2 * eta + (phi - 6) / 2 - 1;
1194  else
1195  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Bx02");
1196  return binNum - 1;
1197  } else if (crate == 3) { // BA03,BC03
1198  if (stName == "BIL")
1199  binNum = eta;
1200  else if (stName == "BIM")
1201  binNum = 6 + eta;
1202  else if (stName == "BIR")
1203  binNum = 11 + eta;
1204  else if (stName == "BIS")
1205  binNum = 17 + 2 * eta + (phi - 10) / 2 - 1;
1206  else if (stName == "BMF")
1207  binNum = 29 + (eta + 1) / 2;
1208  else if (stName == "BMG")
1209  binNum = 32 + eta / 2;
1210  else if (stName == "BML")
1211  binNum = 35 + 2 * eta + (phi - 9) / 2 - 1;
1212  else if (stName == "BMS")
1213  binNum = 47 + eta;
1214  else if (stName == "BOF")
1215  binNum = 53 + (eta + 1) / 2;
1216  else if (chamber.substr(0, 4) == "BOG0" && region == 0)
1217  binNum = 58;
1218  else if (stName == "BOG")
1219  binNum = 58 + eta / 2 - region;
1220  else if (stName == "BOL")
1221  binNum = 62 + 2 * eta + (phi - 9) / 2 - 1 - region;
1222  else if (stName == "BOS")
1223  binNum = 74 + eta - region;
1224  else
1225  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Bx03");
1226  return binNum - 1;
1227  } else if (crate == 4) { // BA04, BC04
1228 
1229  if (stName == "BIL")
1230  binNum = eta;
1231  else if (stName == "BIM")
1232  binNum = 6 + eta;
1233  else if (stName == "BIR")
1234  binNum = 11 + eta;
1235  else if (stName == "BIS")
1236  binNum = 17 + 2 * eta + (phi - 14) / 2 - 1;
1237  else if (stName == "BMF")
1238  binNum = 29 + (eta + 1) / 2;
1239  else if (stName == "BMG")
1240  binNum = 32 + eta / 2;
1241  else if (stName == "BML" && eta < 6)
1242  binNum = 35 + 2 * eta + (phi - 13) / 2 - 1;
1243  else if (chamber.substr(0, 7) == "BML6A15" || chamber.substr(0, 7) == "BML6C15")
1244  binNum = 46;
1245  else if (stName == "BMS")
1246  binNum = 46 + eta;
1247  else if (stName == "BOF")
1248  binNum = 52 + (eta + 1) / 2;
1249  else if (chamber.substr(0, 4) == "BOG0" && region == 0)
1250  binNum = 57;
1251  else if (stName == "BOG")
1252  binNum = 57 + eta / 2 - region;
1253  else if (stName == "BOL")
1254  binNum = 61 + 2 * eta + (phi - 13) / 2 - 1 - region;
1255  else if (stName == "BOS")
1256  binNum = 74 + eta - region;
1257  else
1258  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Bx04");
1259  return binNum - 1;
1260  }
1261  } else if (region == 2 || region == 3) {
1262  if (crate == 1) { // EA01, EC01
1263  if (stName == "BEE")
1264  binNum = 2 * eta + (phi - 2) / 2 - 1;
1265  else if (stName == "BIS")
1266  binNum = 4 + 2 * (eta - 6) + (phi - 2) / 2 - 1;
1267  else if (stName == "EEL")
1268  binNum = 8 + 2 * eta + (phi - 1) / 2 - 1;
1269  else if (stName == "EES")
1270  binNum = 12 + 2 * eta + (phi - 2) / 2 - 1;
1271  else if (stName == "EIL" && eta < 5)
1272  binNum = 16 + 2 * eta + (phi - 1) / 2 - 1;
1273  else if (stName == "EIL" && eta == 5)
1274  binNum = 25;
1275  else if (stName == "EIS")
1276  binNum = 25 + 2 * eta + (phi - 2) / 2 - 1;
1277  else if (stName == "EML")
1278  binNum = 29 + 2 * eta + (phi - 1) / 2 - 1;
1279  else if (stName == "EMS")
1280  binNum = 39 + 2 * eta + (phi - 2) / 2 - 1;
1281  else if (stName == "EOL")
1282  binNum = 49 + 2 * eta + (phi - 1) / 2 - 1;
1283  else if (stName == "EOS")
1284  binNum = 61 + 2 * eta + (phi - 2) / 2 - 1;
1285  else
1286  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Ex01");
1287  if (m_do_run3Geometry) {
1288  if (region == 2) {
1289  if (binNum > 8 && binNum < 23)
1290  binNum = binNum - 2;
1291  else if (binNum > 22 && binNum < 30)
1292  binNum = binNum - 8;
1293  else if (binNum > 29)
1294  binNum = binNum - 12;
1295  } else if (region == 3) {
1296  if (binNum > 22 && binNum < 30)
1297  binNum = binNum - 6;
1298  else if (binNum > 29)
1299  binNum = binNum - 10;
1300  }
1301  }
1302  return binNum - 1;
1303  } else if (crate == 2) { // EA02, EC02
1304  if (stName == "BEE")
1305  binNum = 2 * eta + (phi - 6) / 2 - 1;
1306  else if (stName == "BIS")
1307  binNum = 4 + 2 * (eta - 6) + (phi - 6) / 2 - 1;
1308  else if (chamber.substr(0, 4) == "EEL1")
1309  binNum = 9 + (phi - 3) / 2 - 1;
1310  else if (chamber.substr(0, 4) == "EEL2")
1311  binNum = 11;
1312  else if (stName == "EES")
1313  binNum = 11 + 2 * eta + (phi - 6) / 2 - 1;
1314  else if (stName == "EIL")
1315  binNum = 15 + 2 * eta + (phi - 5) / 2 - 1;
1316  else if (stName == "EIS")
1317  binNum = 23 + 2 * eta + (phi - 6) / 2 - 1;
1318  else if (stName == "EML")
1319  binNum = 27 + 2 * eta + (phi - 5) / 2 - 1;
1320  else if (stName == "EMS")
1321  binNum = 37 + 2 * eta + (phi - 6) / 2 - 1;
1322  else if (stName == "EOL")
1323  binNum = 47 + 2 * eta + (phi - 5) / 2 - 1;
1324  else if (stName == "EOS")
1325  binNum = 59 + 2 * eta + (phi - 6) / 2 - 1;
1326  else
1327  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Ex02");
1328  if (m_do_run3Geometry) {
1329  if (region == 2) {
1330  if (binNum > 8 && binNum < 22)
1331  binNum = binNum - 2;
1332  else if (binNum > 21 && binNum < 28)
1333  binNum = binNum - 8;
1334  else if (binNum > 27)
1335  binNum = binNum - 12;
1336  } else if (region == 3) {
1337  if (binNum > 21 && binNum < 28)
1338  binNum = binNum - 6;
1339  else if (binNum > 27)
1340  binNum = binNum - 10;
1341  }
1342  }
1343  return binNum - 1;
1344  } else if (crate == 3) { // EA03, EC03
1345 
1346  if (stName == "BEE")
1347  binNum = 2 * eta + (phi - 10) / 2 - 1;
1348  else if (stName == "BIS")
1349  binNum = 4 + 2 * (eta - 6) + (phi - 10) / 2 - 1;
1350  else if (stName == "EEL")
1351  binNum = 8 + 2 * eta + (phi - 9) / 2 - 1;
1352  else if (stName == "EES")
1353  binNum = 12 + 2 * eta + (phi - 10) / 2 - 1;
1354  else if (stName == "EIL" && eta < 5)
1355  binNum = 16 + 2 * eta + (phi - 9) / 2 - 1;
1356  else if (chamber.substr(0, 4) == "EIL5")
1357  binNum = 25;
1358  else if (stName == "EIS")
1359  binNum = 25 + 2 * eta + (phi - 10) / 2 - 1;
1360  else if (stName == "EML")
1361  binNum = 29 + 2 * eta + (phi - 9) / 2 - 1;
1362  else if (stName == "EMS")
1363  binNum = 39 + 2 * eta + (phi - 10) / 2 - 1;
1364  else if (stName == "EOL")
1365  binNum = 49 + 2 * eta + (phi - 9) / 2 - 1;
1366  else if (stName == "EOS")
1367  binNum = 61 + 2 * eta + (phi - 10) / 2 - 1;
1368  else
1369  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Ex03");
1370  if (m_do_run3Geometry) {
1371  if (region == 2) {
1372  if (binNum > 8 && binNum < 23)
1373  binNum = binNum - 2;
1374  else if (binNum > 22 && binNum < 30)
1375  binNum = binNum - 8;
1376  else if (binNum > 29)
1377  binNum = binNum - 12;
1378  }
1379  if (region == 3) {
1380  if (binNum > 22 && binNum < 30)
1381  binNum = binNum - 6;
1382  else if (binNum > 29)
1383  binNum = binNum - 10;
1384  }
1385  }
1386  return binNum - 1;
1387  } else if (crate == 4) { // EA04, EC04
1388  if (stName == "BEE")
1389  binNum = 2 * eta + (phi - 14) / 2 - 1;
1390  else if (stName == "BIS")
1391  binNum = 4 + 2 * (eta - 6) + (phi - 14) / 2 - 1;
1392  else if (stName == "EEL")
1393  binNum = 8 + 2 * eta + (phi - 13) / 2 - 1;
1394  else if (stName == "EES")
1395  binNum = 12 + 2 * eta + (phi - 14) / 2 - 1;
1396  else if (stName == "EIL")
1397  binNum = 16 + 2 * eta + (phi - 13) / 2 - 1;
1398  else if (stName == "EIS")
1399  binNum = 24 + 2 * eta + (phi - 14) / 2 - 1;
1400  else if (stName == "EML")
1401  binNum = 28 + 2 * eta + (phi - 13) / 2 - 1;
1402  else if (stName == "EMS")
1403  binNum = 38 + 2 * eta + (phi - 14) / 2 - 1;
1404  else if (stName == "EOL")
1405  binNum = 48 + 2 * eta + (phi - 13) / 2 - 1;
1406  else if (stName == "EOS")
1407  binNum = 60 + 2 * eta + (phi - 14) / 2 - 1;
1408  else
1409  ATH_MSG_INFO("chamber " << chamber << " didn't exist in crate Ex04");
1410  if (m_do_run3Geometry) {
1411  if (region == 2) {
1412  if (binNum > 8 && binNum < 23)
1413  binNum = binNum - 2;
1414  else if (binNum > 22 && binNum < 29)
1415  binNum = binNum - 8;
1416  else if (binNum > 28)
1417  binNum = binNum - 12;
1418  }
1419  if (region == 3) {
1420  if (binNum > 22 && binNum < 28)
1421  binNum = binNum - 6;
1422  else if (binNum > 28)
1423  binNum = binNum - 10;
1424  }
1425  }
1426 
1427  return binNum - 1;
1428  }
1429  }
1430  return -1;
1431 }
1434  return roe ? roe->getNtubesperlayer() : -1;
1435 }
1438  return roe ? roe->getNLayers() : -1;
1439 }
TH2::Fill
int Fill(double, double)
Definition: rootspy.cxx:382
MdtRawDataMonAlg::cachedTubeMax
int cachedTubeMax(const Identifier &id) const
Definition: MDTRawDataUtilsRun3.cxx:1432
convertChamberName
std::string convertChamberName(int, int, int, const std::string &)
Definition: MuonDQA/MuonDQAUtils/src/MuonChamberNameConverter.cxx:10
MdtReadoutElement.h
MdtRawDataMonAlg::m_detMgr
const MuonGM::MuonDetectorManager * m_detMgr
Definition: MdtRawDataMonAlg.h:195
MuonGM::MdtReadoutElement::getNLayers
int getNLayers() const
Returns the number of tube layers inside the multilayer.
MdtRawDataMonAlg::binMdtOccVsLB_Crate
virtual StatusCode binMdtOccVsLB_Crate(TH2 *&h, int region, int crate)
Definition: MDTRawDataUtilsRun3.cxx:860
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
MdtRawDataMonAlg::mdtchamberId
void mdtchamberId()
Definition: MDTRawDataUtilsRun3.cxx:384
calibdata.chamber
chamber
Definition: calibdata.py:32
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
MdtRawDataMonAlg::setIsATLASReady
void setIsATLASReady()
Definition: MDTRawDataUtilsRun3.cxx:470
MdtRawDataMonAlg::get_bin_for_LB_hist
int get_bin_for_LB_hist(int region, int layer, int phi, int eta, bool isBIM) const
Definition: MDTRawDataUtilsRun3.cxx:498
MdtRawDataMonAlg::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) const
Definition: MDTRawDataUtilsRun3.cxx:1158
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
MdtRawDataMonAlg::ChamberTubeNumberCorrection
static void ChamberTubeNumberCorrection(int &tubeNum, std::string_view hardware_name, int tubePos, int numLayers)
Definition: MDTRawDataUtilsRun3.cxx:267
MuonIdHelper::stationName
int stationName(const Identifier &id) const
Definition: MuonIdHelper.cxx:804
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MdtRawDataMonAlg.h
MuonChamberNameConverter.h
MdtRawDataMonAlg::binMdtRegional
virtual StatusCode binMdtRegional(TH2 *, std::string_view xAxis)
Definition: MDTRawDataUtilsRun3.cxx:79
MdtRawDataMonAlg::GetTubeMax
int GetTubeMax(const Identifier &digcoll_id, std::string_view hardware_name)
Definition: MDTRawDataUtilsRun3.cxx:423
dqt_zlumi_alleff_HIST.A
A
Definition: dqt_zlumi_alleff_HIST.py:110
tubeMax
double tubeMax
Definition: MDT_ResponseTest.cxx:31
skel.l2
l2
Definition: skel.GENtoEVGEN.py:426
TH1F_LW
Definition: TH1F_LW.h:23
AthMonitorAlgorithm::m_DQFilterTools
ToolHandleArray< IDQFilterTool > m_DQFilterTools
Array of Data Quality filter tools.
Definition: AthMonitorAlgorithm.h:341
MdtRawDataMonAlg::m_chambersIdHash
std::vector< IdentifierHash > m_chambersIdHash
Definition: MdtRawDataMonAlg.h:154
MdtRawDataMonAlg::getChamber
StatusCode getChamber(const IdentifierHash &id, MDTChamber *&chamber) const
Definition: MDTRawDataUtilsRun3.cxx:490
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
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
MdtIdHelper
Definition: MdtIdHelper.h:61
MdtRawDataMonAlg::m_atlas_ready
bool m_atlas_ready
Definition: MdtRawDataMonAlg.h:189
MdtRawDataMonAlg::m_hist_hash_list
std::vector< std::unique_ptr< MDTChamber > > m_hist_hash_list
Definition: MdtRawDataMonAlg.h:165
TH2
Definition: rootspy.cxx:373
MdtRawDataMonAlg::cachedTubeLayerMax
int cachedTubeLayerMax(const Identifier &id) const
Definition: MDTRawDataUtilsRun3.cxx:1436
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:814
MdtRawDataMonAlg::binMdtGlobal
virtual StatusCode binMdtGlobal(TH2 *, char ecap)
Definition: MDTRawDataUtilsRun3.cxx:28
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
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
MdtRawDataMonAlg::AinB
static bool AinB(int A, std::vector< int > &B)
Definition: MDTRawDataUtilsRun3.cxx:454
MdtRawDataMonAlg::m_chambersId
std::vector< Identifier > m_chambersId
Definition: MdtRawDataMonAlg.h:153
MdtRawDataMonAlg::mezzmdt
int mezzmdt(const Identifier &id) const
Definition: MDTRawDataUtilsRun3.cxx:411
MdtRawDataMonAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtRawDataMonAlg.h:110
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
MdtRawDataMonAlg::CorrectTubeMax
static void CorrectTubeMax(const std::string &hardware_name, int &numTubes)
Definition: MDTRawDataUtilsRun3.cxx:286
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:37
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:53
MdtRawDataMonAlg::CorrectLayerMax
static void CorrectLayerMax(const std::string &hardware_name, int &numLayers)
Definition: MDTRawDataUtilsRun3.cxx:291
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MdtRawDataMonAlg::m_do_run3Geometry
Gaudi::Property< bool > m_do_run3Geometry
Definition: MdtRawDataMonAlg.h:180
skel.l1
l1
Definition: skel.GENtoEVGEN.py:425
MdtIdHelper::get_module_hash
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override
Definition: MdtIdHelper.cxx:318
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
MdtRawDataMonAlg::m_masked_tubes
std::unique_ptr< MDTNoisyTubes > m_masked_tubes
Definition: MdtRawDataMonAlg.h:108
MdtRawDataMonAlg::binMdtGlobal_byLayer
virtual StatusCode binMdtGlobal_byLayer(TH2 *, TH2 *, TH2 *)
Definition: MDTRawDataUtilsRun3.cxx:142
MdtRawDataMonAlg::fillMDTMaskedTubes
virtual StatusCode fillMDTMaskedTubes(IdentifierHash, const std::string &, TH1F_LW *&h)
Definition: MDTRawDataUtilsRun3.cxx:357
IdContext
class IdContext
Definition: IdContext.h:34
MdtRawDataMonAlg::binMdtOccVsLB
virtual StatusCode binMdtOccVsLB(TH2 *&h, int region, int layer)
Definition: MDTRawDataUtilsRun3.cxx:596
MdtRawDataMonAlg::getChamberName
std::string getChamberName(const Muon::MdtPrepData *) const
Definition: MDTRawDataUtilsRun3.cxx:479