ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ActsTrk::detail::xAODUncalibMeasSurfAcc Class Reference

Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement. More...

#include <xAODUncalibMeasSurfAcc.h>

Collaboration diagram for ActsTrk::detail::xAODUncalibMeasSurfAcc:

Public Member Functions

 xAODUncalibMeasSurfAcc ()=default
 Empty default constructor -> conversion will crash for ID measurements. More...
 
 xAODUncalibMeasSurfAcc (const ActsTrk::ITrackingGeometryTool *trackGeoTool)
 Constructor taking the pointer to the Tracking geometry tool. More...
 
const Acts::Surface * operator() (const Acts::SourceLink &sourceLink) const
 Operator called by the Acts API to fetch the surface. More...
 
const Acts::Surface * get (const xAOD::UncalibratedMeasurement *meas) const
 Operator. More...
 

Private Attributes

const Acts::TrackingGeometry * m_actsTrackingGeometry {nullptr}
 
const DetectorElementToActsGeometryIdMapm_detectorElementToGeometryIdMap {nullptr}
 

Detailed Description

Helper class to access the Acts::surface associated with an Uncalibrated xAOD measurement.

In the ID domain, the Acts identifier of the uncalibrated measurement is looked-up in the DetectorElementToActsGeometryIdMap and then the tracking geometry is used to return the corresponding surface. In the muon domain, all measurements have a link to the associated readout element and the surface look-up is performed via a helper funciton.

Definition at line 22 of file xAODUncalibMeasSurfAcc.h.

Constructor & Destructor Documentation

◆ xAODUncalibMeasSurfAcc() [1/2]

ActsTrk::detail::xAODUncalibMeasSurfAcc::xAODUncalibMeasSurfAcc ( )
default

Empty default constructor -> conversion will crash for ID measurements.

◆ xAODUncalibMeasSurfAcc() [2/2]

ActsTrk::detail::xAODUncalibMeasSurfAcc::xAODUncalibMeasSurfAcc ( const ActsTrk::ITrackingGeometryTool trackGeoTool)

Constructor taking the pointer to the Tracking geometry tool.

The tracking geometry and the surface association map are directly retrieved from the tool.

Parameters
trackGeoToolPointer to the tracking geometry tool

Definition at line 12 of file xAODUncalibMeasSurfAcc.cxx.

12  :
13  m_actsTrackingGeometry{trackGeoTool->trackingGeometry().get()},

Member Function Documentation

◆ get()

const Acts::Surface * ActsTrk::detail::xAODUncalibMeasSurfAcc::get ( const xAOD::UncalibratedMeasurement meas) const

Operator.

ID measurements use the tracking geometry surface id look up to fetch the surface

Muon measurements have a direct link to the readout geometry -> surface

Definition at line 19 of file xAODUncalibMeasSurfAcc.cxx.

19  {
20  switch (meas->type()) {
21  using enum xAOD::UncalibMeasType;
23  case PixelClusterType:
24  case StripClusterType:
25  case HGTDClusterType:{
27  assert(m_actsTrackingGeometry);
28  const auto geoKey = makeDetectorElementKey(meas->type(), meas->identifierHash());
29  const auto geoid_iter = m_detectorElementToGeometryIdMap->find(geoKey);
30  if (geoid_iter == m_detectorElementToGeometryIdMap->end()) {
31  return nullptr;
32  }
34  }
36  case MdtDriftCircleType:
37  case RpcStripType:
38  case TgcStripType:
39  case sTgcStripType:
40  case MMClusterType:{
41  return &xAOD::muonSurface(meas);
42  break;
43  }case Other: {
44  const auto* pMeas = static_cast<const xAOD::AuxiliaryMeasurement*>(meas);
45  return pMeas->surface().get();
46  }
47 
48  default:
49  break;
50 
51  }
52 #ifndef NDEBUG
53  throw std::domain_error("xAODUncalibMeasSurfAcc() - Cannot decode surface type");
54 #endif
55  return nullptr;
56  }

◆ operator()()

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

Operator called by the Acts API to fetch the surface.

Definition at line 16 of file xAODUncalibMeasSurfAcc.cxx.

16  {
17  return get(xAODUncalibMeasCalibrator::unpack(sourceLink));
18  }

Member Data Documentation

◆ m_actsTrackingGeometry

