File Layer.hpp

namespace Acts


This file is foreseen for the Geometry module to replace Extent


this is foreseen for the ‘Geometry’ module


typedef std::shared_ptr<Layer> MutableLayerPtr
using NextLayers = std::pair<const Layer*, const Layer*>
typedef ObjectIntersection<Surface> SurfaceIntersection

Typedef of the surface intersection.


enum LayerType

For code readability, it distinguishes between different type of layers, which steers the behaviour in the navigation.


enumerator navigation
enumerator passive
enumerator active
class Layer : public virtual Acts::GeometryObject
#include <Acts/Geometry/Layer.hpp>

Base Class for a Detector Layer in the Tracking Geometry.

An actual implemented Detector Layer inheriting from this base class has to inherit from a specific type of Surface as well. In addition, a Layer can carry:

A SurfaceArray of Surfaces holding the actual detector elements or subSurfaces. A pointer to the TrackingVolume (can only be set by such) An active/passive code : 0 - activ 1 - passive [….] - other

The search type for compatible surfaces on a layer is [ the higher the number, the faster ]: ——&#8212; Layer internal ———————————————&#8212; -1 - provide all intersection tested without boundary check 0 - provide all intersection tested with boundary check 1 - provide overlap descriptor based without boundary check 2 - provide overlap descriptor based with boundary check

A layer can have substructure regarding:

  • m_ssRepresentingSurface -> always exists (1), can have material (2)

  • m_ssSensitiveSurfaces -> can or not exist (0,1), can have material (2)

  • m_ssApproachSurfaces -> can or not exist (0,1) cam have material (2)

Subclassed by Acts::ConeLayer, Acts::CylinderLayer, Acts::DiscLayer, Acts::NavigationLayer, Acts::PlaneLayer

Public Functions

Layer() = delete

Default Constructor - deleted.

Layer(const Layer&) = delete

Copy Constructor - deleted.

virtual ~Layer() = default


const ApproachDescriptor *approachDescriptor() const

Return method for the approach descriptor, can be nullptr.

ApproachDescriptor *approachDescriptor()

Non-const version of the approach descriptor.

boost::container::small_vector<SurfaceIntersection, 10> compatibleSurfaces(const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, const NavigationOptions<Surface> &options) const

Decompose Layer into (compatible) surfaces.

  • gctx – The current geometry context object, e.g. alignment

  • position – Position parameter for searching

  • direction – Direction of the parameters for searching

  • options – The navigation options


list of intersection of surfaces on the layer

virtual bool isOnLayer(const GeometryContext &gctx, const Vector3 &position, const BoundaryCheck &bcheck = true) const

geometrical isOnLayer() method


using isOnSurface() with Layer specific tolerance

  • gctx – The current geometry context object, e.g. alignment

  • position – is the gobal position to be checked

  • bcheck – is the boundary check directive


boolean that indicates success of the operation

LayerType layerType() const

return the LayerType

