File LayerCreator.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

class LayerCreator
#include <Acts/Geometry/LayerCreator.hpp>

The LayerCreator is able to build cylinde,r disc layers or plane layers from detector elements.

Public Functions

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

Constructor.

Parameters
  • lcConfig – is the configuration object

  • logger – logging instance

~LayerCreator() = default

Destructor.

void associateSurfacesToLayer(Layer &layer) const
MutableLayerPtr cylinderLayer(const GeometryContext &gctx, std::vector<std::shared_ptr<const Surface>> surfaces, size_t binsPhi, size_t binsZ, std::optional<ProtoLayer> _protoLayer = std::nullopt, const Transform3 &transform = Transform3::Identity(), std::unique_ptr<ApproachDescriptor> ad = nullptr) const

returning a cylindrical layer

Parameters
  • gctx – ist the geometry context with which the geometry is built

  • surfaces – is the vector of pointers to sensitive surfaces represented by this layer

  • binsPhi – is number of bins the sensitive surfaces are ordered in phi

  • binsZ – is number of bins the sensitive surfaces are ordered in Z

  • _protoLayer – (optional) proto layer specifying the dimensions and envelopes

  • transform – is the (optional) transform of the layer

  • ad – possibility to hand over a specific ApproachDescriptor, which is needed for material mapping. Otherwise the default ApproachDescriptor will be taken used for this layer

Pre

the pointers to the sensitive surfaces in the surfaces vectors all need to be valid, since no check is performed

Returns

shared pointer to a newly created layer

MutableLayerPtr cylinderLayer(const GeometryContext &gctx, std::vector<std::shared_ptr<const Surface>> surfaces, BinningType bTypePhi, BinningType bTypeZ, std::optional<ProtoLayer> _protoLayer = std::nullopt, const Transform3 &transform = Transform3::Identity(), std::unique_ptr<ApproachDescriptor> ad = nullptr) const

returning a cylindrical layer

Parameters
  • gctx – ist the geometry context with which the geometry is built

  • surfaces – is the vector of pointers to sensitive surfaces represented by this layer

  • bTypePhi – binning type in phi (equidistant/arbitrary)

  • bTypeZ – binning type in z (equidistant/arbitrary)

  • _protoLayer – (optional) proto layer specifying the dimensions and envelopes

  • transform – is the (optional) transform of the layer

  • ad – possibility to hand over a specific ApproachDescriptor, which is needed for material mapping. Otherwise the default ApproachDescriptor will be taken used for this layer

Pre

the pointers to the sensitive surfaces in the surfaces vectors all need to be valid, since no check is performed

Returns

shared pointer to a newly created layer

MutableLayerPtr discLayer(const GeometryContext &gctx, std::vector<std::shared_ptr<const Surface>> surfaces, size_t binsR, size_t binsPhi, std::optional<ProtoLayer> _protoLayer = std::nullopt, const Transform3 &transform = Transform3::Identity(), std::unique_ptr<ApproachDescriptor> ad = nullptr) const

returning a disc layer

Parameters
  • gctx – ist the geometry context with which the geometry is built

  • surfaces – is the vector of pointers to sensitive surfaces represented by this layer

  • binsR – is number of bins the sensitive surfaces are ordered in R

  • binsPhi – is number of bins the sensitive surfaces are ordered in Phi

  • transform – is the (optional) transform of the layer

  • _protoLayer – (optional) proto layer specifying the dimensions and envelopes

  • ad – possibility to hand over a specific ApproachDescriptor, which is needed for material mapping. Otherwise the default ApproachDescriptor will be taken used for this layer

Pre

the pointers to the sensitive surfaces in the surfaces vectors all need to be valid, since no check is performed

Returns

shared pointer to a newly created layer

MutableLayerPtr discLayer(const GeometryContext &gctx, std::vector<std::shared_ptr<const Surface>> surfaces, BinningType bTypeR, BinningType bTypePhi, std::optional<ProtoLayer> _protoLayer = std::nullopt, const Transform3 &transform = Transform3::Identity(), std::unique_ptr<ApproachDescriptor> ad = nullptr) const

returning a disc layer

Parameters
  • gctx – ist the geometry context with which the geometry is built

  • surfaces – is the vector of pointers to sensitive surfaces represented by this layer

  • bTypeR – binning type in r (equidistant/arbitrary)

  • bTypePhi – binning type in phi (equidistant/arbitrary)

  • transform – is the (optional) transform of the layer

  • _protoLayer – (optional) proto layer specifying the dimensions and envelopes

  • ad – possibility to hand over a specific ApproachDescriptor, which is needed for material mapping. Otherwise the default ApproachDescriptor will be taken used for this layer

Pre

the pointers to the sensitive surfaces in the surfaces vectors all need to be valid, since no check is performed

Returns

shared pointer to a newly created layer

inline Config getConfiguration() const

Access th configuration object.

MutableLayerPtr planeLayer(const GeometryContext &gctx, std::vector<std::shared_ptr<const Surface>> surfaces, size_t bins1, size_t bins2, BinningValue bValue, std::optional<ProtoLayer> _protoLayer = std::nullopt, const Transform3 &transform = Transform3::Identity(), std::unique_ptr<ApproachDescriptor> ad = nullptr) const

returning a plane layer

Parameters
  • gctx – ist the geometry context with which the geometry is built

  • surfaces[in] is the vector of pointers to sensitive surfaces represented by this layer

  • bins1[in] is the number of bins in the orthogonal direction to bValue

  • bins2[in] is the number of bins in the orthogonal direction to bValue

  • bValue[in] Direction of the aligned surfaces

  • transform[in] is the (optional) transform of the layer

  • _protoLayer[in] (optional) proto layer specifying the dimensions and envelopes

  • ad[in] possibility to hand over a specific ApproachDescriptor, which is needed for material mapping. Otherwise the default ApproachDescriptor will be taken used for this layer

Pre

the pointers to the sensitive surfaces in the surfaces vectors all need to be valid, since no check is performed

Returns

shared pointer to a newly created layer

void setConfiguration(const Config &lcConfig)

Set the configuration object.

Parameters

lcConfig – is the configuration struct

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

set logging instance

Parameters

newLogger – the logger instance

Private Functions

bool checkBinning(const GeometryContext &gctx, const SurfaceArray &sArray) const

Validates that all the sensitive surfaces are actually accessible through the binning.

Parameters
  • gctx – Geometry context to work with

  • sArraySurfaceArray instance to check

inline const Logger &logger() const

Private acces method to the logger.

Private Members

Config m_cfg

configuration object

std::unique_ptr<const Logger> m_logger

logging instance

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

Configuration for the LayerCreator This is the nexted configuration struct for the LayerCreator class.

Public Functions

Config() = default

standard constructor

Public Members

double cylinderPhiTolerance = {0.1}

cylinder module phi tolerance : it counts at same phi, if …

double cylinderZtolerance = {10.}

cylinder module z tolerance : it counts at same z, if …

std::shared_ptr<const SurfaceArrayCreator> surfaceArrayCreator = nullptr

surface array helper

namespace Test