File CylinderVolumeHelper.hpp

namespace Acts

Set the Geometry Context PLUGIN.

Set the Calibration Context PLUGIN.

Convenience functions to ease creation of and Acts::InterpolatedMaterialMap and to avoid code duplication.

Set the Mangetic Field Context PLUGIN.

Convenience functions to ease creation of and Acts::InterpolatedBFieldMap and to avoid code duplication.

Currently implemented for the two most common formats: rz and xyz.

class CylinderVolumeHelper : public Acts::ITrackingVolumeHelper
#include <Acts/Geometry/CylinderVolumeHelper.hpp>

The concrete implementation for cylindrical TrackingVolume objects of the ITrackingVolumeCreator interface.

Public Functions

CylinderVolumeHelper(const Config &cvhConfig, std::unique_ptr<const Logger> logger = getDefaultLogger("CylinderVolumeHelper", Logging::INFO))

Constructor.

Parameters
  • cvhConfig – is the configuration struct for this builder

  • logger – logging instance

~CylinderVolumeHelper() override = default
virtual MutableTrackingVolumePtr createContainerTrackingVolume(const GeometryContext &gctx, const TrackingVolumeVector &volumes) const override

Create a container volumes from sub volumes, input volumes are ordered in R or Z by convention.

Parameters
  • gctx[in] the geometry context for this building

  • volumes – the volumes to be contained

Returns

shared pointer to a new TrackingVolume

virtual MutableTrackingVolumePtr createGapTrackingVolume(const GeometryContext &gctx, MutableTrackingVolumeVector &mtvVector, std::shared_ptr<const IVolumeMaterial> volumeMaterial, double rMin, double rMax, double zMin, double zMax, unsigned int materialLayers, bool cylinder = true, const std::string &volumeName = "UndefinedVolume") const override

Create a gap volume from dimensions and.

Note

this TrackingVolume is restricted to Translation only

Parameters
  • gctx[in] the geometry context for this building

  • mtvVector – Vector of confined TrackingVolumes

  • volumeMaterial – dense material properties for this TrackingVolume

  • rMin – minimum radius

  • rMax – maximum radius

  • zMin – minimum z

  • zMax – maximum z

  • materialLayers – number of material layers (aequidistant binning)

  • cylinder – type of layers

  • volumeName – volume name to be given

Returns

shared pointer to a new TrackingVolume

virtual MutableTrackingVolumePtr createGapTrackingVolume(const GeometryContext &gctx, MutableTrackingVolumeVector &mtvVector, std::shared_ptr<const IVolumeMaterial> volumeMaterial, double rMin, double rMax, double zMin, double zMax, const std::vector<double> &layerPositions, bool cylinder = true, const std::string &volumeName = "UndefinedVolume", BinningType bType = arbitrary) const override

Create a gap volume from dimensions and.

Parameters
  • gctx[in] the geometry context for this building

  • mtvVector – Vector of confined TrackingVolumes

  • volumeMaterial – dense material properties for this TrackingVolume

  • rMin – minimum radius

  • rMax – maximum radius

  • zMin – minimum z

  • zMax – maximum z

  • layerPositions – custom layer positions

  • cylinder – type of layers

  • volumeName – : volume name to be given

  • bType – (optional) BinningType - arbitrary(default) or equidistant

Returns

shared pointer to a new TrackingVolume

virtual MutableTrackingVolumePtr createTrackingVolume(const GeometryContext &gctx, const LayerVector &layers, std::shared_ptr<const IVolumeMaterial> volumeMaterial, VolumeBoundsPtr volumeBounds, MutableTrackingVolumeVector mtvVector = {}, const Transform3 &transform = Transform3::Identity(), const std::string &volumeName = "UndefinedVolume", BinningType bType = arbitrary) const override

Create a TrackingVolume* from a set of layers and (optional) parameters.

Parameters
  • gctx – is the geometry context for witch the volume is built

  • layers – vector of static layers confined by the TrackingVolume if no bounds or HepTransform is given, they define the size together with the volume enevlope parameters

  • volumeMaterial – material properties for this TrackingVolume

  • volumeBounds – confinement of this TrackingVolume

  • mtvVector – (optiona) Vector of confined TrackingVolumes

  • transform – (optional) placement of this TrackingVolume

  • volumeName – volume name to be given

  • bType – (optional) BinningType - arbitrary(default) or equidistant

Returns

shared pointer to a new TrackingVolume

virtual MutableTrackingVolumePtr createTrackingVolume(const GeometryContext &gctx, const LayerVector &layers, MutableTrackingVolumeVector mtvVector, std::shared_ptr<const IVolumeMaterial> volumeMaterial, double rMin, double rMax, double zMin, double zMax, const std::string &volumeName = "UndefinedVolume", BinningType bType = arbitrary) const override

Create a TrackingVolume* from a set of layers and (optional) parameters.

Parameters
  • gctx – is the geometry context for witch the volume is built

  • layers – vector of static layers confined by the TrackingVolume if no bounds or HepTransform is given, they define the size together with the volume enevlope parameters

  • volumeMaterial – material properties for this TrackingVolume

  • mtvVector – Vector of confined TrackingVolumes

  • rMin – minimum radius

  • rMax – maximum radius

  • zMin – minimum z

  • zMax – maximum z

  • volumeName – volume name to be given

  • bType – (optional) BinningType - arbitrary(default) or equidistant

