ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::Surface Class Referenceabstract

Abstract Base Class for tracking surfaces. More...

#include <Acts/Surfaces/Surface.hpp>

Inheritance diagram for Acts::Surface:
[legend]
Collaboration diagram for Acts::Surface:
[legend]

Public Types

enum  SurfaceType {
  Cone = 0 , Cylinder = 1 , Disc = 2 , Perigee = 3 ,
  Plane = 4 , Straw = 5 , Curvilinear = 6 , Other = 7
}
 This enumerator simplifies the persistency & calculations, by saving a dynamic_cast, e.g. More...

Public Member Functions

 ~Surface () noexcept override
AlignmentToBoundMatrix alignmentToBoundDerivative (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, const FreeVector &pathDerivative) const
 The derivative of bound track parameters w.r.t.
virtual AlignmentToPathMatrix alignmentToPathDerivative (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const
 Calculate the derivative of path length at the geometry constraint or point-of-closest-approach w.r.t.
void assignDetectorElement (const SurfacePlacementBase &detelement)
 Assign a detector element.
void assignIsSensitive (bool isSensitive)
 Assign whether the surface is sensitive.
void assignSurfaceMaterial (std::shared_ptr< const ISurfaceMaterial > material)
 Assign the surface material description.
void assignSurfacePlacement (const SurfacePlacementBase &placement)
 Assign a placement object which may dynamically align the surface in space.
void assignThickness (double thick)
 Assign the thickness of the surface in the orthogonal dimension.
const DetectorElementBaseassociatedDetectorElement () const
 Return method for the associated Detector Element.
const LayerassociatedLayer () const
 Return method for the associated Layer in which the surface is embedded.
void associateLayer (const Layer &lay)
 Set Associated Layer Many surfaces can be associated to a Layer, but it might not be known yet during construction of the layer, this can be set afterwards.
virtual const SurfaceBoundsbounds () const =0
 Return method for SurfaceBounds.
virtual BoundToFreeMatrix boundToFreeJacobian (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const
 Calculate the jacobian from local to global which the surface knows best, hence the calculation is done here.
virtual Vector3 center (const GeometryContext &gctx) const
 Return method for the surface center.
virtual Vector2 closestPointOnBoundary (const Vector2 &lposition, const SquareMatrix2 &metric) const
 Calculates the closest point on the boundary of the surface to a given point in local coordinates.
virtual double distanceToBoundary (const Vector2 &lposition) const
 Calculates the distance to the boundary of the surface from a given point in local coordinates.
virtual FreeToBoundMatrix freeToBoundJacobian (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const
 Calculate the jacobian from global to local which the surface knows best, hence the calculation is done here.
virtual FreeToPathMatrix freeToPathDerivative (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const
 Calculate the derivative of path length at the geometry constraint or point-of-closest-approach w.r.t.
std::shared_ptr< SurfacegetSharedPtr ()
 Retrieve a std::shared_ptr for this surface (non-const version).
std::shared_ptr< const SurfacegetSharedPtr () const
 Retrieve a std::shared_ptr for this surface (const version).
virtual Result< Vector2globalToLocal (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, double tolerance=s_onSurfaceTolerance) const =0
 Global to local transformation Generalized global to local transformation for the surface types.
virtual bool insideBounds (const Vector2 &lposition, const BoundaryTolerance &boundaryTolerance=BoundaryTolerance::None()) const
 The insideBounds method for local positions.
virtual MultiIntersection3D intersect (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, const BoundaryTolerance &boundaryTolerance=BoundaryTolerance::Infinite(), double tolerance=s_onSurfaceTolerance) const =0
 Straight line intersection schema from position/direction.
bool isAlignable () const
 Returns whether the Surface is alignable.
bool isOnSurface (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, const BoundaryTolerance &boundaryTolerance=BoundaryTolerance::None(), double tolerance=s_onSurfaceTolerance) const
 The geometric onSurface method.
bool isSensitive () const
 Returns whether the Surface is sensitive.
virtual ActsMatrix< 2, 3 > localCartesianToBoundLocalDerivative (const GeometryContext &gctx, const Vector3 &position) const =0
 Calculate the derivative of bound track parameters local position w.r.t.
virtual Vector3 localToGlobal (const GeometryContext &gctx, const Vector2 &lposition, const Vector3 &direction) const =0
 Local to global transformation Generalized local to global transformation for the surface types.
const Transform3localToGlobalTransform (const GeometryContext &gctx) const
 Return method for the surface Transform3 by reference In case a detector element is associated the surface transform is just forwarded to the detector element in order to keep the (mis-)alignment cache cetrally handled.
virtual std::string name () const =0
 Return properly formatted class name.
virtual Vector3 normal (const GeometryContext &gctx, const Vector3 &pos, const Vector3 &direction) const =0
 Return the surface normal at a given position and direction.
Surfaceoperator= (const Surface &other)
 Assignment operator.
bool operator== (const Surface &other) const
 Comparison (equality) operator The strategy for comparison is (a) first pointer comparison (b) then type comparison (c) then bounds comparison (d) then transform comparison.
virtual double pathCorrection (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const =0
 Calculation of the path correction for incident.
virtual Polyhedron polyhedronRepresentation (const GeometryContext &gctx, unsigned int quarterSegments=2u) const =0
 Return a Polyhedron for surface objects.
virtual Acts::RotationMatrix3 referenceFrame (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const
 Return method for the reference frame This is the frame in which the covariance matrix is defined (specialized by all surfaces).
const ISurfaceMaterialsurfaceMaterial () const
 Return method for the associated Material to this surface.
const std::shared_ptr< const ISurfaceMaterial > & surfaceMaterialSharedPtr () const
 Return method for the shared pointer to the associated Material.
const SurfacePlacementBasesurfacePlacement () const
 Return the associated surface placement if there is any.
double thickness () const
 Return the thickness of the surface in the normal direction.
GeometryContextOstreamWrapper< SurfacetoStream (const GeometryContext &gctx) const
 Helper method for printing: the returned object captures the surface and the geometry context and will print the surface.
std::string toString (const GeometryContext &gctx) const
 Output into a std::string.
const Transform3transform (const GeometryContext &gctx) const
 Return method for the surface Transform3 by reference In case a detector element is associated the surface transform is just forwarded to the detector element in order to keep the (mis-)alignment cache cetrally handled.
virtual SurfaceType type () const =0
 Return method for the Surface type to avoid dynamic casts.
void visualize (IVisualization3D &helper, const GeometryContext &gctx, const ViewConfig &viewConfig=s_viewSurface) const
 Visualize the surface for debugging and inspection.
Public Member Functions inherited from Acts::GeometryObject
 GeometryObject ()=default
 Defaulted constructor.
 GeometryObject (const GeometryIdentifier &geometryId)
 Constructor from a value.
 GeometryObject (const GeometryObject &)=default
 Defaulted copy constructor.
virtual ~GeometryObject () noexcept=default
void assignGeometryId (const GeometryIdentifier &geometryId)
 Set the value.
GeometryIdentifier geometryId () const
virtual Vector3 referencePosition (const GeometryContext &gctx, AxisDirection aDir) const =0
 Force a binning position method.
virtual double referencePositionValue (const GeometryContext &gctx, AxisDirection aDir) const
 Implement the binningValue.

Static Public Member Functions

template<class T, typename... Args>
static std::shared_ptr< T > makeShared (Args &&... args)
 Factory for producing memory managed instances of Surface.

Static Public Attributes

static constexpr std::array< std::string_view, Surface::SurfaceType::Other+1 > s_surfaceTypeNames
 Helper strings for screen output.

Protected Member Functions

 Surface (const GeometryContext &gctx, const Surface &other, const Transform3 &shift) noexcept
 Copy constructor with optional shift.
 Surface (const Surface &other) noexcept
 Copy constructor.
 Surface (const SurfacePlacementBase &placement) noexcept
 Constructor from SurfacePlacement: Element proxy.
 Surface (const Transform3 &transform=Transform3::Identity())
 Constructor with Transform3 as a shared object.
virtual std::ostream & toStreamImpl (const GeometryContext &gctx, std::ostream &sl) const
 Output Method for std::ostream, to be overloaded by child classes.

Protected Attributes

std::unique_ptr< const Transform3m_transform {}
 Transform3 definition that positions (translation, rotation) the surface in global space.
Protected Attributes inherited from Acts::GeometryObject
GeometryIdentifier m_geometryId
 Unique geometry identifier for this object.

Detailed Description

Abstract Base Class for tracking surfaces.

The Surface class builds the core of the Acts Tracking Geometry. All other geometrical objects are either extending the surface or are built from it.

Surfaces are either owned by Detector elements or the Tracking Geometry, in which case they are not copied within the data model objects.

Member Enumeration Documentation

◆ SurfaceType

This enumerator simplifies the persistency & calculations, by saving a dynamic_cast, e.g.

for persistency

Enumerator
Cone 
Cylinder 
Disc 
Perigee 
Plane 
Straw 
Curvilinear 
Other 

Constructor & Destructor Documentation

◆ Surface() [1/4]

Acts::Surface::Surface ( const Transform3 & transform = Transform3::Identity())
explicitprotected

Constructor with Transform3 as a shared object.

Parameters
transformTransform3 positions the surface in 3D global space
Note
also acts as default constructor

◆ Surface() [2/4]

Acts::Surface::Surface ( const Surface & other)
protectednoexcept

Copy constructor.

Note
copy construction invalidates the association to detector element and layer
Parameters
otherSource surface for copy.

◆ Surface() [3/4]

Acts::Surface::Surface ( const SurfacePlacementBase & placement)
explicitprotectednoexcept

Constructor from SurfacePlacement: Element proxy.

Parameters
placementReference to the surface placement
Note
The Surface does not take any ownership over the SurfacePlacementBase it is expected that the user ensures the life-time of the SurfacePlacementBase and that the Surface is actually owned by the SurfacePlacementBase instance

◆ Surface() [4/4]

Acts::Surface::Surface ( const GeometryContext & gctx,
const Surface & other,
const Transform3 & shift )
explicitprotectednoexcept

Copy constructor with optional shift.

Note
copy construction invalidates the association to detector element and layer
Parameters
gctxThe current geometry context object, e.g. alignment
otherSource surface for copy
shiftAdditional transform applied as: shift * transform

◆ ~Surface()

Acts::Surface::~Surface ( )
overridenoexcept

Member Function Documentation

◆ alignmentToBoundDerivative()

AlignmentToBoundMatrix Acts::Surface::alignmentToBoundDerivative ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction,
const FreeVector & pathDerivative ) const

The derivative of bound track parameters w.r.t.

alignment parameters of its reference surface (i.e. local frame origin in global 3D Cartesian coordinates and its rotation represented with extrinsic Euler angles)

Parameters
gctxThe current geometry context object, e.g. alignment change of alignment parameters
positionglobal 3D position
directionglobal 3D momentum direction
pathDerivativeis the derivative of free parameters w.r.t. path length
Returns
Derivative of bound track parameters w.r.t. local frame alignment parameters

◆ alignmentToPathDerivative()

virtual AlignmentToPathMatrix Acts::Surface::alignmentToPathDerivative ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
virtual

Calculate the derivative of path length at the geometry constraint or point-of-closest-approach w.r.t.

alignment parameters of the surface (i.e. local frame origin in global 3D Cartesian coordinates and its rotation represented with extrinsic Euler angles)

Note
Re-implementation is needed for surface whose intersection with track is not its local xy plane, e.g. LineSurface, CylinderSurface and ConeSurface
Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal 3D position
directionglobal 3D momentum direction
Returns
Derivative of path length w.r.t. the alignment parameters

Reimplemented in Acts::ConeSurface, Acts::CylinderSurface, and Acts::LineSurface.

◆ assignDetectorElement()

void Acts::Surface::assignDetectorElement ( const SurfacePlacementBase & detelement)

Assign a detector element.

Deprecated
: The method is deprecated in favour of assignSurfacePlacement()
Parameters
detelementDetector element which is represented by this surface

◆ assignIsSensitive()

void Acts::Surface::assignIsSensitive ( bool isSensitive)

Assign whether the surface is sensitive.

Parameters
isSensitiveBoolean flag to set sensitivity
Exceptions
logic_errorif the surface is associated to a detector element

◆ assignSurfaceMaterial()

void Acts::Surface::assignSurfaceMaterial ( std::shared_ptr< const ISurfaceMaterial > material)

Assign the surface material description.

The material is usually derived in a complicated way and loaded from a framework given source. As various surfaces may share the same source this is provided by a shared pointer

Parameters
materialMaterial description associated to this surface

◆ assignSurfacePlacement()

void Acts::Surface::assignSurfacePlacement ( const SurfacePlacementBase & placement)

Assign a placement object which may dynamically align the surface in space.

Parameters
placementPlacement object defining the surface's position

◆ assignThickness()

void Acts::Surface::assignThickness ( double thick)

Assign the thickness of the surface in the orthogonal dimension.

Parameters
thickThickness parameter to assign (>=0)

◆ associatedDetectorElement()

const DetectorElementBase * Acts::Surface::associatedDetectorElement ( ) const

Return method for the associated Detector Element.

Deprecated
This method is deprecated in favour of surfacePlacement()
Returns
plain pointer to the DetectorElement, can be nullptr

◆ associatedLayer()

const Layer * Acts::Surface::associatedLayer ( ) const

Return method for the associated Layer in which the surface is embedded.

Returns
Layer by plain pointer, can be nullptr

◆ associateLayer()

void Acts::Surface::associateLayer ( const Layer & lay)

Set Associated Layer Many surfaces can be associated to a Layer, but it might not be known yet during construction of the layer, this can be set afterwards.

Parameters
laythe assignment Layer by reference

◆ bounds()

virtual const SurfaceBounds & Acts::Surface::bounds ( ) const
pure virtual

Return method for SurfaceBounds.

Returns
SurfaceBounds by reference

Implemented in Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::LineSurface, and Acts::PlaneSurface.

◆ boundToFreeJacobian()

virtual BoundToFreeMatrix Acts::Surface::boundToFreeJacobian ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
virtual

Calculate the jacobian from local to global which the surface knows best, hence the calculation is done here.

Note
In principle, the input could also be a free parameters vector as it could be transformed to a bound parameters. But the transform might fail in case the parameters is not on surface. To avoid the check inside this function, it takes directly the bound parameters as input (then the check might be done where this function is called).
Todo
this mixes track parameterisation and geometry should move to : "Acts/EventData/detail/coordinate_transformations.hpp"
Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal 3D position
directionglobal 3D momentum direction
Returns
Jacobian from local to global

Reimplemented in Acts::DiscSurface, and Acts::LineSurface.

◆ center()

virtual Vector3 Acts::Surface::center ( const GeometryContext & gctx) const
virtual

Return method for the surface center.

Note
the center is always recalculated in order to not keep a cache
Parameters
gctxThe current geometry context object, e.g. alignment
Returns
center position by value

◆ closestPointOnBoundary()

virtual Vector2 Acts::Surface::closestPointOnBoundary ( const Vector2 & lposition,
const SquareMatrix2 & metric ) const
virtual

Calculates the closest point on the boundary of the surface to a given point in local coordinates.

Parameters
lpositionThe local position to check
metricThe metric to use for the calculation
Returns
The closest point on the boundary of the surface

◆ distanceToBoundary()

virtual double Acts::Surface::distanceToBoundary ( const Vector2 & lposition) const
virtual

Calculates the distance to the boundary of the surface from a given point in local coordinates.

Parameters
lpositionThe local position to check
Returns
The distance to the boundary of the surface

◆ freeToBoundJacobian()

virtual FreeToBoundMatrix Acts::Surface::freeToBoundJacobian ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
virtual

Calculate the jacobian from global to local which the surface knows best, hence the calculation is done here.

Note
It assumes the input free parameters is on surface, hence no onSurface check is done inside this function.
Todo
this mixes track parameterisation and geometry should move to : "Acts/EventData/detail/coordinate_transformations.hpp"
Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal 3D position
directionglobal 3D momentum direction
Returns
Jacobian from global to local

Reimplemented in Acts::DiscSurface.

◆ freeToPathDerivative()

virtual FreeToPathMatrix Acts::Surface::freeToPathDerivative ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
virtual

Calculate the derivative of path length at the geometry constraint or point-of-closest-approach w.r.t.

free parameters. The calculation is identical for all surfaces where the reference frame does not depend on the direction

Todo
this mixes track parameterisation and geometry should move to : "Acts/EventData/detail/coordinate_transformations.hpp"
Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal 3D position
directionglobal 3D momentum direction
Returns
Derivative of path length w.r.t. free parameters

Reimplemented in Acts::LineSurface.

◆ getSharedPtr() [1/2]

std::shared_ptr< Surface > Acts::Surface::getSharedPtr ( )

Retrieve a std::shared_ptr for this surface (non-const version).

Note
Will error if this was not created through the makeShared factory since it needs access to the original reference. In C++14 this is undefined behavior (but most likely implemented as a bad_weak_ptr exception), in C++17 it is defined as that exception.
Only call this if you need shared ownership of this object.
Returns
The shared pointer

◆ getSharedPtr() [2/2]

std::shared_ptr< const Surface > Acts::Surface::getSharedPtr ( ) const

Retrieve a std::shared_ptr for this surface (const version).

Note
Will error if this was not created through the makeShared factory since it needs access to the original reference. In C++14 this is undefined behavior, but most likely implemented as a bad_weak_ptr exception, in C++17 it is defined as that exception.
Only call this if you need shared ownership of this object.
Returns
The shared pointer

◆ globalToLocal()

virtual Result< Vector2 > Acts::Surface::globalToLocal ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction,
double tolerance = s_onSurfaceTolerance ) const
pure virtual

Global to local transformation Generalized global to local transformation for the surface types.

Since some surface types need the global momentum/direction to resolve sign ambiguity this is also provided

Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal 3D position - considered to be on surface but not inside bounds (check is done)
directionglobal 3D momentum direction
toleranceoptional tolerance within which a point is considered valid on surface
Returns
a Result<Vector2> which can be !ok() if the operation fails

Implemented in Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::LineSurface, Acts::PlaneSurface, and Acts::RegularSurface.

◆ insideBounds()

virtual bool Acts::Surface::insideBounds ( const Vector2 & lposition,
const BoundaryTolerance & boundaryTolerance = BoundaryTolerance::None() ) const
virtual

The insideBounds method for local positions.

Parameters
lpositionThe local position to check
boundaryToleranceBoundaryTolerance directive for this onSurface check
Returns
boolean indication if operation was successful

◆ intersect()

virtual MultiIntersection3D Acts::Surface::intersect ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction,
const BoundaryTolerance & boundaryTolerance = BoundaryTolerance::Infinite(),
double tolerance = s_onSurfaceTolerance ) const
pure virtual

Straight line intersection schema from position/direction.

Parameters
gctxThe current geometry context object, e.g. alignment
positionThe position to start from
directionThe direction at start
boundaryTolerancethe BoundaryTolerance
tolerancethe tolerance used for the intersection
Returns
MultiIntersection3D intersection object

Implemented in Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::LineSurface, and Acts::PlaneSurface.

◆ isAlignable()

bool Acts::Surface::isAlignable ( ) const

Returns whether the Surface is alignable.

◆ isOnSurface()

bool Acts::Surface::isOnSurface ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction,
const BoundaryTolerance & boundaryTolerance = BoundaryTolerance::None(),
double tolerance = s_onSurfaceTolerance ) const

The geometric onSurface method.

Geometrical check whether position is on Surface

Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal position to be evaludated
directionglobal momentum direction (required for line-type surfaces)
boundaryToleranceBoundaryTolerance directive for this onSurface check
toleranceoptional tolerance within which a point is considered on surface
Returns
boolean indication if operation was successful

◆ isSensitive()

bool Acts::Surface::isSensitive ( ) const

Returns whether the Surface is sensitive.

◆ localCartesianToBoundLocalDerivative()

virtual ActsMatrix< 2, 3 > Acts::Surface::localCartesianToBoundLocalDerivative ( const GeometryContext & gctx,
const Vector3 & position ) const
pure virtual

Calculate the derivative of bound track parameters local position w.r.t.

position in local 3D Cartesian coordinates

Parameters
gctxThe current geometry context object, e.g. alignment
positionThe position of the parameters in global
Returns
Derivative of bound local position w.r.t. position in local 3D cartesian coordinates

Implemented in Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::LineSurface, and Acts::PlaneSurface.

◆ localToGlobal()

virtual Vector3 Acts::Surface::localToGlobal ( const GeometryContext & gctx,
const Vector2 & lposition,
const Vector3 & direction ) const
pure virtual

Local to global transformation Generalized local to global transformation for the surface types.

Since some surface types need the global momentum/direction to resolve sign ambiguity this is also provided

Parameters
gctxThe current geometry context object, e.g. alignment
lpositionlocal 2D position in specialized surface frame
directionglobal 3D momentum direction
Returns
The global position by value

Implemented in Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::LineSurface, Acts::PlaneSurface, and Acts::RegularSurface.

◆ localToGlobalTransform()

const Transform3 & Acts::Surface::localToGlobalTransform ( const GeometryContext & gctx) const

Return method for the surface Transform3 by reference In case a detector element is associated the surface transform is just forwarded to the detector element in order to keep the (mis-)alignment cache cetrally handled.

Parameters
gctxThe current geometry context object, e.g. alignment
Returns
the contextual transform

◆ makeShared()

template<class T, typename... Args>
std::shared_ptr< T > Acts::Surface::makeShared ( Args &&... args)
static

Factory for producing memory managed instances of Surface.

Will forward all parameters and will attempt to find a suitable constructor.

Parameters
argsConstructor arguments to forward to surface creation
Returns
Shared pointer to the created surface instance

◆ name()

virtual std::string Acts::Surface::name ( ) const
pure virtual

Return properly formatted class name.

Returns
The surface class name as a string

Implemented in Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::LineSurface, Acts::PerigeeSurface, Acts::PlaneSurface, and Acts::StrawSurface.

◆ normal()

virtual Vector3 Acts::Surface::normal ( const GeometryContext & gctx,
const Vector3 & pos,
const Vector3 & direction ) const
pure virtual

Return the surface normal at a given position and direction.

This method is fully generic, and valid for all surface types.

Note
For some surface types, the direction is ignored, but it is not safe to pass in a zero vector!
Parameters
gctxThe current geometry context object, e.g. alignment
posThe position at which to calculate the normal
directionThe direction at which to calculate the normal
Returns
The normal vector at the given position and direction

Implemented in Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::LineSurface, Acts::PlaneSurface, and Acts::RegularSurface.

◆ operator=()

Surface & Acts::Surface::operator= ( const Surface & other)

Assignment operator.

Note
copy construction invalidates the association to detector element and layer
Parameters
otherSource surface for the assignment
Returns
Reference to this surface after assignment

◆ operator==()

bool Acts::Surface::operator== ( const Surface & other) const

Comparison (equality) operator The strategy for comparison is (a) first pointer comparison (b) then type comparison (c) then bounds comparison (d) then transform comparison.

Parameters
othersource surface for the comparison
Returns
True if surfaces are equal, false otherwise

◆ pathCorrection()

virtual double Acts::Surface::pathCorrection ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
pure virtual

Calculation of the path correction for incident.

Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal 3D position
Note
The position is either ignored, or it is coerced to be on the surface, depending on the surface type.
Parameters
directionglobal 3D momentum direction
Returns
Path correction with respect to the nominal incident.

Implemented in Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::LineSurface, and Acts::PlaneSurface.

◆ polyhedronRepresentation()

virtual Polyhedron Acts::Surface::polyhedronRepresentation ( const GeometryContext & gctx,
unsigned int quarterSegments = 2u ) const
pure virtual

Return a Polyhedron for surface objects.

Parameters
gctxThe current geometry context object, e.g. alignment
quarterSegmentsThe number of segemtns to approximate a 0.5*pi sector, which represents a quarter of the full circle
Note
In order to symmetrize the code between sectoral and closed cylinders in case of closed cylinders, both (-pi, pi) are given as separate vertices
An internal surface transform can invalidate the extrema in the transformed space
Returns
A list of vertices and a face/facett description of it

Implemented in Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::PerigeeSurface, Acts::PlaneSurface, and Acts::StrawSurface.

◆ referenceFrame()

virtual Acts::RotationMatrix3 Acts::Surface::referenceFrame ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
virtual

Return method for the reference frame This is the frame in which the covariance matrix is defined (specialized by all surfaces).

Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal 3D position - considered to be on surface but not inside bounds (check is done)
directionglobal 3D momentum direction (optionally ignored)
Returns
RotationMatrix3 which defines the three axes of the measurement frame

Reimplemented in Acts::ConeSurface, Acts::CylinderSurface, and Acts::LineSurface.

◆ surfaceMaterial()

const ISurfaceMaterial * Acts::Surface::surfaceMaterial ( ) const

Return method for the associated Material to this surface.

Returns
SurfaceMaterial as plain pointer, can be nullptr

◆ surfaceMaterialSharedPtr()

const std::shared_ptr< const ISurfaceMaterial > & Acts::Surface::surfaceMaterialSharedPtr ( ) const

Return method for the shared pointer to the associated Material.

Returns
SurfaceMaterial as shared_pointer, can be nullptr

◆ surfacePlacement()

const SurfacePlacementBase * Acts::Surface::surfacePlacement ( ) const

Return the associated surface placement if there is any.

◆ thickness()

double Acts::Surface::thickness ( ) const

Return the thickness of the surface in the normal direction.

◆ toStream()

GeometryContextOstreamWrapper< Surface > Acts::Surface::toStream ( const GeometryContext & gctx) const

Helper method for printing: the returned object captures the surface and the geometry context and will print the surface.

Parameters
gctxThe current geometry context object, e.g. alignment
Returns
The wrapper object for printing

◆ toStreamImpl()

virtual std::ostream & Acts::Surface::toStreamImpl ( const GeometryContext & gctx,
std::ostream & sl ) const
protectedvirtual

Output Method for std::ostream, to be overloaded by child classes.

Parameters
gctxThe current geometry context object, e.g. alignment
slis the ostream to be dumped into
Returns
Reference to the output stream for chaining

Reimplemented in Acts::PerigeeSurface.

◆ toString()

std::string Acts::Surface::toString ( const GeometryContext & gctx) const

Output into a std::string.

Parameters
gctxThe current geometry context object, e.g. alignment
Returns
String representation of the surface

◆ transform()

const Transform3 & Acts::Surface::transform ( const GeometryContext & gctx) const

Return method for the surface Transform3 by reference In case a detector element is associated the surface transform is just forwarded to the detector element in order to keep the (mis-)alignment cache cetrally handled.

Parameters
gctxThe current geometry context object, e.g. alignment
Returns
the contextual transform

◆ type()

virtual SurfaceType Acts::Surface::type ( ) const
pure virtual

Return method for the Surface type to avoid dynamic casts.

Returns
The surface type enumeration value

Implemented in Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::PerigeeSurface, Acts::PlaneSurface, and Acts::StrawSurface.

◆ visualize()

void Acts::Surface::visualize ( IVisualization3D & helper,
const GeometryContext & gctx,
const ViewConfig & viewConfig = s_viewSurface ) const

Visualize the surface for debugging and inspection.

Parameters
helperVisualization helper for 3D rendering
gctxGeometry context for coordinate transformations
viewConfigVisual configuration (color, style, etc.)

Member Data Documentation

◆ m_transform

std::unique_ptr<const Transform3> Acts::Surface::m_transform {}
protected

Transform3 definition that positions (translation, rotation) the surface in global space.

◆ s_surfaceTypeNames

std::array<std::string_view, Surface::SurfaceType::Other + 1> Acts::Surface::s_surfaceTypeNames
staticconstexpr
Initial value:
= {"Cone", "Cylinder", "Disc", "Perigee",
"Plane", "Straw", "Curvilinear", "Other"}

Helper strings for screen output.