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

Class for a planaer in the TrackingGeometry. More...

#include <Acts/Surfaces/PlaneSurface.hpp>

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

Public Member Functions

void assignSurfaceBounds (std::shared_ptr< const PlanarBounds > newBounds)
 Overwrite the existing surface bounds with new ones.
const SurfaceBoundsbounds () const override
 Return method for bounds object of this surfrace.
const std::shared_ptr< const PlanarBounds > & boundsPtr () const
 This method returns the shared_ptr to the DiscBounds.
Result< Vector2globalToLocal (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, double tolerance=s_onSurfaceTolerance) const final
 Convert a global position to a local one this is the most generic interface, which is implemented by all surfaces.
Result< Vector2globalToLocal (const GeometryContext &gctx, const Vector3 &position, double tolerance=s_onSurfaceTolerance) const override
 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
 Straight line intersection.
ActsMatrix< 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 override
 Local to global transformation.
Vector3 localToGlobal (const GeometryContext &gctx, const Vector2 &lposition, const Vector3 &direction) const final
 Local to global transformation.
std::pair< std::shared_ptr< PlaneSurface >, bool > mergedWith (const PlaneSurface &other, AxisDirection direction, const Logger &logger=getDummyLogger()) const
 Merge two plane surfaces into a single one.
std::string name () const override
 Return properly formatted class name for screen output.
Vector3 normal (const GeometryContext &gctx) const
 Get the normal vector, independent of the location.
Vector3 normal (const GeometryContext &gctx, const Vector2 &lposition) const final
 Get the normal vector of this surface at a given local position.
Vector3 normal (const GeometryContext &gctx, const Vector3 &pos, const Vector3 &direction) const final
 Calculate the normal vector of the surface This overload is fully generic, fulfills the Surface interface and accepts a global position and a direction.
Vector3 normal (const GeometryContext &gctx, const Vector3 &position) const final
 Get the normal vector of this surface at a given global position.
PlaneSurfaceoperator= (const PlaneSurface &other)
 Assignment operator.
double pathCorrection (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const final
 Method that calculates the correction due to incident angle.
Polyhedron polyhedronRepresentation (const GeometryContext &gctx, unsigned int quarterSegments) const override
 Return a Polyhedron for the surfaces.
Vector3 referencePosition (const GeometryContext &gctx, AxisDirection aDir) const final
 The axis position is the position calculated for a certain axis type.
SurfaceType type () const override
 Return the surface type.
Public Member Functions inherited from Acts::RegularSurface
Result< Vector2globalToLocal (const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, double tolerance=s_onSurfaceTolerance) const final
 Convert a global position to a local one this is the most generic interface, which is implemented by all surfaces.
bool isOnSurface (const GeometryContext &gctx, const Vector3 &position, const BoundaryTolerance &boundaryTolerance=BoundaryTolerance::None(), double tolerance=s_onSurfaceTolerance) const
 The geometric onSurface method.
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.
Vector3 localToGlobal (const GeometryContext &gctx, const Vector2 &lposition, const Vector3 &direction) const final
 Local to global transformation.
Vector3 normal (const GeometryContext &gctx, const Vector3 &pos, const Vector3 &direction) const final
 Calculate the normal vector of the surface This overload is fully generic, fulfills the Surface interface and accepts a global position and a direction.
 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.
Public Member Functions inherited from Acts::Surface
 ~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 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 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.
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 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.
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 double referencePositionValue (const GeometryContext &gctx, AxisDirection aDir) const
 Implement the binningValue.

Protected Member Functions

 PlaneSurface (const GeometryContext &gctx, const PlaneSurface &other, const Transform3 &transform)
 Copy constructor - with shift.
 PlaneSurface (const PlaneSurface &other)
 Copy Constructor.
 PlaneSurface (const Transform3 &transform, std::shared_ptr< const PlanarBounds > pbounds=nullptr)
 Constructor for Planes with (optional) shared bounds object.
 PlaneSurface (std::shared_ptr< const PlanarBounds > pbounds, const SurfacePlacementBase &placement)
 Constructor from SurfacePlacementBase : Element proxy.
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
 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::shared_ptr< const PlanarBoundsm_bounds
 the bounds of this surface
Protected Attributes inherited from Acts::Surface
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.

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 , Other = 7
}
 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

