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

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

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

Public Member Functions

 ~LineSurface () override=default
 Destructor - defaulted.
 
 LineSurface ()=delete
 Default Constructor - deleted.
 
LineSurfaceoperator= (const LineSurface &other)
 
const Vector3D normal (const GeometryContext &gctx, const Vector2D &lposition) const final
 
const Vector3D binningPosition (const GeometryContext &gctx, BinningValue bValue) const final
 
const 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
 
const BoundRowVector derivativeFactors (const GeometryContext &gctx, const Vector3D &position, const Vector3D &direction, const RotationMatrix3D &rft, const BoundToFreeMatrix &jacobian) const final
 
void localToGlobal (const GeometryContext &gctx, const Vector2D &lposition, const Vector3D &momentum, Vector3D &position) const final
 
bool globalToLocal (const GeometryContext &gctx, const Vector3D &position, const Vector3D &momentum, Vector2D &lposition) const final
 
Intersection intersectionEstimate (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 */.
 
- 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 const Vector3D center (const GeometryContext &gctx) const
 
virtual const Vector3D normal (const GeometryContext &gctx, const Vector3D &position) const
 
virtual const 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 const RotationMatrix3D initJacobianToLocal (const GeometryContext &gctx, FreeToBoundMatrix &jacobian, const Vector3D &position, const Vector3D &direction) const
 
virtual SurfaceIntersection intersect (const GeometryContext &gctx, const Vector3D &position, const Vector3D &direction, const BoundaryCheck &bcheck) const
 
virtual std::ostream & toStream (const GeometryContext &gctx, std::ostream &sl) const
 
virtual Polyhedron polyhedronRepresentation (const GeometryContext &gctx, size_t lseg) const =0
 
- Public Member Functions inherited from Acts::GeometryObject
 GeometryObject ()=default
 Defaulted construrctor.
 
 GeometryObject (const GeometryObject &)=default
 Defaulted copy constructor.
 
 GeometryObject (const GeometryID &geoID)
 
GeometryObjectoperator= (const GeometryObject &geoID)
 
const GeometryIDgeoID () const
 
virtual double binningPositionValue (const GeometryContext &gctx, BinningValue bValue) const
 
void assignGeoID (const GeometryID &geoID)
 

Protected Member Functions

 LineSurface (std::shared_ptr< const Transform3D > htrans, double radius, double halez)
 
 LineSurface (std::shared_ptr< const Transform3D > htrans, 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 &transf)
 
- Protected Member Functions inherited from Acts::Surface
 Surface (std::shared_ptr< const Transform3D > tform=nullptr)
 
 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
std::shared_ptr< const
Transform3D
m_transform
 
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
GeometryID m_geoID
 

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 ( std::shared_ptr< const Transform3D htrans,
double  radius,
double  halez 
)
protected

Constructor from Transform3D and bounds

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

Definition at line 18 of file LineSurface.cpp.

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

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

Constructor from Transform3D and a shared bounds object

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

Definition at line 24 of file LineSurface.cpp.

View newest version in sPHENIX GitHub at line 24 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 30 of file LineSurface.cpp.

View newest version in sPHENIX GitHub at line 30 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 36 of file LineSurface.cpp.

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

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

Copy constructor - with shift

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

Definition at line 39 of file LineSurface.cpp.

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

Acts::LineSurface::~LineSurface ( )
overridedefault

Destructor - defaulted.

Acts::LineSurface::LineSurface ( )
delete

Default Constructor - deleted.

Member Function Documentation

const 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 76 of file LineSurface.ipp.

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

const SurfaceBounds & LineSurface::bounds ( ) const
inlinefinalvirtual

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

Implements Acts::Surface.

Definition at line 87 of file LineSurface.ipp.

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

References Acts::s_noBounds.

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

+ Here is the caller graph for this function:

const 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 189 of file LineSurface.ipp.

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

References Acts::eBoundParametersSize, norm, and pc.

bool LineSurface::globalToLocal ( const GeometryContext gctx,
const Vector3D position,
const Vector3D momentum,
Vector2D lposition 
) 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::eLOC_R 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::eLOC_Z} $ 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)
lpositionlocal 2D position to be filled (given by reference for method symmetry)
Returns
boolean indication if operation was successful (fail means global position was not on surface)

Implements Acts::Surface.

Definition at line 29 of file LineSurface.ipp.

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

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

+ Here is the call 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 138 of file LineSurface.ipp.

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

References Acts::VectorHelpers::cross(), Acts::eLOC_0, Acts::ePHI, Acts::eQOP, Acts::eT, Acts::eTHETA, x, y, and z.

+ Here is the call graph for this function:

Intersection LineSurface::intersectionEstimate ( 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 94 of file LineSurface.ipp.

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

References denom, max, norm, position, Acts::s_onSurfaceTolerance, Acts::Test::transform, and Acts::UnitConstants::u.

void LineSurface::localToGlobal ( const GeometryContext gctx,
const Vector2D lposition,
const Vector3D momentum,
Vector3D position 
) 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)
positionis the global position which is filled

Implements Acts::Surface.

Definition at line 13 of file LineSurface.ipp.

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

References Acts::eLOC_R, Acts::eLOC_Z, and Acts::Test::transform.

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 50 of file LineSurface.ipp.

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

const 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 81 of file LineSurface.ipp.

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

References Acts::Test::transform.

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

Assignment operator

Parameters
slsfis the source surface dor copying

Definition at line 46 of file LineSurface.cpp.

View newest version in sPHENIX GitHub at line 46 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 70 of file LineSurface.ipp.

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

const 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 54 of file LineSurface.ipp.

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

References Acts::Test::transform.

Member Data Documentation

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

bounds (shared)

Definition at line 261 of file LineSurface.hpp.

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

Referenced by operator=(), and Acts::StrawSurface::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: