ATLAS Offline Software
Loading...
Searching...
No Matches
ActsTrk::detail::TrkMeasSurfaceAccessor Class Reference

Helper class to access the Acts::Surface for a given Acts::SourceLink which is poiniting to a Trk::MeasurementBase. More...

#include <TrkMeasSurfaceAccessor.h>

Collaboration diagram for ActsTrk::detail::TrkMeasSurfaceAccessor:

Public Member Functions

 TrkMeasSurfaceAccessor ()=default
 Empty default constructor -> conversion will crash.
 TrkMeasSurfaceAccessor (const IActsToTrkConverterTool *trkConvTool)
 Standard constructor taking the pointer to a configured surface conversion tool.
const Acts::Surface * operator() (const Acts::SourceLink &sourceLink) const
 Operator called by the Acts API to fetch the surface.

Private Attributes

const IActsToTrkConverterToolm_trkConvTool {nullptr}

Detailed Description

Helper class to access the Acts::Surface for a given Acts::SourceLink which is poiniting to a Trk::MeasurementBase.

The measurement must be be associated with a surface hold by a Trk::DetElementBase. Temporary ad-hoc surfaces cannot be converted.

Definition at line 14 of file TrkMeasSurfaceAccessor.h.

Constructor & Destructor Documentation

◆ TrkMeasSurfaceAccessor() [1/2]

ActsTrk::detail::TrkMeasSurfaceAccessor::TrkMeasSurfaceAccessor ( )
default

Empty default constructor -> conversion will crash.

◆ TrkMeasSurfaceAccessor() [2/2]

ActsTrk::detail::TrkMeasSurfaceAccessor::TrkMeasSurfaceAccessor ( const IActsToTrkConverterTool * trkConvTool)

Standard constructor taking the pointer to a configured surface conversion tool.

Definition at line 7 of file TrkMeasSurfaceAccessor.cxx.

7 :
8 m_trkConvTool{trkConvTool} {}
const IActsToTrkConverterTool * m_trkConvTool

Member Function Documentation

◆ operator()()

const Acts::Surface * ActsTrk::detail::TrkMeasSurfaceAccessor::operator() ( const Acts::SourceLink & sourceLink) const

Operator called by the Acts API to fetch the surface.

Definition at line 9 of file TrkMeasSurfaceAccessor.cxx.

9 {
10 const auto* meas = TrkMeasurementCalibrator::unpack(sourceLink);
11 assert(m_trkConvTool != nullptr);
12 return &(m_trkConvTool->trkSurfaceToActsSurface(meas->associatedSurface()));
13 }
static const Trk::MeasurementBase * unpack(const Acts::SourceLink &sl)
Unpacks the Acts::SourceLink to a Trk measurement.

Member Data Documentation

◆ m_trkConvTool

const IActsToTrkConverterTool* ActsTrk::detail::TrkMeasSurfaceAccessor::m_trkConvTool {nullptr}
private

Definition at line 24 of file TrkMeasSurfaceAccessor.h.

24{nullptr};

The documentation for this class was generated from the following files: