EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::LineSurface Class Reference

#include <acts/blob/sPHENIX/Core/include/Acts/Surfaces/LineSurface.hpp>

+ Inheritance diagram for Acts::LineSurface:
+ Collaboration diagram for Acts::LineSurface:

Public Member Functions

 ~LineSurface () override=default
 
 LineSurface ()=delete
 
LineSurfaceoperator= (const LineSurface &other)
 
Vector3D normal (const GeometryContext &gctx, const Vector2D &lposition) const final
 
Vector3D binningPosition (const GeometryContext &gctx, BinningValue bValue) const final
 
RotationMatrix3D referenceFrame (const GeometryContext &gctx, const Vector3D &position, const Vector3D &momentum) const final
 
void initJacobianToGlobal (const GeometryContext &gctx, BoundToFreeMatrix &jacobian, const Vector3D &position, const Vector3D &direction, const BoundVector &pars) const final
 
BoundRowVector derivativeFactors (const GeometryContext &gctx, const Vector3D &position, const Vector3D &direction, const RotationMatrix3D &rft, const BoundToFreeMatrix &jacobian) const final
 
Vector3D localToGlobal (const GeometryContext &gctx, const Vector2D &lposition, const Vector3D &momentum) const final
 
Result< Vector2DglobalToLocal (const GeometryContext &gctx, const Vector3D &position, const Vector3D &momentum) const final
 
SurfaceIntersection intersect (const GeometryContext &gctx, const Vector3D &position, const Vector3D &direction, const BoundaryCheck &bcheck=false) const final
 Straight line intersection schema.
 
double pathCorrection (const GeometryContext &gctx, const Vector3D &position, const Vector3D &momentum) const override
 
const SurfaceBoundsbounds () const final
 This method returns the bounds of the Surface by reference */.
 
std::string name () const override
 Return properly formatted class name for screen output */.
 
AlignmentRowVector alignmentToPathDerivative (const GeometryContext &gctx, const RotationMatrix3D &rotToLocalZAxis, const Vector3D &position, const Vector3D &direction) const final
 
LocalCartesianToBoundLocalMatrix localCartesianToBoundLocalDerivative (const GeometryContext &gctx, const Vector3D &position) const final
 
- Public Member Functions inherited from Acts::Surface
virtual ~Surface ()
 
std::shared_ptr< SurfacegetSharedPtr ()
 
std::shared_ptr< const SurfacegetSharedPtr () const
 
Surfaceoperator= (const Surface &other)
 
virtual bool operator== (const Surface &other) const
 
virtual bool operator!= (const Surface &sf) const
 
virtual SurfaceType type () const =0
 Return method for the Surface type to avoid dynamic casts.
 
virtual const Transform3Dtransform (const GeometryContext &gctx) const
 
virtual Vector3D center (const GeometryContext &gctx) const
 
virtual Vector3D normal (const GeometryContext &gctx, const Vector3D &position) const
 
virtual Vector3D normal (const GeometryContext &gctx) const
 
const DetectorElementBaseassociatedDetectorElement () const
 
const LayerassociatedLayer () const
 
void associateLayer (const Layer &lay)
 
const ISurfaceMaterialsurfaceMaterial () const
 
const std::shared_ptr< const
ISurfaceMaterial > & 
surfaceMaterialSharedPtr () const
 
void assignSurfaceMaterial (std::shared_ptr< const ISurfaceMaterial > material)
 
bool isOnSurface (const GeometryContext &gctx, const Vector3D &position, const Vector3D &momentum, const BoundaryCheck &bcheck=true) const
 
virtual bool insideBounds (const Vector2D &lposition, const BoundaryCheck &bcheck=true) const
 
virtual RotationMatrix3D initJacobianToLocal (const GeometryContext &gctx, FreeToBoundMatrix &jacobian, const Vector3D &position, const Vector3D &direction) const
 
virtual std::ostream & toStream (const GeometryContext &gctx, std::ostream &sl) const
 
virtual Polyhedron polyhedronRepresentation (const GeometryContext &gctx, size_t lseg) const =0
 
