CMS 3D CMS Logo

AlgebraicROOTObjects.h
Go to the documentation of this file.
1 #ifndef DataFormats_Math_AlgebraicROOTObjects_h_
2 #define DataFormats_Math_AlgebraicROOTObjects_h_
3 
4 #define SMATRIX_USE_CONSTEXPR
5 #include <Math/SVector.h>
6 #include <Math/SMatrix.h>
7 
8 // Use ".!" in VIM
9 // for I in $(seq 1 6); do echo "typedef ROOT::Math::SVector<double,$I> AlgebraicVector$I;"; done
10 typedef ROOT::Math::SVector<double, 1> AlgebraicVector1;
11 typedef ROOT::Math::SVector<double, 2> AlgebraicVector2;
12 typedef ROOT::Math::SVector<double, 3> AlgebraicVector3;
13 typedef ROOT::Math::SVector<double, 4> AlgebraicVector4;
14 typedef ROOT::Math::SVector<double, 5> AlgebraicVector5;
15 typedef ROOT::Math::SVector<double, 6> AlgebraicVector6;
16 typedef ROOT::Math::SVector<double, 15> AlgebraicVector15;
17 
18 // for I in $(seq 1 6); do echo "typedef ROOT::Math::SMatrix<double,$I,$I,ROOT::Math::MatRepSym<double,$I> > AlgebraicSymMatrix$I$I;"; done
19 typedef ROOT::Math::SMatrix<double, 1, 1, ROOT::Math::MatRepSym<double, 1> > AlgebraicSymMatrix11;
20 typedef ROOT::Math::SMatrix<double, 2, 2, ROOT::Math::MatRepSym<double, 2> > AlgebraicSymMatrix22;
21 typedef ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepSym<double, 3> > AlgebraicSymMatrix33;
22 typedef ROOT::Math::SMatrix<double, 4, 4, ROOT::Math::MatRepSym<double, 4> > AlgebraicSymMatrix44;
23 typedef ROOT::Math::SMatrix<double, 5, 5, ROOT::Math::MatRepSym<double, 5> > AlgebraicSymMatrix55;
24 typedef ROOT::Math::SMatrix<double, 6, 6, ROOT::Math::MatRepSym<double, 6> > AlgebraicSymMatrix66;
25 
26 // for I in $(seq 1 6); do for J in $(seq 1 6); do echo "typedef ROOT::Math::SMatrix<double,$I,$J,ROOT::Math::MatRepStd<double,$I,$J> > AlgebraicMatrix$I$J;"; done; done
27 typedef ROOT::Math::SMatrix<double, 1, 1, ROOT::Math::MatRepStd<double, 1, 1> > AlgebraicMatrix11;
28 typedef ROOT::Math::SMatrix<double, 1, 2, ROOT::Math::MatRepStd<double, 1, 2> > AlgebraicMatrix12;
29 typedef ROOT::Math::SMatrix<double, 1, 3, ROOT::Math::MatRepStd<double, 1, 3> > AlgebraicMatrix13;
30 typedef ROOT::Math::SMatrix<double, 1, 4, ROOT::Math::MatRepStd<double, 1, 4> > AlgebraicMatrix14;
31 typedef ROOT::Math::SMatrix<double, 1, 5, ROOT::Math::MatRepStd<double, 1, 5> > AlgebraicMatrix15;
32 typedef ROOT::Math::SMatrix<double, 1, 6, ROOT::Math::MatRepStd<double, 1, 6> > AlgebraicMatrix16;
33 typedef ROOT::Math::SMatrix<double, 2, 1, ROOT::Math::MatRepStd<double, 2, 1> > AlgebraicMatrix21;
34 typedef ROOT::Math::SMatrix<double, 2, 2, ROOT::Math::MatRepStd<double, 2, 2> > AlgebraicMatrix22;
35 typedef ROOT::Math::SMatrix<double, 2, 3, ROOT::Math::MatRepStd<double, 2, 3> > AlgebraicMatrix23;
36 typedef ROOT::Math::SMatrix<double, 2, 4, ROOT::Math::MatRepStd<double, 2, 4> > AlgebraicMatrix24;
37 typedef ROOT::Math::SMatrix<double, 2, 5, ROOT::Math::MatRepStd<double, 2, 5> > AlgebraicMatrix25;
38 typedef ROOT::Math::SMatrix<double, 2, 6, ROOT::Math::MatRepStd<double, 2, 6> > AlgebraicMatrix26;
39 typedef ROOT::Math::SMatrix<double, 3, 1, ROOT::Math::MatRepStd<double, 3, 1> > AlgebraicMatrix31;
40 typedef ROOT::Math::SMatrix<double, 3, 2, ROOT::Math::MatRepStd<double, 3, 2> > AlgebraicMatrix32;
41 typedef ROOT::Math::SMatrix<double, 3, 3, ROOT::Math::MatRepStd<double, 3, 3> > AlgebraicMatrix33;
42 typedef ROOT::Math::SMatrix<double, 3, 4, ROOT::Math::MatRepStd<double, 3, 4> > AlgebraicMatrix34;
43 typedef ROOT::Math::SMatrix<double, 3, 5, ROOT::Math::MatRepStd<double, 3, 5> > AlgebraicMatrix35;
44 typedef ROOT::Math::SMatrix<double, 3, 6, ROOT::Math::MatRepStd<double, 3, 6> > AlgebraicMatrix36;
45 typedef ROOT::Math::SMatrix<double, 4, 1, ROOT::Math::MatRepStd<double, 4, 1> > AlgebraicMatrix41;
46 typedef ROOT::Math::SMatrix<double, 4, 2, ROOT::Math::MatRepStd<double, 4, 2> > AlgebraicMatrix42;
47 typedef ROOT::Math::SMatrix<double, 4, 3, ROOT::Math::MatRepStd<double, 4, 3> > AlgebraicMatrix43;
48 typedef ROOT::Math::SMatrix<double, 4, 4, ROOT::Math::MatRepStd<double, 4, 4> > AlgebraicMatrix44;
49 typedef ROOT::Math::SMatrix<double, 4, 5, ROOT::Math::MatRepStd<double, 4, 5> > AlgebraicMatrix45;
50 typedef ROOT::Math::SMatrix<double, 4, 6, ROOT::Math::MatRepStd<double, 4, 6> > AlgebraicMatrix46;
51 typedef ROOT::Math::SMatrix<double, 5, 1, ROOT::Math::MatRepStd<double, 5, 1> > AlgebraicMatrix51;
52 typedef ROOT::Math::SMatrix<double, 5, 2, ROOT::Math::MatRepStd<double, 5, 2> > AlgebraicMatrix52;
53 typedef ROOT::Math::SMatrix<double, 5, 3, ROOT::Math::MatRepStd<double, 5, 3> > AlgebraicMatrix53;
54 typedef ROOT::Math::SMatrix<double, 5, 4, ROOT::Math::MatRepStd<double, 5, 4> > AlgebraicMatrix54;
55 typedef ROOT::Math::SMatrix<double, 5, 5, ROOT::Math::MatRepStd<double, 5, 5> > AlgebraicMatrix55;
56 typedef ROOT::Math::SMatrix<double, 5, 6, ROOT::Math::MatRepStd<double, 5, 6> > AlgebraicMatrix56;
57 typedef ROOT::Math::SMatrix<double, 6, 1, ROOT::Math::MatRepStd<double, 6, 1> > AlgebraicMatrix61;
58 typedef ROOT::Math::SMatrix<double, 6, 2, ROOT::Math::MatRepStd<double, 6, 2> > AlgebraicMatrix62;
59 typedef ROOT::Math::SMatrix<double, 6, 3, ROOT::Math::MatRepStd<double, 6, 3> > AlgebraicMatrix63;
60 typedef ROOT::Math::SMatrix<double, 6, 4, ROOT::Math::MatRepStd<double, 6, 4> > AlgebraicMatrix64;
61 typedef ROOT::Math::SMatrix<double, 6, 5, ROOT::Math::MatRepStd<double, 6, 5> > AlgebraicMatrix65;
62 typedef ROOT::Math::SMatrix<double, 6, 6, ROOT::Math::MatRepStd<double, 6, 6> > AlgebraicMatrix66;
63 
65 template <unsigned int D1, unsigned int D2 = D1>
67  typedef typename ROOT::Math::SVector<double, D1> Vector;
68  typedef typename ROOT::Math::SMatrix<double, D1, D1, ROOT::Math::MatRepSym<double, D1> > SymMatrix;
69  typedef typename ROOT::Math::SMatrix<double, D1, D2, ROOT::Math::MatRepStd<double, D1, D2> > Matrix;
70 };
71 
72 typedef ROOT::Math::SMatrixIdentity AlgebraicMatrixID;
73 
74 #endif
AlgebraicVector3
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Definition: AlgebraicROOTObjects.h:12
AlgebraicMatrix35
ROOT::Math::SMatrix< double, 3, 5, ROOT::Math::MatRepStd< double, 3, 5 > > AlgebraicMatrix35
Definition: AlgebraicROOTObjects.h:43
AlgebraicSymMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
Definition: AlgebraicROOTObjects.h:21
AlgebraicMatrix21
ROOT::Math::SMatrix< double, 2, 1, ROOT::Math::MatRepStd< double, 2, 1 > > AlgebraicMatrix21
Definition: AlgebraicROOTObjects.h:33
AlgebraicMatrix23
ROOT::Math::SMatrix< double, 2, 3, ROOT::Math::MatRepStd< double, 2, 3 > > AlgebraicMatrix23
Definition: AlgebraicROOTObjects.h:35
AlgebraicMatrix16
ROOT::Math::SMatrix< double, 1, 6, ROOT::Math::MatRepStd< double, 1, 6 > > AlgebraicMatrix16
Definition: AlgebraicROOTObjects.h:32
AlgebraicMatrix44
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepStd< double, 4, 4 > > AlgebraicMatrix44
Definition: AlgebraicROOTObjects.h:48
AlgebraicMatrix26
ROOT::Math::SMatrix< double, 2, 6, ROOT::Math::MatRepStd< double, 2, 6 > > AlgebraicMatrix26
Definition: AlgebraicROOTObjects.h:38
AlgebraicVector1
ROOT::Math::SVector< double, 1 > AlgebraicVector1
Definition: AlgebraicROOTObjects.h:10
AlgebraicROOTObject::SymMatrix
ROOT::Math::SMatrix< double, D1, D1, ROOT::Math::MatRepSym< double, D1 > > SymMatrix
Definition: AlgebraicROOTObjects.h:68
AlgebraicMatrix42
ROOT::Math::SMatrix< double, 4, 2, ROOT::Math::MatRepStd< double, 4, 2 > > AlgebraicMatrix42
Definition: AlgebraicROOTObjects.h:46
AlgebraicMatrix36
ROOT::Math::SMatrix< double, 3, 6, ROOT::Math::MatRepStd< double, 3, 6 > > AlgebraicMatrix36
Definition: AlgebraicROOTObjects.h:44
AlgebraicMatrix56
ROOT::Math::SMatrix< double, 5, 6, ROOT::Math::MatRepStd< double, 5, 6 > > AlgebraicMatrix56
Definition: AlgebraicROOTObjects.h:56
AlgebraicMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
Definition: AlgebraicROOTObjects.h:41
AlgebraicMatrix61
ROOT::Math::SMatrix< double, 6, 1, ROOT::Math::MatRepStd< double, 6, 1 > > AlgebraicMatrix61
Definition: AlgebraicROOTObjects.h:57
AlgebraicMatrix52
ROOT::Math::SMatrix< double, 5, 2, ROOT::Math::MatRepStd< double, 5, 2 > > AlgebraicMatrix52
Definition: AlgebraicROOTObjects.h:52
AlgebraicMatrix53
ROOT::Math::SMatrix< double, 5, 3, ROOT::Math::MatRepStd< double, 5, 3 > > AlgebraicMatrix53
Definition: AlgebraicROOTObjects.h:53
AlgebraicMatrixID
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
Definition: AlgebraicROOTObjects.h:72
AlgebraicMatrix46
ROOT::Math::SMatrix< double, 4, 6, ROOT::Math::MatRepStd< double, 4, 6 > > AlgebraicMatrix46
Definition: AlgebraicROOTObjects.h:50
AlgebraicMatrix14
ROOT::Math::SMatrix< double, 1, 4, ROOT::Math::MatRepStd< double, 1, 4 > > AlgebraicMatrix14
Definition: AlgebraicROOTObjects.h:30
AlgebraicMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepStd< double, 5, 5 > > AlgebraicMatrix55
Definition: AlgebraicROOTObjects.h:55
AlgebraicMatrix34
ROOT::Math::SMatrix< double, 3, 4, ROOT::Math::MatRepStd< double, 3, 4 > > AlgebraicMatrix34
Definition: AlgebraicROOTObjects.h:42
AlgebraicMatrix25
ROOT::Math::SMatrix< double, 2, 5, ROOT::Math::MatRepStd< double, 2, 5 > > AlgebraicMatrix25
Definition: AlgebraicROOTObjects.h:37
AlgebraicSymMatrix66
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Definition: AlgebraicROOTObjects.h:24
AlgebraicMatrix43
ROOT::Math::SMatrix< double, 4, 3, ROOT::Math::MatRepStd< double, 4, 3 > > AlgebraicMatrix43
Definition: AlgebraicROOTObjects.h:47
AlgebraicSymMatrix11
ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepSym< double, 1 > > AlgebraicSymMatrix11
Definition: AlgebraicROOTObjects.h:19
AlgebraicROOTObject
============= When we need templated root objects
Definition: AlgebraicROOTObjects.h:66
AlgebraicMatrix64
ROOT::Math::SMatrix< double, 6, 4, ROOT::Math::MatRepStd< double, 6, 4 > > AlgebraicMatrix64
Definition: AlgebraicROOTObjects.h:60
AlgebraicMatrix63
ROOT::Math::SMatrix< double, 6, 3, ROOT::Math::MatRepStd< double, 6, 3 > > AlgebraicMatrix63
Definition: AlgebraicROOTObjects.h:59
AlgebraicMatrix31
ROOT::Math::SMatrix< double, 3, 1, ROOT::Math::MatRepStd< double, 3, 1 > > AlgebraicMatrix31
Definition: AlgebraicROOTObjects.h:39
AlgebraicROOTObject::Matrix
ROOT::Math::SMatrix< double, D1, D2, ROOT::Math::MatRepStd< double, D1, D2 > > Matrix
Definition: AlgebraicROOTObjects.h:69
AlgebraicMatrix12
ROOT::Math::SMatrix< double, 1, 2, ROOT::Math::MatRepStd< double, 1, 2 > > AlgebraicMatrix12
Definition: AlgebraicROOTObjects.h:28
AlgebraicVector2
ROOT::Math::SVector< double, 2 > AlgebraicVector2
Definition: AlgebraicROOTObjects.h:11
AlgebraicVector15
ROOT::Math::SVector< double, 15 > AlgebraicVector15
Definition: AlgebraicROOTObjects.h:16
AlgebraicMatrix62
ROOT::Math::SMatrix< double, 6, 2, ROOT::Math::MatRepStd< double, 6, 2 > > AlgebraicMatrix62
Definition: AlgebraicROOTObjects.h:58
AlgebraicMatrix13
ROOT::Math::SMatrix< double, 1, 3, ROOT::Math::MatRepStd< double, 1, 3 > > AlgebraicMatrix13
Definition: AlgebraicROOTObjects.h:29
AlgebraicMatrix22
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepStd< double, 2, 2 > > AlgebraicMatrix22
Definition: AlgebraicROOTObjects.h:34
AlgebraicVector5
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: AlgebraicROOTObjects.h:14
AlgebraicVector6
ROOT::Math::SVector< double, 6 > AlgebraicVector6
Definition: AlgebraicROOTObjects.h:15
AlgebraicMatrix54
ROOT::Math::SMatrix< double, 5, 4, ROOT::Math::MatRepStd< double, 5, 4 > > AlgebraicMatrix54
Definition: AlgebraicROOTObjects.h:54
AlgebraicSymMatrix44
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
Definition: AlgebraicROOTObjects.h:22
AlgebraicMatrix65
ROOT::Math::SMatrix< double, 6, 5, ROOT::Math::MatRepStd< double, 6, 5 > > AlgebraicMatrix65
Definition: AlgebraicROOTObjects.h:61
AlgebraicVector4
ROOT::Math::SVector< double, 4 > AlgebraicVector4
Definition: AlgebraicROOTObjects.h:13
AlgebraicMatrix15
ROOT::Math::SMatrix< double, 1, 5, ROOT::Math::MatRepStd< double, 1, 5 > > AlgebraicMatrix15
Definition: AlgebraicROOTObjects.h:31
AlgebraicMatrix66
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepStd< double, 6, 6 > > AlgebraicMatrix66
Definition: AlgebraicROOTObjects.h:62
AlgebraicMatrix11
ROOT::Math::SMatrix< double, 1, 1, ROOT::Math::MatRepStd< double, 1, 1 > > AlgebraicMatrix11
Definition: AlgebraicROOTObjects.h:27
AlgebraicMatrix41
ROOT::Math::SMatrix< double, 4, 1, ROOT::Math::MatRepStd< double, 4, 1 > > AlgebraicMatrix41
Definition: AlgebraicROOTObjects.h:45
AlgebraicMatrix45
ROOT::Math::SMatrix< double, 4, 5, ROOT::Math::MatRepStd< double, 4, 5 > > AlgebraicMatrix45
Definition: AlgebraicROOTObjects.h:49
AlgebraicMatrix32
ROOT::Math::SMatrix< double, 3, 2, ROOT::Math::MatRepStd< double, 3, 2 > > AlgebraicMatrix32
Definition: AlgebraicROOTObjects.h:40
AlgebraicMatrix51
ROOT::Math::SMatrix< double, 5, 1, ROOT::Math::MatRepStd< double, 5, 1 > > AlgebraicMatrix51
Definition: AlgebraicROOTObjects.h:51
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
AlgebraicMatrix24
ROOT::Math::SMatrix< double, 2, 4, ROOT::Math::MatRepStd< double, 2, 4 > > AlgebraicMatrix24
Definition: AlgebraicROOTObjects.h:36
AlgebraicROOTObject::Vector
ROOT::Math::SVector< double, D1 > Vector
Definition: AlgebraicROOTObjects.h:67
AlgebraicSymMatrix22
ROOT::Math::SMatrix< double, 2, 2, ROOT::Math::MatRepSym< double, 2 > > AlgebraicSymMatrix22
Definition: AlgebraicROOTObjects.h:20