File CylinderVolumeBuilder.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

Enums

enum WrappingCondition

Values:

enumerator Undefined

inconsistency detected

enumerator Attaching

attach the volumes

enumerator Inserting

insert the new volume

enumerator Wrapping

wrap the new volume around

enumerator CentralInserting

insert the new one into the center

enumerator CentralWrapping

wrap the new central volume around

enumerator NoWrapping

no inner volume present - no wrapping needed

class CylinderVolumeBuilder : public Acts::ITrackingVolumeBuilder
#include <Acts/Geometry/CylinderVolumeBuilder.hpp>

A volume builder to be used for building a concentrical cylindrical volumes.

  • a) configured volume

  • b) wrapping around a cylindrical/disk layer config

All are optionally wrapped around a given volume which has to by a cylinder volume and which has to be center at z == 0

To receive the tracking volume it is possible to also hand over a triple of layers, which is a C++ tuple of three pointers to layer vectors (defined in the ITrackingVolumeBuilder). This functionality is needed for a possible translation of an geometry existing in another format. The first entry represents the layers of the negative endcap, the second the layers of the barrel and the third the layers of the positive endcap. If the one of these pointers is a nullptr no layers will be created for this volume

For the endcap region it is possible to check for a ring layout, in which case an attempt to split into individual ring volumes is done

Public Functions

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

Constructor.

Parameters
  • cvbConfig[in] is the configuraiton struct to steer the builder

  • logger[in] logging instance

~CylinderVolumeBuilder() override

Destructor.

VolumeConfig analyzeContent(const GeometryContext &gctx, const LayerVector &lVector, const MutableTrackingVolumeVector &mtvVector) const

Analyze the config to gather needed dimension.

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

  • lVector[in] is the vector of layers that are parsed

  • mtvVector[in] Vector of mutable tracking volumes to analyze

Returns

a VolumeConfig representing this layer

inline Config getConfiguration() const

Get configuration method.

Return the configuration object.

Returns

a copy of the config object

void setConfiguration(const Config &cvbConfig)

Set configuration method.

Parameters

cvbConfig[in] is the new configuration to be set

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

set logging instance

Parameters

newLogger[in] is the logging istance to be set

virtual MutableTrackingVolumePtr trackingVolume(const GeometryContext &gctx, TrackingVolumePtr existingVolume = nullptr, VolumeBoundsPtr externalBounds = nullptr) const override

CylinderVolumeBuilder main call method.

Parameters
  • gctx[in] geometry context for which this cylinder volume is built

  • existingVolume[in] is an (optional) volume to be included

  • externalBounds[in] are (optional) external confinement constraints

Returns

a mutable pointer to a new TrackingVolume which includes the optionally provided exisitingVolume consistently for further processing

Private Functions

bool checkLayerContainment(const GeometryContext &gctx, VolumeConfig &layerConfig, const VolumeConfig &insideConfig, const VolumeConfig &volumeConfig, int sign) const

Helper method check the layer containment, both for inside / outside.

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

  • layerConfig[in] is the VolumeConfig to be tested the wrapping flag may be set

  • insideConfig[in] is the inside volume in order to check the wrapping

  • volumeConfig[in] is the volume to be tested

  • sign[in] distinguishes inside/outside testing

Returns

boolean that indicates the test result

inline const Logger &logger() const

Private access to the logger.

Returns

a const reference to the logger

Private Members

Config m_cfg

Configuration struct.

std::unique_ptr<const Logger> m_logger

the logging instance

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

Nested configuration struct for this CylinderVolumeBuilder.

Public Members

std::array<std::shared_ptr<const ISurfaceMaterial>, 6> boundaryMaterial{nullptr, nullptr, nullptr, nullptr, nullptr, nullptr}

—————–&#8212; MB (outer [1]) ————&#8212; | MB [2] NEC MB [3] | B | MB [4] PEC MB [5] | —————–&#8212; MB (inner [0]) ————&#8212;

bool buildToRadiusZero = false

Build the volume to the beam line.

bool checkRingLayout = false

Check for endcap ring layout.

std::shared_ptr<const IConfinedTrackingVolumeBuilder> ctVolumeBuilder = nullptr

Builder to construct confined volumes within the volume.

std::shared_ptr<const ILayerBuilder> layerBuilder = nullptr