const Acts::TrackingGeometry* ActsTrk::detail::xAODUncalibMeasSurfAcc::m_actsTrackingGeometry {nullptr}
private

Definition at line 36 of file xAODUncalibMeasSurfAcc.h.

◆ m_detectorElementToGeometryIdMap

const DetectorElementToActsGeometryIdMap* ActsTrk::detail::xAODUncalibMeasSurfAcc::m_detectorElementToGeometryIdMap {nullptr}
private

Definition at line 37 of file xAODUncalibMeasSurfAcc.h.


The documentation for this class was generated from the following files:
xAOD::UncalibratedMeasurement_v1::identifierHash
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash)
ActsTrk::detail::xAODUncalibMeasSurfAcc::get
const Acts::Surface * get(const xAOD::UncalibratedMeasurement *meas) const
Operator.
Definition: xAODUncalibMeasSurfAcc.cxx:19
xAOD::UncalibMeasType::HGTDClusterType
@ HGTDClusterType
InDetDD::Other
@ Other
Definition: DetectorDesign.h:42
xAOD::UncalibMeasType::StripClusterType
@ StripClusterType
ActsTrk::ITrackingGeometryTool::surfaceIdMap
virtual const ActsTrk::DetectorElementToActsGeometryIdMap * surfaceIdMap() const =0
Returns the pointer to the identifier mapping between Acts::surface ID & IdentifierHash of the ITk su...
xAOD::UncalibMeasType::MMClusterType
@ MMClusterType
xAOD::UncalibMeasType::sTgcStripType
@ sTgcStripType
xAOD::AuxiliaryMeasurement_v1::surface
const SurfacePtr_t & surface() const
Returns the reference to the Acts::Surface.
Definition: AuxiliaryMeasurement_v1.cxx:44
ActsTrk::detail::xAODUncalibMeasCalibrator::unpack
static const xAOD::UncalibratedMeasurement * unpack(const Acts::SourceLink &sl)
Helper method to unpack an Acts source link to an uncalibrated measurement.
Definition: xAODUncalibMeasCalibrator.cxx:12
xAOD::UncalibMeasType::TgcStripType
@ TgcStripType
xAOD::UncalibratedMeasurement_v1::type
virtual xAOD::UncalibMeasType type() const =0
Returns the type of the measurement type as a simple enumeration.
ActsTrk::detail::xAODUncalibMeasSurfAcc::m_detectorElementToGeometryIdMap
const DetectorElementToActsGeometryIdMap * m_detectorElementToGeometryIdMap
Definition: xAODUncalibMeasSurfAcc.h:37
ActsTrk::makeDetectorElementKey
DetectorElementKey makeDetectorElementKey(xAOD::UncalibMeasType meas_type, unsigned int identifier_hash)
Definition: DetectorElementToActsGeometryIdMap.h:23
xAOD::AuxiliaryMeasurement_v1
Implementation of an uncalibrated AuxiliaryMeasurement which may serve as an external constraint in t...
Definition: AuxiliaryMeasurement_v1.h:24
ActsTrk::ITrackingGeometryTool::trackingGeometry
virtual std::shared_ptr< const Acts::TrackingGeometry > trackingGeometry() const =0
Access to the built Acts tracking geometry
xAOD::muonSurface
const Acts::Surface & muonSurface(const xAOD::UncalibratedMeasurement *meas)
Returns the associated Acts surface to the measurement.
Definition: MuonSpectrometer/MuonPhaseII/Event/xAOD/xAODMuonPrepData/Root/UtilFunctions.cxx:61
xAOD::UncalibMeasType
UncalibMeasType
Define the type of the uncalibrated measurement.
Definition: MeasurementDefs.h:25
ActsTrk::detail::xAODUncalibMeasSurfAcc::m_actsTrackingGeometry
const Acts::TrackingGeometry * m_actsTrackingGeometry
Definition: xAODUncalibMeasSurfAcc.h:36
xAOD::UncalibMeasType::RpcStripType
@ RpcStripType
xAOD::UncalibMeasType::MdtDriftCircleType
@ MdtDriftCircleType
ActsTrk::DetectorElementToActsGeometryIdMap::getValue
static const Acts::GeometryIdentifier & getValue(const value_type &element)
Definition: DetectorElementToActsGeometryIdMap.h:36
xAOD::UncalibMeasType::PixelClusterType
@ PixelClusterType