Class Acts::SpacePointUtility

class SpacePointUtility

Public Functions

inline SpacePointUtility(SpacePointBuilderConfig cfg)

Constructor.

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

Calculates a space point whithout using the vertex.

Note

This is mostly to resolve space points from cosmic data

Note

The meaning of the parameter is explained in more detail in the function body

Parameters
  • stripEnds1 – The ends of one strip

  • stripEnds2 – The ends of another strip

  • spParams – SpacePointParamaters for the SP

Returns

parameter that indicates the location of the space point; returns

  1. if it failed

Vector2 calcRhoZVars(const GeometryContext &gctx, const SourceLink &slinkFront, const SourceLink &slinkBack, const std::function<std::pair<const BoundVector, const BoundSymMatrix>(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
  • gctx – The current geometry context object, e.g. alignment

  • slinkFront – The SourceLink on the front layer

  • slinkBack – The SourceLink on the back layer

  • paramCovAccessor – function to extract local position and covariance from SourceLink

  • globalPos – global position

  • theta – The angle between the two strips

Returns

(rho, z) components of the global covariance

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 succesful or not.

Parameters
  • stripEnds1[in] Top and bottom end of the first strip

  • stripEnds2[in] Top and bottom end of the second strip

  • posVertex[in] Position of the vertex

  • spParams[inout] Data container of the calculations

  • stripLengthTolerance[in] Tolerance scaling factor on the strip detector element length

Returns

Result whether the space point calculation was succesful

Result<double> 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
  • pos1[in] position of the first SourceLink

  • pos2[in] position the second SourceLink

  • posVertex[in] Position of the vertex

  • maxDistance[in] Maximum distance between two SourceLinks

  • maxAngleTheta2[in] Maximum squared theta angle between two SourceLinks

  • maxAnglePhi2[in] Maximum squared phi angle between two SourceLinks

Returns

Result with the squared sum within configuration parameters.

std::pair<Vector3, Vector2> globalCoords(const GeometryContext &gctx, const SourceLink &slink, const BoundVector &par, const BoundSymMatrix &cov) const

Getter method for the global coordinates of a SourceLink.

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

  • slink – SourceLink that holds the necessary information

  • par – local position

  • cov – local covariance

Returns

vectors of the global coordinates and covariance of the SourceLink

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.

Parameters
  • spParams[in] container that stores geometric parameters and rules of the space point formation

  • stripLengthGapTolerance[in] Tolerance scaling factor of the gap between strip detector elements

Returns

indicator if the test was successful

Vector2 rhoZCovariance(const GeometryContext &gctx, const GeometryIdentifier &geoId, const Vector3 &globalPos, const SymMatrix2 &localCov) const

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

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

  • geoId – The geometry ID

  • globalPos – The global position

  • localCov – The local covariance matrix

Returns

(rho, z) components of the global covariance