ATLAS Offline Software
|
Definition of ATLAS Math & Geometry primitives (Amg) More...
Classes | |
struct | Vector3DComparer |
comparison of two Vector3D, needed for the definition of a std::set<Amg::Vector3D> More... | |
struct | VectorVector3DComparer |
Typedefs | |
using | Rotation3D = Eigen::Quaternion< double > |
using | Translation3D = Eigen::Translation< double, 3 > |
using | AngleAxis3D = Eigen::AngleAxisd |
using | Transform3D = Eigen::Affine3d |
using | Vector3D = Eigen::Matrix< double, 3, 1 > |
using | Vector2D = Eigen::Matrix< double, 2, 1 > |
using | RotationMatrix3D = Eigen::Matrix< double, 3, 3 > |
using | SetVector3D = std::set< Amg::Vector3D, Vector3DComparer > |
using | SetVectorVector3D = std::set< std::vector< Amg::Vector3D >, VectorVector3DComparer > |
using | MatrixX = Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > |
Dynamic Matrix - dynamic allocation. More... | |
using | SymMatrixX = Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > |
using | VectorX = Eigen::Matrix< double, Eigen::Dynamic, 1 > |
Dynamic Vector - dynamic allocation. More... | |
template<int MaxRows, int MaxCols> | |
using | MatrixMaxX = Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, MaxRows, MaxCols > |
Fixed capacity dynamic size types. More... | |
template<int MaxDim> | |
using | SymMatrixMaxX = Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, MaxDim, MaxDim > |
template<int MaxRows> | |
using | VectorMaxX = Eigen::Matrix< double, Eigen::Dynamic, 1, 0, MaxRows, 1 > |
Enumerations | |
enum | AxisDefs { x = 0, y = 1, z = 2, px = 0, py = 1, pz = 2 } |
element for code readability More... | |
Functions | |
template<class T > | |
std::string | AsString (const T &m) |
write an Amg Eigen object to std::string More... | |
Amg::Transform3D | CLHEPTransformToEigen (const HepGeom::Transform3D &CLHEPtransf) |
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D. More... | |
RotationMatrix3D | CLHEPRotationToEigen (const CLHEP::HepRotation &CLHEProtation) |
Converts a CLHEP::HepRotation into an Eigen-based Amg::RotationMatrix3D. More... | |
Amg::Translation3D | CLHEPTranslationToEigen (const CLHEP::Hep3Vector &CLHEPtranslation) |
Converts a CLHEP::Hep3Vector into an Eigen-based Amg::Translation3D. More... | |
Amg::Transform3D | CLHEPTranslate3DToEigen (const HepGeom::Translate3D &CLHEPtranslate3D) |
Converts a CLHEP-based HepGeom::Translate3 into an Eigen-based Amg::Transform3D. More... | |
HepGeom::Transform3D | EigenTransformToCLHEP (const Amg::Transform3D &eigenTransf) |
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D. More... | |
Amg::Vector3D | Hep3VectorToEigen (const CLHEP::Hep3Vector &CLHEPvector) |
Converts a CLHEP-based CLHEP::Hep3Vector into an Eigen-based Amg::Vector3D. More... | |
CLHEP::Hep3Vector | EigenToHep3Vector (const Amg::Vector3D &eigenvector) |
Converts an Eigen-based Amg::Vector3D into a CLHEP-based CLHEP::Hep3Vector. More... | |
Amg::Vector3D | convert_CLHEPPhiThetaPsi_to_EigenEulerAngles (Amg::Vector3D clhep_angles, int convention=0) |
Convert CLEHP Phi,Theta,Psi angles to Eigen euler angles using Z-X-Z convention. More... | |
Amg::Vector3D | convert_EigenEulerAngles_to_CLHEPPhiThetaPsi (Amg::Vector3D eigen_angles, int convention=0) |
Convert Eigen euler angles to CLEHP Phi,Theta,Psi angles. More... | |
Amg::Vector3D | getPhiThetaPsi (Amg::RotationMatrix3D mat, int convention=0) |
Get the equivalents to CLHEP Phi, Theta, Psi Euler angles. More... | |
Amg::RotationMatrix3D | setPhi (Amg::RotationMatrix3D mat, double angle, int convention=0) |
double | angle (const Amg::Vector3D &v1, const Amg::Vector3D &v2) |
calculates the opening angle between two vectors More... | |
float | distance2 (const Amg::Vector3D &p1, const Amg::Vector3D &p2) |
calculates the squared distance between two point in 3D space More... | |
float | distance (const Amg::Vector3D &p1, const Amg::Vector3D &p2) |
calculates the distance between two point in 3D space More... | |
void | setPhi (Amg::Vector3D &v, double phi) |
sets the phi angle of a vector without changing theta nor the magnitude More... | |
void | setThetaPhi (Amg::Vector3D &v, double theta, double phi) |
sets the theta and phi angle of a vector without changing the magnitude More... | |
void | setRThetaPhi (Amg::Vector3D &v, double r, double theta, double phi) |
sets radius, the theta and phi angle of a vector. More... | |
void | setTheta (Amg::Vector3D &v, double theta) |
sets the theta of a vector without changing phi nor the magnitude More... | |
void | setPerp (Amg::Vector3D &v, double perp) |
scales the vector in the xy plane without changing the z coordinate nor the angles More... | |
void | setMag (Amg::Vector3D &v, double mag) |
scales the vector length without changing the angles More... | |
double | deltaPhi (const Amg::Vector3D &v1, const Amg::Vector3D &v2) |
double | deltaR (const Amg::Vector3D &v1, const Amg::Vector3D &v2) |
void | setVector3DCartesian (Amg::Vector3D &v1, double x1, double y1, double z1) |
Sets components in cartesian coordinate system. More... | |
double | mag2Vector3D (const Amg::Vector3D &v1) |
Gets magnitude squared of the vector. More... | |
double | magVector3D (const Amg::Vector3D &v1) |
Gets magnitude of the vector. More... | |
double | rVector3D (const Amg::Vector3D &v1) |
Gets r-component in spherical coordinate system. More... | |
Amg::Vector3D | transform (Amg::Vector3D &v, Amg::Transform3D &tr) |
Transform a point from a Trasformation3D. More... | |
Amg::Transform3D | getTransformFromRotTransl (Amg::RotationMatrix3D rot, Amg::Vector3D transl_vec) |
void | getAngleAxisFromRotation (Amg::RotationMatrix3D &rotation, double &rotationAngle, Amg::Vector3D &rotationAxis) |
Amg::Vector3D | getTranslationVectorFromTransform (const Amg::Transform3D &tr) |
Get the Translation vector out of a Transformation. More... | |
Amg::Rotation3D | getRotation3DfromAngleAxis (double angle, Amg::Vector3D &axis) |
get a AngleAxis from an angle and an axis. More... | |
Amg::Transform3D | getRotateX3D (double angle) |
get a rotation transformation around X-axis More... | |
Amg::Transform3D | getRotateY3D (double angle) |
get a rotation transformation around Y-axis More... | |
Amg::Transform3D | getRotateZ3D (double angle) |
get a rotation transformation around Z-axis More... | |
Amg::Transform3D | getTranslateX3D (const double X) |
: Returns a shift transformation along the x-axis More... | |
Amg::Transform3D | getTranslateY3D (const double Y) |
: Returns a shift transformation along the y-axis More... | |
Amg::Transform3D | getTranslateZ3D (const double Z) |
: Returns a shift transformation along the z-axis More... | |
Amg::Transform3D | getTranslate3D (const double X, const double Y, const double Z) |
: Returns a shift transformation along an arbitrary axis More... | |
Amg::Transform3D | getTranslate3D (const Amg::Vector3D &v) |
: Returns a shift transformation along an arbitrary axis More... | |
template<int N> | |
double | lineDistance (const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB) |
Calculates the shortest distance between two lines posA: offset point of line A dirA: orientation of line A (unit length) posB: offset point of line B dirB: orientation of line B (unit length) More... | |
template<int N> | |
std::optional< double > | intersect (const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB) |
Calculates the point of closest approach of two lines. More... | |
template<int N> | |
std::optional< double > | intersect (const AmgVector(N)&pos, const AmgVector(N)&dir, const AmgVector(N)&planeNorm, const double offset) |
Intersects a line parametrized as A + lambda * B with the (N-1) dimensional hyperplane that's given in the Hesse normal form <P, N> - C = 0 More... | |
bool | doesNotDeform (const Amg::Transform3D &trans) |
Checks whether the linear part of the transformation rotates or stetches any of the basis vectors. More... | |
bool | isIdentity (const Amg::Transform3D &trans) |
Checks whether the transformation is the Identity transformation. More... | |
std::string | toString (const Translation3D &translation, int precision=4) |
GeoPrimitvesToStringConverter. More... | |
std::string | toString (const Transform3D &transform, int precision=4, const std::string &rotOffSet="") |
std::string | toString (const CLHEP::HepRotation &rot, int precision=4, const std::string &offset="") |
std::string | toString (const CLHEP::Hep3Vector &translation, int precision=4) |
std::string | toString (const CLHEP::Hep2Vector &translation, int precision=4) |
std::string | toString (const HepGeom::Transform3D &transf, int precision=4, const std::string &offset="") |
bool | saneCovarianceElement (double ele) |
A covariance matrix formally needs to be positive semi definite. More... | |
template<int N> | |
bool | hasPositiveOrZeroDiagElems (const AmgSymMatrix(N) &mat) |
Returns true if all diagonal elements of the covariance matrix are finite aka sane in the above definition. More... | |
bool | hasPositiveOrZeroDiagElems (const Amg::MatrixX &mat) |
template<int N> | |
bool | hasPositiveDiagElems (const AmgSymMatrix(N) &mat) |
Returns true if all diagonal elements of the covariance matrix are finite aka sane in the above definition. More... | |
bool | hasPositiveDiagElems (const Amg::MatrixX &mat) |
template<int N> | |
bool | isPositiveSemiDefinite (const AmgSymMatrix(N) &mat) |
Check if is positive semidefinit using that fact that is needed for Cholesky decomposition. More... | |
bool | isPositiveSemiDefinite (const Amg::MatrixX &mat) |
template<int N> | |
bool | isPositiveDefinite (const AmgSymMatrix(N) &mat) |
Check if is positive semidefinit using that fact that is needed for Cholesky decomposition. More... | |
bool | isPositiveDefinite (const Amg::MatrixX &mat) |
template<int N> | |
bool | isPositiveSemiDefiniteSlow (const AmgSymMatrix(N) &mat) |
These are the slow test following the definition. More... | |
bool | isPositiveSemiDefiniteSlow (const Amg::MatrixX &mat) |
template<int N> | |
bool | isPositiveDefiniteSlow (const AmgSymMatrix(N) &mat) |
bool | isPositiveDefiniteSlow (const Amg::MatrixX &mat) |
template<typename T , typename U > | |
double | chi2 (const T &precision, const U &residual, const int sign=1) |
template<int N> | |
bool | saneVector (const AmgVector(N) &vec) |
double | error (const Amg::MatrixX &mat, int index) |
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in range More... | |
template<int N> | |
double | error (const AmgSymMatrix(N) &mat, int index) |
constexpr int | CalculateCompressedSize (int n) |
template<int N> | |
void | compress (const AmgSymMatrix(N) &covMatrix, std::vector< float > &vec) |
void | compress (const MatrixX &covMatrix, std::vector< float > &vec) |
template<int N> | |
void | expand (std::vector< float >::const_iterator it, std::vector< float >::const_iterator, AmgSymMatrix(N) &covMatrix) |
void | expand (std::vector< float >::const_iterator it, std::vector< float >::const_iterator it_end, MatrixX &covMatrix) |
template<int N> | |
std::pair< int, int > | compare (const AmgSymMatrix(N) &m1, const AmgSymMatrix(N) &m2, double precision=1e-9, bool relative=false) |
compare two matrices, returns the indices of the first element that fails the condition, returns <-1,-1> if all is ok Users can provide the required precision and whether the difference should be evaluate relative to the values or absolutely More... | |
template<int N> | |
int | compare (const AmgVector(N) &m1, const AmgVector(N) &m2, double precision=1e-9, bool relative=false) |
compare two vectors, returns the indices of the first element that fails the condition, returns <-1,-1> if all is ok Users can provide the required precision and whether the difference should be evaluate relative to the values or absolutely More... | |
double | roundWithPrecision (double val, int precision) |
EventPrimitvesToStringConverter. More... | |
std::string | toString (const MatrixX &matrix, int precision=4, const std::string &offset="") |
Definition of ATLAS Math & Geometry primitives (Amg)
Event primitives helper functions.
Event Primitives Covariance Helper Functions.
Geometry primitives helper functions.
This is based on the Eigen geometry module: http://eigen.tuxfamily.org/dox/group__Geometry__Module.html
using Amg::AngleAxis3D = typedef Eigen::AngleAxisd |
Definition at line 45 of file GeoPrimitives.h.
using Amg::MatrixMaxX = typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, 0, MaxRows, MaxCols> |
Fixed capacity dynamic size types.
Avoid dynamic allocations. Helpfull if we do not know the exact but a max size. But we potentially waste some space
Definition at line 36 of file EventPrimitives.h.
using Amg::MatrixX = typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> |
Dynamic Matrix - dynamic allocation.
Definition at line 27 of file EventPrimitives.h.
using Amg::Rotation3D = typedef Eigen::Quaternion<double> |
Definition at line 43 of file GeoPrimitives.h.
using Amg::RotationMatrix3D = typedef Eigen::Matrix<double, 3, 3> |
Definition at line 49 of file GeoPrimitives.h.
using Amg::SetVector3D = typedef std::set<Amg::Vector3D, Vector3DComparer> |
Definition at line 35 of file GeoPrimitivesHelpers.h.
using Amg::SetVectorVector3D = typedef std::set< std::vector< Amg::Vector3D>, VectorVector3DComparer> |
Definition at line 36 of file GeoPrimitivesHelpers.h.
using Amg::SymMatrixMaxX = typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, 0, MaxDim, MaxDim> |
Definition at line 40 of file EventPrimitives.h.
using Amg::SymMatrixX = typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic> |
Definition at line 28 of file EventPrimitives.h.
using Amg::Transform3D = typedef Eigen::Affine3d |
Definition at line 46 of file GeoPrimitives.h.
using Amg::Translation3D = typedef Eigen::Translation<double, 3> |
Definition at line 44 of file GeoPrimitives.h.
using Amg::Vector2D = typedef Eigen::Matrix<double, 2, 1> |
Definition at line 48 of file GeoPrimitives.h.
using Amg::Vector3D = typedef Eigen::Matrix<double, 3, 1> |
Definition at line 47 of file GeoPrimitives.h.
using Amg::VectorMaxX = typedef Eigen::Matrix<double, Eigen::Dynamic, 1, 0, MaxRows, 1> |
Definition at line 44 of file EventPrimitives.h.
using Amg::VectorX = typedef Eigen::Matrix<double, Eigen::Dynamic, 1> |
Dynamic Vector - dynamic allocation.
Definition at line 30 of file EventPrimitives.h.
enum Amg::AxisDefs |
element for code readability
Enumerator | |
---|---|
x | |
y | |
z | |
px | |
py | |
pz |
Definition at line 32 of file GeoPrimitives.h.
|
inline |
std::string Amg::AsString | ( | const T & | m | ) |
|
inlineconstexpr |
Definition at line 51 of file EventPrimitivesHelpers.h.
|
inline |
Definition at line 221 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
Converts a CLHEP::HepRotation into an Eigen-based Amg::RotationMatrix3D.
CLHEProtation | A CLHEP::HepRotation. |
Definition at line 63 of file CLHEPtoEigenConverter.h.
|
inline |
Converts a CLHEP-based HepGeom::Transform3D into an Eigen Amg::Transform3D.
CLHEPtransf | A CLHEP-based HepGeom::Transform3D. |
Definition at line 38 of file CLHEPtoEigenConverter.h.
|
inline |
Converts a CLHEP-based HepGeom::Translate3 into an Eigen-based Amg::Transform3D.
CLHEPtranslate3D | A CLHEP-based HepGeom::Translate3. |
Definition at line 99 of file CLHEPtoEigenConverter.h.
|
inline |
Converts a CLHEP::Hep3Vector into an Eigen-based Amg::Translation3D.
CLHEPtranslation | A CLHEP::Hep3Vector. |
Definition at line 85 of file CLHEPtoEigenConverter.h.
std::pair<int, int> Amg::compare | ( | const AmgSymMatrix(N) & | m1, |
const AmgSymMatrix(N) & | m2, | ||
double | precision = 1e-9 , |
||
bool | relative = false |
||
) |
compare two matrices, returns the indices of the first element that fails the condition, returns <-1,-1> if all is ok Users can provide the required precision and whether the difference should be evaluate relative to the values or absolutely
Definition at line 109 of file EventPrimitivesHelpers.h.
int Amg::compare | ( | const AmgVector(N) & | m1, |
const AmgVector(N) & | m2, | ||
double | precision = 1e-9 , |
||
bool | relative = false |
||
) |
compare two vectors, returns the indices of the first element that fails the condition, returns <-1,-1> if all is ok Users can provide the required precision and whether the difference should be evaluate relative to the values or absolutely
Definition at line 135 of file EventPrimitivesHelpers.h.
|
inline |
|
inline |
Convert CLEHP Phi,Theta,Psi angles to Eigen euler angles using Z-X-Z convention.
N.B. if "convention = 0" --> "Z-X-Z" convention ==> DEFAULT!! if "convention = 1" --> "Z-Y-Z"
Definition at line 34 of file CLHEPtoEigenEulerAnglesConverters.h.
|
inline |
Convert Eigen euler angles to CLEHP Phi,Theta,Psi angles.
N.B. if "convention = 0" --> "Z-X-Z" convention ==> DEFAULT!! if "convention = 1" --> "Z-Y-Z" convention
Note: as explained in: eigen / Eigen / src / Geometry / EulerAngles.h the returned angles are in the ranges [0:pi]x[-pi:pi]x[-pi:pi]
(source here: https://bitbucket.org/eigen/eigen/src/42e011583bceb055a43fa688622e828fbbabf818/Eigen/src/Geometry/EulerAngles.h)
N.B.!! CLHEP's Phi, Theta, Psi correspond to eulerAngles[2], [1] and [0] respectively, with the sign inverted.
Definition at line 62 of file CLHEPtoEigenEulerAnglesConverters.h.
|
inline |
|
inline |
|
inline |
calculates the distance between two point in 3D space
Definition at line 54 of file GeoPrimitivesHelpers.h.
|
inline |
|
inline |
Checks whether the linear part of the transformation rotates or stetches any of the basis vectors.
Definition at line 361 of file GeoPrimitivesHelpers.h.
|
inline |
Converts an Eigen-based Amg::Vector3D into a CLHEP-based CLHEP::Hep3Vector.
eigenvector | An Eigen-based Amg::Vector3D. |
Definition at line 147 of file CLHEPtoEigenConverter.h.
|
inline |
Converts an Eigen-based Amg::Transform3D into a CLHEP-based HepGeom::Transform3D.
eigenTransf | An Eigen-based Amg::Transform3D. |
Definition at line 120 of file CLHEPtoEigenConverter.h.
|
inline |
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in range
Definition at line 40 of file EventPrimitivesHelpers.h.
|
inline |
|
inline |
Definition at line 86 of file EventPrimitivesHelpers.h.
|
inline |
|
inline |
Definition at line 192 of file GeoPrimitivesHelpers.h.
|
inline |
Get the equivalents to CLHEP Phi, Theta, Psi Euler angles.
phi = vector[0] theta = vector[1] psi = vector[2]
N.B. if "convention = 0" --> "Z-X-Z" convention ==> DEFAULT!! if "convention = 1" --> "Z-Y-Z" convention
N.B.!! for normal usage, use the default notation (simply leave it empty, or use convention=0), or, alternatively, be sure to use the same convention in both setPhi() and getPhiThetaPsi().
we extract the Euler Angles from the Eigen matrix,
Definition at line 41 of file EulerAnglesHelpers.h.
|
inline |
|
inline |
|
inline |
|
inline |
get a AngleAxis from an angle and an axis.
to replace the CLHEP constructor: CLHEP::Rotate3D::Rotate3D(double a, cconst Vector3D< double > & v)
Definition at line 237 of file GeoPrimitivesHelpers.h.
|
inline |
Definition at line 172 of file GeoPrimitivesHelpers.h.
|
inline |
: Returns a shift transformation along an arbitrary axis
Definition at line 293 of file GeoPrimitivesHelpers.h.
|
inline |
: Returns a shift transformation along an arbitrary axis
Definition at line 289 of file GeoPrimitivesHelpers.h.
|
inline |
: Returns a shift transformation along the x-axis
Definition at line 277 of file GeoPrimitivesHelpers.h.
|
inline |
: Returns a shift transformation along the y-axis
Definition at line 281 of file GeoPrimitivesHelpers.h.
|
inline |
: Returns a shift transformation along the z-axis
Definition at line 285 of file GeoPrimitivesHelpers.h.
|
inline |
Get the Translation vector out of a Transformation.
Definition at line 225 of file GeoPrimitivesHelpers.h.
|
inline |
Definition at line 105 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
Returns true if all diagonal elements of the covariance matrix are finite aka sane in the above definition.
And positive. Instead of just positive we check that we are above the float epsilon
Definition at line 96 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
|
inline |
Returns true if all diagonal elements of the covariance matrix are finite aka sane in the above definition.
And equal or greater than 0.
Definition at line 73 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
Converts a CLHEP-based CLHEP::Hep3Vector into an Eigen-based Amg::Vector3D.
CLHEPvector | A CLHEP-based CLHEP::Hep3Vector. |
Definition at line 137 of file CLHEPtoEigenConverter.h.
std::optional<double> Amg::intersect | ( | const AmgVector(N)& | pos, |
const AmgVector(N)& | dir, | ||
const AmgVector(N)& | planeNorm, | ||
const double | offset | ||
) |
Intersects a line parametrized as A + lambda * B with the (N-1) dimensional hyperplane that's given in the Hesse normal form <P, N> - C = 0
<P, N> - C = 0 --> <A + lambda *B , N> - C = 0 --> lambda = (C - <A,N> ) / <N, B>
Definition at line 347 of file GeoPrimitivesHelpers.h.
std::optional<double> Amg::intersect | ( | const AmgVector(N)& | posA, |
const AmgVector(N)& | dirA, | ||
const AmgVector(N)& | posB, | ||
const AmgVector(N)& | dirB | ||
) |
Calculates the point of closest approach of two lines.
posA: offset point of line A dirA: orientation of line A (unit length) posB: offset point of line B dirB: orientation of line B (unit length) Returns the length to be travelled along line B
Use the formula A + lambda dirA = B + mu dirB (A-B) + lambda dirA = mu dirB <A-B, dirB> + lambda <dirA,dirB> = mu A + lambda dirA = B + (<A-B, dirB> + lambda <dirA,dirB>)dirB <A-B,dirA> + lambda <dirA, dirA> = <A-B, dirB><dirA,dirB> + lamda<dirA,dirB><dirA,dirB> -> lambda = -(<A-B, dirA> - <A-B, dirB> * <dirA, dirB>) / (1- <dirA,dirB>^2) --> mu = (<A-B, dirB> - <A-B, dirA> * <dirA, dirB>) / (1- <dirA,dirB>^2)
If the two directions are parallel to each other there's no way of intersection
Definition at line 325 of file GeoPrimitivesHelpers.h.
|
inline |
Checks whether the transformation is the Identity transformation.
Definition at line 371 of file GeoPrimitivesHelpers.h.
|
inline |
Definition at line 146 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
Check if is positive semidefinit using that fact that is needed for Cholesky decomposition.
We use LLT from Eigen
Definition at line 138 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
Definition at line 202 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
Definition at line 188 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
Definition at line 126 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
Check if is positive semidefinit using that fact that is needed for Cholesky decomposition.
We have to use LDLT from Eigen
Definition at line 118 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
Definition at line 172 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
These are the slow test following the definition.
Indented mainly for testing/
Definition at line 158 of file EventPrimitivesCovarianceHelpers.h.
double Amg::lineDistance | ( | const AmgVector(N)& | posA, |
const AmgVector(N)& | dirA, | ||
const AmgVector(N)& | posB, | ||
const AmgVector(N)& | dirB | ||
) |
Calculates the shortest distance between two lines posA: offset point of line A dirA: orientation of line A (unit length) posB: offset point of line B dirB: orientation of line B (unit length)
Definition at line 303 of file GeoPrimitivesHelpers.h.
|
inline |
Gets magnitude squared of the vector.
Definition at line 140 of file GeoPrimitivesHelpers.h.
|
inline |
|
inline |
EventPrimitvesToStringConverter.
inline methods for conversion of EventPrimitives (Matrix) to std::string.
This is to enhance formatted screen ouput and for ASCII based testing.
The offset can be used to offset the lines (starting from line 2) wrt to the zero position for formatting reasons.
Definition at line 35 of file EventPrimitivesToStringConverter.h.
|
inline |
Gets r-component in spherical coordinate system.
Definition at line 148 of file GeoPrimitivesHelpers.h.
|
inline |
A covariance matrix formally needs to be positive semi definite.
Not positive definite just positive semi definite.
A symmetric matrix M with real entries is positive-definite if the real number x^T M x is positive for every nonzero real column vector x. Positive-semidefinite means x^T M x non zero for every nonzero real column vector x
A symmetric matrix is positive semidefinite if all its eigenvalues are non negative.
A symmetric matrix is positive definite if all its eigenvalues are positive
Positive Definite and Positive Semi Definit matrices Have a Cholesky decomposition. The Positive (semi) definiteness is a necessary and sufficient condition
A positive (semi)-definite matrix can not have non-positive (negative) diagonal elements. If A_ii < 0 we could choose an x vector with all entries 0 bar x_i and the x^T M x would be negative.
Having positive (positive or 0) diagonal elements is necessary but not sufficient condition. As we could have positive diagonal elements and have a vector x that still could result in x^T M x being negative. Matrix A in the test shows this issue
What follows are methods to check for these
We can
Definition at line 63 of file EventPrimitivesCovarianceHelpers.h.
|
inline |
|
inline |
|
inline |
Definition at line 102 of file EulerAnglesHelpers.h.
|
inline |
sets the phi angle of a vector without changing theta nor the magnitude
Definition at line 62 of file GeoPrimitivesHelpers.h.
|
inline |
sets radius, the theta and phi angle of a vector.
Angles are measured in RADIANS
Definition at line 80 of file GeoPrimitivesHelpers.h.
|
inline |
sets the theta of a vector without changing phi nor the magnitude
Definition at line 89 of file GeoPrimitivesHelpers.h.
|
inline |
sets the theta and phi angle of a vector without changing the magnitude
Definition at line 70 of file GeoPrimitivesHelpers.h.
|
inline |
Sets components in cartesian coordinate system.
Definition at line 136 of file GeoPrimitivesHelpers.h.
|
inline |
Definition at line 100 of file GeoPrimitivesToStringConverter.h.
|
inline |
Definition at line 87 of file GeoPrimitivesToStringConverter.h.
|
inline |
Definition at line 66 of file GeoPrimitivesToStringConverter.h.
|
inline |
Definition at line 113 of file GeoPrimitivesToStringConverter.h.
|
inline |
Definition at line 41 of file EventPrimitivesToStringConverter.h.
|
inline |
Definition at line 46 of file GeoPrimitivesToStringConverter.h.
|
inline |
GeoPrimitvesToStringConverter.
static methods for conversion of GeoPrimitives and will call the EventPrimitives converter (Matrix) to std::string.
This is to enhance formatted screen ouput and for ASCII based testing.
The offset can be used to offset the lines (starting from line 2) wrt to the zero position for formatting reasons.
Definition at line 40 of file GeoPrimitivesToStringConverter.h.
|
inline |
Transform a point from a Trasformation3D.
from CLHEP::Point3D::transform: http://proj-clhep.web.cern.ch/proj-clhep/doc/CLHEP_2_0_4_7/doxygen/html/Point3D_8cc-source.html#l00032
Definition at line 156 of file GeoPrimitivesHelpers.h.