ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
ActsPlugins::DetrayGeometryConverter Class Reference

Converter from an ACTS TrackingGeometry to a detray detector. More...

#include </home/runner/work/acts/acts/Plugins/Detray/include/ActsPlugins/Detray/DetrayGeometryConverter.hpp>

Classes

struct  Config
 Configuration for the geometry converter. More...
struct  DetrayGeometry
 Combined result of a geometry conversion. More...

Public Member Functions

 DetrayGeometryConverter (Config config, std::unique_ptr< const Acts::Logger > logger=Acts::getDefaultLogger("DetrayGeometryConverter", Acts::Logging::INFO))
 Constructor.
template<typename metadata_t>
DetrayGeometry< metadata_t > convert (vecmem::memory_resource &mr, const Acts::GeometryContext &gctx, const std::shared_ptr< const Acts::TrackingGeometry > &trackingGeometry, const std::string &detectorName="") const
 Convert an ACTS TrackingGeometry into a detray detector.

Detailed Description

Converter from an ACTS TrackingGeometry to a detray detector.

The geometry conversion is a two-step process: first the ACTS geometry is converted into detray payloads by a DetrayPayloadConverter, then those payloads are used to build the actual detray detector. This class drives the second step and lets the call site fully customize the first step by supplying its own configured DetrayPayloadConverter instance through the Config.

Constructor & Destructor Documentation

◆ DetrayGeometryConverter()

ActsPlugins::DetrayGeometryConverter::DetrayGeometryConverter ( Config config,
std::unique_ptr< const Acts::Logger > logger = Acts::getDefaultLogger(          "DetrayGeometryConverter", Acts::Logging::INFO) )
explicit

Constructor.

Parameters
configConfiguration object
loggerLogger instance

Member Function Documentation

◆ convert()

template<typename metadata_t>
DetrayGeometry< metadata_t > ActsPlugins::DetrayGeometryConverter::convert ( vecmem::memory_resource & mr,
const Acts::GeometryContext & gctx,
const std::shared_ptr< const Acts::TrackingGeometry > & trackingGeometry,
const std::string & detectorName = "" ) const

Convert an ACTS TrackingGeometry into a detray detector.

Template Parameters
metadata_tthe detector metadata type to build
Parameters
mrthe memory resource to use for the detray detector construction
gctxthe geometry context
trackingGeometrythe ACTS tracking geometry to convert
detectorNamethe name to set for the detray detector (optional, if not set, it will be taken from the payloads or defaulted to empty)

This method performs the following steps:

  1. It converts the ACTS tracking geometry into detray payloads using the configured DetrayPayloadConverter.
  2. It builds a detray detector from the converted payloads using the detray::detector_builder.
Returns
The built detray detector together with its name map.