AlignmentToBoundMatrix alignmentToBoundDerivative (const GeometryContext &gctx, const FreeVector &derivatives, const Vector3D &position, const Vector3D &direction) const
 
- Public Member Functions inherited from Acts::GeometryObject
 GeometryObject ()=default
 Defaulted construrctor.
 
 GeometryObject (const GeometryObject &)=default
 Defaulted copy constructor.
 
 GeometryObject (const GeometryIdentifier &geometryId)
 
GeometryObjectoperator= (const GeometryObject &geometryId)
 
const GeometryIdentifiergeometryId () const
 
virtual double binningPositionValue (const GeometryContext &gctx, BinningValue bValue) const
 
void assignGeometryId (const GeometryIdentifier &geometryId)
 

Protected Member Functions

 LineSurface (const Transform3D &transform, double radius, double halez)
 
 LineSurface (const Transform3D &transform, std::shared_ptr< const LineBounds > lbounds=nullptr)
 
 LineSurface (const std::shared_ptr< const LineBounds > &lbounds, const DetectorElementBase &detelement)
 
 LineSurface (const LineSurface &other)
 
 LineSurface (const GeometryContext &gctx, const LineSurface &other, const Transform3D &shift)
 
- Protected Member Functions inherited from Acts::Surface
 Surface (const Transform3D &transform=Transform3D::Identity())
 
 Surface (const Surface &other)
 
 Surface (const DetectorElementBase &detelement)
 
 Surface (const GeometryContext &gctx, const Surface &other, const Transform3D &shift)
 

Protected Attributes

std::shared_ptr< const LineBoundsm_bounds
 bounds (shared)
 
- Protected Attributes inherited from Acts::Surface
Transform3D m_transform = Transform3D::Identity()
 
const DetectorElementBasem_associatedDetElement {nullptr}
 Pointer to the a DetectorElementBase.
 
const Layerm_associatedLayer {nullptr}
 
const TrackingVolumem_associatedTrackingVolume {nullptr}
 
std::shared_ptr< const
ISurfaceMaterial
m_surfaceMaterial
 Possibility to attach a material descrption.
 
- Protected Attributes inherited from Acts::GeometryObject
GeometryIdentifier m_geometryId
 

Private Member Functions

bool globalToLocalPlain (const GeometryContext &gctx, const Vector3D &position, const Vector3D &momentum, Vector2D &lposition) const
 

Private Attributes

friend Surface
 

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
}
 
- Static Public Member Functions inherited from Acts::Surface
template<class T , typename... Args>
static std::shared_ptr< TmakeShared (Args &&...args)
 

Detailed Description

Base class for a linear surfaces in the TrackingGeometry to describe dirft tube, straw like detectors or the Perigee It inherits from Surface.

Note
It leaves the type() method virtual, so it can not be instantiated
LineSurface.png

Definition at line 31 of file LineSurface.hpp.

View newest version in sPHENIX GitHub at line 31 of file LineSurface.hpp

Constructor & Destructor Documentation

Acts::LineSurface::LineSurface ( const Transform3D transform,
double  radius,
double  halez 
)
protected

Constructor from Transform3D and bounds

Parameters
transformThe transform that positions the surface in the global frame
radiusThe straw radius
halezThe half length in z

Definition at line 15 of file LineSurface.cpp.

View newest version in sPHENIX GitHub at line 15 of file LineSurface.cpp

Acts::LineSurface::LineSurface ( const Transform3D transform,
std::shared_ptr< const LineBounds lbounds = nullptr 
)
protected

Constructor from Transform3D and a shared bounds object

Parameters
transformThe transform that positions the surface in the global frame
lboundsThe bounds describing the straw dimensions, can be optionally nullptr

Definition at line 21 of file LineSurface.cpp.

View newest version in sPHENIX GitHub at line 21 of file LineSurface.cpp

Acts::LineSurface::LineSurface ( const std::shared_ptr< const LineBounds > &  lbounds,
const DetectorElementBase detelement 
)
protected

Constructor from DetectorElementBase : Element proxy

Parameters
lboundsThe bounds describing the straw dimensions
detelementfor which this surface is (at least) one representation

Definition at line 25 of file LineSurface.cpp.

View newest version in sPHENIX GitHub at line 25 of file LineSurface.cpp

References throw_assert.

Acts::LineSurface::LineSurface ( const LineSurface other)
protected

Copy constructor

Parameters
otherThe source surface for copying

Definition at line 31 of file LineSurface.cpp.

View newest version in sPHENIX GitHub at line 31 of file LineSurface.cpp

Acts::LineSurface::LineSurface ( const GeometryContext gctx,
const LineSurface other,
const Transform3D shift 
)
protected

Copy constructor - with shift

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

Definition at line 34 of file LineSurface.cpp.

View newest version in sPHENIX GitHub at line 34 of file LineSurface.cpp

Acts::LineSurface::~LineSurface ( )
overridedefault
Acts::LineSurface::LineSurface ( )
delete

Member Function Documentation

AlignmentRowVector LineSurface::alignmentToPathDerivative ( const GeometryContext gctx,
const RotationMatrix3D rotToLocalZAxis,
const Vector3D position,
const Vector3D direction 
) const
inlinefinalvirtual

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)

Parameters
gctxThe current geometry context object, e.g. alignment
rotToLocalZAxisThe derivative of local frame z axis vector w.r.t. its rotation
positionThe position of the paramters in global
directionThe direction of the track
Returns
Derivative of path length w.r.t. the alignment parameters

Reimplemented from Acts::Surface.

Definition at line 211 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 211 of file LineSurface.ipp

References Acts::eAlignmentCenter0, Acts::eAlignmentRotation0, and Acts::Test::transform.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

Vector3D LineSurface::binningPosition ( const GeometryContext gctx,
BinningValue  bValue 
) const
inlinefinalvirtual

The binning position is the position calcualted for a certain binning type

Parameters
gctxThe current geometry context object, e.g. alignment
bValueis the binning type to be used
Returns
position that can beused for this binning

Implements Acts::GeometryObject.

Definition at line 70 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 70 of file LineSurface.ipp

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

const SurfaceBounds & LineSurface::bounds ( ) const
inlinefinalvirtual

This method returns the bounds of the Surface by reference */.

Implements Acts::Surface.

Definition at line 81 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 81 of file LineSurface.ipp

References Acts::s_noBounds.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

BoundRowVector LineSurface::derivativeFactors ( const GeometryContext gctx,
const Vector3D position,
const Vector3D direction,
const RotationMatrix3D rft,
const BoundToFreeMatrix jacobian 
) const
inlinefinalvirtual

Calculate the form factors for the derivatives the calculation is identical for all surfaces where the reference frame does not depend on the direction

Parameters
gctxThe current geometry context object, e.g. alignment
positionis the position of the paramters in global
directionis the direction of the track
rftis the transposed reference frame (avoids recalculation)
jacobianis the transport jacobian
Returns
a five-dim vector

Reimplemented from Acts::Surface.

Definition at line 185 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 185 of file LineSurface.ipp

References Acts::eBoundSize, and charm_jet_strange_helicity::pc.

Result< Vector2D > LineSurface::globalToLocal ( const GeometryContext gctx,
const Vector3D position,
const Vector3D momentum 
) const
inlinefinalvirtual

Specified for LineSurface: global to local method without dynamic memory allocation

This method is the true global->local transformation.
makes use of globalToLocal and indicates the sign of the Acts::eBoundLoc0 by the given momentum

The calculation of the sign of the radius (or $ d_0 $) can be done as follows:
May $ \vec d = \vec m - \vec c $ denote the difference between the center of the line and the global position of the measurement/predicted state, then $ \vec d $ lies within the so called measurement plane. The measurement plane is determined by the two orthogonal vectors $ \vec{measY}= \vec{Acts::eBoundLoc1} $ and $ \vec{measX} = \vec{measY} \times \frac{\vec{p}}{|\vec{p}|} $.

The sign of the radius ( $ d_{0} $ ) is then defined by the projection of $ \vec{d} $ onto $ \vec{measX} $:
$ sign = -sign(\vec{d} \cdot \vec{measX}) $

