Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::SpacePointUtility Class Reference

#include <acts/blob/sPHENIX/Core/include/Acts/Utilities/SpacePointUtility.hpp>

+ Collaboration diagram for Acts::SpacePointUtility:

Public Member Functions

 SpacePointUtility (SpacePointBuilderConfig cfg)
 Constructor.
 
std::pair< Vector3, Vector2globalCoords (const GeometryContext &gctx, const SourceLink &slink, const SourceLinkSurfaceAccessor &surfaceAccessor, const BoundVector &par, const BoundSquareMatrix &cov) const
 Getter method for the global coordinates of a SourceLink.
 
Vector2 rhoZCovariance (const GeometryContext &gctx, const Surface &surface, const Vector3 &globalPos, const SquareMatrix2 &localCov) const
 Get rho and z covariance from the local position and covariance.
 
Vector2 calcRhoZVars (const GeometryContext &gctx, const SourceLink &slinkFront, const SourceLink &slinkBack, const SourceLinkSurfaceAccessor &surfaceAccessor, const std::function< std::pair< const BoundVector, const BoundSquareMatrix >(SourceLink)> &paramCovAccessor, const Vector3 &globalPos, const double theta) const
 Calculate the rho and z covariance from the front and back SourceLink in the strip SP formation.
 
Result< void > calculateStripSPPosition (const std::pair< Vector3, Vector3 > &stripEnds1, const std::pair< Vector3, Vector3 > &stripEnds2, const Vector3 &posVertex, SpacePointParameters &spParams, const double stripLengthTolerance) const
 This function performs a straight forward calculation of a space point and returns whether it was successful or not.
 
Result< void > recoverSpacePoint (SpacePointParameters &spParams, double stripLengthGapTolerance) const
 This function tests if a space point can be estimated by a more tolerant treatment of construction. In fact, this function indirectly allows shifts of the vertex.
 
Result< doubledifferenceOfMeasurementsChecked (const Vector3 &pos1, const Vector3 &pos2, const Vector3 &posVertex, const double maxDistance, const double maxAngleTheta2, const double maxAnglePhi2) const
 Calculates (Delta theta)^2 + (Delta phi)^2 between two SourceLinks.
 
Result< doublecalcPerpendicularProjection (const std::pair< Vector3, Vector3 > &stripEnds1, const std::pair< Vector3, Vector3 > &stripEnds2, SpacePointParameters &spParams) const
 Calculates a space point without using the vertex.
 

Private Attributes

SpacePointBuilderConfig m_config
 
std::error_code m_error
 

Detailed Description

Definition at line 63 of file SpacePointUtility.hpp.

View newest version in sPHENIX GitHub at line 63 of file SpacePointUtility.hpp

Constructor & Destructor Documentation

Acts::SpacePointUtility::SpacePointUtility ( SpacePointBuilderConfig  cfg)
inline

Constructor.

Definition at line 66 of file SpacePointUtility.hpp.

View newest version in sPHENIX GitHub at line 66 of file SpacePointUtility.hpp

Member Function Documentation

Result< double > Acts::SpacePointUtility::calcPerpendicularProjection ( const std::pair< Vector3, Vector3 > &  stripEnds1,
const std::pair< Vector3, Vector3 > &  stripEnds2,
SpacePointParameters spParams 
) const

Calculates a space point without using the vertex.

Note
This is mostly to resolve space points from cosmic data
Parameters
stripEnds1The ends of one strip
stripEnds2The ends of another strip
spParamsSpacePointParamaters for the SP
Returns
parameter that indicates the location of the space point; returns
  1. if it failed
Note
The meaning of the parameter is explained in more detail in the function body

This approach assumes that no vertex is available. This option aims to approximate the space points from cosmic data. The underlying assumption is that the best point is given by the closest distance between both lines describing the SDEs. The point x on the first SDE is parametrized as a + lambda0 * q with the top end a of the strip and the vector q = a - b(ottom end of the strip). An analogous parametrization is performed of the second SDE with y = c + lambda1 * r. x get resolved by resolving lambda0 from the condition that |x-y| is the shortest distance between two skew lines.

Definition at line 290 of file SpacePointUtility.cpp.

View newest version in sPHENIX GitHub at line 290 of file SpacePointUtility.cpp

References ac(), Acts::UnitConstants::e, Acts::SpacePointParameters::firstBtmToTop, m_error, and Acts::SpacePointParameters::secondBtmToTop.

+ Here is the call graph for this function:

Vector2 Acts::SpacePointUtility::calcRhoZVars ( const GeometryContext gctx,
const SourceLink slinkFront,
const SourceLink slinkBack,
const SourceLinkSurfaceAccessor surfaceAccessor,
const std::function< std::pair< const BoundVector, const BoundSquareMatrix >(SourceLink)> &  paramCovAccessor,
const Vector3 globalPos,
const double  theta 
) const

Calculate the rho and z covariance from the front and back SourceLink in the strip SP formation.

Parameters
gctxThe current geometry context object, e.g. alignment
slinkFrontThe SourceLink on the front layer
slinkBackThe SourceLink on the back layer
paramCovAccessorfunction to extract local position and covariance from SourceLink
surfaceAccessorfunction to extract surface from SourceLink
globalPosglobal position
thetaThe angle between the two strips
Returns
(rho, z) components of the global covariance

Definition at line 90 of file SpacePointUtility.cpp.

View newest version in sPHENIX GitHub at line 90 of file SpacePointUtility.cpp

References rhoZCovariance(), and writeMapConfig::surface.

+ Here is the call graph for this function:

Result< void > Acts::SpacePointUtility::calculateStripSPPosition ( const std::pair< Vector3, Vector3 > &  stripEnds1,
const std::pair< Vector3, Vector3 > &  stripEnds2,
const Vector3 posVertex,
SpacePointParameters spParams,
const double  stripLengthTolerance 
) const

This function performs a straight forward calculation of a space point and returns whether it was successful or not.

Parameters
[in]stripEnds1Top and bottom end of the first strip
[in]stripEnds2Top and bottom end of the second strip
[in]posVertexPosition of the vertex
[in,out]spParamsData container of the calculations
[in]stripLengthToleranceTolerance scaling factor on the strip detector element length
Returns
Result whether the space point calculation was successful

The following algorithm is meant for finding the position on the first strip if there is a corresponding Measurement on the second strip. The resulting point is a point x on the first surfaces. This point is along a line between the points a (top end of the strip) and b (bottom end of the strip). The location can be parametrized as 2 * x = (1 + m) a + (1 - m) b as function of the scalar m. m is a parameter in the interval -1 < m < 1 since the hit was on the strip. Furthermore, the vector from the vertex to the Measurement on the second strip y is needed to be a multiple k of the vector from vertex to the hit on the first strip x. As a consequence of this demand y = k * x needs to be on the connecting line between the top (c) and bottom (d) end of the second strip. If both measurements correspond to each other, the condition y * (c X d) = k * x (c X d) = 0 ("X" represents a cross product) needs to be fulfilled. Inserting the first equation into this equation leads to the condition for m as given in the following algorithm and therefore to the calculation of x. The same calculation can be repeated for y. Its corresponding parameter will be named n.

Definition at line 143 of file SpacePointUtility.cpp.

View newest version in sPHENIX GitHub at line 143 of file SpacePointUtility.cpp

References Acts::SpacePointParameters::firstBtmToTop, Acts::SpacePointParameters::firstBtmToTopXvtxToFirstMid2, Acts::SpacePointParameters::limit, Acts::SpacePointParameters::m, m_error, Acts::SpacePointParameters::n, Acts::SpacePointParameters::secondBtmToTop, Acts::SpacePointParameters::secondBtmToTopXvtxToSecondMid2, Acts::SpacePointParameters::vtxToFirstMid2, and Acts::SpacePointParameters::vtxToSecondMid2.

Result< double > Acts::SpacePointUtility::differenceOfMeasurementsChecked ( const Vector3 pos1,
const Vector3 pos2,
const Vector3 posVertex,
const double  maxDistance,
const double  maxAngleTheta2,
const double  maxAnglePhi2 
) const

Calculates (Delta theta)^2 + (Delta phi)^2 between two SourceLinks.

Parameters
[in]pos1position of the first SourceLink
[in]pos2position the second SourceLink
[in]posVertexPosition of the vertex
[in]maxDistanceMaximum distance between two SourceLinks
[in]maxAngleTheta2Maximum squared theta angle between two SourceLinks
[in]maxAnglePhi2Maximum squared phi angle between two SourceLinks
Returns
Result with the squared sum within configuration parameters.

Definition at line 23 of file SpacePointUtility.cpp.

View newest version in sPHENIX GitHub at line 23 of file SpacePointUtility.cpp

References m_error, norm, Acts::VectorHelpers::phi(), and Acts::VectorHelpers::theta().

