ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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. More...
 
 TrkMeasSurfaceAccessor (const IActsToTrkConverterTool *trkConvTool)
 Standard constructor taking the pointer to a configured surface conversion tool. More...
 
const Acts::Surface * operator() (const Acts::SourceLink &sourceLink) const
 Operator called by the Acts API to fetch the surface. More...
 

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} {}

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  }

Member Data Documentation

◆ m_trkConvTool

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

Definition at line 24 of file TrkMeasSurfaceAccessor.h.


The documentation for this class was generated from the following files:
ActsTrk::detail::TrkMeasSurfaceAccessor::m_trkConvTool
const IActsToTrkConverterTool * m_trkConvTool
Definition: TrkMeasSurfaceAccessor.h:24
ActsTrk::IActsToTrkConverterTool::trkSurfaceToActsSurface
virtual const Acts::Surface & trkSurfaceToActsSurface(const Trk::Surface &atlasSurface) const =0
Translate the parsed Trk surface into an Acts surface.
ActsTrk::detail::TrkMeasurementCalibrator::unpack
static const Trk::MeasurementBase * unpack(const Acts::SourceLink &sl)
Unpacks the Acts::SourceLink to a Trk measurement.
Definition: TrkMeasurementCalibrator.cxx:11