-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMatrix.h
66 lines (47 loc) · 1.79 KB
/
Matrix.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef _matrix_
#define _matrix_
#include "Math/SMatrix.h"
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,3,6> SMatrix36;
typedef ROOT::Math::SMatrix<float,6,3> SMatrix63;
void dumpMatrix(SMatrix33& m);
void dumpMatrix(SMatrix36& m);
void dumpMatrix(SMatrix63& m);
void dumpMatrix(SMatrix66& m);
void dumpMatrix(SMatrixSym33& m);
void dumpMatrix(SMatrixSym66& m);
//==============================================================================
#ifndef __APPLE__
#include "MatriplexSymNT.h"
const idx_t M = 6;
typedef Matriplex<float, M, M> MPlexMM;
typedef Matriplex<float, M, 1> MPlexMV;
typedef MatriplexSym<float, M> MPlexSS;
#endif
//==============================================================================
#include <random>
extern std::default_random_engine g_gen;
extern std::normal_distribution<float> g_gaus;
extern std::uniform_real_distribution<float> g_unif;
#ifndef NO_ROOT
typedef double Double_t;
namespace TMath
{
inline Double_t Pi() { return 3.14159265358979323846; }
inline Double_t TwoPi() { return 2.0 * Pi(); }
inline Double_t PiOver2() { return Pi() / 2.0; }
inline Double_t PiOver4() { return Pi() / 4.0; }
inline Double_t InvPi() { return 1.0 / Pi(); }
inline Double_t RadToDeg() { return 180.0 / Pi(); }
inline Double_t DegToRad() { return Pi() / 180.0; }
inline Double_t Sqrt2() { return 1.4142135623730950488016887242097; }
}
#else
#include "TMath.h"
#endif
#endif