+ Here is the call graph for this function:

std::pair< Vector3, Vector2 > Acts::SpacePointUtility::globalCoords ( const GeometryContext gctx,
const SourceLink slink,
const SourceLinkSurfaceAccessor surfaceAccessor,
const BoundVector par,
const BoundSquareMatrix cov 
) const

Getter method for the global coordinates of a SourceLink.

Parameters
gctxThe current geometry context object, e.g. alignment
slinkSourceLink that holds the necessary information
surfaceAccessorfunction to extract surface from SourceLink
parlocal position
covlocal covariance
Returns
vectors of the global coordinates and covariance of the SourceLink

Definition at line 51 of file SpacePointUtility.cpp.

View newest version in sPHENIX GitHub at line 51 of file SpacePointUtility.cpp

References Acts::eBoundLoc0, Acts::eBoundLoc1, Acts::ePos0, Acts::ePos1, Acts::ePos2, Acts::Surface::localToGlobal(), Acts::Surface::referenceFrame(), writeMapConfig::surface, ambiguity_solver_full_chain::x, and y.

+ Here is the call graph for this function:

Result< void > Acts::SpacePointUtility::recoverSpacePoint ( SpacePointParameters spParams,
double  stripLengthGapTolerance 
) const

This function tests if a space point can be estimated by a more tolerant treatment of construction. In fact, this function indirectly allows shifts of the vertex.

Parameters
[in]spParamscontainer that stores geometric parameters and rules of the space point formation
[in]stripLengthGapToleranceTolerance scaling factor of the gap between strip detector elements
Returns
indicator if the test was successful

The following code considers an overshoot of m and n in the same direction of their SDE. The term "overshoot" represents the amount of m or n outside its regular interval (-1, 1). It calculates which overshoot is worse. In order to compare both, the overshoot in n is projected onto the first surface by considering the normalized projection of r onto q. This allows a rescaling of the overshoot. The worse overshoot will be set to +/-1, the parameter with less overshoot will be moved towards 0 by the worse overshoot. In order to treat both SDEs equally, the rescaling eventually needs to be performed several times. If these shifts allows m and n to be in the limits, the space point can be stored.

Note
This shift can be understood as a shift of the particle's trajectory. This is leads to a shift of the vertex. Since these two points are treated independently from other measurement, it is also possible to consider this as a change in the slope of the particle's trajectory. The would also move the vertex position.

Definition at line 198 of file SpacePointUtility.cpp.

View newest version in sPHENIX GitHub at line 198 of file SpacePointUtility.cpp

References Acts::SpacePointParameters::firstBtmToTop, Acts::SpacePointParameters::firstBtmToTopXvtxToFirstMid2, Acts::SpacePointParameters::limit, Acts::SpacePointParameters::limitExtended, Acts::SpacePointParameters::m, m_error, Acts::SpacePointParameters::mag_firstBtmToTop, Acts::SpacePointParameters::n, Acts::SpacePointParameters::secondBtmToTop, and Acts::SpacePointParameters::vtxToSecondMid2.

Vector2 Acts::SpacePointUtility::rhoZCovariance ( const GeometryContext gctx,
const Surface surface,
const Vector3 globalPos,
const SquareMatrix2 localCov 
) const

Get rho and z covariance from the local position and covariance.

Parameters
gctxThe current geometry context object, e.g. alignment
surfaceThe surface associated
globalPosThe global position
localCovThe local covariance matrix
Returns
(rho, z) components of the global covariance

Definition at line 116 of file SpacePointUtility.cpp.

View newest version in sPHENIX GitHub at line 116 of file SpacePointUtility.cpp

References Acts::ePos0, Acts::ePos1, Acts::ePos2, Acts::Surface::referenceFrame(), ambiguity_solver_full_chain::x, and y.

Referenced by calcRhoZVars().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

SpacePointBuilderConfig Acts::SpacePointUtility::m_config
private

Definition at line 169 of file SpacePointUtility.hpp.

View newest version in sPHENIX GitHub at line 169 of file SpacePointUtility.hpp

std::error_code Acts::SpacePointUtility::m_error
private

Definition at line 170 of file SpacePointUtility.hpp.

View newest version in sPHENIX GitHub at line 170 of file SpacePointUtility.hpp

Referenced by calcPerpendicularProjection(), calculateStripSPPosition(), differenceOfMeasurementsChecked(), and recoverSpacePoint().


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