File GenericApproachDescriptor.hpp

namespace Acts


This file is foreseen for the Geometry module to replace Extent

class GenericApproachDescriptor : public Acts::ApproachDescriptor
#include <Acts/Geometry/GenericApproachDescriptor.hpp>

Class to decide and return which approaching surface to be taken, it’s a generic descriptor for n surfaces.

It is templated in order to allow for BoundarySurfaces from representing volumes of layers to be re-used

Public Functions

inline GenericApproachDescriptor(std::vector<std::shared_ptr<const Surface>> aSurfaces)

A generic approach descriptor for new Acts::Surface objects passing ownership.


aSurfaces – are the approach surfaces

~GenericApproachDescriptor() override = default

A generic approach descriptor with n surfaces to test.

virtual ObjectIntersection<Surface> approachSurface(const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, const BoundaryCheck &bcheck) const override

Get the aproach surface to the layer.

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

  • position – The global position to start the approach from

  • direction – The momentum vector

  • bcheck – The boundary check prescription


: a SurfaceIntersection

virtual const std::vector<const Surface*> &containedSurfaces() const override

return all contained surfaces of this approach descriptor

virtual std::vector<const Surface*> &containedSurfaces() override

Non-const version.

virtual void registerLayer(const Layer &lay) override

Register the Layer to the surfaces.


lay – is the layer to be registerd

Private Members

std::vector<const Surface*> m_surfaceCache

the surface container cache

We will need to mutate those surfaces in registerLayer, but the C++ type system has no const-correct way of expressing this constraint.

std::vector<std::shared_ptr<const Surface>> m_surfaces

approach surfaces with ownership control