ATLAS Offline Software
TrackStatePrinterTool.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 // Athena
12 
13 // ACTS
14 #include "Acts/Definitions/Units.hpp"
15 #include "Acts/Definitions/Common.hpp"
16 #include "Acts/Definitions/Algebra.hpp"
17 #include "Acts/Surfaces/Surface.hpp"
18 #include "Acts/Surfaces/AnnulusBounds.hpp"
19 #include "Acts/Surfaces/SurfaceBounds.hpp"
20 #include "Acts/Surfaces/DiscSurface.hpp"
21 #include "Acts/EventData/TransformationHelpers.hpp"
22 
23 // PACKAGE
26 #include "ActsInterop/Logger.h"
27 
29 
30 // Other
31 #include <vector>
32 #include <iostream>
33 #include <sstream>
34 
35 namespace ActsTrk
36 {
41 
42  std::string TrackStatePrinterTool::trackStateName(Acts::ConstTrackStateType trackStateType)
43  {
44  static constexpr std::array<std::tuple<bool, Acts::TrackStateFlag, char>, 6> trackStateNames{{
45  {false, Acts::TrackStateFlag::ParameterFlag, '-'},
46  {true, Acts::TrackStateFlag::MeasurementFlag, 'M'},
47  {true, Acts::TrackStateFlag::OutlierFlag, 'O'},
48  {true, Acts::TrackStateFlag::HoleFlag, 'H'},
49  {true, Acts::TrackStateFlag::MaterialFlag, 'm'},
50  {true, Acts::TrackStateFlag::SharedHitFlag, 'S'},
51  }};
52  std::string s;
53  for (const auto &[b, f, c] : trackStateNames)
54  {
55  if (trackStateType.test(f) == b)
56  s += c;
57  }
58  return s;
59  }
60 
61  // compact surface/boundary name
62  std::string TrackStatePrinterTool::actsSurfaceName(const Acts::Surface &surface)
63  {
64  std::string name = surface.name();
65  if (name.compare(0, 6, "Acts::") == 0)
66  {
67  name.erase(0, 6);
68  }
69  if (name.size() > 7 && name.compare(name.size() - 7, 7, "Surface") == 0)
70  {
71  name.erase(name.size() - 7, 7);
72  }
73  static const std::map<Acts::SurfaceBounds::BoundsType, const char *> boundsNames{{
74  {Acts::SurfaceBounds::BoundsType::eCone, "Cone"},
75  {Acts::SurfaceBounds::BoundsType::eCylinder, "Cylinder"},
76  {Acts::SurfaceBounds::BoundsType::eDiamond, "Diamond"},
77  {Acts::SurfaceBounds::BoundsType::eDisc, "Disc"},
78  {Acts::SurfaceBounds::BoundsType::eEllipse, "Ellipse"},
79  {Acts::SurfaceBounds::BoundsType::eLine, "Line"},
80  {Acts::SurfaceBounds::BoundsType::eRectangle, "Rectangle"},
81  {Acts::SurfaceBounds::BoundsType::eTrapezoid, "Trapezoid"},
82  {Acts::SurfaceBounds::BoundsType::eTriangle, "Triangle"},
83  {Acts::SurfaceBounds::BoundsType::eDiscTrapezoid, "DiscTrapezoid"},
84  {Acts::SurfaceBounds::BoundsType::eConvexPolygon, "ConvexPolygon"},
85  {Acts::SurfaceBounds::BoundsType::eAnnulus, "Annulus"},
86  {Acts::SurfaceBounds::BoundsType::eBoundless, "Boundless"},
87  {Acts::SurfaceBounds::BoundsType::eOther, "Other"},
88  }};
89  if (auto it = boundsNames.find(surface.bounds().type());
90  it != boundsNames.end() && it->second != name)
91  {
92  name += ' ';
93  name += it->second;
94  }
95  return name;
96  }
97 
98  static std::string
99  atlasSurfaceName(const Acts::Surface *measurement_surface)
100  {
101  if (measurement_surface) {
102  const ActsDetectorElement *
103  acts_detector_element = dynamic_cast<const ActsDetectorElement *>(measurement_surface->associatedDetectorElement());
104  if (acts_detector_element) {
105  const InDetDD::SiDetectorElement *detElem = dynamic_cast< const InDetDD::SiDetectorElement *>(acts_detector_element->upstreamDetectorElement());
106  if (detElem) {
107  if (auto idHelper = detElem->getIdHelper())
108  {
109  auto name = idHelper->show_to_string(detElem->identify());
110  if (name.size() >= 2 && name[0] == '[' && name[name.size() - 1] == ']')
111  {
112  return name.substr(1, name.size() - 2);
113  }
114  else
115  {
116  return name;
117  }
118  }
119  }
120  }
121  }
122  return {};
123  }
124 
125  static void printHeader(int type, bool extra = false)
126  {
127  std::cout << std::left
128  << std::setw(5) << "Index" << ' '
129  << std::setw(4) << "Type" << ' '
130  << std::setw(21) << "SurfaceBounds" << ' ';
131  if (type == 0)
132  {
133  std::cout << std::setw(22) << "GeometryId" << ' '
134  << std::setw(20) << "ATLAS ID" << ' '
135  << std::right
136  << std::setw(10) << "loc0" << ' '
137  << std::setw(10) << "loc1"
138  << " "
139  << std::setw(9) << "R" << ' '
140  << std::setw(9) << "phid" << ' '
141  << std::setw(9) << "eta";
142  if (extra)
143  {
144  std::cout << ' '
145  << std::setw(10) << "Trk loc0" << ' '
146  << std::setw(10) << "loc1"
147  << " "
148  << std::setw(9) << "Trk R" << ' '
149  << std::setw(9) << "phid" << ' '
150  << std::setw(9) << "eta" << ' '
151  << std::setw(10) << "g2l loc0" << ' '
152  << std::setw(10) << "loc1";
153  }
154  std::cout << '\n';
155  static std::atomic<int> kilroy = 0;
156  if (!(kilroy++))
157  {
158  std::cout << "R (mm) and phi (degrees). Estimated local coordinate indicated by \"*\" (from SP), \"o\" (from module center), or \"#\" (globalToLocal(center) failure).";
159  if (extra)
160  std::cout << " Athena/ACTS comparison only shown if different.";
161  std::cout << '\n';
162  }
163  }
164  if (type == 1)
165  {
166  std::cout << std::setw(22) << "GeometryId/meas/stats" << ' '
167  << std::right
168  << std::setw(10) << "loc0" << ' '
169  << std::setw(10) << "loc1" << ' '
170  << std::setw(9) << "Pos R" << ' '
171  << std::setw(9) << "phid" << ' '
172  << std::setw(9) << "eta" << ' '
173  << std::setw(9) << "q*pT" << ' '
174  << std::setw(9) << "phid" << ' '
175  << std::setw(9) << "eta" << ' '
176  << std::setw(6) << "TrkLen" << ' '
177  << std::setw(7) << "chi2" << ' '
178  << std::setw(6) << "Flags" << '\n';
179  }
180  }
181 
182  static void
183  printVec3(const Acts::Vector3 &p)
184  {
185  std::cout << std::fixed << ' '
186  << std::setw(9) << std::setprecision(3) << p.head<2>().norm() << ' '
187  << std::setw(9) << std::setprecision(3) << std::atan2(p[1], p[0]) / Acts::UnitConstants::degree << ' '
188  << std::setw(9) << std::setprecision(5) << std::atanh(p[2] / p.norm())
189  << std::defaultfloat << std::setprecision(-1);
190  }
191 
192  static void
193  printVec3(const Acts::Vector3 &p, const Acts::Vector3 &cmp, int precision = 3)
194  {
195  if (((p - cmp).array().abs() >= 0.5 * std::pow(10.0, -precision)).any())
196  {
197  printVec3(p);
198  }
199  else
200  {
201  std::cout << std::setw(30) << "";
202  }
203  }
204 
205  static void
206  printVec2(const Acts::Vector2 &p, const char *estimated = nullptr)
207  {
208  const char e0 = estimated ? estimated[0] : ' ';
209  const char *e1 = estimated ? estimated + 1 : "";
210  std::cout << std::fixed << ' '
211  << std::setw(10) << std::setprecision(4) << p[0] << e0
212  << std::setw(10) << std::setprecision(4) << p[1] << e1
213  << std::defaultfloat << std::setprecision(-1);
214  }
215 
216  static void
217  printVec2(const Acts::Vector2 &p, const Acts::Vector2 &cmp, const char *estimated = nullptr, int precision = 4)
218  {
219  if (((p - cmp).array().abs() >= 0.5 * std::pow(10.0, -precision)).any())
220  {
221  printVec2(p, estimated);
222  }
223  else
224  {
225  std::cout << std::setw(22 + (estimated ? 1 : 0)) << "";
226  }
227  }
228 
229  static void
230  printMeasurement(const Acts::GeometryContext &tgContext,
231  const Acts::Surface *surface,
232  const std::tuple<Acts::Vector2, Amg::Vector2D, int, int> &locData,
233  bool compareMeasurementTransforms = false)
234  {
235  auto &[loc, locTrk, measInd, est] = locData;
236  int flag = est < 0 ? est : 2 * est + measInd;
237  int flagTrk = est < 0 ? est : 2 * est;
238  // indicates coordinate that is estimated: *=from SP, o=from module center, #=globalToLocal(center) failure
239  static const std::map<int, const char *> estimated_flags{{-1, " "},
240  {0, " *"},
241  {1, "* "},
242  {2, " o"},
243  {3, "o "},
244  {4, " #"},
245  {5, "# "}};
246  printVec2(loc, estimated_flags.at(flag));
247 
248  if (surface)
249  {
250  // momentum direction doesn't seem to be needed for measurement surfaces (only LineSurface?)
251  auto glob = surface->localToGlobal(tgContext, loc, Acts::Vector3::Zero());
252  printVec3(glob);
253 
254  if (compareMeasurementTransforms)
255  {
256  const ActsDetectorElement *
257  acts_detector_element = dynamic_cast<const ActsDetectorElement *>(surface->associatedDetectorElement());
258  if (acts_detector_element) {
259  const InDetDD::SiDetectorElement *detElem = dynamic_cast< const InDetDD::SiDetectorElement *>(acts_detector_element->upstreamDetectorElement());
260 
261  // if measInd=1: won't match because comparing x,y and R,phi, but at least not phi,R.
262  // This is still useful for debugging because the next test also fails.
263  printVec2(locTrk, (measInd == 1 ? loc.reverse() : loc), estimated_flags.at(flagTrk));
264 
265  if (detElem)
266  {
267  auto globTrk = detElem->surface().localToGlobal(locTrk);
268  printVec3(globTrk, glob);
269 
270  auto res = surface->globalToLocal(tgContext, globTrk, Acts::Vector3::Zero());
271  if (!res.ok())
272  {
273  std::cout << " ** " << res.error() << " **";
274  }
275  else
276  {
277  printVec2(res.value(), loc);
278  }
279  }
280  }
281  }
282 
283  }
284  std::cout << std::defaultfloat << std::setprecision(-1);
285  }
286 
287  static std::tuple<Acts::Vector2, Amg::Vector2D, int, int>
288  localPositionStrip2D(const Acts::GeometryContext &tgContext,
289  const xAOD::UncalibratedMeasurement &measurement,
290  const Acts::Surface *surface,
291  const xAOD::SpacePoint *sp)
292  {
293  auto *disc = dynamic_cast<const Acts::DiscSurface *>(surface);
294  Acts::Vector2 loc{Acts::Vector2::Zero()};
295  int est = 2; // est = 0 (estimated from SP), 1 (from module center), 2 (globalToLocal(center) failure), -1 (pixel)
296  if (surface)
297  {
298  if (sp)
299  {
300  auto res = surface->globalToLocal(tgContext, sp->globalPosition().cast<double>(), Acts::Vector3::Zero());
301  if (res.ok())
302  {
303  loc = res.value();
304  est = 0;
305  }
306  }
307 
308  if (est != 0)
309  {
310  if (auto *annulus = dynamic_cast<const Acts::AnnulusBounds *>(&surface->bounds()))
311  {
312  loc[0] = 0.5 * (annulus->rMin() + annulus->rMax());
313  est = 1;
314  }
315  else
316  {
317  auto res = surface->globalToLocal(tgContext, surface->center(tgContext), Acts::Vector3::Zero());
318  if (res.ok())
319  {
320  loc = res.value();
321  est = 1;
322  }
323  }
324  }
325  }
326 
327  const int measInd = disc ? 1 : 0;
328  loc[measInd] = measurement.localPosition<1>()[0];
329  if (disc)
330  {
331  Amg::Vector2D locTrk{disc->localPolarToCartesian(loc).reverse()};
332  locTrk[0] = -locTrk[0];
333  return {loc, locTrk, measInd, est};
334  }
335  else
336  {
337  return {loc, loc, measInd, est};
338  }
339  }
340 
341  void
342  TrackStatePrinterTool::printMeasurementAssociatedSpacePoint(const Acts::GeometryContext &tgContext,
343  const Acts::TrackingGeometry &tracking_geometry,
344  const DetectorElementToActsGeometryIdMap &detectorElementToGeometryIdMap,
345  const xAOD::UncalibratedMeasurement *measurement,
346  const std::vector<small_vector<const xAOD::SpacePoint *>> &measToSp,
347  size_t offset) const
348  {
349  if (!measurement)
350  return;
351 
352  std::cout << std::setw(5) << (measurement->index() + offset) << ' '
353  << std::setw(3) << measurement->numDimensions() << "D ";
354 
355  const Acts::Surface *surface_ptr = ActsTrk::getSurfaceOfMeasurement( tracking_geometry, detectorElementToGeometryIdMap, *measurement);
356  if (!surface_ptr)
357  {
358  std::cout << std::setw(20 + 22 + 20 + 2) << "** no surface for measurement **";
359  }
360  else
361  {
362  std::cout << std::left;
363  std::cout << std::setw(21) << actsSurfaceName(*surface_ptr) << ' '
364  << std::setw(22) << to_string(surface_ptr->geometryId()) << ' ';
365  std::cout << std::setw(20) << atlasSurfaceName(surface_ptr);
366  std::cout << std::right;
367  }
368 
369  if (measurement->type() == xAOD::UncalibMeasType::PixelClusterType)
370  {
371  const auto loc = measurement->localPosition<2>().cast<double>();
372  printMeasurement(tgContext, surface_ptr, {loc, loc, -1, -1}, m_compareMeasurementTransforms);
373  }
374  else if (measurement->type() == xAOD::UncalibMeasType::StripClusterType)
375  {
376  const small_vector<const xAOD::SpacePoint *> &spvec = measToSp.at(measurement->index());
377  if (spvec.empty())
378  {
379  printMeasurement(tgContext, surface_ptr,
380  localPositionStrip2D(tgContext, *measurement, surface_ptr, nullptr),
382  }
383  else
384  {
385  size_t isp = 0;
386  for (auto *sp : spvec)
387  {
388  if (isp++)
389  {
390  std::cout << '\n'
391  << std::left
392  << std::setw(76) << to_string("** Spacepoint ", isp, " **")
393  << std::right;
394  }
395  printMeasurement(tgContext, surface_ptr,
396  localPositionStrip2D(tgContext, *measurement, surface_ptr, sp),
398  }
399  }
400  }
401  else if (measurement->type() == xAOD::UncalibMeasType::HGTDClusterType) {
402  const auto loc3D = measurement->localPosition<3>().cast<double>();
403  const std::tuple<Acts::Vector2, Amg::Vector2D, int, int> locTup = {Acts::Vector2{loc3D.head<2>()}, Amg::Vector2D{loc3D.head<2>()}, -1, -1};
404  printMeasurement(tgContext, surface_ptr, locTup, m_compareMeasurementTransforms);
405  }
406  std::cout << '\n';
407  }
408 
409  void TrackStatePrinterTool::printParameters(const Acts::Surface &surface,
410  const Acts::GeometryContext &tgContext,
411  const Acts::BoundVector &bound)
412  {
413  auto p = Acts::transformBoundToFreeParameters(surface, tgContext, bound);
414  std::cout << std::fixed
415  << std::setw(10) << std::setprecision(4) << bound[Acts::eBoundLoc0] << ' '
416  << std::setw(10) << std::setprecision(4) << bound[Acts::eBoundLoc1] << ' '
417  << std::setw(9) << std::setprecision(3) << p.segment<2>(Acts::eFreePos0).norm() << ' '
418  << std::setw(9) << std::setprecision(3) << std::atan2(p[Acts::eFreePos1], p[Acts::eFreePos0]) / Acts::UnitConstants::degree << ' '
419  << std::setw(9) << std::setprecision(5) << std::atanh(p[Acts::eFreePos2] / p.segment<3>(Acts::eFreePos0).norm()) << ' '
420  << std::setw(9) << std::setprecision(3) << p.segment<2>(Acts::eFreeDir0).norm() / p[Acts::eFreeQOverP] << ' '
421  << std::setw(9) << std::setprecision(3) << std::atan2(p[Acts::eFreeDir1], p[Acts::eFreeDir0]) / Acts::UnitConstants::degree << ' '
422  << std::setw(9) << std::setprecision(5) << std::atanh(p[Acts::eFreeDir2])
423  << std::defaultfloat << std::setprecision(-1);
424  }
425 
429 
431  const std::string &name,
432  const IInterface *parent)
434  {}
435 
437  {
438  ATH_MSG_DEBUG("Initializing " << name() << "...");
439  ATH_MSG_DEBUG("Properties Summary:");
442 
443  ATH_CHECK(m_trackingGeometryTool.retrieve());
444  ATH_CHECK(m_spacePointKey.initialize());
445 
446  return StatusCode::SUCCESS;
447  }
448 
449  void
450  TrackStatePrinterTool::printSeed(const Acts::GeometryContext &tgContext,
451  const ActsTrk::Seed &seed,
452  const Acts::BoundTrackParameters &initialParameters,
453  const std::vector<std::pair<const xAOD::UncalibratedMeasurementContainer *, size_t>> &offset,
454  size_t iseed,
455  bool isKF) const
456  {
457  if (!isKF)
458  printHeader(1);
459 
460  std::ostringstream os;
461  size_t nos = 0;
462  for (const auto *sp : seed.sp())
463  {
464  size_t nom = 0;
465  for (const auto *el : sp->measurements())
466  {
467  if (nom > 0)
468  os << '+';
469  else if (nos > 0)
470  os << ',';
471  ++nos;
472  ++nom;
473  os << el->index() + containerOffset(el->container(), offset);
474  }
475  }
476 
477  std::cout << std::setw(5) << iseed << ' '
478  << std::left
479  << std::setw(4) << (!isKF ? "seed" : "KF") << ' '
480  << std::setw(21) << actsSurfaceName(initialParameters.referenceSurface()) << ' '
481  << std::setw(22) << to_string(os.str()) << ' '
482  << std::right;
483  printParameters(initialParameters.referenceSurface(), tgContext, initialParameters.parameters());
484  std::cout << '\n'
485  << std::flush;
486  }
487 
488  void
490  const std::vector<const xAOD::UncalibratedMeasurementContainer *> &clusterContainers,
491  const DetectorElementToActsGeometryIdMap &detectorElementToGeometryIdMap,
492  const std::vector<size_t> &offsets) const
493  {
494  const Acts::TrackingGeometry *
495  acts_tracking_geometry = m_trackingGeometryTool->trackingGeometry().get();
496  if (!acts_tracking_geometry) {
497  ATH_MSG_WARNING("No Acts tracking geometry.");
498  return;
499  }
500  Acts::GeometryContext tgContext = m_trackingGeometryTool->getGeometryContext(ctx).context();
501 
502  auto measToSp = addSpacePoints(ctx, clusterContainers, offsets);
503 
504  ATH_MSG_INFO("CKF input measurements:");
505  printHeader(0, m_compareMeasurementTransforms);
506 
507  for (std::size_t icontainer = 0; icontainer < clusterContainers.size(); ++icontainer)
508  {
509  for (const auto *measurement : *clusterContainers[icontainer])
510  {
512  *acts_tracking_geometry,
513  detectorElementToGeometryIdMap,
514  measurement,
515  measToSp[icontainer],
516  offsets[icontainer]);
517  }
518  }
519  std::cout << std::flush;
520  }
521 
522  std::vector<std::vector<TrackStatePrinterTool::small_vector<const xAOD::SpacePoint *>>>
523  TrackStatePrinterTool::addSpacePoints(const EventContext &ctx,
524  const std::vector<const xAOD::UncalibratedMeasurementContainer *> &clusterContainers,
525  const std::vector<size_t> &offsets) const
526  {
527  std::vector<std::vector<TrackStatePrinterTool::small_vector<const xAOD::SpacePoint *>>> measToSp{clusterContainers.size()};
528  for (std::size_t icontainer = 0; icontainer < clusterContainers.size(); ++icontainer)
529  {
530  measToSp[icontainer].resize(clusterContainers[icontainer]->size());
531  }
532 
533  for (auto &spacePointKey : m_spacePointKey)
534  {
535  ATH_MSG_DEBUG("Retrieving from input SpacePoint collection '" << spacePointKey.key() << "' ...");
536  SG::ReadHandle<xAOD::SpacePointContainer> handle = SG::makeHandle(spacePointKey, ctx);
537  if (!handle.isValid())
538  {
539  ATH_MSG_ERROR("Error retrieving from input SpacePoint collection '" << spacePointKey.key() << "'");
540  continue;
541  }
542  ATH_MSG_DEBUG(" \\__ " << handle->size() << " elements!");
543  for (const auto *sp : *handle)
544  {
545  for (const xAOD::UncalibratedMeasurement *meas : sp->measurements())
546  {
547  if (!meas)
548  continue;
549  for (std::size_t icontainer = 0; icontainer < clusterContainers.size(); ++icontainer)
550  {
551  // This measurement may well be in a different clusterContainer. Skip all but the one we are interested in.
552  if (!(meas && meas->index() < clusterContainers[icontainer]->size() && meas == clusterContainers[icontainer]->at(meas->index())))
553  continue;
554  small_vector<const xAOD::SpacePoint *> &measSp = measToSp[icontainer].at(meas->index());
555  if (!measSp.empty())
556  {
557  ATH_MSG_INFO("Cluster "
558  << (meas->index() + offsets[icontainer])
559  << " used by SpacePoints at ("
560  << sp->globalPosition()[0] << ',' << sp->globalPosition()[1] << ',' << sp->globalPosition()[2]
561  << ") and ("
562  << measSp[0]->globalPosition()[0] << ',' << measSp[0]->globalPosition()[1] << ',' << measSp[0]->globalPosition()[2]
563  << ')');
564  }
565  measSp.push_back(sp);
566  }
567  }
568  }
569  }
570  return measToSp;
571  }
572 
573 } // namespace ActsTrk
python.EI_Lib.cmp
def cmp(x, y)
Definition: EI_Lib.py:6
ActsTrk::TrackStatePrinterTool::TrackStatePrinterTool
TrackStatePrinterTool(const std::string &type, const std::string &name, const IInterface *parent)
=========================================================================
Definition: TrackStatePrinterTool.cxx:430
ActsTrk::TrackStatePrinterTool::addSpacePoints
std::vector< std::vector< small_vector< const xAOD::SpacePoint * > > > addSpacePoints(const EventContext &ctx, const std::vector< const xAOD::UncalibratedMeasurementContainer * > &clusterContainers, const std::vector< size_t > &offset) const
Definition: TrackStatePrinterTool.cxx:523
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
xAOD::UncalibMeasType::HGTDClusterType
@ HGTDClusterType
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TrackParameters.h
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FullCPAlgorithmsTest_eljob.flush
flush
Definition: FullCPAlgorithmsTest_eljob.py:182
ActsTrk::DetectorElementToActsGeometryIdMap
Definition: DetectorElementToActsGeometryIdMap.h:31
perfmonmt-printer.printHeader
def printHeader()
Definition: perfmonmt-printer.py:10
egammaEnergyPositionAllSamples::e1
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
xAOD::UncalibMeasType::StripClusterType
@ StripClusterType
ActsTrk::TrackStatePrinterTool::printSeed
void printSeed(const Acts::GeometryContext &tgContext, const ActsTrk::Seed &seed, const Acts::BoundTrackParameters &initialParameters, const std::vector< std::pair< const xAOD::UncalibratedMeasurementContainer *, size_t >> &offset, size_t iseed, bool isKF) const
Definition: TrackStatePrinterTool.cxx:450
skel.it
it
Definition: skel.GENtoEVGEN.py:396
ActsDetectorElement::upstreamDetectorElement
const GeoVDetectorElement * upstreamDetectorElement() const
Returns the underllying GeoModel detectorelement that this one is based on.
Definition: ActsDetectorElement.cxx:288
InDetDD::SolidStateDetectorElementBase::surface
Trk::Surface & surface()
Element Surface.
ActsTrk::TrackStatePrinterTool::printMeasurementAssociatedSpacePoint
void printMeasurementAssociatedSpacePoint(const Acts::GeometryContext &tgContext, const Acts::TrackingGeometry &tracking_geometry, const DetectorElementToActsGeometryIdMap &detectorElementToGeometryIdMap, const xAOD::UncalibratedMeasurement *measurement, const std::vector< small_vector< const xAOD::SpacePoint * >> &measToSp, size_t offset) const
Definition: TrackStatePrinterTool.cxx:342
xAOD::SpacePoint_v1
Definition: SpacePoint_v1.h:29
ActsTrk::TrackStatePrinterTool::m_compareMeasurementTransforms
Gaudi::Property< bool > m_compareMeasurementTransforms
Definition: TrackStatePrinterTool.h:98
xAOD::SpacePoint_v1::globalPosition
ConstVectorMap globalPosition() const
Returns the global position of the pixel cluster.
InDetDD::SolidStateDetectorElementBase::getIdHelper
const AtlasDetectorID * getIdHelper() const
Returns the id helper (inline)
ActsTrk::getSurfaceOfMeasurement
const Acts::Surface * getSurfaceOfMeasurement(const Acts::TrackingGeometry &tracking_geometry, const DetectorElementToActsGeometryIdMap &detector_element_to_geoid, const xAOD::UncalibratedMeasurement &measurement)
Definition: SurfaceOfMeasurementUtil.h:13
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
ActsTrk::TrackStatePrinterTool::printParameters
static void printParameters(const Acts::Surface &surface, const Acts::GeometryContext &tgContext, const Acts::BoundVector &bound)
Definition: TrackStatePrinterTool.cxx:409
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::UncalibratedMeasurement_v1
Definition: UncalibratedMeasurement_v1.h:13
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::UncalibratedMeasurement_v1::type
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
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
HGTD_DetectorElement.h
master.flag
bool flag
Definition: master.py:29
UncalibratedMeasurementContainer.h
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
test_pyathena.parent
parent
Definition: test_pyathena.py:15
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
TrackStatePrinterTool.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
hist_file_dump.f
f
Definition: hist_file_dump.py:135
ActsTrk::TrackStatePrinterTool::m_spacePointKey
SG::ReadHandleKeyArray< xAOD::SpacePointContainer > m_spacePointKey
Definition: TrackStatePrinterTool.h:92
ActsTrk::Seed
Acts::Seed< xAOD::SpacePoint, 3ul > Seed
Definition: Seed.h:12
ActsDetectorElement
Definition: ActsDetectorElement.h:42
xAOD::SpacePoint_v1::measurements
const std::vector< const xAOD::UncalibratedMeasurement * > & measurements() const
Returns the index of the measurements.
ActsDetectorElement.h
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
xAOD::UncalibratedMeasurement_v1::localPosition
ConstVectorMap< N > localPosition() const
Returns the local position of the measurement.
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
xAOD::UncalibratedMeasurement_v1::numDimensions
virtual unsigned int numDimensions() const =0
Returns the number of dimensions of the measurement.
lumiFormat.array
array
Definition: lumiFormat.py:91
python.handimod.extra
int extra
Definition: handimod.py:522
ActsTrk::TrackStatePrinterTool::printMeasurements
void printMeasurements(const EventContext &ctx, const std::vector< const xAOD::UncalibratedMeasurementContainer * > &clusterContainers, const DetectorElementToActsGeometryIdMap &detectorElementToGeometryIdMap, const std::vector< size_t > &offsets) const
Definition: TrackStatePrinterTool.cxx:489
ActsTrk::TrackStatePrinterTool::m_printFilteredStates
Gaudi::Property< bool > m_printFilteredStates
Definition: TrackStatePrinterTool.h:99
PlotSFuncertainty.nom
nom
Definition: PlotSFuncertainty.py:141
ActsTrk::TrackStatePrinterTool::initialize
virtual StatusCode initialize() override
Definition: TrackStatePrinterTool.cxx:436
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
ActsTrk::TrackStatePrinterTool::m_trackingGeometryTool
ToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool
Definition: TrackStatePrinterTool.h:95
SurfaceOfMeasurementUtil.h
SiDetectorElement.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MuonDetectorBuilderTool.cxx:54
egammaEnergyPositionAllSamples::e0
double e0(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in pre-sampler
AthAlgTool
Definition: AthAlgTool.h:26
Logger.h
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
ActsTrk::TrackStatePrinterTool::small_vector
boost::container::small_vector< T, N_SP_PER_MEAS > small_vector
Definition: TrackStatePrinterTool.h:104
ActsTrk::TrackStatePrinterTool::trackStateName
static std::string trackStateName(Acts::ConstTrackStateType trackStateType)
========================================================================= file-local static functions...
Definition: TrackStatePrinterTool.cxx:42
python.compressB64.c
def c
Definition: compressB64.py:93
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TrackContainer.h
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106
Trk::Surface::localToGlobal
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
xAOD::UncalibMeasType::PixelClusterType
@ PixelClusterType
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
ActsTrk::TrackStatePrinterTool::actsSurfaceName
static std::string actsSurfaceName(const Acts::Surface &surface)
Definition: TrackStatePrinterTool.cxx:62