File Layer.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

Typedefs

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

Typedef of the surface intersection.

Enums

enum LayerType

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

Values:

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 - active 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

Destructor.

ApproachDescriptor *approachDescriptor()

Non-const version of the approach descriptor.

const ApproachDescriptor *approachDescriptor() const

Return method for the approach descriptor, can be nullptr.

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.

Parameters
  • 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

Returns

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

Note

using isOnSurface() with Layer specific tolerance

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

  • position – is the global position to be checked

  • bcheck – is the boundary check directive

Returns

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.

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

  • position – is the start position for the search

  • direction – is the direction for the search

Returns

the pointer to the next layer

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

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

Parameters

layer – is the source layer for assignment

const AbstractVolume *representingVolume() const

Return the abstract volume that represents the layer.

Returns

the representing volume of the layer

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

Accept layer according to the following collection directives.

Parameters
  • 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

Returns

a boolean whether the layer is accepted for processing

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

Returns

a boolean whether the layer is accepted for processing

SurfaceArray *surfaceArray()

Non-const version.

const SurfaceArray *surfaceArray() const

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

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.

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

  • position – Position for searching

  • direction – Direction for searching

  • options – The navigation options

Returns

the Surface intersection of the approach surface

virtual const Surface &surfaceRepresentation() const = 0

Transforms the layer into a Surface representation for extrapolation.

Note

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.

Returns

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)

Parameters
  • 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

Parameters

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 structure

Parameters
  • 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

Friends

friend class TrackingVolume