ATLAS Offline Software
MuonEDMPrinterTool.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 
7 #include <algorithm>
8 #include <iostream>
9 
28 #include "TrkTrack/Track.h"
32 namespace Muon {
33 
34 
35 MuonEDMPrinterTool::MuonEDMPrinterTool(const std::string& ty, const std::string& na, const IInterface* pa)
36  : AthAlgTool(ty, na, pa)
37 {
38  declareInterface<MuonEDMPrinterTool>(this);
39 }
40 
42  if (parent() != toolSvc()) {
43  ATH_MSG_FATAL("There's no need to make this tool private");
44  return StatusCode::FAILURE;
45  }
46  ATH_CHECK(m_idHelperSvc.retrieve());
47  ATH_CHECK(m_edmHelperSvc.retrieve());
48  ATH_CHECK(m_pullCalculator.retrieve());
49 
51  ATH_CHECK(m_mdtKey.initialize(!m_mdtKey.empty()));
52  ATH_CHECK(m_rpcKey.initialize(!m_rpcKey.empty()));
53  ATH_CHECK(m_tgcKey.initialize(!m_tgcKey.empty()));
54 
55 
56  return StatusCode::SUCCESS;
57 }
58 
59 std::string
61 {
62 
63  std::ostringstream sout;
64  // create detailed track summary
65  typedef Trk::MuonTrackSummary::ChamberHitSummary ChamberHitSummary;
66 
67  sout << "Hits: eta " << summary.netaHits() << " phi " << summary.nphiHits() << " holes " << summary.nholes()
68  << " outliers " << summary.noutliers() << " pseudo " << summary.npseudoMeasurements() << " scatterers "
69  << summary.nscatterers() << " close Hits " << summary.ncloseHits() << std::endl;
70 
71 
72  const std::vector<ChamberHitSummary>& chamberHitSummary = summary.chamberHitSummary();
73  sout.setf(std::ios::left);
74  std::vector<ChamberHitSummary>::const_iterator chit = chamberHitSummary.begin();
75  std::vector<ChamberHitSummary>::const_iterator chit_end = chamberHitSummary.end();
76  std::vector<ChamberHitSummary>::const_iterator chit_last = chit_end - 1;
77  for (; chit != chit_end; ++chit) {
78  const Identifier& chId = chit->chamberId();
79  bool isMdt = m_idHelperSvc->isMdt(chId);
80 
81  sout << " " << std::setw(35) << m_idHelperSvc->toStringChamber(chId);
82 
83  const ChamberHitSummary::Projection& first = isMdt ? chit->mdtMl1() : chit->etaProjection();
84  const ChamberHitSummary::Projection& second = isMdt ? chit->mdtMl2() : chit->phiProjection();
85 
86 
87  std::string firstString = isMdt ? "ml1 " : "eta ";
88  std::string secondString = isMdt ? "ml2 " : "phi ";
89 
90  sout << " Hits: " << firstString << std::setw(3) << first.nhits << " " << secondString << std::setw(3)
91  << second.nhits;
92 
93  if (first.nholes || second.nholes) {
94  sout << " Holes: ";
95  if (first.nholes != 0) sout << firstString << std::setw(3) << first.nholes;
96  if (second.nholes != 0) {
97  if (first.nholes != 0) sout << " ";
98  sout << secondString << std::setw(3) << second.nholes;
99  }
100  }
101  if (first.noutliers || second.noutliers) {
102  sout << " Outliers: ";
103  if (first.noutliers != 0) sout << firstString << std::setw(3) << first.noutliers << " ";
104  if (second.noutliers != 0) {
105  if (first.noutliers != 0) sout << " ";
106  sout << secondString << std::setw(3) << second.noutliers;
107  }
108  }
109 
110  if (first.ndeltas || second.ndeltas) {
111  sout << " Deltas: ";
112  if (first.ndeltas != 0) sout << firstString << std::setw(3) << first.ndeltas << " ";
113  if (second.ndeltas != 0) {
114  if (first.ndeltas != 0) sout << " ";
115  sout << secondString << std::setw(3) << second.ndeltas;
116  }
117  }
118 
119  if (first.ncloseHits || second.ncloseHits) {
120  sout << " Close Hits: ";
121  if (first.ncloseHits != 0) sout << firstString << std::setw(3) << first.ncloseHits << " ";
122  if (second.ncloseHits != 0) {
123  if (first.ncloseHits != 0) sout << " ";
124  sout << secondString << std::setw(3) << second.ncloseHits;
125  }
126  }
127 
128  if (chit != chit_last) sout << std::endl;
129  }
130 
131  return sout.str();
132 }
133 
134 
135 std::string
137 {
138 
139  const Trk::MuonTrackSummary* muonSummary = nullptr;
140 
141  // check if the track already has a MuonTrackSummary, if not calculate it using the helper
142  const Trk::TrackSummary* summary = track.trackSummary();
143  if (summary) muonSummary = summary->muonTrackSummary();
144  if (!muonSummary) {
145  ATH_MSG_WARNING("No muon summary is present");
146  return "";
147  }
148 
149  return print(*muonSummary);
150 }
151 
152 
153 std::string
155 {
156  std::ostringstream sout;
157  const Trk::TrackStates* states = track.trackStateOnSurfaces();
158  if (!states) return "";
162  Trk::TrackStates::const_iterator it2_end = states->end();
163  // Build map of AEOTs and the measurements they affect
164  std::multimap<const Trk::MeasurementBase*, const Trk::AlignmentEffectsOnTrack*> measAndTheirAlignmentEffects;
165  const Trk::MeasurementBase* m = nullptr;
166  const Trk::AlignmentEffectsOnTrack* aeot = nullptr;
167  for (; it != it_end; ++it) {
168  aeot = (*it)->alignmentEffectsOnTrack();
169  if (aeot) {
170  // Now get the list of identifiers which this AEOT impacts.
171  const std::vector<Identifier>& identifiers = aeot->vectorOfAffectedTSOS();
172  it2 = states->begin();
173  it2_end = states->end();
174  for (; it2 != it2_end; ++it2) {
175  m = (*it2)->measurementOnTrack();
176  if (m) {
177  Identifier id = m_edmHelperSvc->getIdentifier(*m);
178  if ((id.is_valid() && (std::find(identifiers.begin(), identifiers.end(), id) != identifiers.end()))
179  || (aeot->effectsLastFromNowOn() && it2 > it))
180  {
181  // Either this measurement is explicitly listed, OR it is in a TSOS after an AEOT whose effects
182  // last from now on.
183  measAndTheirAlignmentEffects.insert(
184  std::pair<const Trk::MeasurementBase*, const Trk::AlignmentEffectsOnTrack*>(m, aeot));
185  }
186  }
187  }
188  }
189  }
190  // std::cout << " measAndTheirAlignmentEffects " << measAndTheirAlignmentEffects.size() << std::endl;
191 
192  // Reset
193  it = states->begin();
194  it_end = states->end();
195  // first loop to get width of Id's for nice alignment
196  std::vector<std::string> idStrings;
197  std::vector<std::string> dataStrings;
198  unsigned int idWidth = 0;
199  for (; it != it_end; ++it) {
200  m = (*it)->measurementOnTrack();
201  if (m) {
202  // Identifier part
203  std::string idStr = printId(*m);
204  idStrings.push_back(idStr);
205  if (idStr.length() > idWidth) idWidth = idStr.length();
206  // Data part
207  const Trk::TrackParameters* trackParameters = (*it)->trackParameters();
208  std::string dataStr = printData(*m);
209  if (trackParameters) {
211  measAndTheirAlignmentEffects.begin();
212  itMap = measAndTheirAlignmentEffects.find(m);
213  if (itMap != measAndTheirAlignmentEffects.end()) {
214  std::vector<const Trk::AlignmentEffectsOnTrack*> aeotos;
215  aeotos.push_back(itMap->second);
216  ++itMap;
217  if (itMap != measAndTheirAlignmentEffects.end() && itMap->first == m)
218  aeotos.push_back(itMap->second);
219  std::optional<Trk::ResidualPull> resPull{m_pullCalculator->residualPull(
220  m, trackParameters, Trk::ResidualPull::Unbiased, Trk::TrackState::unidentified, aeotos)};
221  if (resPull) dataStr += print(*resPull);
222  if (resPull) dataStr += " (AEOT)";
223  } else {
224  std::optional<Trk::ResidualPull> resPull{
225  m_pullCalculator->residualPull(m, trackParameters, Trk::ResidualPull::Unbiased)};
226  if (resPull) dataStr += print(*resPull);
227  }
228  }
229  if ((*it)->type(Trk::TrackStateOnSurface::Outlier)) {
230  dataStr += " (Outlier)";
231  } else if ((*it)->type(Trk::TrackStateOnSurface::Hole)) {
232  dataStr += " (Hole)";
233  }
234  dataStrings.push_back(dataStr);
235  }
236  aeot = (*it)->alignmentEffectsOnTrack();
237  if (aeot) {
238  std::string idStr = " AEOT ";
239  idStrings.push_back(idStr);
240  std::ostringstream souta;
241  souta << std::setprecision(3) << " deltaTranslation (mm) " << aeot->deltaTranslation() << " error "
242  << aeot->sigmaDeltaTranslation() << " deltaAngle (mrad) " << 1000 * aeot->deltaAngle() << " error "
243  << 1000 * aeot->sigmaDeltaAngle();
244  dataStrings.push_back(souta.str());
245  }
246  }
247 
248  // second loop to print out aligned strings
249  unsigned int n = idStrings.size();
250  for (unsigned int i = 0; i < n; ++i) {
251  sout << std::left << std::setw(idWidth) << idStrings[i] << std::right << " " << dataStrings[i];
252  if (i != n - 1) sout << std::endl;
253  }
254 
255  return sout.str();
256 }
257 
258 
259 std::string
261 {
262  if (track.info().patternRecoInfo(Trk::TrackInfo::STACO)) return "STACO";
263  if (track.info().patternRecoInfo(Trk::TrackInfo::StacoLowPt)) return "StacoLowPt";
264  if (track.info().patternRecoInfo(Trk::TrackInfo::Muonboy)) return "Muonboy";
265  if (track.info().patternRecoInfo(Trk::TrackInfo::MuTag)) return "MuTag";
266  if (track.info().patternRecoInfo(Trk::TrackInfo::MuidComb)
267  || track.info().patternRecoInfo(Trk::TrackInfo::MuidCombined))
268  return "MuidCombined";
269  if (track.info().patternRecoInfo(Trk::TrackInfo::MuidStandAlone)) return "MuidStandAlone";
270  if (track.info().patternRecoInfo(Trk::TrackInfo::Moore)) return "Moore";
271  if (track.info().patternRecoInfo(Trk::TrackInfo::MuGirl)) return "MuGirl";
272  if (track.info().patternRecoInfo(Trk::TrackInfo::MuGirlUnrefitted)) return "MuGirlUnrefitted";
273  if (track.info().patternRecoInfo(Trk::TrackInfo::MuidVertexAssociator)) return "MuidVertexAssociator";
274  if (track.info().patternRecoInfo(Trk::TrackInfo::MuGirlLowBeta)) return "MuGirlLowBeta";
275  return "Unknown";
276 }
277 
278 std::string
280 {
281 
282  std::ostringstream sout;
283 
284  sout << printPatRec(track);
285 
286  const Trk::FitQuality* fq = track.fitQuality();
287  if (fq) {
288  sout << std::setprecision(4) << " : chi2 " << fq->chiSquared() << " ndof " << fq->numberDoF();
289  } else {
290  sout << " no fit Quality ";
291  }
292  const Trk::Perigee* pp = track.perigeeParameters();
293  if (pp) {
294  sout << " " << print(*pp);
295  } else {
296  sout << " no perigee ";
297  }
298  sout <<std::endl;
299  sout<<"----- Track states -------"<<std::endl;
300  unsigned int n{1};
301  for (const Trk::TrackStateOnSurface* tsos : *track.trackStateOnSurfaces()) {
302  if (tsos->measurementOnTrack()) sout<<" **** "<<std::setw(3)<<n<<" Measurement: "<<print(*tsos->measurementOnTrack())<<std::endl;
303  if (tsos->materialEffectsOnTrack()) sout<<" **** "<<std::setw(3)<<n<<" Material: "<<print(*tsos->materialEffectsOnTrack())<<std::endl;
304  if (tsos->alignmentEffectsOnTrack()) sout<<" **** "<<std::setw(3)<<n<<" AEOT: "<<print(*tsos->alignmentEffectsOnTrack())<<std::endl;
305  if (tsos->trackParameters()) sout<<" **** "<<std::setw(3)<<n<<" Parameters: "<<print(*tsos->trackParameters())<<std::endl;
306  ++n;
307  }
308  sout<<"-----------------------------"<<std::endl;
309 
310  return sout.str();
311 }
312 
313 
314 std::string
316 {
317 
318  std::ostringstream sout;
319 
320  // get first none-trigger id
321  Identifier chid = m_edmHelperSvc->chamberId(segment);
322  int nphi = 0;
323  int ntrigEta = 0;
324  int neta = 0;
325 
326  const MuonGM::MdtReadoutElement* mdtDetEl = nullptr;
327  Identifier shortestTubeId;
328  double shortestTubeLen = 1e9;
329 
330  std::vector<const Trk::MeasurementBase*>::const_iterator hit = segment.containedMeasurements().begin();
331  std::vector<const Trk::MeasurementBase*>::const_iterator hit_end = segment.containedMeasurements().end();
332  for (; hit != hit_end; ++hit) {
333  Identifier id;
334  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(*hit);
335  if (rot)
336  id = rot->identify();
337  else {
338  const CompetingMuonClustersOnTrack* crot = dynamic_cast<const CompetingMuonClustersOnTrack*>(*hit);
339  if (crot) id = crot->containedROTs().front()->identify();
340  }
341  if (!id.is_valid()) continue;
342  bool measuresPhi = m_idHelperSvc->measuresPhi(id);
343  bool isTrigger = m_idHelperSvc->isTrigger(id);
344  if (measuresPhi)
345  ++nphi;
346  else if (!isTrigger)
347  ++neta;
348 
349  if (!isTrigger) {
350  const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(rot);
351  if (mdt && mdt->prepRawData()) {
352  double tubelen = 0.5 * mdt->prepRawData()->detectorElement()->tubeLength(id);
353  if (tubelen < shortestTubeLen) {
354  shortestTubeId = id;
355  shortestTubeLen = tubelen;
356  mdtDetEl = mdt->prepRawData()->detectorElement();
357  }
358  }
359  } else {
360  if (!measuresPhi) ++ntrigEta;
361  }
362  }
363 
364  sout << m_idHelperSvc->toStringChamber(chid);
365 
366  const Trk::FitQuality* fq = segment.fitQuality();
367  if (fq) {
368  sout << std::setprecision(2) << " chi2 " << std::setw(7) << fq->chiSquared();
369  } else {
370  sout << " no fit Quality ";
371  }
372 
373  sout << " neta " << std::setw(2) << neta << " nphi " << std::setw(2) << nphi << " nTrigEta " << std::setw(2)
374  << ntrigEta;
375 
376  const MuonSegmentQuality* q = dynamic_cast<const MuonSegmentQuality*>(fq);
377  if (q) sout << std::setw(2) << " nholes " << q->numberOfHoles();
378 
379 
380  sout << " theta " << std::fixed << std::setprecision(5) << std::setw(7) << segment.globalDirection().theta()
381  << " phi " << std::fixed << std::setprecision(3) << std::setw(6) << segment.globalDirection().phi();
382 
383  if (segment.hasFittedT0())
384  sout << " T0 " << std::fixed << std::setprecision(2) << std::setw(5) << segment.time() << " err "
385  << std::setw(5) << segment.errorTime();
386 
387  if (mdtDetEl) {
388  double posAlongTube = std::abs((mdtDetEl->globalToLocalTransf(shortestTubeId)*segment.globalPosition()).z());
389  double distFromEdge = posAlongTube - shortestTubeLen;
390  if (distFromEdge < -100.)
391  sout << " inside chamber";
392  else if (distFromEdge < -1.)
393  sout << " close to edge";
394  else if (distFromEdge < 0.0001)
395  sout << " on edge";
396  else
397  sout << " outside chamber";
398  }
399  return sout.str();
400 }
401 
402 std::string
404 {
405 
406  std::ostringstream sout;
407 
408  Identifier id = prd.identify();
409  sout << m_idHelperSvc->toString(id) << " ";
410 
411  const Amg::Vector3D* pos = nullptr;
412  const MuonCluster* cl = dynamic_cast<const MuonCluster*>(&prd);
413  if (cl)
414  pos = &cl->globalPosition();
415  else {
416  const MdtPrepData* mdt = dynamic_cast<const MdtPrepData*>(&prd);
417  if (mdt)
418  pos = &mdt->detectorElement()->surface(id).center();
419  else {
420  const CscStripPrepData* strip = dynamic_cast<const CscStripPrepData*>(&prd);
421  if (strip) pos = &strip->globalPosition();
422  }
423  }
424  if (!pos)
425  sout << " unknown type of muon prepdata " << std::endl;
426  else {
427  double h_r = pos->perp();
428  double h_z = pos->z();
429  double h_phi = pos->phi();
430  double h_theta = pos->theta();
431  double error = std::sqrt(prd.localCovariance()(0, 0));
432 
433  // add time for RPC
434  double rpcTime = 0.0;
435  const RpcPrepData* rpc = dynamic_cast<const RpcPrepData*>(&prd);
436  if (rpc) rpcTime = rpc->time();
437 
438  sout << "r " << std::fixed << std::setprecision(0) << std::setw(5) << h_r << " z " << std::fixed
439  << std::setprecision(0) << std::setw(5) << h_z << " theta " << std::fixed << std::setprecision(3)
440  << std::setw(4) << h_theta << " phi " << std::fixed << std::setprecision(3) << std::setw(4) << h_phi
441  << " error " << std::fixed << std::setprecision(2) << std::setw(5) << error;
442  if (rpc) sout << " time " << std::fixed << std::setprecision(2) << std::setw(5) << rpcTime;
443  }
444  return sout.str();
445 }
446 
447 std::string
449 {
450  return printId(measurement) + " " + printData(measurement);
451 }
452 
453 
454 std::string
455 MuonEDMPrinterTool::print(const std::vector<const Trk::MeasurementBase*>& measurements) const
456 {
457 
458  std::ostringstream sout;
459 
460  // first loop to get width of Id's for nice alignment
461  std::vector<std::string> idStrings;
462  std::vector<std::string> dataStrings;
463  unsigned int idWidth = 0;
464 
465  std::vector<const Trk::MeasurementBase*>::const_iterator hit = measurements.begin();
466  std::vector<const Trk::MeasurementBase*>::const_iterator hit_end = measurements.end();
467  // std::vector< const Trk::MeasurementBase* >::const_iterator hit_last = hit_end;
468  for (; hit != hit_end; ++hit) {
469  if (!*hit) {
470  sout << " WARNING, zero pointer detected in MeasurementBase vector!!! " << std::endl;
471  continue;
472  }
473  // Identifier part
474  std::string idStr = printId(**hit);
475  idStrings.push_back(idStr);
476  if (idStr.length() > idWidth) idWidth = idStr.length();
477  // Data part
478  std::string dataStr = printData(**hit);
479  dataStrings.push_back(dataStr);
480  }
481 
482 
483  // second loop to print out aligned strings
484  unsigned int n = idStrings.size();
485  for (unsigned int i = 0; i < n; ++i) {
486  sout << std::left << std::setw(idWidth) << idStrings[i] << std::right << " " << dataStrings[i];
487  if (i != n - 1) sout << std::endl;
488  }
489 
490  return sout.str();
491 }
492 
493 std::string
494 MuonEDMPrinterTool::print(const std::vector<const MuonSegment*>& segs) const
495 {
496 
497  std::ostringstream sout;
498 
499  std::vector<const MuonSegment*>::const_iterator it = segs.begin();
500  std::vector<const MuonSegment*>::const_iterator it_end = segs.end();
501  std::vector<const MuonSegment*>::const_iterator it_last = it_end;
502  --it_last;
503  for (; it != it_end; ++it) {
504  if (!*it) {
505  sout << " WARNING, zero pointer detected in MuonSegment vector!!! " << std::endl;
506  continue;
507  }
508  sout << print(**it);
509  if (it != it_last) sout << std::endl;
510  }
511 
512  return sout.str();
513 }
514 
515 std::string
516 MuonEDMPrinterTool::print(std::vector<std::unique_ptr<MuonSegment> >& segs) const
517 {
518 
519  std::ostringstream sout;
520 
521  std::vector<std::unique_ptr<MuonSegment> >::iterator it = segs.begin();
522  std::vector<std::unique_ptr<MuonSegment> >::iterator it_end = segs.end();
523  std::vector<std::unique_ptr<MuonSegment> >::iterator it_last = it_end;
524  --it_last;
525  for (; it != it_end; ++it) {
526  if (!*it) {
527  sout << " WARNING, zero pointer detected in MuonSegment vector!!! " << std::endl;
528  continue;
529  }
530  sout << print(**it);
531  if (it != it_last) sout << std::endl;
532  }
533 
534  return sout.str();
535 }
536 
537 std::string
539 {
540  std::ostringstream sout;
541 
542  sout << "MuonSegmentCombinationCollection with combis " << combiCol.size() << std::endl;
546  --it_last;
547  for (; it != it_end; ++it) {
548  if (!*it) {
549  sout << " WARNING, zero pointer detected in MuonSegmentCombinationCollection!!! " << std::endl;
550  continue;
551  }
552  sout << print(**it);
553  if (it != it_last) sout << std::endl;
554  }
555  return sout.str();
556 }
557 
558 std::string
560 {
561  std::ostringstream sout;
562 
563  unsigned int nstations = combi.numberOfStations();
564  sout << "SegmentCombination with stations " << nstations << std::endl;
565 
566  // loop over chambers in combi
567  for (unsigned int i = 0; i < nstations; ++i) {
568 
569  // loop over segments in station
571 
572  // check if not empty
573  if (!stationSegs || stationSegs->empty()) continue;
574 
575  // get chamber identifier, chamber index and station index
576  // Identifier chid = m_edmHelperSvc->chamberId( *stationSegs->front() );
577  sout << print(*stationSegs);
578  if (i != nstations - 1) sout << std::endl;
579  }
580 
581  return sout.str();
582 }
583 
584 std::string
586 {
587  std::ostringstream sout;
588 
589  unsigned int nhits = pattern.numberOfContainedPrds();
590  sout << "MuonPattern with " << nhits << " hits" << std::setprecision(5) << " theta "
591  << pattern.globalDirection().theta() << " phi " << pattern.globalDirection().phi() << std::setprecision(1)
592  << " r " << std::setw(5) << (int)pattern.globalPosition().perp() << " z " << std::setw(5)
593  << (int)pattern.globalPosition().z() << std::endl;
594  for (unsigned int i = 0; i < nhits; ++i) {
595  const Trk::PrepRawData* prd = pattern.prd(i);
596  if (!prd) {
597  sout << " ERROR found zero pointer on MuonPattern " << std::endl;
598  continue;
599  }
600  sout << " " << print(*prd);
601  if (i < nhits - 1) sout << std::endl;
602  }
603  return sout.str();
604 }
605 
606 std::string
608 {
609  std::ostringstream sout;
610 
611  sout << "MuonPatternCollection with " << patCol.size() << " patterns " << std::endl;
613  MuonPatternCollection::const_iterator it_end = patCol.end();
614  MuonPatternCollection::const_iterator it_last = it_end;
615  --it_last;
616  for (; it != it_end; ++it) {
617  if (!*it) {
618  sout << " WARNING, zero pointer detected in MuonPatternCollection!!! " << std::endl;
619  continue;
620  }
621  sout << " " << print(**it);
622  if (it != it_last) sout << std::endl;
623  }
624  return sout.str();
625 }
626 
627 std::string
629 {
630  std::ostringstream sout;
631 
632  sout << "MuonPrdPatternCollection with " << patCol.size() << " patterns " << std::endl;
636  --it_last;
637  for (; it != it_end; ++it) {
638  if (!*it) {
639  sout << " WARNING, zero pointer detected in MuonPatternCollection!!! " << std::endl;
640  continue;
641  }
642  sout << " " << print(**it);
643  if (it != it_last) sout << std::endl;
644  }
645  return sout.str();
646 }
647 
648 std::string
650 {
651  std::ostringstream sout;
652 
653  sout << "MuonPatternCombinationCollection with combis " << combiCol.size() << std::endl;
657  --it_last;
658  for (; it != it_end; ++it) {
659  if (!*it) {
660  sout << " WARNING, zero pointer detected in MuonPatternCombinationCollection!!! " << std::endl;
661  continue;
662  }
663  sout << print(**it);
664  if (it != it_last) sout << std::endl;
665  }
666  return sout.str();
667 }
668 
669 std::string
671 {
672  std::ostringstream sout;
673 
674  unsigned int nchambers = combi.chamberData().size();
675  sout << "MuonPatternCombination with " << nchambers << " chambers ";
676  const Trk::TrackParameters* pars = combi.trackParameter();
677  if (pars) {
678  sout << " " << print(*pars);
679  } else {
680  sout << " -> combi has no parameters ";
681  }
682  if (!combi.chamberData().empty()) sout << std::endl;
683  std::vector<MuonPatternChamberIntersect>::const_iterator chit = combi.chamberData().begin();
684  std::vector<MuonPatternChamberIntersect>::const_iterator chit_end = combi.chamberData().end();
685  std::vector<MuonPatternChamberIntersect>::const_iterator chit_last = chit_end;
686  --chit_last;
687  for (; chit != chit_end; ++chit) {
688  const MuonPatternChamberIntersect& chamberIntersect = *chit;
689  sout << print(chamberIntersect);
690  if (chit != chit_last) sout << std::endl;
691  }
692  return sout.str();
693 }
694 
695 std::string
697 {
698  std::ostringstream sout;
699 
700  std::string chIdString("Unknown id");
701  double chTheta(-99.);
702  double chPhi(-99.);
703  // if the intersect is not empty use the Identifier of first hit as chamber ID
704  const Trk::PrepRawData* firstPrd = nullptr;
705  if (!intersect.prepRawDataVec().empty() && intersect.prepRawDataVec().front()) {
706  firstPrd = intersect.prepRawDataVec().front();
707  chIdString = m_idHelperSvc->toStringChamber(firstPrd->identify());
708  chTheta = firstPrd->detectorElement()->center().theta();
709  chPhi = firstPrd->detectorElement()->center().phi();
710  } else {
711  return chIdString;
712  }
713  Identifier chId = m_idHelperSvc->chamberId(firstPrd->identify());
714  int neta = 0;
715  int nphi = 0;
716  bool isMdt = false;
717 
718  unsigned int nchannelsEta = 0;
719  unsigned int nchannelsPhi = 0;
720  std::set<const Trk::TrkDetElementBase*> detEls;
721  std::vector<const Trk::PrepRawData*>::const_iterator hit = intersect.prepRawDataVec().begin();
722  std::vector<const Trk::PrepRawData*>::const_iterator hit_end = intersect.prepRawDataVec().end();
723  for (; hit != hit_end; ++hit) {
724  const Trk::PrepRawData* prd = *hit;
725  if (!prd) {
726  sout << " ERROR found zero pointer on MuonPatternChamberIntersect " << std::endl;
727  continue;
728  }
729  const Identifier& id = prd->identify();
730  if (m_idHelperSvc->measuresPhi(id))
731  ++nphi;
732  else
733  ++neta;
734  if (!isMdt && m_idHelperSvc->isMdt(id)) isMdt = true;
735 
736  if (!detEls.count(prd->detectorElement())) {
737  detEls.insert(prd->detectorElement());
738 
739  if (isMdt && detEls.empty()) {
740 
742  const MuonGM::MuonDetectorManager* MuonDetMgr{*DetectorManagerHandle};
743  if (MuonDetMgr == nullptr) {
744  ATH_MSG_DEBUG("Cannot retrieve DetectorManager ");
745  } else {
746 
747  Identifier idml1 = m_idHelperSvc->mdtIdHelper().channelID(id, 1, 1, 1);
748  Identifier idml2 = m_idHelperSvc->mdtIdHelper().channelID(id, 2, 1, 1);
749  const MuonGM::MdtReadoutElement* detEl1 = MuonDetMgr->getMdtReadoutElement(idml1);
750  const MuonGM::MdtReadoutElement* detEl2 = nullptr;
751  if (m_idHelperSvc->mdtIdHelper().numberOfMultilayers(id) == 2) {
752  detEl2 = MuonDetMgr->getMdtReadoutElement(idml2);
753  } else {
754  ATH_MSG_DEBUG("A single multilayer for this station " << m_idHelperSvc->toString(id));
755  }
756  if (detEl1 ) {
757  detEls.insert(detEl1);
758  nchannelsEta += detEl1->getNLayers() * detEl1->getNtubesperlayer();
759  } else {
760  ATH_MSG_DEBUG("Couldn't find first detector element ");
761  }
762  if (detEl2 ) {
763  detEls.insert(detEl2);
764  nchannelsEta += detEl2->getNLayers() * detEl2->getNtubesperlayer();
765  }
766  }
767  } else if (m_idHelperSvc->isTgc(id)) {
768  const MuonGM::TgcReadoutElement* detEl =
769  dynamic_cast<const MuonGM::TgcReadoutElement*>(prd->detectorElement());
770  if (detEl) {
771  for (int i = 1; i <= detEl->nGasGaps(); ++i) {
772  nchannelsEta += detEl->nWireGangs(i);
773  nchannelsPhi += detEl->nStrips(i);
774  }
775  }
776  } else if (m_idHelperSvc->isRpc(id)) {
777  const MuonGM::RpcReadoutElement* detEl =
778  dynamic_cast<const MuonGM::RpcReadoutElement*>(prd->detectorElement());
779  if (detEl) {
780  nchannelsPhi += detEl->nGasGapPerLay() * detEl->NphiStripPanels() * detEl->NphiStrips();
781  nchannelsEta += detEl->NetaStrips();
782  }
783  }
784  }
785  }
786 
787  unsigned int nchHitsEta = 0;
788  unsigned int nchHitsPhi = 0;
789 
790 
791  if (isMdt && !m_mdtKey.empty()) {
792  SG::ReadHandle mdtPrdContainer{m_mdtKey};
793  const MdtPrepDataCollection *coll = mdtPrdContainer->indexFindPtr(m_idHelperSvc->moduleHash(chId));
794  if (coll != nullptr) {
795  nchHitsEta = coll->size();
796  }
797  } else if (m_idHelperSvc->isRpc(chId) && !m_rpcKey.empty()) {
798  SG::ReadHandle rpcPrdContainer{m_rpcKey};
799  const RpcPrepDataCollection* coll = rpcPrdContainer->indexFindPtr(m_idHelperSvc->moduleHash(chId));
800  if (coll != nullptr) {
801  for (const RpcPrepData* prd : *coll) {
802  if (m_idHelperSvc->measuresPhi(prd->identify()))
803  ++nchHitsPhi;
804  else
805  ++nchHitsEta;
806  }
807  }
808  } else if (m_idHelperSvc->isTgc(chId) && !m_tgcKey.empty()) {
809  SG::ReadHandle tgcPrdContainer{m_tgcKey};
810  const TgcPrepDataCollection *coll = tgcPrdContainer->indexFindPtr(m_idHelperSvc->moduleHash(chId));
811  if (coll != nullptr) {
812  for (const TgcPrepData* prd : *coll) {
813  if (m_idHelperSvc->measuresPhi(prd->identify()))
814  ++nchHitsPhi;
815  else
816  ++nchHitsEta;
817  }
818  }
819  }
820 
821  sout.setf(std::ios::left);
822  sout << std::setw(33) << chIdString << " neta " << std::setw(3) << neta;
823  if (!isMdt)
824  sout << " nphi " << std::setw(3) << nphi;
825  else
826  sout << " ";
827 
828  double scaleEta = nchannelsEta != 0 ? 1. / nchannelsEta : 0.;
829  double scalePhi = nchannelsPhi != 0 ? 1. / nchannelsPhi : 0.;
830  sout << " occupancy eta " << std::fixed << std::setprecision(2) << std::setw(5) << scaleEta * nchHitsEta;
831  if (!isMdt)
832  sout << " phi " << std::fixed << std::setw(5) << scalePhi * nchHitsPhi;
833  else
834  sout << " ";
835 
836  sout << std::setprecision(2) << " pat theta " << std::setw(5) << intersect.intersectDirection().theta()
837  << " ch theta " << std::setw(5) << chTheta << " ch phi " << std::setw(6) << chPhi << std::setprecision(1)
838  << " r " << std::setw(5) << (int)intersect.intersectPosition().perp() << " z " << std::setw(5)
839  << (int)intersect.intersectPosition().z();
840 
841  return sout.str();
842 }
843 
844 std::string
846 {
847  std::ostringstream sout;
848  sout << "r " << std::fixed << std::setprecision(0) << std::setw(5)
849  << pars.position().perp()
850  << " z " << std::fixed << std::setprecision(0) << std::setw(6) << pars.position().z() << " theta "
851  << std::fixed << std::setprecision(5) << std::setw(7) << pars.momentum().theta()<< " eta "
852  << std::fixed << std::setprecision(5) << std::setw(7) << pars.momentum().eta() << " phi " << std::fixed
853  << std::setprecision(3) << std::setw(6) << pars.momentum().phi() << " q*p(GeV) " << std::scientific
854  << std::setprecision(3) << std::setw(10) << pars.momentum().mag() * pars.charge() * 1e-3 << " pT(GeV) "
855  << std::scientific << std::setprecision(3) << std::setw(9) << pars.momentum().perp() * 1e-3;
856 
857  return sout.str();
858 }
859 
860 std::string
862 {
863  std::ostringstream sout;
864 
865  const std::vector<double>& residual = resPull.residual();
866  const std::vector<double>& pull = resPull.pull();
867  for (unsigned int i = 0; i < residual.size(); ++i) {
868  if (residual[i] != 999. && residual[i] != -999.)
869  sout << " residual " << std::setprecision(3) << std::setw(8) << residual[i] << " ";
870  }
871  sout << " pull ";
872  for (unsigned int i = 0; i < pull.size(); ++i) sout << std::setprecision(3) << std::setw(8) << pull[i] << " ";
873  return sout.str();
874 }
875 
876 
877 std::string
879 {
880  std::ostringstream sout;
881 
882  // print position of hit
883  double h_r = measurement.globalPosition().perp();
884  double h_z = measurement.globalPosition().z();
885  double h_phi = measurement.globalPosition().phi();
886  double h_theta = measurement.globalPosition().theta();
887  double error = std::sqrt(measurement.localCovariance()(0, 0));
888  const Trk::LocalParameters& lpars = measurement.localParameters();
889  double local_pos = lpars.contains(Trk::locX) ? lpars[Trk::locX] : (lpars.contains(Trk::locY) ? lpars[Trk::locY] : 0.);
890  sout << "r " << std::fixed << std::setprecision(0) << std::setw(5) << h_r << " z " << std::fixed
891  << std::setprecision(0) << std::setw(5) << h_z << " phi " << std::fixed << std::setprecision(3) << std::setw(4)
892  << h_phi << " theta " << std::fixed << std::setprecision(3) << std::setw(4) << h_theta
893  << " lPos " << std::fixed << std::setprecision(2) << std::setw(5) << local_pos
894  << " error " << std::fixed << std::setprecision(2) << std::setw(5) << error;
895 
896 
897  // print measurement data
898  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(&measurement);
899  if (rot) {
900  // add drift time for MDT
901  const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(rot);
902  if (mdt) {
903  sout << " r_drift " << std::fixed << std::setprecision(2) << std::setw(5) << mdt->driftRadius();
904 
905  } else {
906  // add time for RPC
907  const RpcClusterOnTrack* rpc = dynamic_cast<const RpcClusterOnTrack*>(rot);
908  if (rpc) {
909  const RpcPrepData* rpcPRD = rpc->prepRawData();
910  if (rpcPRD) {
911  sout << " time " << std::fixed << std::setprecision(2) << std::setw(5) << rpcPRD->time();
912  }
913  }
914  }
915  } else { // !rot
916  // if we get here: not a ROT, maybe a CROT
917  const CompetingMuonClustersOnTrack* crot = dynamic_cast<const CompetingMuonClustersOnTrack*>(&measurement);
918  if (crot) {
919  unsigned int nlayers = 0;
920  unsigned int nhits = 0;
921  std::set<Identifier> layers;
922  std::vector<double> rpcTimes;
923  const std::vector<const MuonClusterOnTrack*>& rots = crot->containedROTs();
924  nhits = rots.size();
925  rpcTimes.reserve(nhits);
926  std::vector<const MuonClusterOnTrack*>::const_iterator itR = rots.begin(), itR_end = rots.end();
927  for (; itR != itR_end; ++itR) {
928  Identifier layerId = m_idHelperSvc->layerId((*itR)->identify());
929  layers.insert(layerId);
930  const RpcClusterOnTrack* rpc = dynamic_cast<const RpcClusterOnTrack*>(*itR);
931  const RpcPrepData* rpcPRD = rpc ? rpc->prepRawData() : nullptr;
932  if (rpcPRD) rpcTimes.push_back(rpcPRD->time());
933  }
934  nlayers = layers.size();
935  sout << " CompRot: hits " << nhits << " layers " << nlayers;
936  // add time for RPC
937  if (!rpcTimes.empty()) {
938  sout << (rpcTimes.size() == 1 ? " time" : " times") << std::fixed << std::setprecision(2);
939  std::vector<double>::iterator itD = rpcTimes.begin(), itD_end = rpcTimes.end();
940  for (; itD != itD_end; ++itD) sout << " " << std::setw(5) << *itD;
941  }
942  } // if crot
943  } // else !rot
944 
945  return sout.str();
946 } // printData( Trk::MeasurementBase )
947 
948 
949 std::string
951 {
952  std::string idStr;
953  Identifier id = m_edmHelperSvc->getIdentifier(measurement);
954  if (!id.is_valid()) {
955  const Trk::PseudoMeasurementOnTrack* pseudo = dynamic_cast<const Trk::PseudoMeasurementOnTrack*>(&measurement);
956  if (pseudo)
957  idStr = "pseudo measurement";
958  else
959  idStr = "no Identifier";
960  } else if (!m_idHelperSvc->isMuon(id)) {
961  idStr = "Id hit";
962  } else {
963  idStr = m_idHelperSvc->toString(id);
964  }
965 
966  return idStr;
967 }
968 
970  std::stringstream mat_string{};
971  const Trk::MaterialEffectsOnTrack* matOnTrk = dynamic_cast<const Trk::MaterialEffectsOnTrack*>(&mat);
972  if (matOnTrk) {
973  const Trk::ScatteringAngles* scatAng = matOnTrk->scatteringAngles();
974  if (scatAng) {
975  mat_string<<" dPhi: "<<scatAng->deltaPhi()<<" +- "<<scatAng->sigmaDeltaPhi()<< " / ";
976  mat_string<<" dTheta: "<<scatAng->deltaTheta()<<" +- "<<scatAng->sigmaDeltaTheta()<<" ";
977  }
978  const Trk::EnergyLoss* eloss = matOnTrk->energyLoss();
979  if (eloss) {
980  mat_string<<" deltaE: "<<eloss->deltaE();
981  if (std::abs(std::abs(eloss->sigmaMinusDeltaE()) - std::abs(eloss->sigmaPlusDeltaE())) > std::numeric_limits<float>::epsilon()) {
982  mat_string<<" +/- "<<eloss->sigmaPlusDeltaE()<<"/"<<eloss->sigmaMinusDeltaE();
983  } else {
984  mat_string<<" +- "<<eloss->sigmaDeltaE();
985  }
986  mat_string<<" Ion: "<<eloss->meanIoni()<<" +- "<<eloss->sigmaIoni();
987  mat_string<<" Rad: "<<eloss->meanRad()<<" +- "<<eloss->sigmaRad();
988  mat_string<<" Length "<<eloss->length();
989  }
990  mat_string<<" ";
991 
992  }
993  return mat_string.str();
994 }
996  std::stringstream aeot_string;
997  aeot_string<<"dTrans: "<<aeot.deltaTranslation()<<" +- "<<aeot.sigmaDeltaTranslation();
998  aeot_string<<" dAngle: "<<aeot.deltaAngle()<<" +- "<<aeot.sigmaDeltaAngle();
999  return aeot_string.str();
1000 }
1001 
1002 std::string MuonEDMPrinterTool::print(const Trk::TrackStateOnSurface& tsos) const {
1003  std::stringstream tsos_str{};
1004  if (tsos.measurementOnTrack()) tsos_str<<"Measurement: "<<print(*tsos.measurementOnTrack())<<"\t";
1005  if (tsos.materialEffectsOnTrack()) tsos_str<<"Material "<<print(*tsos.materialEffectsOnTrack())<<"\t";
1006  if (tsos.trackParameters()) tsos_str<<"Parameters: "<<print(*tsos.trackParameters())<<"\t";
1007 
1008  return tsos_str.str();
1009 }
1010 } // namespace Muon
Muon::MuonSegmentQuality
Definition: MuonSegmentQuality.h:34
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::AlignmentEffectsOnTrack::effectsLastFromNowOn
bool effectsLastFromNowOn() const
Returns true if the effects of this AlignmentEffectsOnTrack apply to all remaining TrackStatesOnSurfa...
Definition: AlignmentEffectsOnTrack.h:68
Trk::ScatteringAngles::deltaPhi
double deltaPhi() const
returns the
Definition: ScatteringAngles.h:82
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Muon::MuonPatternCombination::chamberData
const std::vector< MuonPatternChamberIntersect > & chamberData() const
access to the MuonPatternChamberIntersect associated with the MuonPatternCombination
Definition: MuonPatternCombination.h:60
MuonCluster.h
Trk::EnergyLoss::sigmaMinusDeltaE
double sigmaMinusDeltaE() const
returns the negative side
Trk::LocalParameters
Definition: LocalParameters.h:98
Trk::TrackStateOnSurface::trackParameters
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
Trk::TrackInfo::MuidCombined
@ MuidCombined
MuidCombined.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:180
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
Muon::MuonEDMPrinterTool::m_mdtKey
SG::ReadHandleKey< MdtPrepDataContainer > m_mdtKey
Definition: MuonEDMPrinterTool.h:161
Muon::MuonEDMPrinterTool::printData
std::string printData(const Trk::MeasurementBase &measurement) const
print data part of Muon MeasurementBase to string
Definition: MuonEDMPrinterTool.cxx:878
Muon::MuonSegmentCombination
Definition: MuonSegmentCombination.h:30
MuonGM::MdtReadoutElement::getNLayers
int getNLayers() const
Returns the number of tube layers inside the multilayer.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
AlignmentEffectsOnTrack.h
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
MuonGM::RpcReadoutElement::NphiStripPanels
int NphiStripPanels() const
returns the number of phi strip panels (1 or 2)
MuonPatternChamberIntersect.h
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
MuonGM::MdtReadoutElement::tubeLength
double tubeLength(const int tubeLayer, const int tube) const
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Muon::MdtDriftCircleOnTrack::prepRawData
virtual const MdtPrepData * prepRawData() const override final
Returns the PrepRawData used to create this corrected measurement.
Definition: MdtDriftCircleOnTrack.h:257
Trk::locX
@ locX
Definition: ParamDefs.h:37
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
Muon::MuonEDMPrinterTool::MuonEDMPrinterTool
MuonEDMPrinterTool(const std::string &, const std::string &, const IInterface *)
constructor
Definition: MuonEDMPrinterTool.cxx:35
MuonTrackSummary.h
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MuonEDMPrinterTool.h
Muon::MuonEDMPrinterTool::m_tgcKey
SG::ReadHandleKey< TgcPrepDataContainer > m_tgcKey
Definition: MuonEDMPrinterTool.h:173
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
MuonGM::RpcReadoutElement::nGasGapPerLay
int nGasGapPerLay() const
returns the number of gasgaps
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
Trk::AlignmentEffectsOnTrack::vectorOfAffectedTSOS
const std::vector< Identifier > & vectorOfAffectedTSOS() const
Returns a vector of the affected TSOS in the track.
Definition: AlignmentEffectsOnTrack.h:115
MuonEDMHelperSvc.h
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Trk::TrackInfo::MuidStandAlone
@ MuidStandAlone
MuidStandalone.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:165
Trk::ResidualPull::Unbiased
@ Unbiased
RP with track state that has measurement not included.
Definition: ResidualPull.h:57
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
Trk::LocalParameters::contains
bool contains(ParamDefs par) const
The simple check for the clients whether the parameter is contained.
Trk::ResidualPull::pull
const std::vector< double > & pull() const
return pull vector
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Trk::EnergyLoss::sigmaDeltaE
double sigmaDeltaE() const
returns the symmatric error
CompetingMuonClustersOnTrack.h
CscStripPrepData.h
Muon::MuonSegmentCombination::stationSegments
SegmentVec * stationSegments(unsigned int index) const
Access to segments in a given station.
Definition: MuonSegmentCombination.h:114
Trk::ScatteringAngles
represents a deflection of the track caused through multiple scattering in material.
Definition: ScatteringAngles.h:26
Trk::TrackStateOnSurface::measurementOnTrack
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
MuonGM::RpcReadoutElement
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:55
Trk::TrackInfo::Muonboy
@ Muonboy
Tracks from MuonBoy.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:117
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Trk::EnergyLoss::sigmaRad
double sigmaRad() const
Muon::RpcClusterOnTrack
Class to represent calibrated clusters formed from RPC strips.
Definition: RpcClusterOnTrack.h:35
MdtPrepData.h
MuonSegmentQuality.h
Trk::AlignmentEffectsOnTrack::deltaAngle
double deltaAngle() const
returns the
Definition: AlignmentEffectsOnTrack.h:103
Trk::ResidualPull
This class containes residual and pull information.
Definition: ResidualPull.h:46
Muon::CompetingMuonClustersOnTrack
Definition: CompetingMuonClustersOnTrack.h:54
MdtDriftCircleOnTrack.h
Trk::MaterialEffectsBase
base class to integrate material effects on Trk::Track in a flexible way.
Definition: MaterialEffectsBase.h:35
Trk::EnergyLoss::meanIoni
double meanIoni() const
Trk::Surface::center
const Amg::Vector3D & center() const
Returns the center position of the Surface.
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Trk::AlignmentEffectsOnTrack
Class to represent misalignments or 'discontinuities' on tracks These have a surface where the z axis...
Definition: AlignmentEffectsOnTrack.h:24
Trk::TrackState::unidentified
@ unidentified
Definition: TrackStateDefs.h:27
PrepRawData.h
MuonGM::TgcReadoutElement::nGasGaps
int nGasGaps() const
Returns the number of gas gaps associated with the readout element (2 or 3)
Trk::MuonTrackSummary::ChamberHitSummary
structure to hold information per chamber in the muon system
Definition: MuonTrackSummary.h:32
MuonSegmentCombination.h
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
Track.h
MuonGM::MdtReadoutElement::globalToLocalTransf
Amg::Transform3D globalToLocalTransf(const int tubeLayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:401
MaterialEffectsOnTrack.h
Trk::PseudoMeasurementOnTrack
Class to handle pseudo-measurements in fitters and on track objects.
Definition: PseudoMeasurementOnTrack.h:44
Muon::RpcPrepData::time
float time() const
Returns the time.
Definition: RpcPrepData.h:197
Muon::MuonEDMPrinterTool::m_edmHelperSvc
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonEDMPrinterTool.h:142
Muon::CscStripPrepData
Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).
Definition: CscStripPrepData.h:40
Muon::MuonPattern
Basic class for patterns in the muon spectrometer consistig out of a list of Trk::PrepRawData objects...
Definition: MuonPattern.h:23
Trk::MaterialEffectsOnTrack
represents the full description of deflection and e-loss of a track in material.
Definition: MaterialEffectsOnTrack.h:40
Trk::EnergyLoss::length
double length() const
RpcClusterOnTrack.h
Trk::ScatteringAngles::sigmaDeltaTheta
double sigmaDeltaTheta() const
returns the
Definition: ScatteringAngles.h:100
Muon::MuonEDMPrinterTool::print
std::string print(const Trk::Track &track) const
print track parameters to string
Definition: MuonEDMPrinterTool.cxx:279
ResidualPull.h
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
Trk::TrackStateOnSurface::Hole
@ Hole
A hole on the track - this is defined in the following way.
Definition: TrackStateOnSurface.h:128
lumiFormat.i
int i
Definition: lumiFormat.py:85
Muon::RpcPrepData
Class to represent RPC measurements.
Definition: RpcPrepData.h:35
Trk::TrackStateOnSurface::materialEffectsOnTrack
const MaterialEffectsBase * materialEffectsOnTrack() const
return material effects const overload
Muon::MuonPatternChamberIntersect
This class holds information needed for the Moore and MoMu pattern recognition for a muon chamber.
Definition: MuonPatternChamberIntersect.h:38
Trk::TrackInfo::MuGirlUnrefitted
@ MuGirlUnrefitted
Tracks from MuGirl not refitted with iPat.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:120
beamspotman.n
n
Definition: beamspotman.py:731
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
urldecode::states
states
Definition: urldecode.h:39
MuonGM::RpcReadoutElement::NphiStrips
int NphiStrips() const
returns the number of phi strips
MuonPatternCombination.h
Trk::EnergyLoss::deltaE
double deltaE() const
returns the
MuonGM::TgcReadoutElement
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:42
PseudoMeasurementOnTrack.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::TrackInfo::MuidVertexAssociator
@ MuidVertexAssociator
MuidVertexAssociator.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:183
Trk::TrackInfo::MuGirlLowBeta
@ MuGirlLowBeta
MuGirlLowBeta.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:192
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:282
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::MuonTrackSummary
Detailed track summary for the muon system Give access to hit counts per chamber.
Definition: MuonTrackSummary.h:26
Muon::MuonEDMPrinterTool::m_rpcKey
SG::ReadHandleKey< RpcPrepDataContainer > m_rpcKey
Definition: MuonEDMPrinterTool.h:167
Trk::TrackInfo::STACO
@ STACO
Tracks produced by STACO.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:123
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
TrackSummary.h
Trk::ParametersBase
Definition: ParametersBase.h:55
Muon::MdtDriftCircleOnTrack::driftRadius
double driftRadius() const
Returns the value of the drift radius.
Definition: MdtDriftCircleOnTrack.h:277
MuonGM::TgcReadoutElement::nStrips
int nStrips(int gasGap) const
Returns the number of strips in a given gas gap.
Muon::MuonPrepDataCollection
Template to hold collections of MuonPrepRawData objects.
Definition: MuonPrepDataCollection.h:46
DataVector< const Trk::TrackStateOnSurface >
Trk::EnergyLoss::meanRad
double meanRad() const
MuonGM::RpcReadoutElement::NetaStrips
int NetaStrips() const
returns the number of eta strips
MuonGM::TgcReadoutElement::nWireGangs
int nWireGangs(int gasGap) const
Returns the number of wire gangs (Random grouping of wires) in a given gas gap.
Muon::MuonEDMPrinterTool::m_pullCalculator
ToolHandle< Trk::IResidualPullCalculator > m_pullCalculator
Definition: MuonEDMPrinterTool.h:149
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::MeasurementBase
Definition: MeasurementBase.h:58
Muon::RpcClusterOnTrack::prepRawData
virtual const RpcPrepData * prepRawData() const override final
Returns the RpcPrepData - is a TRT_DriftCircle in this scope.
Definition: RpcClusterOnTrack.h:127
createDCubeDigitHistograms.rpcTime
rpcTime
Definition: createDCubeDigitHistograms.py:64
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
Trk::EnergyLoss
This class describes energy loss material effects in the ATLAS tracking EDM.
Definition: EnergyLoss.h:34
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition: MdtDriftCircleOnTrack.h:37
Trk::MeasurementBase::globalPosition
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Muon::MdtPrepData
Class to represent measurements from the Monitored Drift Tubes.
Definition: MdtPrepData.h:33
Muon::CompetingMuonClustersOnTrack::containedROTs
const std::vector< const MuonClusterOnTrack * > & containedROTs() const
returns the vector of SCT_ClusterOnTrack objects .
Definition: CompetingMuonClustersOnTrack.h:184
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::MuonEDMPrinterTool::initialize
StatusCode initialize()
AlgTool initilize.
Definition: MuonEDMPrinterTool.cxx:41
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Trk::TrackInfo::Moore
@ Moore
Moore (MoMu)
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:177
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Trk::MaterialEffectsOnTrack::energyLoss
const EnergyLoss * energyLoss() const
returns the energy loss object.
InDetSimDataHelpers::identifiers
std::vector< Identifier > identifiers(const InDetSimDataCollection &coll)
Definition: InDetSimDataDict.h:15
Trk::TrackInfo::StacoLowPt
@ StacoLowPt
Tracks produced by StacoLowpt.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:126
Muon::MuonEDMPrinterTool::printId
std::string printId(const Trk::MeasurementBase &measurement) const
print identifier part of Muon MeasurementBase to string
Definition: MuonEDMPrinterTool.cxx:950
Amg::intersect
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
Definition: GeoPrimitivesHelpers.h:347
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Muon::MuonSegmentCombination::SegmentVec
std::vector< std::unique_ptr< MuonSegment > > SegmentVec
Definition: MuonSegmentCombination.h:32
Muon::MuonPatternCombination::trackParameter
const Trk::TrackParameters * trackParameter() const
access to the global position, direction and if available momentum of the road, the pointer might be ...
Definition: MuonPatternCombination.h:58
DeMoScan.first
bool first
Definition: DeMoScan.py:536
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
Trk::MaterialEffectsOnTrack::scatteringAngles
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.
Muon::TgcPrepData
Class to represent TGC measurements.
Definition: TgcPrepData.h:32
MuonGM::MdtReadoutElement::surface
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:891
Trk::ScatteringAngles::sigmaDeltaPhi
double sigmaDeltaPhi() const
returns the
Definition: ScatteringAngles.h:94
MuonPattern.h
Trk::TrackInfo::MuTag
@ MuTag
Tracks produced by MuTag.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:129
extractSporadic.q
list q
Definition: extractSporadic.py:98
Trk::TrackInfo::MuGirl
@ MuGirl
MuGirl.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:186
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
Trk::AlignmentEffectsOnTrack::sigmaDeltaTranslation
double sigmaDeltaTranslation() const
returns the
Definition: AlignmentEffectsOnTrack.h:97
MuonSegment.h
Muon::MuonCluster
Class representing clusters in the muon system.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:37
Trk::FitQuality::numberDoF
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition: FitQuality.h:60
Trk::AlignmentEffectsOnTrack::deltaTranslation
double deltaTranslation() const
returns the
Definition: AlignmentEffectsOnTrack.h:91
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Trk::ResidualPull::residual
const std::vector< double > & residual() const
return residual vector
Muon::MuonEDMPrinterTool::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: MuonEDMPrinterTool.h:155
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
Trk::ScatteringAngles::deltaTheta
double deltaTheta() const
returns the
Definition: ScatteringAngles.h:88
AthAlgTool
Definition: AthAlgTool.h:26
Muon::MuonEDMPrinterTool::printPatRec
static std::string printPatRec(const Trk::Track &track)
produce a string indicating who produced the track
Definition: MuonEDMPrinterTool.cxx:260
RpcPrepData.h
Muon::MuonPatternCombination
The MuonPatternCombination class provides the means to store the output of the initial global pattern...
Definition: MuonPatternCombination.h:29
get_generator_info.error
error
Definition: get_generator_info.py:40
MuonGM::MdtReadoutElement::getNtubesperlayer
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
error
Definition: IImpactPoint3dEstimator.h:70
Trk::TrkDetElementBase::center
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
Muon::MuonSegmentCombination::numberOfStations
unsigned int numberOfStations() const
Number of stations with segment.
Definition: MuonSegmentCombination.h:108
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Muon::MdtPrepData::detectorElement
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
Definition: MdtPrepData.h:141
Muon::MuonEDMPrinterTool::printStations
std::string printStations(const Trk::Track &track) const
print stations on track to string
Definition: MuonEDMPrinterTool.cxx:136
Trk::EnergyLoss::sigmaPlusDeltaE
double sigmaPlusDeltaE() const
returns the positive side
Muon::MuonEDMPrinterTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonEDMPrinterTool.h:137
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Muon::MuonEDMPrinterTool::printMeasurements
std::string printMeasurements(const Trk::Track &track) const
print measurements on track to string
Definition: MuonEDMPrinterTool.cxx:154
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
Trk::EnergyLoss::sigmaIoni
double sigmaIoni() const
Trk::AlignmentEffectsOnTrack::sigmaDeltaAngle
double sigmaDeltaAngle() const
returns the
Definition: AlignmentEffectsOnTrack.h:109
Trk::PrepRawData::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
Trk::TrackInfo::MuidComb
@ MuidComb
Back compatibility with older ESD versions.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:174
Identifier
Definition: IdentifierFieldParser.cxx:14
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65