SignOfDriftCircleD0.gif
Parameters
gctxThe current geometry context object, e.g. alignment
positionglobal 3D position - considered to be on surface but not inside bounds (check is done)
momentumglobal 3D momentum representation (optionally ignored)
Returns
a Result<Vector2D> which can be !ok() if the operation fails

Implements Acts::Surface.

Definition at line 24 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 24 of file LineSurface.ipp

References Acts::eBoundLoc0, Acts::VectorHelpers::perp(), Acts::VectorHelpers::position(), sign(), and Acts::Test::transform.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool Acts::LineSurface::globalToLocalPlain ( const GeometryContext gctx,
const Vector3D position,
const Vector3D momentum,
Vector2D lposition 
) const
private

helper function to apply the globalToLocal with out transform

Parameters
gctxThe current geometry context object, e.g. alignment
positionis the global position
momentumis the momentum
lpositionis the local position to be filled
void LineSurface::initJacobianToGlobal ( const GeometryContext gctx,
BoundToFreeMatrix jacobian,
const Vector3D position,
const Vector3D direction,
const BoundVector pars 
) const
inlinefinalvirtual

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
gctxThe current geometry context object, e.g. alignment
jacobianis the jacobian to be initialized
positionis the global position of the parameters
directionis the direction at of the parameters
parsis the paranmeters vector

Reimplemented from Acts::Surface.

Definition at line 133 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 133 of file LineSurface.ipp

References Acts::VectorHelpers::cross(), Acts::eBoundLoc0, Acts::eBoundPhi, Acts::eBoundQOverP, Acts::eBoundTheta, Acts::eBoundTime, x, y, and z.

+ Here is the call graph for this function:

SurfaceIntersection LineSurface::intersect ( const GeometryContext gctx,
const Vector3D position,
const Vector3D direction,
const BoundaryCheck bcheck = false 
) const
inlinefinalvirtual

Straight line intersection schema.

Parameters
gctxThe current geometry context object, e.g. alignment
positionThe global position as a starting point
directionThe global direction at the starting point
Note
exptected to be normalized
Parameters
bcheckThe boundary check directive for the estimate

mathematical motivation: Given two lines in parameteric form:

  • $ \vec l_{a}(\lambda) = \vec m_a + \lambda \cdot \vec e_{a} $
  • $ \vec l_{b}(\mu) = \vec m_b + \mu \cdot \vec e_{b} $
    the vector between any two points on the two lines is given by:
  • $ \vec s(\lambda, \mu) = \vec l_{b} - l_{a} = \vec m_{ab} + \mu \cdot \vec e_{b} - \lambda \cdot \vec e_{a} $,
    when $ \vec m_{ab} = \vec m_{b} - \vec m_{a} $.
    $ \vec s(u, \mu_0) $ denotes the vector between the two closest points
    $ \vec l_{a,0} = l_{a}(u) $ and $ \vec l_{b,0} = l_{b}(\mu_0) $
    and is perpendicular to both, $ \vec e_{a} $ and $ \vec e_{b} $.

This results in a system of two linear equations:

  • (i) $ 0 = \vec s(u, \mu_0) \cdot \vec e_a = \vec m_ab \cdot \vec e_a + \mu_0 \vec e_a \cdot \vec e_b - u $
  • (ii) $ 0 = \vec s(u, \mu_0) \cdot \vec e_b = \vec m_ab \cdot \vec e_b + \mu_0 - u \vec e_b \cdot \vec e_a $

Solving (i), (ii) for $ u $ and $ \mu_0 $ yields:

  • $ u = \frac{(\vec m_ab \cdot \vec e_a)-(\vec m_ab \cdot \vec e_b)(\vec e_a \cdot \vec e_b)}{1-(\vec e_a \cdot \vec e_b)^2} $
  • $ \mu_0 = - \frac{(\vec m_ab \cdot \vec e_b)-(\vec m_ab \cdot \vec e_a)(\vec e_a \cdot \vec e_b)}{1-(\vec e_a \cdot \vec e_b)^2} $
Returns
is the intersection object

Implements Acts::Surface.

Definition at line 88 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 88 of file LineSurface.ipp

