Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::CuboidVolumeBuilder Class Reference

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. More...

#include <acts/blob/sPHENIX/Core/include/Acts/Geometry/CuboidVolumeBuilder.hpp>

+ Inheritance diagram for Acts::CuboidVolumeBuilder:
+ Collaboration diagram for Acts::CuboidVolumeBuilder:

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.
 
void setConfig (Config &cfg)
 Setter of the config.
 
std::shared_ptr< const SurfacebuildSurface (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.
 
std::shared_ptr< const LayerbuildLayer (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.
 
std::shared_ptr< TrackingVolumebuildVolume (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.
 
std::pair< double, doublebinningRange (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.
 
void sortVolumes (std::vector< std::pair< TrackingVolumePtr, Vector3 >> &tapVec, BinningValue bValue) const
 
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, VolumeBoundsPtr outsideBounds=nullptr) const =0
 

Private Attributes

Config m_cfg
 Configuration of the world volume.
 

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.

Definition at line 42 of file CuboidVolumeBuilder.hpp.

View newest version in sPHENIX GitHub at line 42 of file CuboidVolumeBuilder.hpp

Constructor & Destructor Documentation

Acts::CuboidVolumeBuilder::CuboidVolumeBuilder ( )
default

Default constructor without a configuration.

Acts::CuboidVolumeBuilder::CuboidVolumeBuilder ( Config cfg)
inline

Constructor that sets the config.

Parameters
[in]cfgConfiguration of the detector

Definition at line 123 of file CuboidVolumeBuilder.hpp.

View newest version in sPHENIX GitHub at line 123 of file CuboidVolumeBuilder.hpp

Member Function Documentation

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

Definition at line 103 of file CuboidVolumeBuilder.cpp.

View newest version in sPHENIX GitHub at line 103 of file CuboidVolumeBuilder.cpp

References Acts::binX, gctx, Acts::CuboidVolumeBuilder::VolumeConfig::layerCfg, Acts::CuboidVolumeBuilder::VolumeConfig::length, Acts::UnitConstants::min, and Acts::CuboidVolumeBuilder::VolumeConfig::position.

std::shared_ptr< const Acts::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

Definition at line 57 of file CuboidVolumeBuilder.cpp.

View newest version in sPHENIX GitHub at line 57 of file CuboidVolumeBuilder.cpp

References Acts::CuboidVolumeBuilder::LayerConfig::binsY, Acts::CuboidVolumeBuilder::LayerConfig::binsZ, Acts::binX, Acts::binY, Acts::binZ, Acts::CuboidVolumeBuilder::LayerConfig::envelopeX, Acts::CuboidVolumeBuilder::LayerConfig::envelopeY, Acts::CuboidVolumeBuilder::LayerConfig::envelopeZ, gctx, Acts::CuboidVolumeBuilder::LayerConfig::rotation, writeMapConfig::surface, Acts::LayerCreator::Config::surfaceArrayCreator, Acts::CuboidVolumeBuilder::LayerConfig::surfaceCfg, and Acts::CuboidVolumeBuilder::LayerConfig::surfaces.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

std::shared_ptr< const Acts::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

Definition at line 36 of file CuboidVolumeBuilder.cpp.

View newest version in sPHENIX GitHub at line 36 of file CuboidVolumeBuilder.cpp

References Acts::CuboidVolumeBuilder::SurfaceConfig::detElementConstructor, Acts::CuboidVolumeBuilder::SurfaceConfig::position, Acts::CuboidVolumeBuilder::SurfaceConfig::rBounds, Acts::CuboidVolumeBuilder::SurfaceConfig::rotation, writeMapConfig::surface, Acts::CuboidVolumeBuilder::SurfaceConfig::surMat, and Acts::CuboidVolumeBuilder::SurfaceConfig::thickness.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

std::shared_ptr< Acts::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

Definition at line 145 of file CuboidVolumeBuilder.cpp.

View newest version in sPHENIX GitHub at line 145 of file CuboidVolumeBuilder.cpp

References Acts::arbitrary, Acts::binX, bounds, Acts::TrackingVolume::create(), Acts::getDefaultLogger(), Acts::Logging::INFO, Acts::LayerArrayCreator::layerArray(), Acts::CuboidVolumeBuilder::VolumeConfig::layerCfg, Acts::CuboidVolumeBuilder::VolumeConfig::layers, Acts::CuboidVolumeBuilder::VolumeConfig::length, Acts::UnitConstants::mm, testing::internal::move(), Acts::CuboidVolumeBuilder::VolumeConfig::name, Acts::CuboidVolumeBuilder::SurfaceConfig::position, Acts::CuboidVolumeBuilder::VolumeConfig::position, Acts::CuboidVolumeBuilder::SurfaceConfig::rBounds, Acts::CuboidVolumeBuilder::SurfaceConfig::rotation, Acts::CuboidVolumeBuilder::LayerConfig::surfaceCfg, Acts::CuboidVolumeBuilder::VolumeConfig::trackingVolumes, Acts::CuboidVolumeBuilder::VolumeConfig::volumeCfg, and Acts::CuboidVolumeBuilder::VolumeConfig::volumeMaterial.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Setter of the config.

Parameters
[in]cfgConfiguration that is set

Definition at line 128 of file CuboidVolumeBuilder.hpp.

View newest version in sPHENIX GitHub at line 128 of file CuboidVolumeBuilder.hpp

References cfg, and m_cfg.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), Acts::EventDataView3DTest::createDetector(), and Acts::Test::makeToyDetector().

+ Here is the caller graph for this function:

void Acts::CuboidVolumeBuilder::sortVolumes ( std::vector< std::pair< TrackingVolumePtr, Vector3 >> &  tapVec,
BinningValue  bValue 
) const
Acts::MutableTrackingVolumePtr 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

Definition at line 225 of file CuboidVolumeBuilder.cpp.

View newest version in sPHENIX GitHub at line 225 of file CuboidVolumeBuilder.cpp

References Acts::binX, Acts::TrackingVolume::create(), i, check_smearing_config::lhs, m_cfg(), testing::internal::move(), Acts::negativeFaceYZ, Acts::open, Acts::positiveFaceYZ, check_smearing_config::rhs, Acts::Experimental::detail::BlueprintHelper::sort(), volumes, and ambiguity_solver_full_chain::x.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and Acts::Test::makeToyDetector().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

Config Acts::CuboidVolumeBuilder::m_cfg
private

Configuration of the world volume.

Definition at line 190 of file CuboidVolumeBuilder.hpp.

View newest version in sPHENIX GitHub at line 190 of file CuboidVolumeBuilder.hpp

Referenced by setConfig().


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