# File ConeSurface.hpp¶

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

Note

this is foreseen for the ‘Geometry’ module

class ConeSurface : public Acts::Surface
#include <Acts/Surfaces/ConeSurface.hpp>

Class for a conical surface in the Tracking geometry.

It inherits from Surface.

The ConeSurface is special since no corresponding Track parameters exist since they’re numerical instable at the tip of the cone. Propagations to a cone surface will be returned in curvilinear coordinates.

Subclassed by Acts::ConeLayer

Public Functions

ConeSurface() = delete
~ConeSurface() override = default
virtual AlignmentToPathMatrix alignmentToPathDerivative(const GeometryContext &gctx, const FreeVector &parameters) const final

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)

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

• parameters – is the free parameters

Returns

Derivative of path length w.r.t. the alignment parameters

virtual Vector3 binningPosition(const GeometryContext &gctx, BinningValue bValue) const final

The binning position method - is overloaded for r-type binning.

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

• bValue – defines the type of binning applied in the global frame

Returns

The return type is a vector for positioning in the global frame

virtual const ConeBounds &bounds() const final

This method returns the ConeBounds by reference.

virtual Result<Vector2> globalToLocal(const GeometryContext &gctx, const Vector3 &position, const Vector3 &momentum, double tolerance = s_onSurfaceTolerance) const final

Global to local transformation.

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

• position – is the global position to be transformed

• momentum – is the global momentum (ignored in this operation)

• tolerance – optional tolerance within which a point is considered valid on surface

Returns

a Result<Vector2> which can be !ok() if the operation fails

virtual SurfaceIntersection intersect(const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction, const BoundaryCheck &bcheck) const final

Straight line intersection schema from position/direction.

If possible returns both solutions for the cylinder

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

• position – The position to start from

• direction – The direction at start

• bcheck – the Boundary Check

Returns

SurfaceIntersection object (contains intersection & surface)

virtual ActsMatrix<2, 3> localCartesianToBoundLocalDerivative(const GeometryContext &gctx, const Vector3 &position) const final

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

position in local 3D Cartesian coordinates

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

• position – The position of the paramters in global

Returns

Derivative of bound local position w.r.t. position in local 3D cartesian coordinates

virtual Vector3 localToGlobal(const GeometryContext &gctx, const Vector2 &lposition, const Vector3 &momentum) const final

Local to global transformation.

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

• lposition – is the local position to be transformed

• momentum – is the global momentum (ignored in this operation)

Returns

The global position by value

virtual std::string name() const override

Return properly formatted class name for screen output.

virtual Vector3 normal(const GeometryContext &gctx, const Vector2 &lposition) const final

Return method for surface normal information.

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

• lposition – is the local position at normal vector request

Returns

Vector3 normal vector in global frame

virtual Vector3 normal(const GeometryContext &gctx, const Vector3 &position) const final

Return method for surface normal information.

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

• position – is the global position as normal vector base

Returns

Vector3 normal vector in global frame

ConeSurface &operator=(const ConeSurface &other)

Assignment operator.

Parameters

other – is the source surface for the assignment

virtual double pathCorrection(const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const final

The pathCorrection for derived classes with thickness.

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

• position – is the global potion at the correction point

• direction – is the momentum direction at the correction point

Returns

is the path correction due to incident angle

virtual Polyhedron polyhedronRepresentation(const GeometryContext &gctx, size_t lseg) const override

Return a Polyhedron for the surfaces.

Note

that a surface transform can invalidate the extrema in the transformed space

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

• lseg – Number of segments along curved lines, it represents the full 2*M_PI coverange, if lseg is set to 1 only the extrema are given

Returns

A list of vertices and a face/facett description of it

virtual RotationMatrix3 referenceFrame(const GeometryContext &gctx, const Vector3 &position, const Vector3 &momentum) const final

Return the measurement frame - this is needed for alignment, in particular for StraightLine and Perigee Surface.

• the default implementation is the RotationMatrix3 of the transform

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

• position – is the global position where the measurement frame is constructed

• momentum – is the momentum used for the measurement frame construction

Returns

matrix that indicates the measurement frame

virtual Vector3 rotSymmetryAxis(const GeometryContext &gctx) const
Parameters

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

virtual SurfaceType type() const override

Return the surface type.

Protected Functions

ConeSurface(const Transform3 &transform, double alpha, bool symmetric = false)

Constructor form HepTransform and an opening angle.

Parameters
• transform – is the transform to place to cone in a 3D frame

• alpha – is the opening angle of the cone

• symmetric – indicates if the cones are built to +/1 z

ConeSurface(const Transform3 &transform, double alpha, double zmin, double zmax, double halfPhi = M_PI)

Constructor form HepTransform and an opening angle.

Parameters
• transform – is the transform that places the cone in the global frame

• alpha – is the opening angle of the cone

• zmin – is the z range over which the cone spans

• zmax – is the z range over which the cone spans

• halfPhi – is the openen angle for cone ssectors

ConeSurface(const Transform3 &transform, std::shared_ptr<const ConeBounds> cbounds)

Constructor from HepTransform and ConeBounds.

Parameters
• transform – is the transform that places the cone in the global frame

• cbounds – is the boundary class, the bounds must exit

ConeSurface(const ConeSurface &other)

Copy constructor.

Parameters

other – is the source cone surface

ConeSurface(const GeometryContext &gctx, const ConeSurface &other, const Transform3 &shift)

Copy constructor - with shift.

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

• other – is the source cone surface

• shift – is the additional transfrom applied after copying

Protected Attributes

std::shared_ptr<const ConeBounds> m_bounds

bounds (shared)

Private Functions

detail::RealQuadraticEquation intersectionSolver(const GeometryContext &gctx, const Vector3 &position, const Vector3 &direction) const

Implementation of the intersection solver.

mathematical motivation:

The calculation will be done in the 3-dim frame of the cone, i.e. the symmetry axis of the cone is the z-axis, x- and y-axis are perpendicular to the z-axis. In this frame the cone is centered around the origin. Therefore the two points describing the line have to be first recalculated into the new frame. Suppose, this is done, the points of intersection can be obtained as follows:

The cone is described by the implicit equation $$x^2 + y^2 = z^2 \tan \alpha$$ where $$\alpha$$ is opening half-angle of the cone the and the line by the parameter equation (with $$t$$ the parameter and $$x_1$$ and $$x_2$$ are points on the line) $$(x,y,z) = \vec x_1 + (\vec x_2 - \vec x_2) t$$. The intersection is the given to the value of $$t$$ where the $$(x,y,z)$$ coordinates of the line satisfy the implicit equation of the cone. Inserting the expression for the points on the line into the equation of the cone and rearranging to the form of a gives (letting $$\vec x_d = \frac{\vec x_2 - \vec x_1}{|\vec x_2 - \vec x_1|}$$): $$t^2 (x_d^2 + y_d^2 - z_d^2 \tan^2 \alpha) + 2 t (x_1 x_d + y_1 y_d - z_1 z_d \tan^2 \alpha) + (x_1^2 + y_1^2 - z_1^2 \tan^2 \alpha) = 0$$ Solving the above for $$t$$ and putting the values into the equation of the line gives the points of intersection. $$t$$ is also the length of the path, since we normalized $$x_d$$ to be unit length.

Returns