References denom, max, Acts::VectorHelpers::position(), Acts::s_onSurfaceTolerance, Acts::Test::transform, and Acts::UnitConstants::u.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

LocalCartesianToBoundLocalMatrix LineSurface::localCartesianToBoundLocalDerivative ( const GeometryContext gctx,
const Vector3D position 
) const
inlinefinalvirtual

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 paramters in global
Returns
Derivative of bound local position w.r.t. position in local 3D cartesian coordinates

Implements Acts::Surface.

Definition at line 241 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 241 of file LineSurface.ipp

References cos(), phi, Acts::VectorHelpers::position(), and Acts::Test::transform.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Vector3D LineSurface::localToGlobal ( const GeometryContext gctx,
const Vector2D lposition,
const Vector3D momentum 
) const
inlinefinalvirtual

Local to global transformation for line surfaces the momentum is used in order to interpret the drift radius

Parameters
gctxThe current geometry context object, e.g. alignment
lpositionis the local position to be transformed
momentumis the global momentum (used to sign the closest approach)
Returns
global position by value

Implements Acts::Surface.

Definition at line 9 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 9 of file LineSurface.ipp

References Acts::eBoundLoc0, Acts::eBoundLoc1, and Acts::Test::transform.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

std::string LineSurface::name ( ) const
inlineoverridevirtual

Return properly formatted class name for screen output */.

Implements Acts::Surface.

Reimplemented in Acts::StrawSurface, and Acts::PerigeeSurface.

Definition at line 44 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 44 of file LineSurface.ipp

Referenced by eicpy.verify.PythiaHistograms::__init__(), eicpy.verify.DjangohHistograms::__init__(), and Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

Vector3D LineSurface::normal ( const GeometryContext gctx,
const Vector2D lposition 
) const
inlinefinalvirtual

Normal vector return

Parameters
gctxThe current geometry context object, e.g. alignment
lpositionis the local position is ignored
Returns
a Vector3D by value

Implements Acts::Surface.

Definition at line 75 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 75 of file LineSurface.ipp

References Acts::Test::transform.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

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

Assignment operator

Parameters
slsfis the source surface dor copying

Definition at line 39 of file LineSurface.cpp.

View newest version in sPHENIX GitHub at line 39 of file LineSurface.cpp

References m_bounds, and Acts::Surface::operator=().

Referenced by Acts::Test::LineSurfaceStub::operator=(), Acts::PerigeeSurface::operator=(), and Acts::StrawSurface::operator=().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double LineSurface::pathCorrection ( const GeometryContext gctx,
const Vector3D position,
const Vector3D momentum 
) const
inlineoverridevirtual

the pathCorrection for derived classes with thickness is by definition 1 for LineSurfaces

Note
input parameters are ignored
there's no material associated to the line surface

Implements Acts::Surface.

Definition at line 64 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 64 of file LineSurface.ipp

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

RotationMatrix3D LineSurface::referenceFrame ( const GeometryContext gctx,
const Vector3D position,
const Vector3D momentum 
) const
inlinefinalvirtual

Return the measurement frame - this is needed for alignment, in particular

for StraightLine and Perigee Surface

  • the default implementation is the the RotationMatrix3D of the transform
Parameters
gctxThe current geometry context object, e.g. alignment
positionis the global position where the measurement frame is constructed
momentumis the momentum used for the measurement frame construction
Returns
is a rotation matrix that indicates the measurement frame

Reimplemented from Acts::Surface.

Definition at line 48 of file LineSurface.ipp.

View newest version in sPHENIX GitHub at line 48 of file LineSurface.ipp

References Acts::Test::transform.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE().

+ Here is the caller graph for this function:

Member Data Documentation

std::shared_ptr<const LineBounds> Acts::LineSurface::m_bounds
protected

bounds (shared)

Definition at line 284 of file LineSurface.hpp.

View newest version in sPHENIX GitHub at line 284 of file LineSurface.hpp

Referenced by Acts::StrawSurface::operator=(), and operator=().

friend Acts::LineSurface::Surface
private

Definition at line 32 of file LineSurface.hpp.

View newest version in sPHENIX GitHub at line 32 of file LineSurface.hpp


The documentation for this class was generated from the following files: