ATLAS Offline Software
Classes | Public Member Functions | Static Protected Attributes | Private Attributes | List of all members
ActsTrk::TrkMeasurementCalibrator Class Reference

#include <MeasurementCalibrator.h>

Inheritance diagram for ActsTrk::TrkMeasurementCalibrator:
Collaboration diagram for ActsTrk::TrkMeasurementCalibrator:

Classes

class  MeasurementAdapter
 

Public Member Functions

 TrkMeasurementCalibrator (const ActsTrk::IActsToTrkConverterTool &converter_tool)
 
template<typename trajectory_t >
void calibrate ([[maybe_unused]] const Acts::GeometryContext &gctx, [[maybe_unused]] const Acts::CalibrationContext &cctx, const Acts::SourceLink &sl, typename Acts::MultiTrajectory< trajectory_t >::TrackStateProxy trackState) const
 
template<typename state_t >
void setProjector (xAOD::UncalibMeasType measType, Acts::SurfaceBounds::BoundsType boundType, state_t &trackState) const
 
template<size_t Dim, typename pos_t , typename cov_t , typename state_t >
void setState (xAOD::UncalibMeasType measType, const pos_t &locpos, const cov_t &cov, Acts::SurfaceBounds::BoundsType boundType, state_t &trackState) const
 
template<class measurement_t , typename trajectory_t >
void setStateFromMeasurement (const measurement_t &measurement, Acts::SurfaceBounds::BoundsType bound_type, typename Acts::MultiTrajectory< trajectory_t >::TrackStateProxy &trackState) const
 

Static Protected Attributes

constexpr static std::array< Acts::BoundSubspaceIndices, 2 > s_stripSubspaceIndices
 
constexpr static Acts::BoundSubspaceIndices s_pixelSubspaceIndices
 

Private Attributes

const ActsTrk::IActsToTrkConverterToolm_converterTool
 

Detailed Description

Definition at line 108 of file MeasurementCalibrator.h.

Constructor & Destructor Documentation

◆ TrkMeasurementCalibrator()

ActsTrk::TrkMeasurementCalibrator::TrkMeasurementCalibrator ( const ActsTrk::IActsToTrkConverterTool converter_tool)
inline

Definition at line 140 of file MeasurementCalibrator.h.

141  : m_converterTool(&converter_tool) {}

Member Function Documentation

◆ calibrate()

template<typename trajectory_t >
void ActsTrk::TrkMeasurementCalibrator::calibrate ( [[maybe_unused] ] const Acts::GeometryContext &  gctx,
[[maybe_unused] ] const Acts::CalibrationContext &  cctx,
const Acts::SourceLink &  sl,
typename Acts::MultiTrajectory< trajectory_t >::TrackStateProxy  trackState 
) const
inline

Definition at line 144 of file MeasurementCalibrator.h.

147  {
148  auto sourceLink = sl.template get<ATLASSourceLink>();
149  trackState.setUncalibratedSourceLink(Acts::SourceLink{sl});
150  assert(sourceLink);
151  const Acts::Surface &surface = this->m_converterTool->trkSurfaceToActsSurface(sourceLink->associatedSurface());
152  this->setStateFromMeasurement<MeasurementAdapter, trajectory_t>(MeasurementAdapter(*sourceLink),
153  surface.bounds().type(),
154  trackState);
155  }

◆ setProjector()

template<typename state_t >
void ActsTrk::MeasurementCalibratorBase::setProjector ( xAOD::UncalibMeasType  measType,
Acts::SurfaceBounds::BoundsType  boundType,
state_t &  trackState 
) const
inlineinherited

Definition at line 47 of file MeasurementCalibrator.h.

49  {
50  switch (measType) {
52  const std::size_t projector_idx = boundType == Acts::SurfaceBounds::eAnnulus;
53  trackState.setBoundSubspaceIndices(s_stripSubspaceIndices[projector_idx]);
54  break;
55  }
57  trackState.setBoundSubspaceIndices(s_pixelSubspaceIndices);
58  break;
59  }
60  default:
61  throw std::domain_error("Can only handle measurement type pixel or strip");
62  }
63  }

◆ setState()

template<size_t Dim, typename pos_t , typename cov_t , typename state_t >
void ActsTrk::MeasurementCalibratorBase::setState ( xAOD::UncalibMeasType  measType,
const pos_t &  locpos,
const cov_t &  cov,
Acts::SurfaceBounds::BoundsType  boundType,
state_t &  trackState 
) const
inlineinherited

Definition at line 66 of file MeasurementCalibrator.h.

70  {
71  trackState.allocateCalibrated(Dim);
72  setProjector(measType, boundType, trackState);
73  trackState.template calibrated<Dim>() = locpos.template cast<Acts::ActsScalar>();
74  trackState.template calibratedCovariance<Dim>() = cov.template cast<Acts::ActsScalar>();
75  }

◆ setStateFromMeasurement()

template<class measurement_t , typename trajectory_t >
void ActsTrk::MeasurementCalibratorBase::setStateFromMeasurement ( const measurement_t &  measurement,
Acts::SurfaceBounds::BoundsType  bound_type,
typename Acts::MultiTrajectory< trajectory_t >::TrackStateProxy &  trackState 
) const
inlineinherited

Definition at line 79 of file MeasurementCalibrator.h.

81  {
82  switch (measurement.type()) {
84  setState<1>(
85  measurement.type(),
86  measurement.template localPosition<1>(),
87  measurement.template localCovariance<1>().template topLeftCorner<1, 1>(),
88  bound_type,
89  trackState);
90  break;
91  }
93  setState<2>(
94  measurement.type(),
95  measurement.template localPosition<2>(),
96  measurement.template localCovariance<2>().template topLeftCorner<2, 2>(),
97  bound_type,
98  trackState);
99  break;
100  }
101  default:
102  throw std::domain_error("Can only handle measurement type pixel or strip");
103  }
104  }

Member Data Documentation

◆ m_converterTool

const ActsTrk::IActsToTrkConverterTool* ActsTrk::TrkMeasurementCalibrator::m_converterTool
private

Definition at line 157 of file MeasurementCalibrator.h.

◆ s_pixelSubspaceIndices

constexpr static Acts::BoundSubspaceIndices ActsTrk::MeasurementCalibratorBase::s_pixelSubspaceIndices
staticconstexprprotectedinherited
Initial value:
= {
Acts::eBoundLoc0, Acts::eBoundLoc1
}

Definition at line 39 of file MeasurementCalibrator.h.

◆ s_stripSubspaceIndices

constexpr static std::array<Acts::BoundSubspaceIndices, 2> ActsTrk::MeasurementCalibratorBase::s_stripSubspaceIndices
staticconstexprprotectedinherited
Initial value:
= {
Acts::BoundSubspaceIndices{Acts::eBoundLoc0},
Acts::BoundSubspaceIndices{Acts::eBoundLoc1}
}

Definition at line 35 of file MeasurementCalibrator.h.


The documentation for this class was generated from the following file:
ActsTrk::MeasurementCalibratorBase::setProjector
void setProjector(xAOD::UncalibMeasType measType, Acts::SurfaceBounds::BoundsType boundType, state_t &trackState) const
Definition: MeasurementCalibrator.h:47
xAOD::UncalibMeasType::StripClusterType
@ StripClusterType
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
ActsTrk::TrkMeasurementCalibrator::m_converterTool
const ActsTrk::IActsToTrkConverterTool * m_converterTool
Definition: MeasurementCalibrator.h:157
ActsTrk::MeasurementCalibratorBase::s_stripSubspaceIndices
constexpr static std::array< Acts::BoundSubspaceIndices, 2 > s_stripSubspaceIndices
Definition: MeasurementCalibrator.h:35
ActsTrk::IActsToTrkConverterTool::trkSurfaceToActsSurface
virtual const Acts::Surface & trkSurfaceToActsSurface(const Trk::Surface &atlasSurface) const =0
ActsTrk::MeasurementCalibratorBase::s_pixelSubspaceIndices
constexpr static Acts::BoundSubspaceIndices s_pixelSubspaceIndices
Definition: MeasurementCalibrator.h:39
xAOD::UncalibMeasType::PixelClusterType
@ PixelClusterType