Class Surface¶
Defined in File Surface.hpp
Inheritance Relationships¶
Base Types¶
public Acts::GeometryObject
(Class GeometryObject)public std::enable_shared_from_this< Surface >
Derived Types¶
public Acts::ConeSurface
(Class ConeSurface)public Acts::CylinderSurface
(Class CylinderSurface)public Acts::DiscSurface
(Class DiscSurface)public Acts::LineSurface
(Class LineSurface)public Acts::PlaneSurface
(Class PlaneSurface)
Class Documentation¶
-
class
Acts
::
Surface
: public virtual Acts::GeometryObject, public std::enable_shared_from_this<Surface>¶ 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.
Subclassed by Acts::ConeSurface, Acts::CylinderSurface, Acts::DiscSurface, Acts::LineSurface, Acts::PlaneSurface
Public Types
-
enum
SurfaceType
¶ This enumerator simplifies the persistency & calculations, by saving a dynamic_cast, e.g.
for persistency
Values:
-
enumerator
Cone
= 0¶
-
enumerator
Cylinder
= 1¶
-
enumerator
Disc
= 2¶
-
enumerator
Perigee
= 3¶
-
enumerator
Plane
= 4¶
-
enumerator
Straw
= 5¶
-
enumerator
Curvilinear
= 6¶
-
enumerator
Other
= 7¶
-
enumerator
Public Functions
-
~Surface
()¶
-
AlignmentToBoundMatrix
alignmentToBoundDerivative
(const GeometryContext &gctx, const FreeVector &derivatives, const Vector3D &position, const Vector3D &direction) 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)
- Return
Derivative of bound track parameters w.r.t. local frame alignment parameters
- Parameters
gctx
: The current geometry context object, e.g. alignmentderivatives
: Path length derivatives of the free, nominal parameters to help evaluate change of free track parameters caused by change of alignment parametersposition
: The position of the paramters in globaldirection
: The direction of the track
-
AlignmentRowVector
alignmentToPathDerivative
(const GeometryContext &gctx, const RotationMatrix3D &rotToLocalZAxis, const Vector3D &position, const Vector3D &direction) const¶ Calculate the derivative of path length 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)
Re-implementation is needed for surface whose intersection with track is not its local xy plane, e.g. LineSurface, CylinderSurface and ConeSurface
- Return
Derivative of path length w.r.t. the alignment parameters
- Parameters
gctx
: The current geometry context object, e.g. alignmentrotToLocalZAxis
: The derivative of local frame z axis vector w.r.t. its rotationposition
: The position of the paramters in globaldirection
: The direction of the track
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
material
: Material description associated to this surface
-
const DetectorElementBase *
associatedDetectorElement
() const¶ Return method for the associated Detector Element.
- Return
plain pointer to the DetectorElement, can be nullptr
-
const Layer *
associatedLayer
() const¶ Return method for the associated Layer in which the surface is embedded.
- Return
Layer by plain pointer, can be nullptr
-
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.
- Parameters
lay
: the assignment Layer by reference
-
const SurfaceBounds &
bounds
() const = 0¶ Return method for SurfaceBounds.
- Return
SurfaceBounds by reference
-
Vector3D
center
(const GeometryContext &gctx) const¶ Return method for the surface center by reference.
- Note
the center is always recalculated in order to not keep a cache
- Return
center position by value
- Parameters
gctx
: The current geometry context object, e.g. alignment
-
BoundRowVector
derivativeFactors
(const GeometryContext &gctx, const Vector3D &position, const Vector3D &direction, const RotationMatrix3D &rft, const BoundToFreeMatrix &jacobian) const¶ Calculate the form factors for the derivatives the calculation is identical for all surfaces where the reference frame does not depend on the direction.
- Return
a five-dim vector
- Parameters
gctx
: The current geometry context object, e.g. alignmentposition
: is the position of the paramters in globaldirection
: is the direction of the trackrft
: is the transposed reference frame (avoids recalculation)jacobian
: is the transport jacobian
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 abad_weak_ptr
exception), in C++17 it is defined as that exception.- Note
Only call this if you need shared ownership of this object.
- Return
The shared pointer
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 abad_weak_ptr
exception, in C++17 it is defined as that exception.- Note
Only call this if you need shared ownership of this object.
- Return
The shared pointer
-
Result<Vector2D>
globalToLocal
(const GeometryContext &gctx, const Vector3D &position, const Vector3D &momentum) const = 0¶ 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
- Return
a Result<Vector2D> which can be !ok() if the operation fails
- Parameters
gctx
: The current geometry context object, e.g. alignmentposition
: global 3D position - considered to be on surface but not inside bounds (check is done)momentum
: global 3D momentum representation (optionally ignored)
-
void
initJacobianToGlobal
(const GeometryContext &gctx, BoundToFreeMatrix &jacobian, const Vector3D &position, const Vector3D &direction, const BoundVector &pars) const¶ Initialize the jacobian from local to global the surface knows best, hence the calculation is done here.
The jacobian is assumed to be initialised, so only the relevant entries are filled
- Parameters
gctx
: The current geometry context object, e.g. alignmentjacobian
: is the jacobian to be initializedposition
: is the global position of the parametersdirection
: is the direction at of the parameterspars
: is the parameter vector
-
RotationMatrix3D
initJacobianToLocal
(const GeometryContext &gctx, FreeToBoundMatrix &jacobian, const Vector3D &position, const Vector3D &direction) const¶ Initialize the jacobian from global to local the surface knows best, hence the calculation is done here.
The jacobian is assumed to be initialised, so only the relevant entries are filled
- Return
the transposed reference frame (avoids recalculation)
- Parameters
jacobian
: is the jacobian to be initializedposition
: is the global position of the parametersdirection
: is the direction at of the parametersgctx
: The current geometry context object, e.g. alignment
-
bool
insideBounds
(const Vector2D &lposition, const BoundaryCheck &bcheck = true) const¶ The insideBounds method for local positions.
- Return
boolean indication if operation was successful
- Parameters
lposition
: The local position to checkbcheck
: BoundaryCheck directive for this onSurface check
-
SurfaceIntersection
intersect
(const GeometryContext &gctx, const Vector3D &position, const Vector3D &direction, const BoundaryCheck &bcheck) const = 0¶ Straight line intersection schema from position/direction.
- Return
SurfaceIntersection object (contains intersection & surface)
- Parameters
gctx
: The current geometry context object, e.g. alignmentposition
: The position to start fromdirection
: The direction at startbcheck
: the Boundary Check
-
bool
isOnSurface
(const GeometryContext &gctx, const Vector3D &position, const Vector3D &momentum, const BoundaryCheck &bcheck = true) const¶ The geometric onSurface method.
Geometrical check whether position is on Surface
- Return
boolean indication if operation was successful
- Parameters
gctx
: The current geometry context object, e.g. alignmentposition
: global position to be evaludatedmomentum
: global momentum (required for line-type surfaces)bcheck
: BoundaryCheck directive for this onSurface check
-
LocalCartesianToBoundLocalMatrix
localCartesianToBoundLocalDerivative
(const GeometryContext &gctx, const Vector3D &position) const = 0¶ Calculate the derivative of bound track parameters local position w.r.t.
position in local 3D Cartesian coordinates
- Return
Derivative of bound local position w.r.t. position in local 3D cartesian coordinates
- Parameters
gctx
: The current geometry context object, e.g. alignmentposition
: The position of the paramters in global
-
Vector3D
localToGlobal
(const GeometryContext &gctx, const Vector2D &lposition, const Vector3D &momentum) const = 0¶ 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
- Return
The global position by value
- Parameters
gctx
: The current geometry context object, e.g. alignmentlposition
: local 2D position in specialized surface framemomentum
: global 3D momentum representation (optionally ignored)
-
std::string
name
() const = 0¶ Return properly formatted class name.
-
Vector3D
normal
(const GeometryContext &gctx, const Vector2D &lposition) const = 0¶ Return method for the normal vector of the surface The normal vector can only be generally defined at a given local position It requires a local position to be given (in general)
- Return
normal vector by value
- Parameters
gctx
: The current geometry context object, e.g. alignmentlposition
: is the local position where the normal vector is constructed
-
Vector3D
normal
(const GeometryContext &gctx, const Vector3D &position) const¶ Return method for the normal vector of the surface The normal vector can only be generally defined at a given local position It requires a local position to be given (in general)
- Return
normal vector by value
- Parameters
position
: is the global position where the normal vector is constructedgctx
: The current geometry context object, e.g. alignment
-
Vector3D
normal
(const GeometryContext &gctx) const¶ Return method for the normal vector of the surface.
It will return a normal vector at the center() position
- Return
normal vector by value
- Parameters
gctx
: The current geometry context object, e.g. alignment
-
bool
operator!=
(const Surface &sf) const¶ Comparison (non-equality) operator.
- Parameters
sf
: Source surface for the comparison
-
Surface &
operator=
(const Surface &other)¶ Assignment operator.
- Note
copy construction invalidates the association to detector element and layer
- Parameters
other
: Source surface for the assignment
-
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.
- Parameters
other
: source surface for the comparison
-
double
pathCorrection
(const GeometryContext &gctx, const Vector3D &position, const Vector3D &direction) const = 0¶ Calucation of the path correction for incident.
- Return
Path correction with respect to the nominal incident.
- Parameters
gctx
: The current geometry context object, e.g. alignmentposition
: global 3D position - considered to be on surface but not inside bounds (check is done)direction
: global 3D momentum direction
-
Polyhedron
polyhedronRepresentation
(const GeometryContext &gctx, size_t lseg) const = 0¶ Return a Polyhedron for this object.
- Note
An internal surface transform can invalidate the extrema in the transformed space
- Return
A list of vertices and a face/facett description of it
- Parameters
gctx
: The current geometry context object, e.g. alignmentlseg
: Number of segments along curved lines, if the lseg is set to one, only the corners and the extrema are given, otherwise it represents the number of segments for a full 2*M_PI circle and is scaled to the relevant sector
-
Acts::RotationMatrix3D
referenceFrame
(const GeometryContext &gctx, const Vector3D &position, const Vector3D &momentum) const¶ Return mehtod for the reference frame This is the frame in which the covariance matrix is defined (specialized by all surfaces)
- Return
RotationMatrix3D which defines the three axes of the measurement frame
- Parameters
gctx
: The current geometry context object, e.g. alignmentposition
: global 3D position - considered to be on surface but not inside bounds (check is done)momentum
: global 3D momentum representation (optionally ignored)
-
const ISurfaceMaterial *
surfaceMaterial
() const¶ Return method for the associated Material to this surface.
- Return
SurfaceMaterial as plain pointer, can be nullptr
Return method for the shared pointer to the associated Material.
- Return
SurfaceMaterial as shared_pointer, can be nullptr
-
std::ostream &
toStream
(const GeometryContext &gctx, std::ostream &sl) const¶ Output Method for std::ostream, to be overloaded by child classes.
- Parameters
gctx
: The current geometry context object, e.g. alignmentsl
: is the ostream to be dumped into
-
const Transform3D &
transform
(const GeometryContext &gctx) const¶ Return method for the surface Transform3D 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.
- Return
the contextual transform
- Parameters
gctx
: The current geometry context object, e.g. alignment
-
SurfaceType
type
() const = 0¶ Return method for the Surface type to avoid dynamic casts.
Public Static Functions
Factory for producing memory managed instances of Surface.
Will forward all parameters and will attempt to find a suitable constructor.
Protected Functions
-
Surface
(const Transform3D &transform = Transform3D::Identity())¶ Constructor with Transform3D as a shared object.
- Note
also acts as default constructor
- Parameters
transform
: Transform3D positions the surface in 3D global space
-
Surface
(const Surface &other)¶ Copy constructor.
- Note
copy construction invalidates the association to detector element and layer
- Parameters
other
: Source surface for copy.
-
Surface
(const DetectorElementBase &detelement)¶ Constructor fromt DetectorElementBase: Element proxy.
- Parameters
detelement
: Detector element which is represented by this surface
-
Surface
(const GeometryContext &gctx, const Surface &other, const Transform3D &shift)¶ Copy constructor with optional shift.
- Note
copy construction invalidates the association to detector element and layer
- Parameters
gctx
: The current geometry context object, e.g. alignmentother
: Source surface for copyshift
: Additional transform applied as: shift * transform
Protected Attributes
-
const DetectorElementBase *
m_associatedDetElement
= {nullptr}¶ Pointer to the a DetectorElementBase.
-
const Layer *
m_associatedLayer
= {nullptr}¶ The associated layer Layer - layer in which the Surface is be embedded, nullptr if not associated.
-
const TrackingVolume *
m_associatedTrackingVolume
= {nullptr}¶ The assoicated TrackingVolume - tracking volume in case the surface is a boundary surface, nullptr if not associated.
-
std::shared_ptr<const ISurfaceMaterial>
m_surfaceMaterial
¶ Possibility to attach a material descrption.
-
Transform3D
m_transform
= Transform3D::Identity()¶ Transform3D definition that positions (translation, rotation) the surface in global space.
-
enum