CMS 3D CMS Logo

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