File CuboidVolumeBuilder.hpp¶
-
namespace Acts
Note
This file is foreseen for the
Geometry
module to replaceExtent
Note
this is foreseen for the ‘Geometry’ module
-
class CuboidVolumeBuilder : public Acts::ITrackingVolumeBuilder
- #include <Acts/Geometry/CuboidVolumeBuilder.hpp>
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.
Public Functions
-
CuboidVolumeBuilder() = default
Default constructor without a configuration.
-
inline CuboidVolumeBuilder(Config &cfg)
Constructor that sets the config.
- Parameters
cfg – [in] Configuration of the detector
-
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.
The ordering depends on the binning value specified in the configuration of the volume.
- Parameters
gctx – [in] the geometry context for this building
cfg – [in] Container with the given surfaces and layers
- Returns
Pair containing the minimum and maximum along the binning direction
-
std::shared_ptr<const Layer> buildLayer(const GeometryContext &gctx, LayerConfig &cfg) const
This function creates a layer with a surface encaspulated with a given configuration.
The surface gets a detector element attached if the template parameter is non-void.
- Parameters
gctx – [in] the geometry context for this building
cfg – [inout] Configuration of the layer and the surface
- Returns
Pointer to the created layer
-
std::shared_ptr<const Surface> 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
gctx – [in] the geometry context for this building
cfg – [in] Configuration of the surface
- Returns
Pointer to the created surface
-
std::shared_ptr<TrackingVolume> 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
gctx – [in] the geometry context for this building
cfg – [inout] Configuration of the TrackingVolume
- Returns
Pointer to the created TrackingVolume
-
inline void setConfig(Config &cfg)
Setter of the config.
- Parameters
cfg – [in] Configuration that is set
-
void sortVolumes(std::vector<std::pair<TrackingVolumePtr, Vector3>> &tapVec, BinningValue bValue) const
This function builds a world TrackingVolume based on a given configuration.
- Parameters
gctx – [in] the geometry context for this building
- Returns
Pointer to the created TrackingGeometry
-
struct Config
- #include <Acts/Geometry/CuboidVolumeBuilder.hpp>
This struct stores the configuration of the tracking geometry.
Public Members
-
std::vector<VolumeConfig> volumeCfg = {}
-
std::vector<VolumeConfig> volumeCfg = {}
-
struct LayerConfig
- #include <Acts/Geometry/CuboidVolumeBuilder.hpp>
This struct stores the data for the construction of a PlaneLayer.
Public Members
-
bool active = false
-
size_t binsY = 1
-
size_t binsZ = 1
-
std::array<ActsScalar, 2u> envelopeX = {0, 0}
-
std::array<ActsScalar, 2u> envelopeY = {0, 0}
-
std::array<ActsScalar, 2u> envelopeZ = {0, 0}
-
std::optional<RotationMatrix3> rotation = {std::nullopt}
-
std::vector<SurfaceConfig> surfaceCfg
-
std::vector<std::shared_ptr<const Surface>> surfaces
-
bool active = false
-
struct SurfaceConfig
- #include <Acts/Geometry/CuboidVolumeBuilder.hpp>
This struct stores the data for the construction of a single PlaneSurface.
Public Members
-
std::function<DetectorElementBase*(const Transform3&, std::shared_ptr<const RectangleBounds>, double)> detElementConstructor
-
Vector3 position
-
std::shared_ptr<const RectangleBounds> rBounds = nullptr
-
RotationMatrix3 rotation = RotationMatrix3::Identity()
-
std::shared_ptr<const ISurfaceMaterial> surMat = nullptr
-
double thickness = 0.
-
std::function<DetectorElementBase*(const Transform3&, std::shared_ptr<const RectangleBounds>, double)> detElementConstructor
-
struct VolumeConfig
- #include <Acts/Geometry/CuboidVolumeBuilder.hpp>
This struct stores the data for the construction of a cuboid TrackingVolume with a given number of PlaneLayers.
Public Members
-
std::vector<LayerConfig> layerCfg
-
std::vector<std::shared_ptr<const Layer>> layers
-
Vector3 length
-
std::string name = "Volume"
-
Vector3 position
-
std::vector<std::shared_ptr<TrackingVolume>> trackingVolumes
-
std::vector<VolumeConfig> volumeCfg
-
std::shared_ptr<const IVolumeMaterial> volumeMaterial = nullptr
-
std::vector<LayerConfig> layerCfg
-
CuboidVolumeBuilder() = default
-
class CuboidVolumeBuilder : public Acts::ITrackingVolumeBuilder