forked from trackreco/mkFit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MatrixSTypes.h
49 lines (38 loc) · 1.22 KB
/
MatrixSTypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _matrixstypes_
#define _matrixstypes_
#include "Math/SMatrix.h"
namespace mkfit {
typedef ROOT::Math::SMatrix<float,6,6,ROOT::Math::MatRepSym<float,6> > SMatrixSym66;
typedef ROOT::Math::SMatrix<float,6> SMatrix66;
typedef ROOT::Math::SVector<float,6> SVector6;
typedef ROOT::Math::SMatrix<float,3> SMatrix33;
typedef ROOT::Math::SMatrix<float,3,3,ROOT::Math::MatRepSym<float,3> > SMatrixSym33;
typedef ROOT::Math::SVector<float,3> SVector3;
typedef ROOT::Math::SMatrix<float,2> SMatrix22;
typedef ROOT::Math::SMatrix<float,2,2,ROOT::Math::MatRepSym<float,2> > SMatrixSym22;
typedef ROOT::Math::SVector<float,2> SVector2;
typedef ROOT::Math::SMatrix<float,3,6> SMatrix36;
typedef ROOT::Math::SMatrix<float,6,3> SMatrix63;
typedef ROOT::Math::SMatrix<float,2,6> SMatrix26;
typedef ROOT::Math::SMatrix<float,6,2> SMatrix62;
template <typename Matrix>
inline void diagonalOnly(Matrix& m)
{
for (int r=0; r<m.kRows; r++) {
for (int c=0; c<m.kCols; c++) {
if (r!=c) m[r][c] = 0.f;
}
}
}
template<typename Matrix>
void dumpMatrix(Matrix m)
{
for (int r=0;r<m.kRows;++r) {
for (int c=0;c<m.kCols;++c) {
std::cout << std::setw(12) << m.At(r,c) << " ";
}
std::cout << std::endl;
}
}
}
#endif