Builder to construct layers within the volume.

std::pair<double, double> layerEnvelopeR = {1. * UnitConstants::mm, 1. * UnitConstants::mm}

Additional envelope in R to create rMin, rMax.

double layerEnvelopeZ = 1. * UnitConstants::mm

the additional envelope in Z to create zMin, zMax

double ringTolerance = 0 * UnitConstants::mm

Tolerance for endcap ring association.

std::shared_ptr<const ITrackingVolumeHelper> trackingVolumeHelper = nullptr

The trackign volume helper for construction.

std::shared_ptr<const IVolumeMaterial> volumeMaterial = nullptr

The world material.

std::string volumeName = ""

The string based indenfication.

int volumeSignature = -1

Volume signature.

struct VolumeConfig
#include <Acts/Geometry/CylinderVolumeBuilder.hpp>

VolumeConfig struct to understand the layer config.

Public Functions

inline VolumeConfig()

Default constructor.

inline void adapt(const VolumeConfig &lConfig)

Adapt to the dimensions of another config it will take the maximum/minimum values and just overwrite them.

Parameters

lConfig[in] is the config to which it should be adapded

inline void adaptR(const VolumeConfig &lConfig)

Adapt to the dimensions of another config in R it will take the maximum/minimum values and just overwrite them.

Parameters

lConfig[in] is the config to which it should be adapded

inline void adaptZ(const VolumeConfig &lConfig)

Adapt to the dimensions of another config in Z it will take the maximum/minimum values and just overwrite them.

Parameters

lConfig[in] is the config to which it should be adapded

inline void attachZ(const VolumeConfig &lConfig)

Attach method - const it attaches the one volume config to the other one.

Parameters

lConfig[in] is the confit to which it should be attached

inline bool contains(const VolumeConfig &vConfig) const

Check if contained full set.

Parameters

vConfig[in] is the config against which is checked

inline bool containsInR(const VolumeConfig &vConfig) const

Check if contained radially.

Parameters

vConfig[in] is the config against which is checked

inline bool containsInZ(const VolumeConfig &vConfig) const

Check if contained longitudinally.

Parameters

vConfig[in] is the config against which is checked

inline void midPointAttachZ(VolumeConfig &lConfig)

Attach method - non-const it attaches the one volume config to the other one in Z this is the non-cost method, i.e.

the mid point is used

Note

lConfig will be changed

Parameters

lConfig[in] is the config to which it should be attached

inline operator bool() const

Conversion operator to bool.

inline bool overlapsInR(const VolumeConfig &vConfig) const

Overlap check radially.

Parameters

vConfig[in] is the config against which is checked

Returns

boolean if the overlap in r exists

inline bool overlapsInZ(const VolumeConfig &vConfig) const

Overlap check longitudinally.

Parameters

vConfig[in] is the config against which is checked

Returns

boolean if the overlap in z exists

inline std::string toString() const

Method for output formatting.

inline bool wraps(const VolumeConfig &vConfig) const

Compatibility check full set.

Parameters

vConfig[in] is the config against which is checked

Returns

boolean if the current volume wraps the vConfig fully

Public Members

LayerVector layers

the layers you have

bool present = {false}

layers are present

double rMax

max parameter r

double rMin

min parameter r

MutableTrackingVolumeVector volumes

the confined volumes you have

bool wrapping = {false}

in what way they are binned

double zMax

max parameter z

double zMin

min parameter z

struct WrappingConfig
#include <Acts/Geometry/CylinderVolumeBuilder.hpp>

The WrappingSetup that is happening here.

Public Functions

WrappingConfig() = default

constructor

inline void configureContainerVolume()

configure the new Volume

inline std::string toString() const

Method for output formatting.

inline void wrapInsertAttach()

wrap, insert, attach

Public Members

VolumeConfig containerVolumeConfig

the combined volume

VolumeConfig cVolumeConfig
VolumeConfig existingVolumeConfig

existing volume config with potential gaps

VolumeConfig externalVolumeConfig

externally provided config, this can only change the the ncp volumes

VolumeConfig fGapVolumeConfig
VolumeConfig nVolumeConfig

the new volumes

VolumeConfig pVolumeConfig
VolumeConfig sGapVolumeConfig
WrappingCondition wCondition = Undefined
std::string wConditionScreen = "[left untouched]"