Class for a planaer in the TrackingGeometry.

The PlaneSurface extends the Surface class with the possibility to convert local to global positions (vice versa).

Constructor & Destructor Documentation

◆ PlaneSurface() [1/4]

Acts::PlaneSurface::PlaneSurface ( const PlaneSurface & other)
protected

Copy Constructor.

Parameters
otheris the source surface for the copy

◆ PlaneSurface() [2/4]

Acts::PlaneSurface::PlaneSurface ( const GeometryContext & gctx,
const PlaneSurface & other,
const Transform3 & transform )
protected

Copy constructor - with shift.

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

◆ PlaneSurface() [3/4]

Acts::PlaneSurface::PlaneSurface ( std::shared_ptr< const PlanarBounds > pbounds,
const SurfacePlacementBase & placement )
protected

Constructor from SurfacePlacementBase : Element proxy.

Parameters
pboundsare the provided planar bounds
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

◆ PlaneSurface() [4/4]

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

Constructor for Planes with (optional) shared bounds object.

Parameters
transformtransform in 3D that positions this surface
pboundsbounds object to describe the actual surface area

Member Function Documentation

◆ assignSurfaceBounds()

void Acts::PlaneSurface::assignSurfaceBounds ( std::shared_ptr< const PlanarBounds > newBounds)

Overwrite the existing surface bounds with new ones.

Parameters
newBoundsPointer to the new bounds

◆ bounds()

const SurfaceBounds & Acts::PlaneSurface::bounds ( ) const
overridevirtual

Return method for bounds object of this surfrace.

Returns
Reference to the surface bounds

Implements Acts::Surface.

◆ boundsPtr()

const std::shared_ptr< const PlanarBounds > & Acts::PlaneSurface::boundsPtr ( ) const

This method returns the shared_ptr to the DiscBounds.

◆ globalToLocal() [1/2]

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

Convert a global position to a local one this is the most generic interface, which is implemented by all surfaces.

Note
The position is required to be on-surface, which is indicated by the Result return value.
Parameters
gctxThe current geometry context object, e.g. alignment
positionis the global position to be converted
directionis the direction of the local position (ignored for RegularSurface)
toleranceis the tolerance for the on-surface check
Returns
Result type containing local position by value

Implements Acts::Surface.

◆ globalToLocal() [2/2]

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

Global to local transformation.

Note
For planar surfaces the momentum direction is ignored in the 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)
toleranceoptional tolerance within which a point is considered valid on surface
Returns
a Result<Vector2> which can be !ok() if the operation fails

Implements Acts::RegularSurface.

◆ intersect()

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

Straight line intersection.

Parameters
gctxThe current geometry context object, e.g. alignment
positionThe start position of the intersection attempt
directionThe direction of the intersection attempt, (
Note
expected to be normalized)
Parameters
boundaryToleranceThe boundary check directive
tolerancethe tolerance used for the intersection

mathematical motivation:

the equation of the plane is given by:
\( \vec n \cdot \vec x = \vec n \cdot \vec p,\)
where \( \vec n = (n_{x}, n_{y}, n_{z})\) denotes the normal vector of the plane, \( \vec p = (p_{x}, p_{y}, p_{z})\) one specific point on the plane and \( \vec x = (x,y,z) \) all possible points on the plane.

Given a line with:
\( \vec l(u) = \vec l_{1} + u \cdot \vec v \),
the solution for \( u \) can be written: \( u = \frac{\vec n (\vec p - \vec l_{1})}{\vec n \vec v}\)
If the denominator is 0 then the line lies:

  • either in the plane
  • perpendicular to the normal of the plane
Returns
the MultiIntersection3D object

Implements Acts::Surface.

◆ localCartesianToBoundLocalDerivative()

ActsMatrix< 2, 3 > Acts::PlaneSurface::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() [1/2]

Vector3 Acts::PlaneSurface::localToGlobal ( const GeometryContext & gctx,
const Vector2 & lposition ) const
overridevirtual

Local to global transformation.

Note
For planar surfaces the momentum direction is ignored in the local to global transformation
Parameters
gctxThe current geometry context object, e.g. alignment
lpositionlocal 2D position in specialized surface frame
Returns
the global position by value

