ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::CuboidVolumeBuilder Class Reference

This class builds a box detector with a configurable amount of surfaces in it. More...

#include <Acts/Geometry/CuboidVolumeBuilder.hpp>

Inheritance diagram for Acts::CuboidVolumeBuilder:
[legend]
Collaboration diagram for Acts::CuboidVolumeBuilder:
[legend]

Classes

struct  Config
 This struct stores the configuration of the tracking geometry. More...
struct  LayerConfig
 This struct stores the data for the construction of a PlaneLayer. More...
struct  SurfaceConfig
 This struct stores the data for the construction of a single PlaneSurface. More...
struct  VolumeConfig
 This struct stores the data for the construction of a cuboid TrackingVolume with a given number of PlaneLayers. More...

Public Member Functions

 CuboidVolumeBuilder ()=default
 Default constructor without a configuration.
 CuboidVolumeBuilder (Config &cfg)
 Constructor that sets the config.
std::pair< double, double > binningRange (const GeometryContext &gctx, const VolumeConfig &cfg) const
 This function evaluates the minimum and maximum of the binning as given by the configurations of the surfaces and layers.
std::shared_ptr< const LayerbuildLayer (const GeometryContext &gctx, LayerConfig &cfg) const
 This function creates a layer with a surface encapsulated with a given configuration.
std::shared_ptr< const SurfacebuildSurface (const GeometryContext &gctx, const SurfaceConfig &cfg) const
 This function creates a surface with a given configuration.
std::shared_ptr< TrackingVolumebuildVolume (const GeometryContext &gctx, VolumeConfig &cfg) const
 This function creates a TrackingVolume with a configurable number of layers and surfaces.
void setConfig (Config &cfg)
 Setter of the config.
void sortVolumes (std::vector< std::pair< TrackingVolumePtr, Vector3 > > &tapVec, AxisDirection bValue) const
 Sort volumes along a given axis direction.
std::shared_ptr< TrackingVolumetrackingVolume (const GeometryContext &gctx, std::shared_ptr< const TrackingVolume >, std::shared_ptr< const VolumeBounds >) const override
 This function builds a world TrackingVolume based on a given configuration.
Public Member Functions inherited from Acts::ITrackingVolumeBuilder
virtual ~ITrackingVolumeBuilder ()=default
 Virtual destructor.
virtual MutableTrackingVolumePtr trackingVolume (const GeometryContext &gctx, TrackingVolumePtr oppositeVolume=nullptr, std::shared_ptr< const VolumeBounds > outsideBounds=nullptr) const =0
 ITrackingVolumeBuilder interface method.

Detailed Description

This class builds a box detector with a configurable amount of surfaces in it.

The idea is to allow a quick configuration of a detector for mostly unit test applications. Therefore this class does not demand to be a universal construction factory but a raw first draft of the idea of factory that may be extended in the future.

Constructor & Destructor Documentation

◆ CuboidVolumeBuilder() [1/2]

Acts::CuboidVolumeBuilder::CuboidVolumeBuilder ( )
default

Default constructor without a configuration.

◆ CuboidVolumeBuilder() [2/2]

Acts::CuboidVolumeBuilder::CuboidVolumeBuilder ( Config & cfg)
explicit

Constructor that sets the config.

Parameters
[in]cfgConfiguration of the detector

Member Function Documentation

◆ binningRange()

std::pair< double, double > Acts::CuboidVolumeBuilder::binningRange ( const GeometryContext & gctx,
const VolumeConfig & cfg ) const

This function evaluates the minimum and maximum of the binning as given by the configurations of the surfaces and layers.

The ordering depends on the binning value specified in the configuration of the volume.

Parameters
[in]gctxthe geometry context for this building
[in]cfgContainer with the given surfaces and layers
Returns
Pair containing the minimum and maximum along the binning direction

◆ buildLayer()

std::shared_ptr< const Layer > Acts::CuboidVolumeBuilder::buildLayer ( const GeometryContext & gctx,
LayerConfig & cfg ) const

This function creates a layer with a surface encapsulated with a given configuration.

The surface gets a detector element attached if the template parameter is non-void.

Parameters
[in]gctxthe geometry context for this building
[in,out]cfgConfiguration of the layer and the surface
Returns
Pointer to the created layer

◆ buildSurface()

std::shared_ptr< const Surface > Acts::CuboidVolumeBuilder::buildSurface ( const GeometryContext & gctx,
const SurfaceConfig & cfg ) const

This function creates a surface with a given configuration.

A detector element is attached if the template parameter is non-void.

Parameters
[in]gctxthe geometry context for this building
[in]cfgConfiguration of the surface
Returns
Pointer to the created surface

◆ buildVolume()

std::shared_ptr< TrackingVolume > Acts::CuboidVolumeBuilder::buildVolume ( const GeometryContext & gctx,
VolumeConfig & cfg ) const

This function creates a TrackingVolume with a configurable number of layers and surfaces.

Each surface gets a detector element attached if the template parameter is non-void.

Parameters
[in]gctxthe geometry context for this building
[in,out]cfgConfiguration of the TrackingVolume
Returns
Pointer to the created TrackingVolume

◆ setConfig()

void Acts::CuboidVolumeBuilder::setConfig ( Config & cfg)

Setter of the config.

Parameters
[in]cfgConfiguration that is set

◆ sortVolumes()

void Acts::CuboidVolumeBuilder::sortVolumes ( std::vector< std::pair< TrackingVolumePtr, Vector3 > > & tapVec,
AxisDirection bValue ) const

Sort volumes along a given axis direction.

Parameters
tapVecVector of tracking volume and position pairs to sort
bValueAxis direction for sorting

◆ trackingVolume()

std::shared_ptr< TrackingVolume > Acts::CuboidVolumeBuilder::trackingVolume ( const GeometryContext & gctx,
std::shared_ptr< const TrackingVolume > ,
std::shared_ptr< const VolumeBounds >  ) const
override

This function builds a world TrackingVolume based on a given configuration.

Parameters
[in]gctxthe geometry context for this building
Returns
Pointer to the created TrackingGeometry