ATLAS Offline Software
MdtRawDataMonAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Package : MdtRawDataMonAlg
7 // Authors: N. Benekos(Illinois)
8 // A. Cortes (Illinois)
9 // G. Dedes (MPI)
10 // Orin Harris (University of Washington)
11 // Justin Griffiths (University of Washington)
12 // M. Biglietti (INFN - Roma Tre)
13 // Oct. 2007
14 //
15 // DESCRIPTION:
16 // Subject: MDT-->Offline Muon Data Quality
18 
19 #include "MdtRawDataMonAlg.h"
20 
22 #include "GaudiKernel/MsgStream.h"
24 #include "MdtHistCoder.h"
35 #include "TrkTrack/Track.h"
37 #include "xAODMuon/Muon.h"
41 
42 // root includes
43 #include <TH2F.h>
44 
45 #include <array>
46 #include <cmath>
47 #include <memory>
48 #include <sstream>
49 
50 namespace {
51  // the tube number of a tube in a tubeLayer in encoded in the GeoSerialIdentifier (modulo maxNTubesPerLayer)
52  constexpr unsigned int maxNTubesPerLayer = MdtIdHelper::maxNTubesPerLayer;
53 } // namespace
54 
56  std::vector<float> mdt_tube_x_barrel;
57  std::vector<float> mdt_tube_y_barrel;
58  std::vector<float> mdt_tube_z_barrel;
59  std::vector<float> mdt_tube_perp_barrel;
60 
61  std::vector<float> mdt_tube_x_ovl;
62  std::vector<float> mdt_tube_y_ovl;
63  std::vector<float> mdt_tube_z_ovl;
64  std::vector<float> mdt_tube_perp_ovl;
65 
66  std::vector<float> mdt_tube_x_endcap;
67  std::vector<float> mdt_tube_y_endcap;
68  std::vector<float> mdt_tube_z_endcap;
69  std::vector<float> mdt_tube_perp_endcap;
70 
71  std::vector<float> adc_mon_nosel;
72  std::vector<float> tdc_mon_nosel;
73  std::vector<float> tdc_mon;
74  std::vector<float> adc_mon;
75  std::vector<int> noiseBurst;
76 
77  std::vector<float> tdc_mon_noiseBurst;
78  std::vector<float> adc_mon_noiseBurst;
79  std::vector<float> adc_mon_noiseBurst_notNoisy;
80  std::vector<float> tdc_mon_noiseBurst_adcCut;
81 
82  std::vector<float> tdc_mon_adcCut;
83 };
84 
86  std::vector<int> sector;
87  std::vector<int> stationEta;
88  std::vector<float> adc_mon;
89  std::vector<float> tdc_mon;
90  std::vector<float> tdc_mon_nb2;
91  std::vector<float> adc_mon_nb2;
92  std::vector<float> tdc_mon_nb1;
93  std::vector<float> adc_mon_nb1;
94  std::vector<float> adc_mon_adccut;
95  std::vector<float> tdc_mon_adccut;
96  std::vector<int> x_mon;
97  std::vector<int> y_mon;
98  std::vector<int> x_mon_noise;
99  std::vector<int> y_mon_noise;
100  std::vector<float> tdc_mon_nb3;
101  std::vector<int> x_bin_perML;
102  std::vector<int> y_bin_perML;
103  std::vector<int> bin_byLayer_x;
104  std::vector<int> bin_byLayer_y;
105  std::vector<float> tdc_mon_rpc;
106  std::vector<float> tdc_mon_tgc;
107  std::vector<int> biny_vslb;
108  std::vector<int> biny_vslb_bycrate;
109  std::vector<int> biny_vslb_bycrate_bis_bee;
110  std::vector<int> biny_vslb_bycrate_ontrack;
112 };
113 
115  std::vector<float> adc_segs_mon;
116  std::vector<float> tdc_segs_mon;
117  std::vector<int> x_segs_mon;
118  std::vector<int> y_segs_mon;
119 };
121 // *********************************************************************
122 // Public Methods
123 // *********************************************************************
124 
125 MdtRawDataMonAlg::MdtRawDataMonAlg(const std::string& name, ISvcLocator* pSvcLocator) : AthMonitorAlgorithm(name, pSvcLocator) {}
126 
128 /*---------------------------------------------------------*/
130 /*---------------------------------------------------------*/
131 {
132  // init message stream
133  ATH_MSG_DEBUG("initialize MdtRawDataMonAlg");
134 
135  ATH_MSG_DEBUG("******************");
136  ATH_MSG_DEBUG("doMdtESD: " << m_doMdtESD);
137  ATH_MSG_DEBUG("******************");
138 
139  // MuonDetectorManager from the conditions store
142 
143  ATH_CHECK(m_idHelperSvc.retrieve());
144 
145  if (m_maskNoisyTubes)
146  m_masked_tubes = std::make_unique<MDTNoisyTubes>();
147  else
148  m_masked_tubes = std::make_unique<MDTNoisyTubes>(false);
149  mdtchamberId();
150 
151  ATH_CHECK(m_l1RoiKey.initialize(SG::AllowEmpty));
152  ATH_CHECK(m_muonKey.initialize());
153  ATH_CHECK(m_segm_type.initialize());
154  ATH_CHECK(m_key_mdt.initialize());
155  ATH_CHECK(m_key_rpc.initialize());
158  m_BMGid = m_idHelperSvc->mdtIdHelper().stationNameIndex("BMG");
159  if (m_BMGid != -1) {
160  ATH_MSG_DEBUG("Processing configuration for layouts with BMG chambers.");
161  m_BMGpresent = true;
162  // MuonDetectorManager from the Detector Store
163  const MuonGM::MuonDetectorManager* MuonDetMgrDS{nullptr};
164  ATH_CHECK(detStore()->retrieve(MuonDetMgrDS));
165 
166  for (int phi = 6; phi < 8; phi++) { // phi sectors
167  for (int eta = 1; eta < 4; eta++) { // eta sectors
168  for (int side = -1; side < 2; side += 2) { // side
169  if (!MuonDetMgrDS->getMuonStation("BMG", side * eta, phi)) continue;
170  for (int roe = 1; roe <= (MuonDetMgrDS->getMuonStation("BMG", side * eta, phi))->nMuonReadoutElements();
171  roe++) { // iterate on readout elemets
172  const MuonGM::MdtReadoutElement* mdtRE = dynamic_cast<const MuonGM::MdtReadoutElement*>(
173  (MuonDetMgrDS->getMuonStation("BMG", side * eta, phi))->getMuonReadoutElement(roe)); // has to be an MDT
174  if (mdtRE) initDeadChannels(mdtRE);
175  }
176  }
177  }
178  }
179  }
180 
181  /* It seems as if a bunch of histograms are created below on the heap
182  * Then these are filled in the binMdtFooBar methods
183  * Later these are passed onto relevant methods of MDTChamber where internals are filled
184  * The original histograms are transient and not needed past initialize here
185  * The logic is a little too convoluted but left as is
186  */
187  unsigned int counter{0};
188  std::string s{""}, xAxis{""};
189 
190  // Create Inner/Middle/Outer/Extra histograms per BA/BC/EA/EC
191  std::vector<std::string> ecap{"BA", "BC", "EA", "EC"};
192  std::vector<std::string> layer{"Inner", "Middle", "Outer", "Extra"};
193  std::vector<std::unique_ptr<TH2F>> mdtHitsPerMultiLayerLumi;
194  mdtHitsPerMultiLayerLumi.reserve(ecap.size() * layer.size());
195 
196  for (const auto& iecap : ecap) {
197  for (const auto& ilayer : layer) {
198  s = "NumberOfHitsIn" + iecap + ilayer + "PerMultiLayer_ADCCut";
199  mdtHitsPerMultiLayerLumi.push_back(std::make_unique<TH2F>(s.c_str(), s.c_str(), 1, 0, 1, 1, 0, 1));
200  xAxis = iecap.substr(0, 1) + ilayer.substr(0, 1) + iecap.substr(1, 1);
201  ATH_CHECK(binMdtRegional(mdtHitsPerMultiLayerLumi[counter].get(), xAxis));
202  counter++;
203  } // end of iecap
204  } // end of ilayer
205  counter = 0;
206 
207  // Create Barrel/EndCap histrograms here
208  std::vector<std::string> mdtHitsBE{"Barrel", "EndCap"};
209  std::vector<std::unique_ptr<TH2F>> mdtHitsPerChamberIMOLumi;
210  mdtHitsPerChamberIMOLumi.reserve(mdtHitsBE.size());
211 
212  for (const auto& imdt : mdtHitsBE) {
213  s = "NumberOfHits" + imdt;
214  mdtHitsPerChamberIMOLumi.push_back(std::make_unique<TH2F>(s.c_str(), s.c_str(), 1, 0, 1, 1, 0, 1));
215  ATH_CHECK(binMdtGlobal(mdtHitsPerChamberIMOLumi[counter].get(), imdt.at(0)));
216  counter++;
217  } // end of imdt
218  counter = 0;
219 
220  // Create Inner/Middle/Outer histograms here
221  std::vector<std::unique_ptr<TH2F>> mdtHitsPerMLByLayer;
222  mdtHitsPerMLByLayer.reserve(layer.size() - 1);
223 
224  for (const auto& ilayer : layer) {
225  if (ilayer == "Extra") continue;
226  s = "NumberOfHitsInMDT" + ilayer + "_ADCCut";
227  mdtHitsPerMLByLayer.push_back(std::make_unique<TH2F>(s.c_str(), s.c_str(), 1, 0, 1, 1, 0, 1));
228  } // end of ilayer
229  ATH_CHECK(binMdtGlobal_byLayer(mdtHitsPerMLByLayer[0].get(), mdtHitsPerMLByLayer[1].get(), mdtHitsPerMLByLayer[2].get()));
230 
231  for (std::vector<Identifier>::const_iterator itr = m_chambersId.begin(); itr != m_chambersId.end(); ++itr, ++counter) {
232  std::string hardware_name =
233  convertChamberName(m_idHelperSvc->mdtIdHelper().stationName(*itr), m_idHelperSvc->mdtIdHelper().stationEta(*itr),
234  m_idHelperSvc->mdtIdHelper().stationPhi(*itr), "MDT");
235  // Skip Chambers That Do NOT Exist
236  if (hardware_name == "BML6A13" || hardware_name == "BML6C13") continue;
237  std::unique_ptr<MDTChamber>& chamber = m_hist_hash_list[m_chambersIdHash.at(counter)];
238  chamber = std::make_unique<MDTChamber>(hardware_name);
239 
240  chamber->SetMDTHitsPerChamber_IMO_Bin(mdtHitsPerChamberIMOLumi[chamber->GetBarrelEndcapEnum()].get());
241  chamber->SetMDTHitsPerML_byLayer_Bins(
242  mdtHitsPerMultiLayerLumi[chamber->GetRegionEnum() * layer.size() + chamber->GetLayerEnum()].get(),
243  mdtHitsPerMLByLayer[(chamber->GetLayerEnum() < 3 ? chamber->GetLayerEnum() : 0)].get());
244 
245  m_tubesperchamber_map[hardware_name] = GetTubeMax(*itr, hardware_name); // total number of tubes in chamber
246  }
247 
248  ATH_MSG_DEBUG(" end of initialize ");
250 }
251 
252 /*----------------------------------------------------------------------------------*/
253 StatusCode MdtRawDataMonAlg::fillHistograms(const EventContext& ctx) const
254 /*----------------------------------------------------------------------------------*/
255 {
256  int lumiblock = -1;
257  SG::ReadHandle<xAOD::EventInfo> evt(m_eventInfo, ctx);
258  lumiblock = evt->lumiBlock();
259 
260  ATH_MSG_DEBUG("MdtRawDataMonAlg::MDT RawData Monitoring Histograms being filled");
261 
262  // Making an histo to store the Run3 geo flag
263  auto run3geo = Monitored::Scalar<int>("run3geo", m_do_run3Geometry);
264  auto firstEvent = Monitored::Scalar<int>("firstEvent", (int)(m_firstEvent));
265  fill("MdtMonitor", run3geo, firstEvent);
266  m_firstEvent = 0;
267 
268  // Retrieve the LVL1 Muon RoIs:
269  bool trig_BARREL = false;
270  bool trig_ENDCAP = false;
271  if (!m_l1RoiKey.empty()) {
272  SG::ReadHandle<xAOD::MuonRoIContainer> muonRoIs(m_l1RoiKey, ctx);
273  if (!muonRoIs.isValid()) { ATH_MSG_ERROR("evtStore() does not contain muon L1 ROI Collection with name " << m_l1RoiKey); }
274  // DEV still needed ? does not compile
275  if (muonRoIs.isPresent() && muonRoIs.isValid()) {
276  ATH_MSG_VERBOSE("Retrieved LVL1MuonRoIs object with key: " << m_l1RoiKey.key());
277  trig_BARREL = std::any_of(muonRoIs->begin(), muonRoIs->end(),
278  [](const auto& i) { return i->getSource() == xAOD::MuonRoI::RoISource::Barrel; });
279  trig_ENDCAP = std::any_of(muonRoIs->begin(), muonRoIs->end(),
280  [](const auto& i) { return i->getSource() == xAOD::MuonRoI::RoISource::Endcap; });
281  }
282  }
283 
284  // declare MDT stuff
285  SG::ReadHandle<Muon::MdtPrepDataContainer> mdt_container(m_key_mdt, ctx);
286  if (!mdt_container.isValid()) {
287  ATH_MSG_ERROR("evtStore() does not contain mdt prd Collection with name " << m_key_mdt);
288  return StatusCode::FAILURE;
289  }
290 
291  ATH_MSG_DEBUG("****** mdtContainer->size() : " << mdt_container->size());
292 
293  int nColl = 0; // Number of MDT chambers with hits
294  int nColl_ADCCut = 0; // Number of MDT chambers with hits above ADC cut
295  int nPrd = 0; // Total number of MDT prd digits
296  int nPrdcut = 0; // Total number of MDT prd digits with a cut on ADC>50.
297 
298  // declare RPC stuff
299  SG::ReadHandle<Muon::RpcPrepDataContainer> rpc_container(m_key_rpc, ctx);
300  if (!rpc_container.isValid()) {
301  ATH_MSG_ERROR("evtStore() does not contain rpc prd Collection with name " << m_key_rpc);
302  return StatusCode::FAILURE;
303  }
304 
305  ATH_MSG_DEBUG("****** rpc->size() : " << rpc_container->size());
306 
308 
310  float Nhitsrpc = 0;
311  for (containerIt = rpc_container->begin(); containerIt != rpc_container->end(); ++containerIt) {
312  for (Muon::RpcPrepDataCollection::const_iterator rpcPrd = (*containerIt)->begin(); rpcPrd != (*containerIt)->end(); ++rpcPrd) {
313  ++Nhitsrpc;
314  }
315  }
316  float Nhitsmdt = 0;
317  bool isNoiseBurstCandidate = false;
319  for (MdtcontainerIt = mdt_container->begin(); MdtcontainerIt != mdt_container->end(); ++MdtcontainerIt) {
320  for (Muon::MdtPrepDataCollection::const_iterator mdtCollection = (*MdtcontainerIt)->begin();
321  mdtCollection != (*MdtcontainerIt)->end(); ++mdtCollection) {
322  ++Nhitsmdt;
323  }
324  }
325 
326  if (Nhitsmdt > m_HighOccThreshold) isNoiseBurstCandidate = true;
327  std::string type = "MDT";
328  std::string hardware_name;
329 
330  std::map<std::string, int> evnt_hitsperchamber_map;
331  std::set<std::string> chambers_from_tracks;
332 
333  if (m_doMdtESD == true) {
334  // DEV this shouls be done in some other way, in AthenaMonManager there is
335  // Gaudi::Property<std::string> m_environmentStr {this,"Environment","user"}; ///< Environment string pulled from the job option
336  // and converted to enum
337  // commented out for the time being
338  // if(m_environment == AthenaMonManager::tier0 || m_environment == AthenaMonManager::tier0ESD || m_environment ==
339  // AthenaMonManager::online) {
340  if (true) { // DEV to be updated
341 
342  SG::ReadHandle<xAOD::TrackParticleContainer> muons(m_muon_type, ctx);
343 
344  // ATH_CHECK(muons.isValid());
345 
346  for (const auto* const mu : *muons) {
347  // add quality selection here
348  if (mu) {
349  const Trk::Track* trk = mu->track();
350  // this work only if tp are available
351  if (!trk) continue;
352 
353  uint8_t ntri_eta = 0;
354  uint8_t n_phi = 0;
355  mu->summaryValue(ntri_eta, xAOD::numberOfTriggerEtaLayers);
356  mu->summaryValue(n_phi, xAOD::numberOfPhiLayers);
357  if (ntri_eta + n_phi == 0) continue;
358 
359  for (const Trk::MeasurementBase* hit : *trk->measurementsOnTrack()) {
360  const Trk::RIO_OnTrack* rot_from_track = dynamic_cast<const Trk::RIO_OnTrack*>(hit);
361  if (!rot_from_track) continue;
362  Identifier rotId = rot_from_track->identify();
363  if (!m_idHelperSvc->isMdt(rotId)) continue;
364  IdentifierHash mdt_idHash;
365  MDTChamber* mdt_chamber = nullptr;
366  m_idHelperSvc->mdtIdHelper().get_module_hash(rotId, mdt_idHash);
367  ATH_CHECK(getChamber(mdt_idHash, mdt_chamber));
368  std::string mdt_chambername = mdt_chamber->getName();
369  chambers_from_tracks.insert(mdt_chambername);
370  }
371  }
372  }
373 
374  MDTOverviewHistogramStruct overviewPlots;
375  auto summaryPlots = std::make_unique<std::array<MDTSummaryHistogramStruct, 4096>>();
376  // loop in MdtPrepDataContainer
377  std::vector<std::string> v_hit_in_chamber_allphi;
378  std::map<std::string, std::vector<std::string>> v_hit_in_chamber;
379  for (Muon::MdtPrepDataContainer::const_iterator containerIt = mdt_container->begin(); containerIt != mdt_container->end();
380  ++containerIt) {
381  if (containerIt == mdt_container->end() || containerIt->empty()) continue; // check if there are counts
382  nColl++;
383 
384  bool isHit_above_ADCCut = false;
385  // loop over hits
386  for (const auto* mdtCollection : **containerIt) {
387  nPrd++;
388 
389  float adc = mdtCollection->adc();
390  hardware_name = getChamberName(mdtCollection);
391 
392  if (hardware_name.substr(0, 3) == "BMG") adc /= m_adcScale;
393  if (adc > m_ADCCut) {
394  nPrdcut++;
395  isHit_above_ADCCut = true;
396  if (m_do_mdtchamberstatphislice) {
397  std::string phi = hardware_name.substr(hardware_name.length() - 2);
398  v_hit_in_chamber[phi].push_back(hardware_name);
399  }
400  v_hit_in_chamber_allphi.push_back(hardware_name);
401  }
402  fillMDTOverviewVects(mdtCollection, isNoiseBurstCandidate, overviewPlots);
403  //=======================================================================
404  //=======================================================================
405  //=======================================================================
406  ATH_CHECK(fillMDTSummaryVects(mdtCollection, chambers_from_tracks, isNoiseBurstCandidate, trig_BARREL, trig_ENDCAP,
407  summaryPlots.get()));
408  //=======================================================================
409  //=======================================================================
410  //=======================================================================
411  if (m_doChamberHists) { ATH_CHECK(fillMDTHistograms(mdtCollection)); }
412 
413  std::map<std::string, int>::iterator iter_hitsperchamber = evnt_hitsperchamber_map.find(hardware_name);
414  if (iter_hitsperchamber == evnt_hitsperchamber_map.end()) {
415  evnt_hitsperchamber_map.insert(make_pair(hardware_name, 1));
416  } else {
417  iter_hitsperchamber->second += 1;
418  }
419 
420  } // for loop over hits mdtcollection
421  nColl_ADCCut += isHit_above_ADCCut;
422  } // loop in MdtPrepDataContainer
423  if (m_do_mdtchamberstatphislice) {
424  for (const auto& phiitem : v_hit_in_chamber) {
425  auto hit_in_chamber = Monitored::Collection("hits_phi_" + phiitem.first, phiitem.second);
426  fill("MdtMonitor", hit_in_chamber);
427  }
428  }
429  auto hit_in_chamber_allphi = Monitored::Collection("hits_allphi", v_hit_in_chamber_allphi);
430  fill("MdtMonitor", hit_in_chamber_allphi);
431 
432  fillMDTOverviewHistograms(overviewPlots);
433  ATH_CHECK(fillMDTSummaryHistograms(summaryPlots.get(), lumiblock));
434 
435  int nHighOccChambers = 0;
436  for (const auto& iterstat : evnt_hitsperchamber_map) {
437  const auto iter_tubesperchamber = m_tubesperchamber_map.find(iterstat.first);
438  if (ATH_UNLIKELY(iter_tubesperchamber == m_tubesperchamber_map.end())) { // indicates software error
439  ATH_MSG_ERROR("Unable to find chamber " << iterstat.first);
440  continue;
441  }
442  float nTubes = iter_tubesperchamber->second;
443  float hits = iterstat.second;
444  float occ = hits / nTubes;
445  if (occ > 0.1) nHighOccChambers++;
446  }
447 
448  auto nHighOccChambers_mon = Monitored::Scalar<float>("nHighOccChambers_mon", nHighOccChambers);
449 
450  auto nPrd_mon = Monitored::Scalar<int>("nPrd_mon", nPrd);
451  auto nPrdcut_mon = Monitored::Scalar<int>("nPrdcut_mon", nPrdcut);
452  auto Nhitsrpc_mon = Monitored::Scalar<int>("Nhitsrpc_mon", Nhitsrpc);
453  auto nColl_mon = Monitored::Scalar<int>("nColl_mon", nColl);
454  auto nColl_ADCCut_mon = Monitored::Scalar<int>("nColl_ADCCut_mon", nColl_ADCCut);
455 
456  fill("MdtMonitor", nHighOccChambers_mon, nPrd_mon, Nhitsrpc_mon, nPrdcut_mon, nColl_mon, nColl_ADCCut_mon);
457 
458  // if (m_mdtglobalhitstime) m_mdtglobalhitstime->Fill(m_time - m_firstTime);
459 
460  } // m_environment == AthenaMonManager::tier0 || m_environment == AthenaMonManager::tier0ESD
461  } // m_doMdtESD==true
462 
463  for (const auto& key : m_segm_type) {
465  if (!segms.isValid()) {
466  ATH_MSG_ERROR("evtStore() does not contain mdt segms Collection with name " << key);
467  return StatusCode::FAILURE;
468  }
469 
470  MDTSegmentHistogramStruct segsPlots[4][4][16]; // [region][layer][phi]
471 
472  ATH_CHECK(handleEvent_effCalc_fillVects(segms.cptr(), segsPlots));
473 
474  ATH_CHECK(fillMDTSegmentHistograms(segsPlots));
475  }
476  return StatusCode::SUCCESS;
477 }
478 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
479 
480 void MdtRawDataMonAlg::fillMDTOverviewVects(const Muon::MdtPrepData* mdtCollection, bool& isNoiseBurstCandidate,
481  MDTOverviewHistogramStruct& vects) const {
482  Identifier digcoll_id = mdtCollection->identify();
483 
484  std::string hardware_name = getChamberName(mdtCollection);
485  bool isNoisy = m_masked_tubes->isNoisy(mdtCollection);
486 
487  // MuonDetectorManager from the conditions store
489  const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr();
490  if (!MuonDetMgr) {
491  ATH_MSG_ERROR("Null pointer to the read MuonDetectorManager conditions object");
492  return;
493  }
494 
495  const MuonGM::MdtReadoutElement* pReadoutElementMDT = MuonDetMgr->getMdtReadoutElement(digcoll_id);
496  const Amg::Vector3D mdtgPos = pReadoutElementMDT->tubePos(digcoll_id); // global position of the wire
497  float mdt_tube_eta = mdtgPos.eta();
498 
499  float tdc = mdtCollection->tdc() * 25.0 / 32.0;
500  // Note: the BMG is digitized with 200ps which is not same as other MDT chambers with 25/32=781.25ps
501  if (hardware_name.substr(0, 3) == "BMG") tdc = mdtCollection->tdc() * 0.2;
502 
503  float adc = mdtCollection->adc();
504  if (hardware_name.substr(0, 3) == "BMG") adc /= m_adcScale;
505 
506  if (adc > m_ADCCut) {
507  // barrel
508  if (std::abs(mdt_tube_eta) > 0. && std::abs(mdt_tube_eta) < 0.9) {
509  vects.mdt_tube_x_barrel.push_back(mdtgPos.x());
510  vects.mdt_tube_y_barrel.push_back(mdtgPos.y());
511  vects.mdt_tube_z_barrel.push_back(mdtgPos.z());
512  vects.mdt_tube_perp_barrel.push_back(mdtgPos.perp());
513  }
514  // OverLap -->Fill MDT Global RZ and YX
515  if (std::abs(mdt_tube_eta) > 0.9 && std::abs(mdt_tube_eta) < 1.2) {
516  vects.mdt_tube_x_ovl.push_back(mdtgPos.x());
517  vects.mdt_tube_y_ovl.push_back(mdtgPos.y());
518  vects.mdt_tube_z_ovl.push_back(mdtgPos.z());
519  vects.mdt_tube_perp_ovl.push_back(mdtgPos.perp());
520  }
521  // EndCap -->Fill MDT Global RZ and YX
522  if (std::abs(mdt_tube_eta) > 1.2 && std::abs(mdt_tube_eta) < 2.7) {
523  vects.mdt_tube_x_endcap.push_back(mdtgPos.x());
524  vects.mdt_tube_y_endcap.push_back(mdtgPos.y());
525  vects.mdt_tube_z_endcap.push_back(mdtgPos.z());
526  vects.mdt_tube_perp_endcap.push_back(mdtgPos.perp());
527  }
528  }
529 
530  vects.adc_mon_nosel.push_back(adc);
531  vects.tdc_mon_nosel.push_back(tdc);
532  if (!isNoisy && adc > 0) {
533  vects.tdc_mon.push_back(tdc);
534  vects.adc_mon.push_back(adc);
535  }
536 
537  vects.noiseBurst.push_back((int)isNoiseBurstCandidate);
538  if (isNoiseBurstCandidate) {
539  vects.tdc_mon_noiseBurst.push_back(tdc);
540  vects.adc_mon_noiseBurst.push_back(adc);
541  if (!isNoisy) { vects.adc_mon_noiseBurst_notNoisy.push_back(adc); }
542  if (adc > m_ADCCut) { vects.tdc_mon_noiseBurst_adcCut.push_back(tdc); }
543  }
544 
545  if (adc > m_ADCCut) { vects.tdc_mon_adcCut.push_back(tdc); }
546 }
547 
549  auto mdt_tube_x_barrel = Monitored::Collection("mdt_tube_x_barrel", vects.mdt_tube_x_barrel);
550  auto mdt_tube_y_barrel = Monitored::Collection("mdt_tube_y_barrel", vects.mdt_tube_y_barrel);
551  auto mdt_tube_z_barrel = Monitored::Collection("mdt_tube_z_barrel", vects.mdt_tube_z_barrel);
552  auto mdt_tube_perp_barrel = Monitored::Collection("mdt_tube_perp_barrel", vects.mdt_tube_perp_barrel);
553  fill("MdtMonitor", mdt_tube_z_barrel, mdt_tube_perp_barrel, mdt_tube_x_barrel, mdt_tube_y_barrel);
554 
555  auto mdt_tube_x_ovl = Monitored::Collection("mdt_tube_x_ovl", vects.mdt_tube_x_ovl);
556  auto mdt_tube_y_ovl = Monitored::Collection("mdt_tube_y_ovl", vects.mdt_tube_y_ovl);
557  auto mdt_tube_z_ovl = Monitored::Collection("mdt_tube_z_ovl", vects.mdt_tube_z_ovl);
558  auto mdt_tube_perp_ovl = Monitored::Collection("mdt_tube_perp_ovl", vects.mdt_tube_perp_ovl);
559  fill("MdtMonitor", mdt_tube_z_ovl, mdt_tube_perp_ovl, mdt_tube_x_ovl, mdt_tube_y_ovl);
560 
561  auto mdt_tube_x_endcap = Monitored::Collection("mdt_tube_x_endcap", vects.mdt_tube_x_endcap);
562  auto mdt_tube_y_endcap = Monitored::Collection("mdt_tube_y_endcap", vects.mdt_tube_y_endcap);
563  auto mdt_tube_z_endcap = Monitored::Collection("mdt_tube_z_endcap", vects.mdt_tube_z_endcap);
564  auto mdt_tube_perp_endcap = Monitored::Collection("mdt_tube_perp_endcap", vects.mdt_tube_perp_endcap);
565  fill("MdtMonitor", mdt_tube_z_endcap, mdt_tube_perp_endcap, mdt_tube_x_endcap, mdt_tube_y_endcap);
566 
567  auto adc_mon_nosel = Monitored::Collection("adc_mon_nosel", vects.adc_mon_nosel);
568  auto tdc_mon_nosel = Monitored::Collection("tdc_mon_nosel", vects.tdc_mon_nosel);
569  auto noiseBurst = Monitored::Collection("noiseBurst", vects.noiseBurst);
570  fill("MdtMonitor", adc_mon_nosel, tdc_mon_nosel, noiseBurst);
571 
572  auto tdc_mon = Monitored::Collection("tdc_mon", vects.tdc_mon);
573  auto adc_mon = Monitored::Collection("adc_mon", vects.adc_mon);
574  fill("MdtMonitor", tdc_mon, adc_mon);
575 
576  auto adc_mon_noiseBurst_notNoisy = Monitored::Collection("adc_mon_noiseBurst_notNoisy", vects.adc_mon_noiseBurst_notNoisy);
577  fill("MdtMonitor", adc_mon_noiseBurst_notNoisy);
578 
579  auto tdc_mon_noiseBurst_adcCut = Monitored::Collection("tdc_mon_noiseBurst_adcCut", vects.tdc_mon_noiseBurst_adcCut);
580  fill("MdtMonitor", tdc_mon_noiseBurst_adcCut);
581 
582  auto tdc_mon_adcCut = Monitored::Collection("tdc_mon_adcCut", vects.tdc_mon_adcCut);
583  fill("MdtMonitor", tdc_mon_adcCut);
584 }
585 
586 StatusCode MdtRawDataMonAlg::fillMDTSummaryVects(const Muon::MdtPrepData* mdtCollection, const std::set<std::string>& chambers_from_tracks,
587  bool& isNoiseBurstCandidate, bool trig_barrel, bool trig_endcap,
588  std::array<MDTSummaryHistogramStruct, 4096>* vects) const {
589  StatusCode sc = StatusCode::SUCCESS;
590  Identifier digcoll_id = (mdtCollection)->identify();
591  IdentifierHash digcoll_idHash = (mdtCollection)->collectionHash();
592 
593  MDTChamber* chamber{nullptr};
594  ATH_CHECK(getChamber(digcoll_idHash, chamber));
595  bool isNoisy = m_masked_tubes->isNoisy(mdtCollection);
596 
597  std::string region[4] = {"BA", "BC", "EA", "EC"};
598  std::string layer[4] = {"Inner", "Middle", "Outer", "Extra"};
599  std::string crate[4] = {"01", "02", "03", "04"};
600  // std::string slayer[4]={"inner","middle","outer","extra"};
601 
602  // int ibarrel = chamber->GetBarrelEndcapEnum();
603  int iregion = chamber->GetRegionEnum();
604  int ilayer = chamber->GetLayerEnum();
605  int icrate = chamber->GetCrate();
606  //
607  int stationPhi = chamber->GetStationPhi();
608  std::string chambername = chamber->getName();
609  int thisStationEta = chamber->GetStationEta();
610 
611  int crate_region = iregion;
612  // correct readout crate info for BEE,BIS7/8
613  if (chambername.substr(0, 3) == "BEE" || (chambername.substr(0, 3) == "BIS" && (thisStationEta == 7 || thisStationEta == 8))) {
614  if (iregion == 0) crate_region = 2;
615  if (iregion == 1) crate_region = 3;
616  }
617 
618  uint16_t v = MdtHistCoder::encode(iregion, ilayer, stationPhi, crate_region, icrate - 1);
619  std::array<MDTSummaryHistogramStruct, 4096>& array = *(vects);
620  auto& thisVects = array[v];
621 
622  bool is_on_track = false;
623  for (const auto& ch : chambers_from_tracks) {
624  if (chambername == ch) is_on_track = true;
625  }
626 
627  bool isBIM = (chambername.at(2) == 'M');
628  float tdc = mdtCollection->tdc() * 25.0 / 32.0;
629  // Note: the BMG is digitized with 200ps which is not same as other MDT chambers with 25/32=781.25ps
630  if (chambername.substr(0, 3) == "BMG") tdc = mdtCollection->tdc() * 0.2;
631  float adc = mdtCollection->adc();
632  if (chambername.substr(0, 3) == "BMG") adc /= m_adcScale;
633 
634  thisVects.sector.push_back(stationPhi + iregion * 16); // here valgrind complains
635 
636  // mdtoccvslb_summaryPerSector->Fill(lumiblock, stationPhi+iregion*16 );
637  // MDTBA/Overview/Hits
638  // iregion = BA/BC/EA/EC --> 4
639  // ilayer = //inner, middle, outer, extra --> 4
640  // stationPhi --> 16 ====> 256
641  // std::string mon="MDTHits_ADCCut_"+region[iregion]+"_Mon_"+layer[ilayer]+"_Phi_"+std::to_string(stationPhi+1);;
642  // int mlayer_n = m_mdtIdHelper->multilayer(digcoll_id);
643  int mlayer_n = m_idHelperSvc->mdtIdHelper().multilayer(digcoll_id);
644 
645  if (!isNoisy && adc > 0) {
646  thisVects.adc_mon.push_back(adc);
647  thisVects.tdc_mon.push_back(tdc);
648  if (isNoiseBurstCandidate) {
649  thisVects.tdc_mon_nb2.push_back(tdc);
650  thisVects.adc_mon_nb2.push_back(adc);
651  }
652  }
653 
654  if (!isNoisy) {
655  // fill(MDT_regionGroup, adc_mon);
656  if (isNoiseBurstCandidate) {
657  thisVects.tdc_mon_nb1.push_back(tdc);
658  thisVects.adc_mon_nb1.push_back(adc);
659  }
660  }
661  if (adc > m_ADCCut && !isNoisy) {
662  thisVects.adc_mon_adccut.push_back(adc);
663  thisVects.tdc_mon_adccut.push_back(tdc);
664  int thisStationEta = chamber->GetStationEta();
665  thisVects.stationEta.push_back(thisStationEta);
666 
667  int binx = chamber->GetMDTHitsPerChamber_IMO_BinX();
668  if (iregion < 2)
669  binx = binx - 9;
670  else
671  binx = binx - 7;
672  int biny = chamber->GetMDTHitsPerChamber_IMO_BinY();
673 
674  std::string varx = " ";
675  std::string vary = " ";
676  std::string varx_noise = " ";
677  std::string vary_noise = " ";
678  if (iregion < 2) {
679  varx = "x_mon_barrel";
680  vary = "y_mon_barrel";
681  varx_noise = "x_mon_barrel_noise";
682  vary_noise = "y_mon_barrel_noise";
683  } else {
684  varx = "x_mon_endcap";
685  vary = "y_mon_endcap";
686  varx_noise = "x_mon_endcap_noise";
687  vary_noise = "y_mon_endcap_noise";
688  }
689 
690  thisVects.x_mon.push_back(binx);
691  thisVects.y_mon.push_back(biny - 1);
692  if (isNoiseBurstCandidate) {
693  thisVects.x_mon_noise.push_back(binx);
694  thisVects.y_mon_noise.push_back(biny - 1);
695  thisVects.tdc_mon_nb3.push_back(tdc);
696  }
697 
698  thisVects.x_bin_perML.push_back(chamber->GetMDTHitsPerML_Binx() - 1); // get the right bin!!!!
699  int biny_ml = 0;
700  if (mlayer_n == 1)
701  biny_ml = chamber->GetMDTHitsPerML_m1_Biny();
702  else if (mlayer_n == 2)
703  biny_ml = chamber->GetMDTHitsPerML_m2_Biny();
704  thisVects.y_bin_perML.push_back(biny_ml - 1);
705 
706  if (layer[ilayer] != "Extra") {
707  thisVects.bin_byLayer_x.push_back(chamber->GetMDTHitsPerML_byLayer_BinX() - 1);
708  thisVects.bin_byLayer_y.push_back(chamber->GetMDTHitsPerML_byLayer_BinY(mlayer_n) - 1);
709  }
710  if (trig_barrel) { thisVects.tdc_mon_rpc.push_back(tdc); }
711  if (trig_endcap) { thisVects.tdc_mon_tgc.push_back(tdc); }
712 
713  // Fill occupancy vs. Lumiblock
714  thisVects.biny_vslb.push_back(get_bin_for_LB_hist(iregion, ilayer, stationPhi, thisStationEta, isBIM));
715  if (chambername.substr(0, 3) == "BEE" || (chambername.substr(0, 3) == "BIS" && (thisStationEta == 7 || thisStationEta == 8))) {
716  thisVects.biny_vslb_bycrate_bis_bee.push_back(
717  get_bin_for_LB_crate_hist(crate_region, icrate, stationPhi + 1, thisStationEta, chambername));
718  } else {
719  thisVects.biny_vslb_bycrate.push_back(
720  get_bin_for_LB_crate_hist(crate_region, icrate, stationPhi + 1, thisStationEta, chambername));
721  }
722 
723  if (is_on_track) {
724  if (chambername.substr(0, 3) == "BEE" || (chambername.substr(0, 3) == "BIS" && (thisStationEta == 7 || thisStationEta == 8))) {
725  thisVects.biny_vslb_bycrate_bis_bee_ontrack.push_back(
726  get_bin_for_LB_crate_hist(crate_region, icrate, stationPhi + 1, thisStationEta, chambername));
727  } else {
728  thisVects.biny_vslb_bycrate_ontrack.push_back(
729  get_bin_for_LB_crate_hist(crate_region, icrate, stationPhi + 1, thisStationEta, chambername));
730  }
731  }
732  }
733 
734  return sc;
735 }
736 
737 StatusCode MdtRawDataMonAlg::fillMDTSummaryHistograms(std::array<MDTSummaryHistogramStruct, 4096>* vects, int lb) const {
738  std::string region[4] = {"BA", "BC", "EA", "EC"};
739  std::string layer[4] = {"Inner", "Middle", "Outer", "Extra"};
740  std::string crate[4] = {"01", "02", "03", "04"};
741  // std::string slayer[4]={"inner","middle","outer","extra"};
742 
743  auto lb_mon = Monitored::Scalar<int>("lb_mon", lb);
744 
745  for (int iregion = 0; iregion < 4; ++iregion) {
746  std::string MDT_regionGroup = "MDT_regionGroup" + region[iregion]; // MDTXX/Overview
747  for (int crate_region = 0; crate_region < 4; ++crate_region) {
748  std::string MDT_regionGroup_bycrate = "MDT_regionGroup_bycrate" + region[crate_region]; // MDTXX/Overview
749  for (int ilayer = 0; ilayer < 4; ++ilayer) {
750  for (int stationPhi = 0; stationPhi < 16; ++stationPhi) {
751  for (int icrate = 0; icrate < 4; ++icrate) {
752  uint16_t v = MdtHistCoder::encode(iregion, ilayer, stationPhi, crate_region, icrate);
753 
754  std::array<MDTSummaryHistogramStruct, 4096>& array = *(vects);
755  auto& thisVects = array[v];
756 
757  auto sector = Monitored::Collection("sector", thisVects.sector);
758 
759  fill("MdtMonitor", lb_mon, sector);
760 
762  "stEta_" + region[iregion] + "_" + layer[ilayer] + "_phi" + std::to_string(stationPhi + 1),
763  thisVects.stationEta);
764 
765  if (m_do_mdtChamberHits) { fill(MDT_regionGroup, stationEta); }
766 
767  auto adc_mon = Monitored::Collection("adc_mon", thisVects.adc_mon);
768  auto tdc_mon = Monitored::Collection("tdc_mon", thisVects.tdc_mon);
769 
770  auto tdc_mon_nb2 = Monitored::Collection("tdc_mon_nb2", thisVects.tdc_mon_nb2);
771  auto adc_mon_nb2 = Monitored::Collection("adc_mon_nb2", thisVects.adc_mon_nb2);
772 
773  auto tdc_mon_nb1 = Monitored::Collection("tdc_mon_nb1", thisVects.tdc_mon_nb1);
774  auto adc_mon_nb1 = Monitored::Collection("adc_mon_nb1", thisVects.adc_mon_nb1);
775 
776  auto adc_mon_adccut = Monitored::Collection("adc_mon_adccut", thisVects.adc_mon_adccut);
777 
778  auto tdc_mon_adccut = Monitored::Collection("tdc_mon_adccut", thisVects.tdc_mon_adccut);
779 
780  std::string varx = iregion < 2 ? "x_mon_barrel" : "x_mon_endcap";
781  std::string vary = iregion < 2 ? "y_mon_barrel" : "y_mon_endcap";
782  std::string varx_noise = iregion < 2 ? "x_mon_barrel_noise" : "x_mon_endcap_noise";
783  std::string vary_noise = iregion < 2 ? "y_mon_barrel_noise" : "y_mon_endcap_noise";
784 
785  auto x_mon = Monitored::Collection(varx, thisVects.x_mon);
786  auto y_mon = Monitored::Collection(vary, thisVects.y_mon);
787  auto x_mon_noise = Monitored::Collection(varx_noise, thisVects.x_mon_noise);
788  auto y_mon_noise = Monitored::Collection(vary_noise, thisVects.y_mon_noise);
789  fill("MdtMonitor", x_mon, y_mon, x_mon_noise, y_mon_noise);
790  auto tdc_mon_nb3 = Monitored::Collection("tdc_mon_nb3", thisVects.tdc_mon_nb3);
791 
792  varx = "x_mon_" + region[iregion] + "_" + layer[ilayer];
793  vary = "y_mon_" + region[iregion] + "_" + layer[ilayer];
794 
795  auto x_bin_perML = Monitored::Collection(varx, thisVects.x_bin_perML); // get the right bin!!!!
796  auto y_bin_perML = Monitored::Collection(vary, thisVects.y_bin_perML);
797 
798  if (layer[ilayer] != "Extra") {
799  varx = "x_mon_" + layer[ilayer];
800  vary = "y_mon_" + layer[ilayer];
801  auto bin_byLayer_x = Monitored::Collection(varx, thisVects.bin_byLayer_x);
802  auto bin_byLayer_y = Monitored::Collection(vary, thisVects.bin_byLayer_y);
803 
804  fill("MdtMonitor", bin_byLayer_x, bin_byLayer_y);
805  }
806 
807  auto tdc_mon_rpc = Monitored::Collection("tdc_mon_rpc", thisVects.tdc_mon_rpc);
808  auto tdc_mon_tgc = Monitored::Collection("tdc_mon_tgc", thisVects.tdc_mon_tgc);
809 
810  auto biny_name = "y_mon_bin_" + region[iregion] + "_" + layer[ilayer];
811  if (layer[ilayer] == "Extra" || layer[ilayer] == "Outer")
812  biny_name = "y_mon_bin_" + region[iregion] + "_OuterPlusExtra";
813 
814  auto biny_var = Monitored::Collection(biny_name, thisVects.biny_vslb);
815 
816  std::vector<int> sum_biny_vslb_bycrate;
817  sum_biny_vslb_bycrate.reserve(thisVects.biny_vslb_bycrate.size() + thisVects.biny_vslb_bycrate_bis_bee.size());
818  sum_biny_vslb_bycrate.insert(sum_biny_vslb_bycrate.end(), thisVects.biny_vslb_bycrate_bis_bee.begin(),
819  thisVects.biny_vslb_bycrate_bis_bee.end());
820  sum_biny_vslb_bycrate.insert(sum_biny_vslb_bycrate.end(), thisVects.biny_vslb_bycrate.begin(),
821  thisVects.biny_vslb_bycrate.end());
822 
823  auto biny_name_bycrate = "y_mon_bin_bycrate_" + region[crate_region] + "_" + crate[icrate];
824  auto biny_var_bycrate = Monitored::Collection(biny_name_bycrate, sum_biny_vslb_bycrate);
825 
826  std::vector<int> sum_biny_vslb_bycrate_ontrack;
827  sum_biny_vslb_bycrate_ontrack.reserve(thisVects.biny_vslb_bycrate_ontrack.size() +
828  thisVects.biny_vslb_bycrate_bis_bee_ontrack.size());
829  sum_biny_vslb_bycrate_ontrack.insert(sum_biny_vslb_bycrate_ontrack.end(),
830  thisVects.biny_vslb_bycrate_bis_bee_ontrack.begin(),
831  thisVects.biny_vslb_bycrate_bis_bee_ontrack.end());
832  sum_biny_vslb_bycrate_ontrack.insert(sum_biny_vslb_bycrate_ontrack.end(),
833  thisVects.biny_vslb_bycrate_ontrack.begin(),
834  thisVects.biny_vslb_bycrate_ontrack.end());
835 
836  auto biny_name_bycrate_ontrack = "y_mon_bin_bycrate_ontrack_" + region[crate_region] + "_" + crate[icrate];
837  auto biny_var_bycrate_ontrack = Monitored::Collection(biny_name_bycrate_ontrack, sum_biny_vslb_bycrate_ontrack);
838 
839  fill(MDT_regionGroup, adc_mon, tdc_mon, tdc_mon_nb2, adc_mon_nb2, tdc_mon_adccut, adc_mon_adccut, tdc_mon_adccut,
840  adc_mon_adccut, tdc_mon_nb3, x_bin_perML, y_bin_perML, tdc_mon_rpc, tdc_mon_tgc, biny_var, lb_mon, biny_var);
841 
842  fill(MDT_regionGroup_bycrate, lb_mon, biny_var_bycrate, biny_var_bycrate_ontrack);
843  }
844  }
845  }
846  }
847  }
848 
849  return StatusCode::SUCCESS;
850 }
851 
853  // fill chamber by chamber histos
854  StatusCode sc = StatusCode::SUCCESS;
855  Identifier digcoll_id = (mdtCollection)->identify();
856  IdentifierHash digcoll_idHash = (mdtCollection)->collectionHash();
857 
858  MDTChamber* chamber{nullptr};
859  ATH_CHECK(getChamber(digcoll_idHash, chamber));
860 
861  std::string hardware_name = chamber->getName();
862  //
863 
864  // //convert layer numbering from 1->4 to 1->8
865  // //check if we are in 2nd multilayer
866  // //then add 4 if large chamber, 3 if small chamber
867  int mdtlayer = m_idHelperSvc->mdtIdHelper().tubeLayer(digcoll_id);
868  if (m_idHelperSvc->mdtIdHelper().multilayer(digcoll_id) == 2) {
869  if (hardware_name.at(1) == 'I' && hardware_name.at(3) != '8')
870  mdtlayer += 4;
871  else
872  mdtlayer += 3;
873  }
874 
875  int mdttube = m_idHelperSvc->mdtIdHelper().tube(digcoll_id) + (mdtlayer - 1) * cachedTubeMax(digcoll_id);
876 
877  ChamberTubeNumberCorrection(mdttube, hardware_name, m_idHelperSvc->mdtIdHelper().tube(digcoll_id), mdtlayer - 1);
878  bool isNoisy = m_masked_tubes->isNoisy(mdtCollection);
879 
880  float tdc = mdtCollection->tdc() * 25.0 / 32.0;
881  // Note: the BMG is digitized with 200ps which is not same as other MDT chambers with 25/32=781.25ps
882  if (hardware_name.substr(0, 3) == "BMG") tdc = mdtCollection->tdc() * 0.2;
883  float adc = mdtCollection->adc();
884  if (hardware_name.substr(0, 3) == "BMG") adc /= m_adcScale;
885 
886  int iregion = chamber->GetRegionEnum();
887 
888  int mezz = mezzmdt(digcoll_id);
889 
890  std::string monPerCh = "MdtMonPerChamber";
891  if (iregion == 0) monPerCh += "BA";
892  if (iregion == 1) monPerCh += "BC";
893  if (iregion == 2) monPerCh += "EA";
894  if (iregion == 3) monPerCh += "EC";
895 
896  int mdtMultLayer = m_idHelperSvc->mdtIdHelper().multilayer(digcoll_id);
897 
898  auto tdc_perch = Monitored::Scalar<float>("tdc_perch_" + hardware_name, tdc);
899  auto adc_perch = Monitored::Scalar<float>("adc_perch_" + hardware_name, adc);
900  auto layer_perch = Monitored::Scalar<int>("layer_perch_" + hardware_name, mdtlayer);
901  auto tube_perch = Monitored::Scalar<int>("tube_perch_" + hardware_name, mdttube);
902  auto mezz_perch = Monitored::Scalar<int>("mezz_perch_" + hardware_name, mezz);
903  auto ml1_adccut = Monitored::Scalar<int>("ml1_adccut", (int)(adc > m_ADCCut && !isNoisy && mdtMultLayer == 1));
904  auto ml2_adccut = Monitored::Scalar<int>("ml2_adccut", (int)(adc > m_ADCCut && !isNoisy && mdtMultLayer == 2));
905  auto adccut_nonoise = Monitored::Scalar<int>("adccut_nonoise", (int)(adc > m_ADCCut && !isNoisy));
906  auto adccut = Monitored::Scalar<int>("adccut", (int)(adc > m_ADCCut));
907 
908  fill(monPerCh, tdc_perch, adc_perch, layer_perch, tube_perch, mezz_perch, ml1_adccut, ml2_adccut, adccut_nonoise, adccut);
909 
910  return sc;
911 }
912 
913 // Code for measuring tube efficiencies and tdc/adc based on hits along segments
914 // Strategy:
915 // First loop over hits along segments and store hits
916 // Identify the MLs affected for each segment
917 // Loop over the tubes in the affected MLs and identify tubes traversed by segment vector (these represent the denom in the efficiency calc)
918 // Find traversed tubes that also have a hit along the segment (these represent the num in the efficiency calc)
919 // Details:
920 // * To avoid double-counting hits (for tdc/adc fills) due to overlapping segments, use a set called store_ROTs
921 // * To avoid double-counting hits (for eff calc) due to overlapping segments, use a set called store_effTubes
922 // * The above 2 sets need not have the same size, because in the latter case some tubes are missed because they are slightly too
923 // far away from the segment vector -- these tubes are simply excluded from the eff calc.
924 // Additionally the latter case is complicated because for overlapping traversed tubes,
925 // we must preference the ones that are part of a segment that records a hit in those tubes
927  MDTSegmentHistogramStruct (&vects)[4][4][16]) const {
928  std::string type = "MDT";
929  const MdtIdHelper& id_helper = m_idHelperSvc->mdtIdHelper();
930  std::set<monAlg::TubeTraversedBySegment, monAlg::TubeTraversedBySegment_cmp> store_effTubes;
931  std::set<Identifier> store_ROTs;
932 
933  // MuonDetectorManager from the conditions store
934 
936  const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr();
937  if (!MuonDetMgr) {
938  ATH_MSG_ERROR("Null pointer to the read MuonDetectorManager conditions object");
939  return StatusCode::FAILURE;
940  }
941 
942  // LOOP OVER SEGMENTS
943  for (const Trk::Segment* trk_seg : *segms) {
944  const Muon::MuonSegment* segment = dynamic_cast<const Muon::MuonSegment*>(trk_seg);
945  if (!segment) {
946  ATH_MSG_DEBUG("no pointer to segment!!!");
947  break;
948  }
949  if (segment->numberOfContainedROTs() < std::max(0lu, m_nb_hits.value()) ||
950  segment->fitQuality()->chiSquared() / segment->fitQuality()->doubleNumberDoF() > m_chi2_cut) {
951  continue;
952  }
953 
954  std::vector<Identifier> ROTs_chamber;
955  std::vector<int> ROTs_tube;
956  std::vector<int> ROTs_L;
957  std::vector<int> ROTs_ML;
958  for (unsigned int irot = 0; irot < segment->numberOfContainedROTs(); irot++) {
959  const Trk::RIO_OnTrack* rot = segment->rioOnTrack(irot);
960  const Muon::MdtDriftCircleOnTrack* mrot = dynamic_cast<const Muon::MdtDriftCircleOnTrack*>(rot);
961  if (!mrot) continue;
962  Identifier tmpid = rot->identify();
963  // This information needs to be stored fully for each segment (for calculations below), so deal with these duplicates later
964  // (otherwise we may not check a traversed ML for a differently pointing overlapping segment, for example)
965 
966  IdentifierHash idHash{0};
967  MDTChamber* chamber = nullptr;
968  id_helper.get_module_hash(tmpid, idHash);
969  ATH_CHECK(getChamber(idHash, chamber));
970  const std::string& chambername = chamber->getName();
971  float adc = mrot->prepRawData()->adc();
972 
973  if (m_idHelperSvc->hasHPTDC(tmpid)) adc /= m_adcScale;
974 
975  if (store_ROTs.count(tmpid)) { continue; }
976  store_ROTs.insert(tmpid);
977 
978  double tdc = mrot->prepRawData()->tdc() * 25.0 / 32.0;
979  // Note: the BMG is digitized with 200ps which is not same as other MDT chambers with 25/32=781.25ps
980  if (m_idHelperSvc->hasHPTDC(tmpid)) tdc = mrot->prepRawData()->tdc() * 0.2;
981  int iregion = chamber->GetRegionEnum();
982  int ilayer = chamber->GetLayerEnum();
983  int statphi = chamber->GetStationPhi();
984 
985  auto& thisVects = vects[iregion][ilayer][statphi];
986  thisVects.adc_segs_mon.push_back(adc);
987 
988  if (adc > m_ADCCut) { // This is somewhat redundant because this is usual cut for segment-reconstruction, but that's OK
989 
990  thisVects.tdc_segs_mon.push_back(tdc);
991 
992  int binx = chamber->GetMDTHitsPerChamber_IMO_BinX();
993  if (iregion < 2)
994  binx = binx - 9;
995  else
996  binx = binx - 7;
997  int biny = chamber->GetMDTHitsPerChamber_IMO_BinY();
998  thisVects.x_segs_mon.push_back(binx);
999  thisVects.y_segs_mon.push_back(biny - 1);
1000 
1001  } // adc cut
1002 
1003  int mdtMultLayer = m_idHelperSvc->mdtIdHelper().multilayer(tmpid);
1004  auto adc_perch = Monitored::Scalar<float>("adc_segs_perch_" + chambername, adc);
1005  auto adc_ml1 = Monitored::Scalar<int>("adc_ml1", (int)(mdtMultLayer == 1));
1006  auto adc_ml2 = Monitored::Scalar<int>("adc_ml2", (int)(mdtMultLayer == 2));
1007 
1008  std::string monPerCh = "MdtMonPerChamber";
1009  if (iregion == 0)
1010  monPerCh += "BA";
1011  else if (iregion == 1)
1012  monPerCh += "BC";
1013  else if (iregion == 2)
1014  monPerCh += "EA";
1015  else if (iregion == 3)
1016  monPerCh += "EC";
1017 
1018  ROTs_chamber.push_back(tmpid);
1019  ROTs_ML.push_back(mdtMultLayer);
1020  ROTs_tube.push_back(m_idHelperSvc->mdtIdHelper().tube(tmpid));
1021  ROTs_L.push_back(m_idHelperSvc->mdtIdHelper().tubeLayer(tmpid));
1022 
1023 
1024  fill(monPerCh, adc_perch, adc_ml1, adc_ml2);
1025  }
1026  // Finished gathering hits used in segment
1027 
1028  if (m_doChamberHists) {
1029  // Find unique chambers (since above we stored one chamber for every tube)
1030  // Also store the MLs affected by the ROTs, since we don't necessarily want to look for traversed tubes in entire chamber
1031  std::vector<Identifier> unique_chambers;
1032  std::vector<std::vector<int>> unique_chambers_ML;
1033 
1034  for (unsigned i = 0; i < ROTs_chamber.size(); i++) {
1035  bool isUnique = true;
1036  for (unsigned j = 0; j < unique_chambers.size(); j++) {
1037  if (getChamberName(ROTs_chamber.at(i)) == getChamberName(unique_chambers.at(j))) {
1038  isUnique = false;
1039  if (!AinB(ROTs_ML.at(i), unique_chambers_ML.at(j))) unique_chambers_ML.at(j).push_back(ROTs_ML.at(i));
1040  break;
1041  }
1042  }
1043  if (isUnique) {
1044  unique_chambers.push_back(ROTs_chamber.at(i));
1045  std::vector<int> tmp_ML;
1046  tmp_ML.push_back(ROTs_ML.at(i));
1047  unique_chambers_ML.push_back(tmp_ML);
1048  }
1049  }
1050  // Done finding unique chambers
1051  // Loop over the unique chambers
1052  // Here we store the tubes in each chamber that were traversed by the segment
1053  std::vector<Identifier> traversed_station_id;
1054  std::vector<int> traversed_tube;
1055  std::vector<int> traversed_L;
1056  std::vector<int> traversed_ML;
1057 
1058  for (const Identifier& station_id : unique_chambers) {
1059  const std::string hardware_name = getChamberName(station_id);
1060  // SEGMENT track
1061  const MuonGM::MdtReadoutElement* detEl = MuonDetMgr->getMdtReadoutElement(station_id);
1062  const Amg::Transform3D& gToStation = detEl->GlobalToAmdbLRSTransform();
1063  const Amg::Vector3D segPosL = gToStation * segment->globalPosition();
1064  const Amg::Vector3D segDirL = gToStation.linear() * segment->globalDirection();
1065  MuonCalib::MTStraightLine segment_track =
1066  MuonCalib::MTStraightLine(segPosL, segDirL, Amg::Vector3D(0, 0, 0), Amg::Vector3D(0, 0, 0));
1067 
1068  // Loop over tubes in chamber, find those along segment
1069  for (int ML : {1, 2}) {
1070 
1071  Identifier newId = id_helper.channelID(station_id, ML, 1, 1);
1072  const MuonGM::MdtReadoutElement* MdtRoEl = MuonDetMgr->getMdtReadoutElement(newId);
1073  int tubeMax = cachedTubeMax(newId);
1074  int tubeLayerMax = cachedTubeLayerMax(newId);
1075  CorrectTubeMax(hardware_name, tubeMax);
1076  CorrectLayerMax(hardware_name, tubeLayerMax);
1077 
1078  int tubeMin = id_helper.tubeMin(newId);
1079  int tubeLayerMin = id_helper.tubeLayerMin(newId);
1080  for (int i_tube = tubeMin; i_tube <= tubeMax; ++i_tube) {
1081  for (int i_layer = tubeLayerMin; i_layer <= tubeLayerMax; ++i_layer) {
1082  Identifier tubeId = id_helper.channelID(newId, ML, i_layer, i_tube);
1083 
1084  if (m_BMGpresent && m_idHelperSvc->mdtIdHelper().stationName(newId) == m_BMGid) {
1085  std::map<Identifier, std::set<Identifier>>::const_iterator myIt = m_DeadChannels.find(MdtRoEl->identify());
1086  if (myIt != m_DeadChannels.end()) {
1087  if (myIt->second.count(tubeId)) {
1088  ATH_MSG_DEBUG("Skipping tube with identifier " << m_idHelperSvc->toString(tubeId));
1089  continue;
1090  }
1091  }
1092  }
1093 
1094  Amg::Vector3D TubePos = MdtRoEl->GlobalToAmdbLRSCoords(MdtRoEl->tubePos(tubeId));
1095  Amg::Vector3D tube_position = Amg::Vector3D(TubePos.x(), TubePos.y(), TubePos.z());
1096  static const Amg::Vector3D tube_direction{1, 0, 0};
1097  MuonCalib::MTStraightLine tube_track =
1098  MuonCalib::MTStraightLine(tube_position, tube_direction, Amg::Vector3D(0, 0, 0), Amg::Vector3D(0, 0, 0));
1099  double distance = std::abs(segment_track.signDistFrom(tube_track));
1100 
1101  if (distance < (MdtRoEl->innerTubeRadius())) {
1102  traversed_tube.push_back(i_tube);
1103  traversed_L.push_back(i_layer);
1104  traversed_ML.push_back(ML);
1105  traversed_station_id.push_back(station_id);
1106  }
1107 
1108  }
1109  }
1110  }
1111  }
1112 
1113  // Done looping over the unqiue chambers
1114 
1115  // Loop over traversed tubes that were stored above
1116  // Here we fill the DRvsDT/DRvsSegD histos, as well is unique hits and traversed tubes to calculate efficiencies
1117  if (traversed_tube.size() < 20) { // quality cut here -- 20 traversed tubes is ridiculous and generates low efficiencies (these
1118  // are due to non-pointing segments)
1119 
1120  for (unsigned k = 0; k < traversed_tube.size(); k++) {
1121 
1122  std::string hardware_name = getChamberName(traversed_station_id.at(k));
1123 
1124  // GET HISTS
1125  IdentifierHash idHash{0};
1126  id_helper.get_module_hash(traversed_station_id.at(k), idHash);
1127 
1128  MDTChamber* chamber{nullptr};
1129  ATH_CHECK(getChamber(idHash, chamber));
1130 
1131  bool hit_flag = false;
1132  for (unsigned j = 0; j < ROTs_tube.size(); j++) {
1133  if ((getChamberName(ROTs_chamber.at(j)) == hardware_name) && (traversed_tube.at(k) == ROTs_tube.at(j)) &&
1134  (traversed_L.at(k) == ROTs_L.at(j)) &&
1135  (traversed_ML.at(k) == ROTs_ML.at(j))) { // found traversed tube with hit used in segment
1136  hit_flag = true;
1137  break;
1138  }
1139  }
1140 
1141  const Identifier& trav_id = traversed_station_id.at(k);
1142  Identifier newId = id_helper.channelID(trav_id, traversed_ML.at(k), 1, 1);
1143 
1144 
1145  int tubeLayerMax = cachedTubeLayerMax(newId);
1146  id_helper.get_module_hash(newId, idHash);
1147  CorrectLayerMax(hardware_name, tubeLayerMax); // ChamberTubeNumberCorrection handles the tubeMax problem
1148 
1149 
1150  int mdtlayer = ((traversed_L.at(k) - 1) + (traversed_ML.at(k) - 1) * tubeLayerMax);
1151  int ibin = traversed_tube.at(k) + mdtlayer * cachedTubeMax(newId);
1152 
1153 
1154  ChamberTubeNumberCorrection(ibin, hardware_name, traversed_tube.at(k), mdtlayer);
1155  // Store info for eff calc
1156  // (Here we make sure we are removing duplicates from overlapping segments by using sets)
1158  monAlg::TubeTraversedBySegment tmp_effTube = monAlg::TubeTraversedBySegment(hardware_name, ibin, hit_flag, idHash);
1159  monAlg::TubeTraversedBySegment tmp_effTube_Hit = monAlg::TubeTraversedBySegment(hardware_name, ibin, true, idHash);
1160  monAlg::TubeTraversedBySegment tmp_effTube_noHit = monAlg::TubeTraversedBySegment(hardware_name, ibin, false, idHash);
1161  it = store_effTubes.find(tmp_effTube_Hit);
1162  if (hit_flag || (it == store_effTubes.end()))
1163  store_effTubes.insert(tmp_effTube); // Insert if w/hit, but if w/o hit then only insert if no already stored w/ h
1164 
1165  it = store_effTubes.find(tmp_effTube_noHit);
1166  if (hit_flag && (it != store_effTubes.end()))
1167  store_effTubes.erase(it); // If w/ hit, and the same tube is stored w/o hit, remove duplicate w/o hit
1168  }
1169  }
1170  // Done looping over traversed tubes
1171 
1172  } // m_doChamberHists
1173  }
1174 
1175  // Fill effentries/effcounts hists for efficiency calculation
1176  if (m_doChamberHists) { // Don't perform this block if not doing chamber by chamber hists
1177  for (const monAlg::TubeTraversedBySegment& it : store_effTubes) {
1178  // GET HISTS
1179  MDTChamber* chamber{nullptr};
1180  ATH_CHECK(getChamber(it.idHash, chamber));
1181  int tubebin = it.tubeBin;
1182 
1183  int iregion = chamber->GetRegionEnum();
1184  std::string monPerCh = "MdtMonPerChamber";
1185  if (iregion == 0) monPerCh += "BA";
1186  if (iregion == 1) monPerCh += "BC";
1187  if (iregion == 2) monPerCh += "EA";
1188  if (iregion == 3) monPerCh += "EC";
1189 
1190  std::string chambername = chamber->getName();
1191  auto tube_perch_segs = Monitored::Scalar<int>("tube_perch_segs_" + chambername, tubebin);
1192  auto hitcut = Monitored::Scalar<int>("hitcut", (int)(it.isHit));
1193 
1194  fill(monPerCh, tube_perch_segs, hitcut);
1195  }
1196  }
1197  return StatusCode::SUCCESS;
1198 
1199 }
1200 
1202  std::string region[4] = {"BA", "BC", "EA", "EC"};
1203  std::string layer[4] = {"Inner", "Middle", "Outer", "Extra"};
1204 
1205  for (int iregion = 0; iregion < 4; ++iregion) {
1206  std::string MDT_regionGroup = "MDT_regionGroup" + region[iregion]; // MDTXX/Overview, 4 gruppi
1207  for (int ilayer = 0; ilayer < 4; ++ilayer) {
1208  for (int stationPhi = 0; stationPhi < 16; ++stationPhi) {
1209  const auto& thisVects = vects[iregion][ilayer][stationPhi];
1210 
1211  auto adc_segs_mon = Monitored::Collection("adc_segs_mon", thisVects.adc_segs_mon);
1212  auto adc_segs_overall_mon = Monitored::Collection("adc_segs_overall_mon", thisVects.adc_segs_mon);
1213  std::string tdc_var = "tdc_segs_" + region[iregion] + "_" + layer[ilayer] + "_phi" + std::to_string(stationPhi + 1);
1214  auto tdc_segs_mon = Monitored::Collection(tdc_var, thisVects.tdc_segs_mon);
1215  if (m_do_mdttdccut_sector) fill(MDT_regionGroup, tdc_segs_mon);
1216 
1217  auto tdc_segs_overall_mon = Monitored::Collection("tdc_segs_overall_mon", thisVects.tdc_segs_mon);
1218  auto tdc_segs_region_mon = Monitored::Collection("tdc_segs_region_mon", thisVects.tdc_segs_mon);
1219 
1220  fill(MDT_regionGroup, adc_segs_mon, tdc_segs_region_mon);
1221 
1222  std::string varx = iregion < 2 ? "x_segs_mon_barrel" : "x_segs_mon_endcap";
1223  std::string vary = iregion < 2 ? "y_segs_mon_barrel" : "y_segs_mon_endcap";
1224  auto x_segs_mon = Monitored::Collection(varx, thisVects.x_segs_mon);
1225  auto y_segs_mon = Monitored::Collection(vary, thisVects.y_segs_mon);
1226 
1227  fill("MdtMonitor", tdc_segs_overall_mon, adc_segs_overall_mon, x_segs_mon, y_segs_mon);
1228  }
1229  }
1230  }
1231  return StatusCode::SUCCESS;
1232 }
1233 
1235  PVConstLink cv = mydetEl->getMaterialGeom(); // it is "Multilayer"
1236  int nGrandchildren = cv->getNChildVols();
1237  if (nGrandchildren <= 0) return;
1238 
1239  Identifier detElId = mydetEl->identify();
1240 
1241  std::set<Identifier>& deadTubes = m_DeadChannels[detElId];
1242 
1243  for (int layer = 1; layer <= mydetEl->getNLayers(); ++layer) {
1244  for (int tube = 1; tube <= mydetEl->getNtubesperlayer(); ++tube) {
1245  bool tubefound = false;
1246  for (unsigned int kk = 0; kk < cv->getNChildVols(); ++kk) {
1247  int tubegeo = cv->getIdOfChildVol(kk) % maxNTubesPerLayer;
1248  int layergeo = (cv->getIdOfChildVol(kk) - tubegeo) / maxNTubesPerLayer;
1249  if (tubegeo == tube && layergeo == layer) {
1250  tubefound = true;
1251  break;
1252  }
1253  if (layergeo > layer) break; // don't loop any longer if you cannot find tube anyway anymore
1254  }
1255  if (!tubefound) {
1256  Identifier deadTubeId = m_idHelperSvc->mdtIdHelper().channelID(detElId, mydetEl->getMultilayer(), layer, tube);
1257  deadTubes.insert(deadTubeId);
1258  ATH_MSG_VERBOSE("adding dead tube " << m_idHelperSvc->toString(deadTubeId));
1259  }
1260  }
1261  }
1262 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
MDTSummaryHistogramStruct::biny_vslb_bycrate_ontrack
std::vector< int > biny_vslb_bycrate_ontrack
Definition: MdtRawDataMonAlg.cxx:110
MdtRawDataMonAlg::cachedTubeMax
int cachedTubeMax(const Identifier &id) const
Definition: MDTRawDataUtilsRun3.cxx:1342
convertChamberName
std::string convertChamberName(int, int, int, const std::string &)
Definition: MuonDQA/MuonDQAUtils/src/MuonChamberNameConverter.cxx:10
MdtRawDataMonAlg::m_nb_hits
Gaudi::Property< size_t > m_nb_hits
Definition: MdtRawDataMonAlg.h:173
Muon::nsw::STGTPSegments::moduleIDBits::stationPhi
constexpr uint8_t stationPhi
station Phi 1 to 8
Definition: NSWSTGTPDecodeBitmaps.h:161
MdtRawDataMonAlg::m_key_rpc
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_key_rpc
Definition: MdtRawDataMonAlg.h:157
xAOD::identify
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:61
MdtRawDataMonAlg::m_detMgr
const MuonGM::MuonDetectorManager * m_detMgr
Definition: MdtRawDataMonAlg.h:193
MuonGM::MdtReadoutElement::getNLayers
int getNLayers() const
Returns the number of tube layers inside the multilayer.
MDTSummaryHistogramStruct::tdc_mon_nb2
std::vector< float > tdc_mon_nb2
Definition: MdtRawDataMonAlg.cxx:90
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
MDTOverviewHistogramStruct::tdc_mon_noiseBurst
std::vector< float > tdc_mon_noiseBurst
Definition: MdtRawDataMonAlg.cxx:77
MDTOverviewHistogramStruct::mdt_tube_perp_endcap
std::vector< float > mdt_tube_perp_endcap
Definition: MdtRawDataMonAlg.cxx:69
MDTSummaryHistogramStruct
Definition: MdtRawDataMonAlg.cxx:85
MDTOverviewHistogramStruct::mdt_tube_z_ovl
std::vector< float > mdt_tube_z_ovl
Definition: MdtRawDataMonAlg.cxx:63
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
MDTSummaryHistogramStruct::y_bin_perML
std::vector< int > y_bin_perML
Definition: MdtRawDataMonAlg.cxx:102
Muon::MdtDriftCircleOnTrack::prepRawData
virtual const MdtPrepData * prepRawData() const override final
Returns the PrepRawData used to create this corrected measurement.
Definition: MdtDriftCircleOnTrack.h:257
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
MdtRawDataMonAlg::fillMDTHistograms
virtual StatusCode fillMDTHistograms(const Muon::MdtPrepData *) const
Definition: MdtRawDataMonAlg.cxx:852
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
python.MagFieldUtils.lumiblock
lumiblock
Definition: MagFieldUtils.py:188
MuonGM::MdtReadoutElement::innerTubeRadius
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
MdtRawDataMonAlg::mdtchamberId
void mdtchamberId()
Definition: MDTRawDataUtilsRun3.cxx:294
MDTSummaryHistogramStruct::bin_byLayer_x
std::vector< int > bin_byLayer_x
Definition: MdtRawDataMonAlg.cxx:103
MDTSummaryHistogramStruct::sector
std::vector< int > sector
Definition: MdtRawDataMonAlg.cxx:86
Muon.h
calibdata.chamber
chamber
Definition: calibdata.py:32
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
MDTSummaryHistogramStruct::biny_vslb_bycrate
std::vector< int > biny_vslb_bycrate
Definition: MdtRawDataMonAlg.cxx:108
MdtHistCoder.h
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
MDTOverviewHistogramStruct
Definition: MdtRawDataMonAlg.cxx:55
MTStraightLine.h
MdtRawDataMonAlg::m_do_mdtChamberHits
Gaudi::Property< bool > m_do_mdtChamberHits
Definition: MdtRawDataMonAlg.h:175
MdtRawDataMonAlg::~MdtRawDataMonAlg
virtual ~MdtRawDataMonAlg()
MDTOverviewHistogramStruct::mdt_tube_y_endcap
std::vector< float > mdt_tube_y_endcap
Definition: MdtRawDataMonAlg.cxx:67
MuonGM::MuonReadoutElement::GlobalToAmdbLRSTransform
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:153
skel.it
it
Definition: skel.GENtoEVGEN.py:396
IdentifiableContainerMT::size
size_t size() const
Duplicate of fullSize for backwards compatability.
Definition: IdentifiableContainerMT.h:206
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:408
MdtHistCoder::encode
static uint16_t encode(const uint16_t regionIn, const uint16_t layerIn, const uint16_t phiIn, const uint16_t crate_regionIn, const uint16_t crateIn)
Definition: MdtHistCoder.h:19
MdtRawDataMonAlg::fillMDTSegmentHistograms
virtual StatusCode fillMDTSegmentHistograms(const MDTSegmentHistogramStruct(&vects)[4][4][16]) const
Definition: MdtRawDataMonAlg.cxx:1201
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:1068
MDTSummaryHistogramStruct::adc_mon
std::vector< float > adc_mon
Definition: MdtRawDataMonAlg.cxx:88
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
MdtRawDataMonAlg::m_chi2_cut
Gaudi::Property< bool > m_chi2_cut
Definition: MdtRawDataMonAlg.h:174
ATH_UNLIKELY
#define ATH_UNLIKELY(x)
Definition: AthUnlikelyMacros.h:17
MdtRawDataMonAlg::ChamberTubeNumberCorrection
static void ChamberTubeNumberCorrection(int &tubeNum, std::string_view hardware_name, int tubePos, int numLayers)
Definition: MDTRawDataUtilsRun3.cxx:263
LArG4FSStartPointFilter.evt
evt
Definition: LArG4FSStartPointFilter.py:42
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
MdtDriftCircleOnTrack.h
MDTOverviewHistogramStruct::tdc_mon
std::vector< float > tdc_mon
Definition: MdtRawDataMonAlg.cxx:73
Muon::MdtPrepData::adc
int adc() const
Returns the ADC (typically range is 0 to 250)
Definition: MdtPrepData.h:146
MDTSummaryHistogramStruct::tdc_mon_adccut
std::vector< float > tdc_mon_adccut
Definition: MdtRawDataMonAlg.cxx:95
MdtRawDataMonAlg.h
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
MuonChamberNameConverter.h
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
MdtRawDataMonAlg::fillMDTOverviewVects
virtual void fillMDTOverviewVects(const Muon::MdtPrepData *, bool &isNoiseBurstCandidate, MDTOverviewHistogramStruct &vects) const
Definition: MdtRawDataMonAlg.cxx:480
MdtRawDataMonAlg::m_tubesperchamber_map
std::map< std::string, int > m_tubesperchamber_map
Definition: MdtRawDataMonAlg.h:154
TRT::Hit::side
@ side
Definition: HitInfo.h:83
Track.h
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
MdtRawDataMonAlg::binMdtRegional
virtual StatusCode binMdtRegional(TH2 *, std::string_view xAxis)
Definition: MDTRawDataUtilsRun3.cxx:75
MdtRawDataMonAlg::GetTubeMax
int GetTubeMax(const Identifier &digcoll_id, std::string_view hardware_name)
Definition: MDTRawDataUtilsRun3.cxx:333
MDTOverviewHistogramStruct::mdt_tube_perp_barrel
std::vector< float > mdt_tube_perp_barrel
Definition: MdtRawDataMonAlg.cxx:59
MDTOverviewHistogramStruct::tdc_mon_noiseBurst_adcCut
std::vector< float > tdc_mon_noiseBurst_adcCut
Definition: MdtRawDataMonAlg.cxx:80
MDTOverviewHistogramStruct::adc_mon
std::vector< float > adc_mon
Definition: MdtRawDataMonAlg.cxx:74
python.changerun.kk
list kk
Definition: changerun.py:41
tubeMax
double tubeMax
Definition: MDT_ResponseTest.cxx:31
MDTOverviewHistogramStruct::mdt_tube_y_ovl
std::vector< float > mdt_tube_y_ovl
Definition: MdtRawDataMonAlg.cxx:62
MDTSummaryHistogramStruct::tdc_mon_nb3
std::vector< float > tdc_mon_nb3
Definition: MdtRawDataMonAlg.cxx:100
MDTSummaryHistogramStruct::y_mon
std::vector< int > y_mon
Definition: MdtRawDataMonAlg.cxx:97
MDTSummaryHistogramStruct::adc_mon_adccut
std::vector< float > adc_mon_adccut
Definition: MdtRawDataMonAlg.cxx:94
MdtRawDataMonAlg::m_chambersIdHash
std::vector< IdentifierHash > m_chambersIdHash
Definition: MdtRawDataMonAlg.h:152
MdtRawDataMonAlg::getChamber
StatusCode getChamber(const IdentifierHash &id, MDTChamber *&chamber) const
Definition: MDTRawDataUtilsRun3.cxx:400
MDTChamber
Definition: MDTChamber.h:22
MuonGM::MuonReadoutElement::GlobalToAmdbLRSCoords
virtual Amg::Vector3D GlobalToAmdbLRSCoords(const Amg::Vector3D &x) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:149
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MdtRawDataMonAlg::m_do_mdttdccut_sector
Gaudi::Property< bool > m_do_mdttdccut_sector
Definition: MdtRawDataMonAlg.h:176
python.BunchSpacingUtils.lb
lb
Definition: BunchSpacingUtils.py:88
MuonGM::MuonDetectorManager::getMdtReadoutElement
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:204
xAOD::numberOfTriggerEtaLayers
@ numberOfTriggerEtaLayers
layers with trigger eta hits [unit8_t].
Definition: TrackingPrimitives.h:292
MuonChambersRange.h
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
MDTOverviewHistogramStruct::mdt_tube_x_barrel
std::vector< float > mdt_tube_x_barrel
Definition: MdtRawDataMonAlg.cxx:56
lumiFormat.i
int i
Definition: lumiFormat.py:85
MDTSegmentHistogramStruct::y_segs_mon
std::vector< int > y_segs_mon
Definition: MdtRawDataMonAlg.cxx:118
MDTOverviewHistogramStruct::mdt_tube_z_barrel
std::vector< float > mdt_tube_z_barrel
Definition: MdtRawDataMonAlg.cxx:58
MdtRawDataMonAlg::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: MdtRawDataMonAlg.h:113
MDTOverviewHistogramStruct::adc_mon_noiseBurst_notNoisy
std::vector< float > adc_mon_noiseBurst_notNoisy
Definition: MdtRawDataMonAlg.cxx:79
MDTOverviewHistogramStruct::adc_mon_nosel
std::vector< float > adc_mon_nosel
Definition: MdtRawDataMonAlg.cxx:71
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
MdtRawDataMonAlg::m_doMdtESD
Gaudi::Property< bool > m_doMdtESD
Definition: MdtRawDataMonAlg.h:169
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
Trk::Segment
Definition: Tracking/TrkEvent/TrkSegment/TrkSegment/Segment.h:56
LVL1_ROI.h
TrackCollection.h
MDTSummaryHistogramStruct::stationEta
std::vector< int > stationEta
Definition: MdtRawDataMonAlg.cxx:87
MDTOverviewHistogramStruct::mdt_tube_x_ovl
std::vector< float > mdt_tube_x_ovl
Definition: MdtRawDataMonAlg.cxx:61
MDTSummaryHistogramStruct::tdc_mon_rpc
std::vector< float > tdc_mon_rpc
Definition: MdtRawDataMonAlg.cxx:105
MdtIdHelper
Definition: MdtIdHelper.h:61
MDTSummaryHistogramStruct::bin_byLayer_y
std::vector< int > bin_byLayer_y
Definition: MdtRawDataMonAlg.cxx:104
MdtIdHelper.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:239
MDTSummaryHistogramStruct::adc_mon_nb2
std::vector< float > adc_mon_nb2
Definition: MdtRawDataMonAlg.cxx:91
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:79
MuonGM::MdtReadoutElement::getMultilayer
int getMultilayer() const
Returns the multilayer represented by the readout element.
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:233
AthMonitorAlgorithm::fill
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
MuonDQAHistMap.h
MDTSummaryHistogramStruct::adc_mon_nb1
std::vector< float > adc_mon_nb1
Definition: MdtRawDataMonAlg.cxx:93
MdtRawDataMonAlg::m_ADCCut
Gaudi::Property< size_t > m_ADCCut
Definition: MdtRawDataMonAlg.h:172
DataVector< Trk::Segment >
MdtRawDataMonAlg::m_hist_hash_list
std::vector< std::unique_ptr< MDTChamber > > m_hist_hash_list
Definition: MdtRawDataMonAlg.h:163
MdtRawDataMonAlg::m_muon_type
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_muon_type
Definition: MdtRawDataMonAlg.h:149
MDTOverviewHistogramStruct::mdt_tube_perp_ovl
std::vector< float > mdt_tube_perp_ovl
Definition: MdtRawDataMonAlg.cxx:64
MdtRawDataMonAlg::cachedTubeLayerMax
int cachedTubeLayerMax(const Identifier &id) const
Definition: MDTRawDataUtilsRun3.cxx:1346
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
MDTOverviewHistogramStruct::tdc_mon_adcCut
std::vector< float > tdc_mon_adcCut
Definition: MdtRawDataMonAlg.cxx:82
MdtRawDataMonAlg::m_muonKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
Definition: MdtRawDataMonAlg.h:159
MDTSummaryHistogramStruct::biny_vslb_bycrate_bis_bee
std::vector< int > biny_vslb_bycrate_bis_bee
Definition: MdtRawDataMonAlg.cxx:109
MDTSummaryHistogramStruct::biny_vslb
std::vector< int > biny_vslb
Definition: MdtRawDataMonAlg.cxx:107
MdtIdHelper::tubeMin
static int tubeMin()
Definition: MdtIdHelper.cxx:768
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
lumiFormat.array
array
Definition: lumiFormat.py:91
Trk::MeasurementBase
Definition: MeasurementBase.h:58
MdtRawDataMonAlg::binMdtGlobal
virtual StatusCode binMdtGlobal(TH2 *, char ecap)
Definition: MDTRawDataUtilsRun3.cxx:24
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
MdtRawDataMonAlg::m_maskNoisyTubes
Gaudi::Property< bool > m_maskNoisyTubes
Definition: MdtRawDataMonAlg.h:171
Muon::MdtPrepData::tdc
int tdc() const
Returns the TDC (typically range is 0 to 2500).
Definition: MdtPrepData.h:145
MdtRawDataMonAlg::m_DeadChannels
std::map< Identifier, std::set< Identifier > > m_DeadChannels
Definition: MdtRawDataMonAlg.h:184
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MdtIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int tubeLayer, int tube) const
Definition: MdtIdHelper.cxx:659
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:364
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
MuonCalib::MTStraightLine::signDistFrom
double signDistFrom(const MTStraightLine &h) const
get the signed distance of two lines (if both are parallel, dist>0)
Definition: MTStraightLine.cxx:89
MdtRawDataMonAlg::m_chambersId
std::vector< Identifier > m_chambersId
Definition: MdtRawDataMonAlg.h:151
MdtRawDataMonAlg::mezzmdt
int mezzmdt(const Identifier &id) const
Definition: MDTRawDataUtilsRun3.cxx:321
MdtRawDataMonAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MdtRawDataMonAlg.h:109
MDTOverviewHistogramStruct::tdc_mon_nosel
std::vector< float > tdc_mon_nosel
Definition: MdtRawDataMonAlg.cxx:72
MdtRawDataMonAlg::m_adcScale
Gaudi::Property< size_t > m_adcScale
Definition: MdtRawDataMonAlg.h:180
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
MdtRawDataMonAlg::CorrectTubeMax
static void CorrectTubeMax(const std::string &hardware_name, int &numTubes)
Definition: MDTRawDataUtilsRun3.cxx:282
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:33
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonDetectorManager.h
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: AthMonitorAlgorithm.cxx:18
MdtRawDataMonAlg::CorrectLayerMax
static void CorrectLayerMax(const std::string &hardware_name, int &numLayers)
Definition: MDTRawDataUtilsRun3.cxx:287
MDTSegmentHistogramStruct::x_segs_mon
std::vector< int > x_segs_mon
Definition: MdtRawDataMonAlg.cxx:117
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Trk::Track::measurementsOnTrack
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
Definition: Tracking/TrkEvent/TrkTrack/src/Track.cxx:178
MDTSummaryHistogramStruct::tdc_mon_tgc
std::vector< float > tdc_mon_tgc
Definition: MdtRawDataMonAlg.cxx:106
TrackParticle.h
python.PyAthena.v
v
Definition: PyAthena.py:154
MDTSegmentHistogramStruct::tdc_segs_mon
std::vector< float > tdc_segs_mon
Definition: MdtRawDataMonAlg.cxx:116
MdtRawDataMonAlg::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Definition: MdtRawDataMonAlg.h:160
MdtRawDataMonAlg::m_segm_type
SG::ReadHandleKeyArray< Trk::SegmentCollection > m_segm_type
Definition: MdtRawDataMonAlg.h:147
MDTOverviewHistogramStruct::mdt_tube_y_barrel
std::vector< float > mdt_tube_y_barrel
Definition: MdtRawDataMonAlg.cxx:57
MuonGM::MdtReadoutElement::tubePos
Amg::Vector3D tubePos(const Identifier &id) const
Returns the global position of the given tube.
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
MDTSegmentHistogramStruct::adc_segs_mon
std::vector< float > adc_segs_mon
Definition: MdtRawDataMonAlg.cxx:115
MdtRawDataMonAlg::fillMDTSummaryHistograms
virtual StatusCode fillMDTSummaryHistograms(std::array< MDTSummaryHistogramStruct, 4096 > *vects, int lb) const
Definition: MdtRawDataMonAlg.cxx:737
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
MDTOverviewHistogramStruct::noiseBurst
std::vector< int > noiseBurst
Definition: MdtRawDataMonAlg.cxx:75
MuonGM::MuonReadoutElement::identify
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:184
MDTSummaryHistogramStruct::x_mon_noise
std::vector< int > x_mon_noise
Definition: MdtRawDataMonAlg.cxx:98
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
MuonCalib::MTStraightLine
Definition: MTStraightLine.h:16
MdtRawDataMonAlg::m_key_mdt
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_key_mdt
Definition: MdtRawDataMonAlg.h:156
MDTChamber::getName
const std::string & getName() const
Definition: MDTChamber.h:67
MuonSegment.h
MDTOverviewHistogramStruct::mdt_tube_z_endcap
std::vector< float > mdt_tube_z_endcap
Definition: MdtRawDataMonAlg.cxx:68
SG::VarHandleBase::isPresent
bool isPresent() const
Is the referenced object present in SG?
Definition: StoreGate/src/VarHandleBase.cxx:394
MdtIdHelper::get_module_hash
virtual int get_module_hash(const Identifier &id, IdentifierHash &hash_id) const override
Definition: MdtIdHelper.cxx:319
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
MdtRawDataMonAlg::initDeadChannels
void initDeadChannels(const MuonGM::MdtReadoutElement *mydetEl)
Definition: MdtRawDataMonAlg.cxx:1234
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
Muon::nsw::STGTPSegments::moduleIDBits::stationEta
constexpr uint8_t stationEta
1 to 3
Definition: NSWSTGTPDecodeBitmaps.h:159
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
MdtRawDataMonAlg::MdtRawDataMonAlg
MdtRawDataMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MdtRawDataMonAlg.cxx:125
MdtIdHelper::maxNTubesPerLayer
static constexpr int maxNTubesPerLayer
The maxNTubesPerLayer represents the absolute maximum of tubes which are built into a single multilay...
Definition: MdtIdHelper.h:68
MDTSummaryHistogramStruct::tdc_mon_nb1
std::vector< float > tdc_mon_nb1
Definition: MdtRawDataMonAlg.cxx:92
FitQuality.h
MuonGM::MdtReadoutElement::getNtubesperlayer
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
MuonStation.h
test_pyathena.counter
counter
Definition: test_pyathena.py:15
MdtRawDataMonAlg::fillMDTSummaryVects
virtual StatusCode fillMDTSummaryVects(const Muon::MdtPrepData *, const std::set< std::string > &, bool &isNoiseBurstCandidate, bool trig_barrel, bool trig_endcap, std::array< MDTSummaryHistogramStruct, 4096 > *) const
Definition: MdtRawDataMonAlg.cxx:586
MDTSummaryHistogramStruct::x_mon
std::vector< int > x_mon
Definition: MdtRawDataMonAlg.cxx:96
CaloNoise_fillDB.mu
mu
Definition: CaloNoise_fillDB.py:53
MdtRawDataMonAlg::m_doChamberHists
Gaudi::Property< bool > m_doChamberHists
Definition: MdtRawDataMonAlg.h:170
MdtRawDataMonAlg::m_masked_tubes
std::unique_ptr< MDTNoisyTubes > m_masked_tubes
Definition: MdtRawDataMonAlg.h:107
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
xAOD::numberOfPhiLayers
@ numberOfPhiLayers
layers with a trigger phi hit [unit8_t].
Definition: TrackingPrimitives.h:290
MdtRawDataMonAlg::binMdtGlobal_byLayer
virtual StatusCode binMdtGlobal_byLayer(TH2 *, TH2 *, TH2 *)
Definition: MDTRawDataUtilsRun3.cxx:138
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
MDTSegmentHistogramStruct
Definition: MdtRawDataMonAlg.cxx:114
TrackingPrimitives.h
MdtRawDataMonAlg::m_BMGpresent
bool m_BMGpresent
Definition: MdtRawDataMonAlg.h:182
MdtRawDataMonAlg::handleEvent_effCalc_fillVects
StatusCode handleEvent_effCalc_fillVects(const Trk::SegmentCollection *segms, MDTSegmentHistogramStruct(&vects)[4][4][16]) const
Definition: MdtRawDataMonAlg.cxx:926
MdtRawDataMonAlg::m_l1RoiKey
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_l1RoiKey
Definition: MdtRawDataMonAlg.h:158
MuonFixedId.h
MDTSummaryHistogramStruct::tdc_mon
std::vector< float > tdc_mon
Definition: MdtRawDataMonAlg.cxx:89
MdtRawDataMonAlg::fillMDTOverviewHistograms
virtual void fillMDTOverviewHistograms(const MDTOverviewHistogramStruct &vects) const
Definition: MdtRawDataMonAlg.cxx:548
calibdata.tube
tube
Definition: calibdata.py:31
MdtRawDataMonAlg::initialize
virtual StatusCode initialize() override
initialize
Definition: MdtRawDataMonAlg.cxx:129
TrackParticleContainer.h
MdtIdHelper::tubeLayerMin
static int tubeLayerMin()
Definition: MdtIdHelper.cxx:764
MDTOverviewHistogramStruct::adc_mon_noiseBurst
std::vector< float > adc_mon_noiseBurst
Definition: MdtRawDataMonAlg.cxx:78
MDTSummaryHistogramStruct::x_bin_perML
std::vector< int > x_bin_perML
Definition: MdtRawDataMonAlg.cxx:101
monAlg::TubeTraversedBySegment
Definition: MdtRawDataMonAlg.h:67
MDTSummaryHistogramStruct::y_mon_noise
std::vector< int > y_mon_noise
Definition: MdtRawDataMonAlg.cxx:99
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
MdtRawDataMonAlg::m_BMGid
int m_BMGid
Definition: MdtRawDataMonAlg.h:183
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
MDTOverviewHistogramStruct::mdt_tube_x_endcap
std::vector< float > mdt_tube_x_endcap
Definition: MdtRawDataMonAlg.cxx:66
MdtRawDataMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: MdtRawDataMonAlg.cxx:253
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
MDTSummaryHistogramStruct::biny_vslb_bycrate_bis_bee_ontrack
std::vector< int > biny_vslb_bycrate_bis_bee_ontrack
Definition: MdtRawDataMonAlg.cxx:111
MdtRawDataMonAlg::getChamberName
std::string getChamberName(const Muon::MdtPrepData *) const
Definition: MDTRawDataUtilsRun3.cxx:389
Identifier
Definition: IdentifierFieldParser.cxx:14