Analysis Software
Documentation for sPHENIX simulation software
|
#include <acts/blob/sPHENIX/Core/include/Acts/Utilities/SpacePointUtility.hpp>
Public Member Functions | |
SpacePointUtility (SpacePointBuilderConfig cfg) | |
Constructor. | |
std::pair< Vector3, Vector2 > | 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. | |
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)> ¶mCovAccessor, 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< 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. | |
Result< double > | calcPerpendicularProjection (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 |
Definition at line 63 of file SpacePointUtility.hpp.
View newest version in sPHENIX GitHub at line 63 of file SpacePointUtility.hpp
|
inline |
Constructor.
Definition at line 66 of file SpacePointUtility.hpp.
View newest version in sPHENIX GitHub at line 66 of file SpacePointUtility.hpp
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.
stripEnds1 | The ends of one strip |
stripEnds2 | The ends of another strip |
spParams | SpacePointParamaters for the SP |
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.
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.
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 |
surfaceAccessor | function to extract surface from SourceLink |
globalPos | global position |
theta | The angle between the two strips |
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.
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.
[in] | stripEnds1 | Top and bottom end of the first strip |
[in] | stripEnds2 | Top and bottom end of the second strip |
[in] | posVertex | Position of the vertex |
[in,out] | spParams | Data container of the calculations |
[in] | stripLengthTolerance | Tolerance scaling factor on the strip detector element length |
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.
[in] | pos1 | position of the first SourceLink |
[in] | pos2 | position the second SourceLink |
[in] | posVertex | Position of the vertex |
[in] | maxDistance | Maximum distance between two SourceLinks |
[in] | maxAngleTheta2 | Maximum squared theta angle between two SourceLinks |
[in] | maxAnglePhi2 | Maximum squared phi angle between two SourceLinks |
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().
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.
gctx | The current geometry context object, e.g. alignment |
slink | SourceLink that holds the necessary information |
surfaceAccessor | function to extract surface from SourceLink |
par | local position |
cov | local covariance |
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.
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.
[in] | spParams | container that stores geometric parameters and rules of the space point formation |
[in] | stripLengthGapTolerance | Tolerance scaling factor of the gap between strip detector elements |
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.
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.
gctx | The current geometry context object, e.g. alignment |
surface | The surface associated |
globalPos | The global position |
localCov | The local covariance matrix |
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().
|
private |
Definition at line 169 of file SpacePointUtility.hpp.
View newest version in sPHENIX GitHub at line 169 of file SpacePointUtility.hpp
|
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().