Implements Acts::RegularSurface.

◆ localToGlobal() [2/2]

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

Local to global transformation.

This is the most generic interface, which is implemented by all surfaces.

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

Implements Acts::Surface.

◆ mergedWith()

std::pair< std::shared_ptr< PlaneSurface >, bool > Acts::PlaneSurface::mergedWith ( const PlaneSurface & other,
AxisDirection direction,
const Logger & logger = getDummyLogger() ) const

Merge two plane surfaces into a single one.

Note
The surfaces need to be compatible, i.e. have bounds that align along merging direction, and have the same bound size along the non-merging direction
Parameters
otherThe other plane surface to merge with
directionThe direction: either AxisX or AxisY
loggerThe logger to use
Returns
The merged plane surface and a boolean indicating if surfaces are reversed
Note
The returned boolean is false if this is left or counter-clockwise of other, and true if not.

◆ name()

std::string Acts::PlaneSurface::name ( ) const
overridevirtual

Return properly formatted class name for screen output.

Returns
String representation of the class name

Implements Acts::Surface.

◆ normal() [1/4]

Vector3 Acts::PlaneSurface::normal ( const GeometryContext & gctx) const

Get the normal vector, independent of the location.

Parameters
gctxThe current geometry context object, e.g. alignment
Returns
The normal vector

◆ normal() [2/4]

Vector3 Acts::PlaneSurface::normal ( const GeometryContext & gctx,
const Vector2 & lposition ) const
finalvirtual

Get the normal vector of this surface at a given local position.

Parameters
gctxThe current geometry context object, e.g. alignment
lpositionis the local position is ignored
Returns
Normal vector as Vector3 by value

Implements Acts::RegularSurface.

◆ normal() [3/4]

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

Calculate the normal vector of the surface This overload is fully generic, fulfills the Surface interface and accepts a global position and a direction.

For RegularSurface this is equivalent to the normal overload, ignoring the direction

Parameters
gctxThe current geometry context object, e.g. alignment
posis the global position where the normal vector is constructed
directionis the direction of the normal vector (ignored for RegularSurface)
Returns
Normal vector at the given position

Implements Acts::Surface.

◆ normal() [4/4]

Vector3 Acts::PlaneSurface::normal ( const GeometryContext & gctx,
const Vector3 & position ) const
finalvirtual

Get the normal vector of this surface at a given global position.

Note
The position is required to be on-surface.
Parameters
gctxThe current geometry context object, e.g. alignment
positionis the global positiono (for PlaneSurface this is ignored)
Returns
The normal vector

Implements Acts::RegularSurface.

◆ operator=()

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

Assignment operator.

Parameters
otherThe source PlaneSurface for assignment
Returns
Reference to this PlaneSurface after assignment

◆ pathCorrection()

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

Method that calculates the correction due to incident angle.

Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal 3D position (ignored for PlaneSurface)
directionglobal 3D momentum direction (ignored for PlaneSurface)
Returns
a double representing the scaling factor

Implements Acts::Surface.

◆ polyhedronRepresentation()

Polyhedron Acts::PlaneSurface::polyhedronRepresentation ( const GeometryContext & gctx,
unsigned int quarterSegments ) const
overridevirtual

Return a Polyhedron for the surfaces.

Parameters
gctxThe current geometry context object, e.g. alignment
quarterSegmentsis the number of segments used to describe curved segments in a quarter of the phi range. If it is 1, then only the extrema points in phi are inserted next to the segment corners.
Note
for planar surfaces without curved segments quarterSegments is ignored
Returns
A list of vertices and a face/facett description of it

Implements Acts::Surface.

◆ referencePosition()

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

The axis position is the position calculated for a certain axis type.

Parameters
gctxThe current geometry context object, e.g. alignment
aDiris the axis direction of reference position request
Returns
position that can be used for this axis

Implements Acts::GeometryObject.

◆ type()

SurfaceType Acts::PlaneSurface::type ( ) const
overridevirtual

Return the surface type.

Returns
Surface type identifier

Implements Acts::Surface.

Member Data Documentation

◆ m_bounds

std::shared_ptr<const PlanarBounds> Acts::PlaneSurface::m_bounds
protected

the bounds of this surface