File SpacePointUtility.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

struct SpacePointParameters
#include <Acts/Utilities/SpacePointUtility.hpp>

Storage container for variables related to the calculation of space points.

Public Members

Vector3 firstBtmToTop

Vector pointing from bottom to top end of first SDE.

Vector3 firstBtmToTopXvtxToFirstMid2

Cross product between firstBtmToTop and vtxToFirstMid2.

double limit = 1.

Regular limit of the absolut values of SpacePointParameters::m and SpacePointParameters::n.

double limitExtended = 0.

Limit of SpacePointParameters::m and SpacePointParameters::n in case of variable vertex.

double m = 0.

Parameter that determines the hit position on the first SDE.

double mag_firstBtmToTop = 0.

Magnitude of SpacePointParameters::firstBtmToTop.

double n = 0.

Parameter that determines the hit position on the second SDE.

Vector3 secondBtmToTop

Vector pointing from bottom to top end of second SDE.

Vector3 secondBtmToTopXvtxToSecondMid2

Cross product between secondBtmToTop and vtxToSecondMid2.

Vector3 vtxToFirstMid2

Twice the vector pointing from vertex to to midpoint of first SDE.

Vector3 vtxToSecondMid2

Twice the vector pointing from vertex to to midpoint of second SDE.

class SpacePointUtility
#include <Acts/Utilities/SpacePointUtility.hpp>

Public Types

using Measurement = Acts::BoundVariantMeasurement

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

Acts::Vector2 calcRhoZVars(const Acts::GeometryContext &gctx, const Measurement &measFront, const Measurement &measBack, const Vector3 &globalPos, const double theta) const

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

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

  • measFront – The measurement on the front layer

  • measBack – The measurement on the back layer

  • 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 measurements.

Parameters
  • pos1[in] position of the first measurement

  • pos2[in] position the second measurement

  • posVertex[in] Position of the vertex

  • maxDistance[in] Maximum distance between two measurements

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

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

Returns

Result with the squared sum within configuration parameters.

std::pair<Vector3, Vector2> globalCoords(const GeometryContext &gctx, const Measurement &meas) const

Getter method for the global coordinates of a measurement.

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

  • meas – measurement that holds the necessary information

Returns

vectors of the global coordinates and covariance of the measurement

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

Acts::Vector2 rhoZCovariance(const Acts::GeometryContext &gctx, const Acts::GeometryIdentifier &geoId, const Acts::Vector3 &globalPos, const Acts::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

Private Functions

double getLoc0Var(const Measurement &meas) const

Get the first component of the local covariance.

Parameters

meas – The measurement

Returns

the (0, 0) component of the local covariance

Private Members

SpacePointBuilderConfig m_config
std::error_code m_error