ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::PointSurface Class Reference

Surface describing the point of closest approach (PCA) of a track to a single fixed 3D point (the surface center). More...

#include <Acts/Surfaces/PointSurface.hpp>

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

Public Member Functions

 PointSurface (const PointSurface &other) noexcept=default
 Copy constructor.
 ~PointSurface () noexcept override=default
 Destructor.
AlignmentToPathMatrix alignmentToPathDerivative (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const final
 Calculate the derivative of path length at the point-of-closest-approach w.r.t.
void assignSurfaceBounds (std::shared_ptr< const PointBounds > newBounds)
 Overwrite the existing surface bounds with new ones.
const SurfaceBoundsbounds () const final
 This method returns the bounds of the surface by reference.
const std::shared_ptr< const PointBounds > & boundsPtr () const
 This method returns the shared_ptr to the PointBounds.
BoundToFreeMatrix boundToFreeJacobian (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const final
 Calculate the jacobian from local to global.
FreeToPathMatrix freeToPathDerivative (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const final
 Calculate the derivative of path length at the point-of-closest-approach w.r.t.
Result< Vector2globalToLocal (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, double tolerance=s_onSurfaceTolerance) const final
 Global to local transformation.
MultiIntersection3D intersect (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, const BoundaryTolerance &boundaryTolerance=BoundaryTolerance::Infinite(), double tolerance=s_onSurfaceTolerance) const final
 Calculate the straight-line intersection with the point surface, i.e.
Matrix< 2, 3 > localCartesianToBoundLocalDerivative (const GeometryContext &gctx, const Vector3 &position) const final
 Calculate the derivative of bound track parameters local position w.r.t.
Vector3 localToGlobal (const GeometryContext &gctx, const Vector2 &lposition, const Vector3 &direction) const final
 Local to global transformation.
std::string name () const final
 Return properly formatted class name for screen output.
Vector3 normal (const GeometryContext &gctx, const Vector3 &pos, const Vector3 &direction) const final
 Return the surface normal, which for a point surface is the momentum direction (the measurement plane is perpendicular to the direction).
PointSurfaceoperator= (const PointSurface &other) noexcept=default
 Assignment operator.
double pathCorrection (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const final
 The pathCorrection is by definition 1 for point surfaces.
Polyhedron polyhedronRepresentation (const GeometryContext &gctx, unsigned int quarterSegments) const final
 Return a Polyhedron for the surface (a non-physical marker at the center).
RotationMatrix3 referenceFrame (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const final
 Return the measurement frame, built from the momentum direction like a curvilinear surface.
Vector3 referencePosition (const GeometryContext &gctx, AxisDirection aDir) const final
 The binning position is the center of the point surface.
SurfaceType type () const final
 Return the surface type.
Public Member Functions inherited from Acts::Surface
AlignmentToBoundMatrix alignmentToBoundDerivative (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, const FreeVector &pathDerivative) const
 The derivative of bound track parameters w.r.t.
void assignIsSensitive (bool isSensitive)
 Assign whether the surface is sensitive.
virtual 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 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 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.
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).
bool hasMaterial () const
 Check if the surface has an associated material description.
virtual bool insideBounds (const Vector2 &lposition, const BoundaryTolerance &boundaryTolerance=BoundaryTolerance::None()) const
 The insideBounds method for local positions.
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.
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 const MaterialSlabmaterialSlab (const Vector2 &lp) const
 Return method for full material description of the Surface.
virtual MaterialSlab materialSlab (const Vector2 &lp, Direction pDir, MaterialUpdateMode mode) const
 Return method for fully scaled material description of the Surface.
Surfaceoperator= (const Surface &other) noexcept=default
 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.
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.
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.
void assignGeometryId (const GeometryIdentifier &geometryId)
 Set the value.
GeometryIdentifier geometryId () const
virtual double referencePositionValue (const GeometryContext &gctx, AxisDirection aDir) const
 Implement the binningValue.

Protected Member Functions

 PointSurface (const GeometryContext &gctx, const PointSurface &other, const Transform3 &shift)
 Copy constructor - with shift.
 PointSurface (const Transform3 &transform, std::shared_ptr< const PointBounds > pbounds=nullptr)
 Constructor from a Transform3 and optional PointBounds.
 PointSurface (const Vector3 &center)
 Constructor from a global position (unbounded point surface).
 PointSurface (const Vector3 &center, double maxDistance)
 Constructor from a global position and a maximum distance.
std::array< AxisDirection, 2 > localAxes () const final
 Local axes of the surface.
std::ostream & toStreamImpl (const GeometryContext &gctx, std::ostream &sl) const final
 Output Method for std::ostream.
Protected Member Functions inherited from Acts::Surface
 Surface (const GeometryContext &gctx, const Surface &other, const Transform3 &shift) noexcept
 Copy constructor with optional shift.
 Surface (const Surface &other) noexcept=default
 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 Vector2 transformSurfaceLocalToMaterialLocal (const Vector2 &surfaceLocal) const
 Transform surface local coordinates to material local coordinates.

Protected Attributes

std::shared_ptr< const PointBoundsm_bounds
 bounds (shared, may be null)
Protected Attributes inherited from Acts::Surface
std::shared_ptr< const ISurfaceMaterialm_surfaceMaterial
 Possibility to attach a material description.
bool m_swapMaterialAxes {false}
 Whether to swap the local coordinates for material lookup.
CloneablePtr< 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.

Additional Inherited Members

Public Types inherited from Acts::Surface
enum  SurfaceType {
  Cone = 0 , Cylinder = 1 , Disc = 2 , Perigee = 3 ,
  Plane = 4 , Straw = 5 , Curvilinear = 6 , Point = 7 ,
  Other = 8
}
 This enumerator simplifies the persistency & calculations, by saving a dynamic_cast, e.g. More...
Static Public Member Functions inherited from Acts::Surface
template<class T, typename... Args>
static std::shared_ptr< T > makeShared (Args &&... args)
 Factory for producing memory managed instances of Surface.
Static Public Attributes inherited from Acts::Surface
static constexpr std::array< std::string_view, Surface::SurfaceType::Other+1 > s_surfaceTypeNames
 Helper strings for screen output.

Detailed Description

Surface describing the point of closest approach (PCA) of a track to a single fixed 3D point (the surface center).

It is the point-analogue of the LineSurface (which represents the PCA to a line / Perigee).

Geometrically, a PointSurface behaves like a curvilinear plane anchored at the fixed center: a plane through the center whose normal always equals the track momentum direction. The track's crossing of that plane is therefore the PCA to the point. Consequently there is no parallel-line degeneracy: a unique intersection always exists.

The local coordinates are Cartesian (x, y) in the measurement plane perpendicular to the track direction. Cartesian (not polar r-phi) is used on purpose, because at the point itself (r = 0) the azimuth phi is degenerate.

The measurement frame is oriented from the track direction like the CurvilinearSurface: the third axis is the track direction, the first axis is built from global Z (with a fall-back to global X when the direction is (anti-)parallel to Z).

Note
A point has no intrinsic orientation, so only translation (center) alignment is supported; rotational alignment derivatives are zero.

Constructor & Destructor Documentation

◆ PointSurface() [1/5]

Acts::PointSurface::PointSurface ( const Vector3 & center)
explicitprotected

Constructor from a global position (unbounded point surface).

Parameters
centerposition of the point in the global frame

◆ PointSurface() [2/5]

Acts::PointSurface::PointSurface ( const Vector3 & center,
double maxDistance )
protected

Constructor from a global position and a maximum distance.

Parameters
centerposition of the point in the global frame
maxDistancemaximum distance from the point (radius of the PointBounds disc in the measurement plane)

◆ PointSurface() [3/5]

Acts::PointSurface::PointSurface ( const Transform3 & transform,
std::shared_ptr< const PointBounds > pbounds = nullptr )
explicitprotected

Constructor from a Transform3 and optional PointBounds.

Parameters
transformthe transform whose translation positions the point
pboundsthe bounds describing the maximum distance, may be nullptr for an unbounded point surface

◆ PointSurface() [4/5]

Acts::PointSurface::PointSurface ( const GeometryContext & gctx,
const PointSurface & other,
const Transform3 & shift )
protected

Copy constructor - with shift.

Parameters
gctxThe current geometry context object, e.g. alignment
otheris the source surface
shiftis the additional transform applied after copying

◆ PointSurface() [5/5]

Acts::PointSurface::PointSurface ( const PointSurface & other)
defaultnoexcept

Copy constructor.

Parameters
otherThe source surface for copying

Member Function Documentation

◆ alignmentToPathDerivative()

AlignmentToPathMatrix Acts::PointSurface::alignmentToPathDerivative ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
finalvirtual

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

alignment parameters of the surface. Only the center (translation) contributes; a point has no orientation so the rotation block is zero.

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 from Acts::Surface.

◆ assignSurfaceBounds()

void Acts::PointSurface::assignSurfaceBounds ( std::shared_ptr< const PointBounds > newBounds)

Overwrite the existing surface bounds with new ones.

Parameters
newBoundsPointer to the new bounds

◆ bounds()

const SurfaceBounds & Acts::PointSurface::bounds ( ) const
finalvirtual

This method returns the bounds of the surface by reference.

Returns
Reference to the surface bounds

Implements Acts::Surface.

◆ boundsPtr()

const std::shared_ptr< const PointBounds > & Acts::PointSurface::boundsPtr ( ) const

This method returns the shared_ptr to the PointBounds.

Returns
Shared pointer to the point bounds (may be nullptr)

◆ boundToFreeJacobian()

BoundToFreeMatrix Acts::PointSurface::boundToFreeJacobian ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
finalvirtual

Calculate the jacobian from local to global.

Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal 3D position
directionglobal 3D momentum direction
Returns
Jacobian from local to global

Reimplemented from Acts::Surface.

◆ freeToPathDerivative()

FreeToPathMatrix Acts::PointSurface::freeToPathDerivative ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
finalvirtual

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

free parameters.

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 from Acts::Surface.

◆ globalToLocal()

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

Global to local transformation.

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
tolerancethe tolerance for the on-surface check
Returns
A Result<Vector2> which is !ok() if position is not the point of closest approach to the point surface.

Implements Acts::Surface.

◆ intersect()

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

Calculate the straight-line intersection with the point surface, i.e.

the point of closest approach of the track to the point.

Given the track (position \( \vec m \), direction \( \vec e \), normalized), the PCA path length is \( u = (\vec c - \vec m) \cdot \vec e \) where \( \vec c \) is the point, and the intersection point is \(\vec m + u \vec e \). Unlike the LineSurface there is no parallel degeneracy.

Parameters
gctxThe current geometry context object, e.g. alignment
positionThe global position as a starting point
directionThe global direction at the starting point
Note
expected to be normalized
Parameters
boundaryToleranceThe boundary check directive for the estimate
tolerancethe tolerance used for the intersection
Returns
is the intersection object

Implements Acts::Surface.

◆ localAxes()

std::array< AxisDirection, 2 > Acts::PointSurface::localAxes ( ) const
finalprotectedvirtual

Local axes of the surface.

Returns
An array of local axes directions

Implements Acts::Surface.

◆ localCartesianToBoundLocalDerivative()

Matrix< 2, 3 > Acts::PointSurface::localCartesianToBoundLocalDerivative ( const GeometryContext & gctx,
const Vector3 & position ) const
finalvirtual

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

Implements Acts::Surface.

◆ localToGlobal()

Vector3 Acts::PointSurface::localToGlobal ( const GeometryContext & gctx,
const Vector2 & lposition,
const Vector3 & direction ) const
finalvirtual

Local to global transformation.

Note
for point surfaces the momentum direction is used in order to build the measurement plane
Parameters
gctxThe current geometry context object, e.g. alignment
lpositionis the local (x, y) position to be transformed
directionis the global momentum direction
Returns
global position by value

Implements Acts::Surface.

◆ name()

std::string Acts::PointSurface::name ( ) const
finalvirtual

Return properly formatted class name for screen output.

Returns
String representation of the class name

Implements Acts::Surface.

◆ normal()

Vector3 Acts::PointSurface::normal ( const GeometryContext & gctx,
const Vector3 & pos,
const Vector3 & direction ) const
finalvirtual

Return the surface normal, which for a point surface is the momentum direction (the measurement plane is perpendicular to the direction).

Parameters
gctxThe current geometry context object, e.g. alignment
posis the global position (ignored)
directionis the global momentum direction
Returns
the normal vector (equal to direction)

Implements Acts::Surface.

◆ operator=()

PointSurface & Acts::PointSurface::operator= ( const PointSurface & other)
defaultnoexcept

Assignment operator.

Parameters
otheris the source surface for copying
Returns
Reference to this PointSurface after assignment

◆ pathCorrection()

double Acts::PointSurface::pathCorrection ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
finalvirtual

The pathCorrection is by definition 1 for point surfaces.

Parameters
gctxGeometry context (ignored)
positionPosition parameter (ignored)
directionDirection parameter (ignored)
Returns
Always returns 1.0 for point surfaces

Implements Acts::Surface.

◆ polyhedronRepresentation()

Polyhedron Acts::PointSurface::polyhedronRepresentation ( const GeometryContext & gctx,
unsigned int quarterSegments ) const
finalvirtual

Return a Polyhedron for the surface (a non-physical marker at the center).

Parameters
gctxThe current geometry context object, e.g. alignment
quarterSegmentsis an ignored parameter
Returns
A list of vertices and a face/facet description of it

Implements Acts::Surface.

◆ referenceFrame()

RotationMatrix3 Acts::PointSurface::referenceFrame ( const GeometryContext & gctx,
const Vector3 & position,
const Vector3 & direction ) const
finalvirtual

Return the measurement frame, built from the momentum direction like a curvilinear surface.

Columns are (U, V, T) with T the direction.

Parameters
gctxThe current geometry context object, e.g. alignment
positionis the global position (ignored)
directionis the momentum direction used to build the frame
Returns
a rotation matrix that indicates the measurement frame

Reimplemented from Acts::Surface.

◆ referencePosition()

Vector3 Acts::PointSurface::referencePosition ( const GeometryContext & gctx,
AxisDirection aDir ) const
finalvirtual

The binning position is the center of the point surface.

Parameters
gctxThe current geometry context object, e.g. alignment
aDiris the axis direction for the reference position request
Returns
the center position

Implements Acts::GeometryObject.

◆ toStreamImpl()

std::ostream & Acts::PointSurface::toStreamImpl ( const GeometryContext & gctx,
std::ostream & sl ) const
finalprotectedvirtual

Output Method for std::ostream.

Parameters
gctxThe current geometry context object, e.g. alignment
slis the ostream to be dumped into
Returns
ostream object which was streamed into

Reimplemented from Acts::Surface.

◆ type()

SurfaceType Acts::PointSurface::type ( ) const
finalvirtual

Return the surface type.

Returns
Surface type identifier for point surfaces

Implements Acts::Surface.