ATLAS Offline Software
Static Public Member Functions | List of all members
EigenHelpers Class Reference

#include <EigenHelpers.h>

Collaboration diagram for EigenHelpers:

Static Public Member Functions

template<class VECTOR , class COVARIANCE >
static void vectorToEigenMatrix (VECTOR &vec, COVARIANCE &cov, const char *)
 Helper fn to fill the covariance from the raw data (vec<float>) More...
 
template<class VECTOR , class COVARIANCE >
static void eigenMatrixToVector (VECTOR &vec, COVARIANCE &cov, const char *)
 Helper fn to get raw data (vec<float>) from the covariance. More...
 
template<class T >
static void vectorToEigenTransform3D (const T &vec, Amg::Transform3D &trans)
 Convert std :: vector<double> to Amg::Transform3D. More...
 
template<class T >
static void eigenTransform3DToVector (const Amg::Transform3D &trans, T &vec)
 Convert HepGeom::Transform3D to std :: vector<double> More...
 

Detailed Description

Definition at line 13 of file EigenHelpers.h.

Member Function Documentation

◆ eigenMatrixToVector()

template<class VECTOR , class COVARIANCE >
static void EigenHelpers::eigenMatrixToVector ( VECTOR vec,
COVARIANCE &  cov,
const char *   
)
inlinestatic

Helper fn to get raw data (vec<float>) from the covariance.

Parameters
VECTORthe vector<float>
COVARIANCEThe eigen covariance matrix
NAMEThe name of the convertor

Definition at line 30 of file EigenHelpers.h.

30  {
32  }

◆ eigenTransform3DToVector()

template<class T >
static void EigenHelpers::eigenTransform3DToVector ( const Amg::Transform3D trans,
T &  vec 
)
inlinestatic

Convert HepGeom::Transform3D to std :: vector<double>

Definition at line 55 of file EigenHelpers.h.

57  {
58  vec.reserve(12);
59  vec.push_back( trans(0, 0) );
60  vec.push_back( trans(0, 1) );
61  vec.push_back( trans(0, 2) );
62  vec.push_back( trans(1, 0) );
63  vec.push_back( trans(1, 1) );
64  vec.push_back( trans(1, 2) );
65  vec.push_back( trans(2, 0) );
66  vec.push_back( trans(2, 1) );
67  vec.push_back( trans(2, 2) );
68  vec.push_back( trans(0, 3) );
69  vec.push_back( trans(1, 3) );
70  vec.push_back( trans(2, 3) );
71  }

◆ vectorToEigenMatrix()

template<class VECTOR , class COVARIANCE >
static void EigenHelpers::vectorToEigenMatrix ( VECTOR vec,
COVARIANCE &  cov,
const char *   
)
inlinestatic

Helper fn to fill the covariance from the raw data (vec<float>)

Parameters
VECTORthe vector<float>
COVARIANCEThe eigen covariance matrix
NAMEThe name of the convertor

Definition at line 22 of file EigenHelpers.h.

22  {
23  Amg::expand(vec.begin(), vec.end(), cov);
24  }

◆ vectorToEigenTransform3D()

template<class T >
static void EigenHelpers::vectorToEigenTransform3D ( const T &  vec,
Amg::Transform3D trans 
)
inlinestatic

Convert std :: vector<double> to Amg::Transform3D.

Definition at line 36 of file EigenHelpers.h.

38  {
39  trans(0, 0) = vec[0];
40  trans(0, 1) = vec[1];
41  trans(0, 2) = vec[2];
42  trans(1, 0) = vec[3];
43  trans(1, 1) = vec[4];
44  trans(1, 2) = vec[5];
45  trans(2, 0) = vec[6];
46  trans(2, 1) = vec[7];
47  trans(2, 2) = vec[8];
48  trans(0, 3) = vec[9];
49  trans(1, 3) = vec[10];
50  trans(2, 3) = vec[11];
51  }

The documentation for this class was generated from the following file:
Amg::compress
void compress(const AmgSymMatrix(N) &covMatrix, std::vector< float > &vec)
Definition: EventPrimitivesHelpers.h:56
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
Amg::expand
void expand(std::vector< float >::const_iterator it, std::vector< float >::const_iterator, AmgSymMatrix(N) &covMatrix)
Definition: EventPrimitivesHelpers.h:75