const Layer *nextLayer(const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const

Fast navigation to next layer.

  • gctx – The current geometry context object, e.g. alignment

  • position – is the start position for the search

  • direction – is the direction for the search


the pointer to the next layer

Layer &operator=(const Layer &layer) = delete

Assignment operator - forbidden, layer assignment must not be ambiguous.


layer – is the source layer for assignment

const AbstractVolume *representingVolume() const

Return the abstract volume that represents the layer.


the representing volume of the layer

template<typename options_t>
inline bool resolve(const options_t &options) const

Accept layer according to the following collection directives.

Template Parameters

options_t – Type of the options for navigation


a boolean whether the layer is accepted for processing

virtual bool resolve(bool resolveSensitive, bool resolveMaterial, bool resolvePassive) const

Accept layer according to the following collection directives.

  • resolveSensitive – is the prescription to find the sensitive surfaces

  • resolveMaterial – is the precription to find material surfaces

  • resolvePassive – is the prescription to find all passive surfaces


a boolean whether the layer is accepted for processing

const SurfaceArray *surfaceArray() const

Return the entire SurfaceArray, returns a nullptr if no SurfaceArray.

SurfaceArray *surfaceArray()

Non-const version.

SurfaceIntersection surfaceOnApproach(const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, const NavigationOptions<Layer> &options) const

Surface seen on approach for layers without sub structure, this is the surfaceRepresentation for layers with sub structure, this is the approachSurface.

  • gctx – The current geometry context object, e.g. alignment

  • position – Position for searching

  • direction – Direction for searching

  • options – The navigation options


the Surface intersection of the approach surface

virtual const Surface &surfaceRepresentation() const = 0

Transforms the layer into a Surface representation for extrapolation.


the layer can be hosting many surfaces, but this is the global one to which one can extrapolate

virtual Surface &surfaceRepresentation() = 0
double thickness() const

Return the Thickness of the Layer this is by definition along the normal vector of the surfaceRepresentation.

const TrackingVolume *trackingVolume() const

Get the confining TrackingVolume.


the pointer to the enclosing volume

Protected Functions

Layer(std::unique_ptr<SurfaceArray> surfaceArray, double thickness = 0., std::unique_ptr<ApproachDescriptor> ades = nullptr, LayerType laytyp = passive)

Constructor with pointer to SurfaceArray (passing ownership)

  • surfaceArray – is the array of sensitive surfaces

  • thickness – is the normal thickness of the Layer

  • ades – oapproach descriptor

  • laytyp – is the layer type if active or passive

void encloseTrackingVolume(const TrackingVolume &tvol)

private method to set enclosing TrackingVolume, called by friend class only optionally, the layer can be resized to the dimensions of the TrackingVolume

  • Bounds of the Surface are resized

  • MaterialSlab dimensions are resized

  • SubSurface array boundaries are NOT resized


tvol – is the tracking volume the layer is confined

Protected Attributes

std::unique_ptr<const ApproachDescriptor> m_approachDescriptor = nullptr

descriptor for surface on approach

The descriptor may need to be modified during geometry building, and will remain constant afterwards, but again C++ cannot currently express this.

double m_layerThickness = 0.

Thickness of the Layer.

LayerType m_layerType

make a passive/active either way

NextLayers m_nextLayers

the previous Layer according to BinGenUtils

const BinUtility *m_nextLayerUtility = nullptr

A binutility to find the next layer.

std::unique_ptr<AbstractVolume> m_representingVolume = nullptr

Representing Volume can be used as approach surface sources.

int m_ssApproachSurfaces = 0
int m_ssRepresentingSurface = 0

sub structure indication

int m_ssSensitiveSurfaces = 0
std::unique_ptr<const SurfaceArray> m_surfaceArray = nullptr

SurfaceArray on this layer Surface.

This array will be modified during signature and constant afterwards, but the C++ type system unfortunately cannot cleanly express this.

const TrackingVolume *m_trackingVolume = nullptr

the enclosing TrackingVolume

Private Functions

void closeGeometry(const IMaterialDecorator *materialDecorator, const GeometryIdentifier &layerID, const GeometryIdentifierHook &hook, const Logger &logger = getDummyLogger())

Private helper method to close the geometry.

  • it will assign material to the surfaces if needed

  • it will set the layer geometry ID for a unique identification

  • it will also register the internal sub strucutre

  • materialDecorator – is a decorator that assigns optionally the surface material to where they belong

  • layerID – is the geometry id of the volume as calculated by the TrackingGeometry

  • hook – Identifier hook to be applied to surfaces

  • logger – A Logger instance


friend class TrackingVolume
template<typename object_t>
struct NavigationOptions
#include <Acts/Geometry/Layer.hpp>

struct for the Navigation options that are forwarded to the geometry

Template Parameters
  • propagator_state_t – Type of the object for navigation state

  • object_t – Type of the object for navigation to check against