Returns

shared pointer to a new TrackingVolume

inline Config getConfiguration() const

Get configuration method.

void setConfiguration(const Config &cvhConfig)

Set configuration method.

Parameters

cvhConfig – is the configurtion struct assigned

void setLogger(std::unique_ptr<const Logger> newLogger)

Set logging instance.

Parameters

newLogger – is the logger isntance to be set

Protected Attributes

Config m_cfg

Configuration object.

Private Functions

void addFaceVolumes(const MutableTrackingVolumePtr &tvol, BoundarySurfaceFace glueFace, TrackingVolumeVector &vols) const

Private method - helper method not to duplicate code.

Parameters
  • tvol – is the volume to which faces are added

  • glueFace – the boundary surface to which faces are added

  • vols – are the voluems which are added

LayerPtr createCylinderLayer(double z, double r, double halflengthZ, double thickness, int binsPhi, int binsZ) const

Private method - helper method to save some code.

Parameters
  • z – is the z position of the layer (

  • r – is the radius of the layer

  • halflengthZ – is the half lengthz in z of the cylinder

  • thickness – is the thickness of the cylinder

  • binsPhi – are the bins for the material in phi

  • binsZ – are the bins for the material in z

Returns

shared pointer to newly created cylinder layer

LayerPtr createDiscLayer(double z, double rMin, double rMax, double thickness, int binsPhi, int binsR) const

Private method - helper method to save some code.

Parameters
  • z – is the z position of the layer (

  • rMin – is the minimum radius of the layer

  • rMax – is the maximal radius of the layer

  • thickness – is the thickness of the cylinder

  • binsPhi – are the bins for the material in phi

  • binsR – are the bins for the material in R

Returns

shared pointer to newly created cylinder layer

bool estimateAndCheckDimension(const GeometryContext &gctx, const LayerVector &layers, const CylinderVolumeBounds *&cylinderVolumeBounds, const Transform3 &transform, double &rMinClean, double &rMaxClean, double &zMinClean, double &zMaxClean, BinningValue &bValue, BinningType bType = arbitrary) const

Private method - it estimates the CylinderBounds and Translation of layers, these are checked against the layer positions/dimensions.

Parameters
  • gctx – [in] the geometry context of this build

  • layers – the layers for which the dimensions are checked

  • cylinderVolumeBounds – the cylinder volume bounds needed for wrapping

  • transform – a transformation of the layers, volume

  • rMinClean – the smallest radius given by layers

  • rMaxClean – the maximal radius given by layers

  • zMinClean – the smallest z extend given by layers

  • zMaxClean – the maximal z extend given by layers

  • bValue – the binning value in which the binning works

  • bType – is the type of binning: equidistant, arbitrary

void glueTrackingVolumes(const GeometryContext &gctx, const MutableTrackingVolumePtr &tvolOne, BoundarySurfaceFace faceOne, const MutableTrackingVolumePtr &tvolTwo, BoundarySurfaceFace faceTwo, double rMin, double rGlueMin, double rMax, double zMin, double zMax) const

Private method - glue volume to the other.

Parameters
  • gctx – [in] the geometry context of this build

  • tvolOne – is the first volume in the glue process

  • faceOne – is the first boundary face of the glue process

  • tvolTwo – is the second volume in the glue process

  • faceTwo – is the second boundary face of the glue process

  • rMin – the minimum radius of the volume

  • rGlueMin – the minimum glue radius (

  • rMax – the maximim radius of the volume

  • zMin – the minimum z extend of the volume

  • zMax – the maximum z extend of the volume

bool interGlueTrackingVolume(const GeometryContext &gctx, const MutableTrackingVolumePtr &tVolume, bool rBinned, double rMin, double rGlueMin, double rMax, double zMin, double zMax) const

Private method - interglue all volumes contained by a TrackingVolume and set the outside glue volumes in the descriptor.

Parameters
  • gctx – [in] the geometry context of this build

  • tVolume – the tracking volume that is glued together

  • rBinned – a boolean indicating if it is binned in r

  • rMin – the minimum radius of the volume

  • rGlueMin – the minimum glue radius (

  • rMax – the maximim radius of the volume

  • zMin – the minimum z extend of the volume

  • zMax – the maximum z extend of the volume

inline const Logger &logger() const

Private access method to the logging instance.

Private Members

std::unique_ptr<const Logger> m_logger

the looging instance

struct Config
#include <Acts/Geometry/CylinderVolumeHelper.hpp>

Nested configuration struct for this CylinderVolumeHelper.

Public Members

std::shared_ptr<const ILayerArrayCreator> layerArrayCreator = nullptr

a tool for coherent LayerArray creation

int passiveLayerPhiBins = 1

bins in phi for the passive layer

int passiveLayerRzBins = 100

bins in r/z for the passive layer

double passiveLayerThickness = 1

thickness of passive layers

std::shared_ptr<const ITrackingVolumeArrayCreator> trackingVolumeArrayCreator = nullptr

Helper Tool to create TrackingVolume.