diff --git a/smatrix/build/configure.in b/smatrix/build/configure.in
index b6cc4ef4976f0c6757157380fab445fc6fe1c4a1..15149f739beadd82ce5e473af3f00ca62b3482d3 100644
--- a/smatrix/build/configure.in
+++ b/smatrix/build/configure.in
@@ -6,7 +6,7 @@ dnl
 AC_INIT(inc/Math/SMatrix.h)
 AM_CONFIG_HEADER(config.h)
 AC_CONFIG_AUX_DIR(config)
-AM_INIT_AUTOMAKE(SMatrix, 5.11.04)
+AM_INIT_AUTOMAKE(SMatrix, 5.11.06)
 
 dnl Checks for programs.
 AC_PROG_CXX
diff --git a/smatrix/doc/SMatrix.html b/smatrix/doc/SMatrix.html
new file mode 100644
index 0000000000000000000000000000000000000000..bc849704f02ca525fb8049b983ecf24da54c147a
--- /dev/null
+++ b/smatrix/doc/SMatrix.html
@@ -0,0 +1 @@
+// SMatrix example of usage

/**

 
 \page SMatrixDoc SMatrix Class Properties
 
 The template ROOT::Math::SMatrix class has 4 template parameters which define, at compile time, its properties. These are: 
 <ul>
 <li> type of the contained elements, T, for example <em>float</em> or <em>double</em>;</li>
 <li>number of rows;</li>
 <li> number of columns;</li>
 <li>representation type (\ref MatRep). This is a class describing the underlined storage model of the Matrix. Presently exists only two types of this class: 
   <ol>
 <li>ROOT::Math::MatRepStd for a general nrows x ncols matrix. This class is itself a template on the contained type T, the number of rows and the number of columns.
 Its data member is an array T[nrows*ncols] containing the matrix data. The data are stored in the row-major C convention. 
 For example, for a matrix, M, of size 3x3, the data \f$ \left[a_0,a_1,a_2,.......,a_7,a_8 \right] \f$d are stored in the following order: 
         \f[
         M = \left( \begin{array}{ccc} 
         a_0 & a_1 & a_2  \\ 
         a_3 & a_4  & a_5  \\ 
		 a_6 & a_7  & a_8   \end{array} \right)
      \f] </li>
 <li>ROOT::Math::MatRepSym for a symmetric matrix of size NxN. This class is a template on the contained type and on the symmetric matrix size, N. 
 It has as data member an array of type T of size N*(N+1)/2, containing the lower diagonal block of the matrix.
  The order follows the lower diagonal block, still in a row-major convention. 
  For example for a symmetric 3x3 matrix the order of the 6 elements \f$ \left[a_0,a_1.....a_5 \right]\f$ is: 
      \f[
       M = \left( \begin{array}{ccc} 
       a_0 & a_1  & a_3  \\ 
       a_1 & a_2  & a_4  \\
       a_3 & a_4 & a_5   \end{array} \right)
       \f]
  </li>
  </ol>
 </li>
 </ul>


<h3>Creating a matrix</h3>
The following constructors are available to create a matrix: 
<ul>
<li>Default constructor for a zero matrix (all elements equal to zero).</li>
<li>Constructor of an identity matrix.</li>
<li>Copy constructor (and assignment) for a matrix with the same representation, or from a different one when possible, for example from a symmetric to a general matrix. </li>
<li>Constructor (and assignment) from a matrix expression, like D = A*B + C. Due to the expression template technique, no temporary objects are created in this operation. In the case of an operation like A = A*B + C, a temporary object is needed and it is created automatically to store the intermediary result in order to preserve the validity of this operation. </li>
<li>Constructor from a generic STL-like iterator copying the data referred by the iterator, following its order. 
It is both possible to specify the <em>begin</em> and <em>end</em> of the iterator or the <em>begin</em> and the size. In case of a symmetric matrix, it is required only the triangular block and the user can specify whether giving a block representing the lower (default case) or the upper diagonal part.</li>
</ul>
 
<p>
Here are some examples on how to create a matrix. We use <em>typedef's</em> in the following examples to avoid the full C++ names for the matrix classes. 
Notice that for a general matrix the representation has the default value, ROOT::Math::MatRepStd, and it is not needed to be specified. Furtheremore, for a general square matrix, the number of column may be as well omitted.
</p>

<pre>
<em>// typedef definitions used in the following declarations</em> 
typedef ROOT::Math::SMatrix&lt;double,3&gt;                                       SMatrix33;      
typedef ROOT::Math::SMatrix&lt;double,2&gt;                                       SMatrix22;
typedef ROOT::Math::SMatrix&lt;double,3,3,ROOT::Math::MatRepSym&lt;double,3&gt; &gt;    SMatrixSym3;
typedef ROOT::Math::SVector&gt;double,2&gt;                                       SVector2; 
typedef ROOT::Math::SVector&gt;double,3&gt;                                       SVector3;
typedef ROOT::Math::SVector&gt;double,6&gt;                                       SVector6; 

SMatrix33   m0;                         <em>// create a zero 3x3 matrix</em>
<em>// create an 3x3 identity matrix </em>
SMatrix33   i = ROOT::Math::SMatrixIdentity();      
double   a[9] = {1,2,3,4,5,6,7,8,9};    <em>// input matrix data</em>
SMatrix33   m(a,9);                     <em>// create a matrix using the a[] data</em>
<em>// this will produce the 3x3 matrix
//    (  1    2    3 
//       4    5    6
//       7    8    9  )</em>
</pre>
Example to fill a symmetric matrix from an <em>std::vector</em>: 
<pre>
std::vector&lt;double&gt; v(6);         
for (int i = 0; i<6; ++i) v[i] = double(i);
SMatrixSym3  s(v.begin(),v.end())                   
// this will produce the symmetric  matrix
//    (  1    4    5 
//       4    2    6
//       5    6    3  )

<em>// create a a general matrix from a symmetric matrix. The opposite will not compile</em>
SMatrix33    m2 = s;                   
</pre>

<h3>Accessing and Setting Methods</h3>

The matrix elements can be set using the <em>operator()(irow,icol)</em>, where irow and icol are the row and column indexes or by using the iterator interface. Notice that the indexes start from zero and not from one as in Fortran.  
<br>
The elements can be accessed by these same methods and also by using the ROOT::Math::SMatrix::apply function. The <em>apply(i)</em> function has exactly the same behavior for general and symmetric matrices, in contrast to the iterator access methods which behave differently (it follows the data order). 
<pre>
SMatrix33   m; 
m(0,0)  = 1;                          <em> // set the element in first row and first column</em>     
*(m.<strong>begin</strong>()+1) = 2;                    <em>// set the second element (0,1)</em>
double x = m(2,1);                     <em>// return the element in third row and first column</em>
x = m.<strong>apply</strong>(7);                        <em>// return the 8-th element (row=2,col=1) </em>
x = *(m.<strong>begin</strong>()+7);                    <em>// return the 8-th element (row=2,col=1)</em>
<em>// symmetric matrices (note the difference in behavior between apply and the iterators)</em>
x = *(m.<strong>begin</strong>()+4)                     <em>// return the element (row=2,col=1). </em>
x = m.<strong>apply</strong>(7);                        <em>// returns again the (row=2,col=1) element</em>                                        
</pre>

There are methods to place and/or retrieve ROOT::Math::SVector objects as rows or columns in (from) a matrix. In addition one can put (get) a sub-matrix as another ROOT::Math::SMatrix object in a matrix. 
If the size of the the sub-vector or sub-matrix are larger than the matrix size a static assert ( a compilation error) is produced. 
The non-const methods are: 
<pre> 

SMatrix33            m;
SVector2       v2(1,2);
<em>// place a vector of size 2 in the first row starting from element (0,1) : m(0,1) = v2[0]</em>
m.<strong>Place_in_row</strong>(v2,0,1); 
<em>// place the vector in the second column from (0,1) : m(0,1) = v2[0]   </em>             
m.<strong>Place in_col</strong>(v2,0,1);                
SMatrix22           m2;
<em>// place the sub-matrix m2 in m starting from the element (1,1) : m(1,1) = m2(0,0)  </em> 
m.<strong>Place_at</strong>(m2,1,1);                    
SVector3     v3(1,2,3);
<em>// set v3 as the diagonal elements of m  : m(i,i) = v3[i] for i=0,1,2</em>
m.<strong>SetDiagonal</strong>(v3)                    </pre>
The const methods retrieving contents (getting slices of a matrix) are: 
<pre>
a = {1,2,3,4,5,6,7,8,9}; 
SMatrix33       m(a,a+9); 
SVector3 irow = m.<strong>Row</strong>(0);             <em>// return as vector the first matrix row  </em>
SVector3 jcol = m.<strong>Col</strong>(1);            <em>// return as vector the second matrix column  </em>
<em>// return a slice of the first row from element (0,1) : r2[0] = m(0,1); r2[1] = m(0,2)</em>
SVector2 r2   =  m.<strong>SubRow</strong>&lt;SVector2&gt; (0,1);    
<em>// return a slice of the second column from element (0,1) : c2[0] = m(0,1); c2[1] = m(1,1);</em>
SVector2 c2   =  m.<strong>SubCol</strong>&lt;SVector2&gt; (1,0);   
<em>// return a sub-matrix 2x2 with the upper left corner at the values (1,1)</em>
SMatrix22 subM = m.<strong>Sub</strong>&lt;SMatrix22&gt;   (1,1); 
<em>// return the diagonal element in a SVector</em>
SVector3  diag = m.<strong>Diagonal</strong>(); 
<em>// return the upper(lower) block of the matrix m</em>
SVector6 vub = m.<strong>UpperBlock</strong>();        <em>//  vub = [ 1, 2, 3, 5, 6, 9 ]</em>
SVector6 vlb = m.<strong>LowerBlock</strong>();       <em> //  vlb = [ 1, 4, 5, 7, 8, 9 ] </em>
</pre>

<h3>Matrix Operators </h3>
<p>The matrix defines the following operators described below. The<em> m1,m2,m3</em> are matrices of the same type and <em>a</em> is a scalar value: </p>
<pre>
m1 == m2           <em>// returns whether m1 is equal to m2 (element by element comparison) </em> 
m1 != m2           <em>// returns whether m1 is NOT equal to m2 (element by element comparison) </em> 
m1 &lt; m2            <em>// returns whether m1 is less than m2 (element wise comparison)</em>
m1 &gt; m2            <em>// returns whether m1 is greater than m2 (element wise comparison)</em>
<em>// in the following m1 and m3 can be general and m2 symmetric, but not vice-versa</em>
m1 += m2           <em>// add m2 to m1</em>
m1 -= m2           <em>// subtract m2 to m1 </em>
m3 = m1 + m2       <em>// matrix addition </em>
m1 - m2            <em>// matrix subtraction</em>

<em>// Multiplication and division via a scalar value a</em> 
m3 = a*m1; m3 = m1*a; m3 = m1/a;  
</pre>
<strong>Matrix - Vector multiplication</strong>: it compiles only if m1 is a N1 x N2 matrix and v2 is a N2 size vector and v3, the returned vector, is of size N1. 
<pre>
v3 = m1 * v2   <em>// \f$ v3_i = \sum_{j} m1_{ij} v2_j  \f$</em>
</pre>
<strong>Matrix - Matrix  multiplication: </strong>it compiles only if  m1 is a  N1 x N2 matrix , m2 is a N2 x N3 matrix and m3 is a N1 x N3 matrix. 
In the case that m1 and m2 are symmetric matrices, m3 is a general one, since their product is not guaranteed to be symmetric.   
<pre>
m3 = m1 * m2    <em>// \f$ m3_{ij} = \sum_{k} m1_{ik} m2_{kj}  \f$</em>
</pre>


<h3>Matrix Functions</h3>

The most used matrix functions are: 
<ul>
<li><strong>ROOT::Math::Transpose</strong>(M) : return the transpose matrix, \f$ M^T \f$</li>
<li><strong>ROOT::Math::Similarity</strong>( v, M) : returns the scalar value resulting from the matrix- vector product \f$ v^T M v \f$ 
</li>
<li><strong>ROOT::Math::Similarity</strong>( U, M) : returns the matrix resulting from the product \f$ U  M U^T \f$. If M is symmetric, the returned resulting matrix  is also symmetric</li>
<li><strong>ROOT::Math::SimilarityT</strong>( U, M) : returns the matrix resulting from the product \f$ U^T  M U \f$. If M is symmetric, the returned resulting matrix  is also symmetric</li>
</ul>
See \ref MatrixFunctions for the documentation of all existing one in the package. 

<h3>Linear Algebra Functions</h3> 

Only limited linear algebra functionality is available for SMatrix. It is possible for squared matrices NxN,  to find the inverse or to calculate the determinant. Different inversion algorithms are used if the matrix is smaller than 6x6 or if it is symmetric. 
In the case of a small matrix, a faster direct inversion is used. For a large (N > 6)  symmetric matrix the Bunch-Kaufman diagonal pivoting method is used while for a large (N > 6) general matrix an LU factorization is performed using the same algorithm as in the CERNLIB routine <a href="http://wwwasdoc.web.cern.ch/wwwasdoc/shortwrupsdir/f010/top.html">dinv</a>.   
<pre>
<em>//  Invert a NxN matrix. The inverted matrix replace the existing one and returns if the result is successful</em>
bool ret = m.<strong>Invert</strong>()  
<em>// return the inverse matrix of m. If the inversion fails ifail is different than zero</em>     
int ifail = 0;
mInv = m.<strong>Inverse</strong>(ifail);  
</pre> 
The determinant of a square matrix can be obtained as follows: 
<pre>
double det; 
<em>// calculate the determinant modyfing the matrix content. Returns if the calculation was successful</em>
bool ret = m.<strong>Det</strong>(det);    
<em>// calculate the determinant using a temporary matrix but preserving the matrix content </em>
bool ret = n.<strong>Det2</strong>(det);
</pre>
<br>

*/
\ No newline at end of file
diff --git a/smatrix/doc/SVector.html b/smatrix/doc/SVector.html
new file mode 100644
index 0000000000000000000000000000000000000000..b40a1d24082bc39f067d76a65b542de082764ed9
--- /dev/null
+++ b/smatrix/doc/SVector.html
@@ -0,0 +1 @@
+// SVector example of usage

/**
 
 \page SVectorDoc SVector Class Properties 
 
 The template ROOT::Math::SVector class has 2 template parameters which define, at compile time, its properties. These are: 
 <ul>
 <li> type of the contained elements, for example <em>float</em> or double. </li>
 <li>size of the vector.</li>

 </ul>


<h3>Creating a Vector </h3>
The following constructors are available to create a vector: 
<ul>
<li>Default constructor for a zero vector (all elements equal to zero)</li>
<li>Constructor (and assignment) from a vector expression, like v = p*q + w. Due to the expression template technique, no temporary objects are created in this operation. </li>
<li>Construct a vector passing directly the elements. This is possible only for vector up to size 10.  
<li>Constructor from an iterator copying the data refered by the iterator. 
It is possible to specify the <em>begin</em> and <em>end</em> of the iterator or the <em>begin</em> and the size.
Note that for the Vector the iterator is not generic and must be of type <em>T*,</em> where T is the type of the contained elements. 
</li>
</ul>
 
<p>Here are some examples on how to create a vector. In the following we assume that we are using the namespace ROOT::Math. 
</p>
<pre>
SVector&gt;double,N&gt;  v;                         <em>// create a vector of size N, v[i]=0 </em>
SVector&gt;double,3&gt;  v(1,2,3);                  <em>// create a vector of size 3, v[0]=1,v[1]=2,v[2]=3 </em>
double   a[9] = {1,2,3,4,5,6,7,8,9};          <em>// input data</em>
SVector&gt;double,9&gt;  v(a,9);                    <em>// create a vector using the a[] data</em>                 
</pre>

<h3>Accessing and Setting Methods</h3>

The single vector elements can be set or retrieved using the <em>operator[i]</em> , <em>operator(i)</em> or the iterator interface. Notice that the index starts from zero and not from one as in Fortran. Also no check is performed on the passed index.  
The elements can be accessed also by using the ROOT::Math::SVector::apply(i) function. 


<pre> 
v[0]  = 1;                          <em> // set the first element </em> 
v(1)  = 2;                          <em> // set the second element </em>     
*(v.<strong>begin</strong>()+3) = 3; <em>                 // set the third element 
</em>
double x = m(i);                     <em>// return the i-th element</em>
x = m.<strong>apply</strong>(i);                      <em>// return the i-th element </em>
x = *(m.<strong>begin</strong>()+i);                  <em>// return the i-th element </em>                                  
</pre>

In addition there are methods to place a sub-vector in a vector. 
If the size of the the sub-vector is larger than the vector size a static assert ( a compilation error) is produced. 

<pre> 
SVector&gt;double,N&gt;  v;   
SVector&gt;double,M&gt;  w;          <em>// M <= N otherwise a compilation error is obtained later </em>   
<em>// place a vector of size M starting from element ioff,  v[ioff + i] = w[i]</em>
v.<strong>Place_at</strong>(w,ioff); 
<em>// return a sub-vector of size M starting from v[ioff]:  w[i] = v[ioff + i]</em>
w = v.Sub &lt; SVector&gt;double,M&gt; &gt; (ioff);
</pre>

<h3>Vector Operators </h3>
<p>The ROOT::Math::SVector class defines the following operators. The (<em>v1,v2,v3</em>) are vectors of the same type and <em>a</em> is a scalar value </p>
<pre>
v1 == v2           <em>// returns whether v1 is equal to v2 (element by element comparison) </em> 
v1 != v2           <em>// returns whether v1 is NOT equal to v2 (element by element comparison) </em> 
v1 &lt; v2            <em>// returns whether v1 is less than v2 (element wise comparison)</em>
v1 &gt; v2            <em>// returns whether v1 is greater than v2 (element wise comparison)</em>
v1 += v2           <em>// add v2 to v1</em>
v1 -= v2           <em>// subtract v2 to v1 </em>
v3 = v1 + v2       <em>// vector addition </em>
v1 - v2            <em>// vector subtraction</em>

<em>// Multiplication and division via a scalar value a for all vector elements</em> 
v3 = a*v1; v3 = v1*a; v3 = v1/a;  
</pre>


<h3>Vector Functions</h3>

The major Vector functions are: 
<ul>
<li><strong>ROOT::Math::Dot</strong>( v1, v2) : returns the scalar value resulting from the vector dot product</li>
<li><strong>ROOT::Math::Cross</strong>( v1, v2) : returns the vector cross product for two vectors of size 3. Note that the Cross product is not defined for other vector sizes</li>
<li><strong>ROOT::Math::Unit</strong>( v) : returns unit vector. One can use also the <em>v.Unit()</em> method. </li>
<li><strong>ROOT::Math::TensorProd</strong>(v1,v2) : returns a general matrix M of size N1xN2 resulting from the <a href="http://en.wikipedia.org/wiki/Tensor_product">Tensor Product</a> between the vector v1 of size N1) and v2 of size N2 </li>
</ul>
See \ref VectFunction for the  list and documentation of all of them. 

<h3>Other Functions</h3>
One can print (or write in an output stream)  Vectors (and also Matrices) using the Print method or the << operator, like: 
<pre>
v.Print(std::cout);
std::cout << v << std::endl;
</pre>

<br>

*/
\ No newline at end of file
diff --git a/smatrix/doc/main.html b/smatrix/doc/main.html
index 2e33312a1a9055def6635ece2c993d69cc8e4e16..fe2bedfd55236d9b51614de811776105630629bc 100644
--- a/smatrix/doc/main.html
+++ b/smatrix/doc/main.html
@@ -21,6 +21,11 @@ It is not in the mandate of this package to provide a complete linear algebra fu
 The SMatrix package contains only header files. Normally one does not need to build any library. In the %ROOT distribution a library, <em>libSmatrix</em> is produced with the C++ dictionary information for some squared matrices and vectors. 
 <br>
 The current version of SMatrix can be downloaded from <A HREF="../SMatrix.tar.gz">here</A>. If you want to install the header files or run the test <em>configure</em> script and then <em>make install</em> or <em>make check</em> to build the tests. No dictionary library is built in this case. 
+
+<ul>
+<li>\ref SVectorDoc
+<li>\ref SMatrixDoc
+</ul>
  
 <h2>References</h2>
 <ol>
diff --git a/smatrix/inc/LinkDef.h b/smatrix/inc/LinkDef.h
index 84f903674fd7b46636a4db23ba5c3eb775052c66..8449759b3da61d8fe1ae0f688fdc3767c30ce6ff 100644
--- a/smatrix/inc/LinkDef.h
+++ b/smatrix/inc/LinkDef.h
@@ -22,7 +22,7 @@
 #pragma link C++ class ROOT::Math::SMatrix<double,2,2>+;
 #pragma link C++ class ROOT::Math::SMatrix<double,3,3>+;
 #pragma link C++ class ROOT::Math::SMatrix<double,4,4>+;
-//#pragma link C++ class ROOT::Math::SMatrix<double,5,5>+;
+#pragma link C++ class ROOT::Math::SMatrix<double,5,5>+;
 
 #pragma link C++ class ROOT::Math::SMatrix<double,4,3>+;
 #pragma link C++ class ROOT::Math::SMatrix<double,3,4>+;
@@ -31,7 +31,7 @@
 #pragma link C++ class ROOT::Math::MatRepStd<double,2,2>+;
 #pragma link C++ class ROOT::Math::MatRepStd<double,3,3>+;
 #pragma link C++ class ROOT::Math::MatRepStd<double,4,4>+;
-//#pragma link C++ class ROOT::Math::MatRepStd<double,5,5>+;
+#pragma link C++ class ROOT::Math::MatRepStd<double,5,5>+;
 
 #pragma link C++ class ROOT::Math::MatRepStd<double,4,3>+;
 #pragma link C++ class ROOT::Math::MatRepStd<double,3,4>+;
@@ -47,7 +47,7 @@
 #pragma link C++ class ROOT::Math::MatRepSym<double,2>+;
 #pragma link C++ class ROOT::Math::MatRepSym<double,3>+;
 #pragma link C++ class ROOT::Math::MatRepSym<double,4>+;
-//#pragma link C++ class ROOT::Math::MatRepSym<double,5>+;
+#pragma link C++ class ROOT::Math::MatRepSym<double,5>+;
 
 #pragma link C++ struct ROOT::Math::RowOffsets<2>;
 #pragma link C++ struct ROOT::Math::RowOffsets<3>;
@@ -58,14 +58,7 @@
 #pragma link C++ class ROOT::Math::SMatrix<double,2,2,ROOT::Math::MatRepSym<double,2> >+;
 #pragma link C++ class ROOT::Math::SMatrix<double,3,3,ROOT::Math::MatRepSym<double,3> >+;
 #pragma link C++ class ROOT::Math::SMatrix<double,4,4,ROOT::Math::MatRepSym<double,4> >+;
-//#pragma link C++ class ROOT::Math::SMatrix<double,5,5,ROOT::Math::MatRepSym<double,5> >+;
-
-#pragma link C++ class ROOT::Math::MatRepStd<Double32_t,5,5>+;
-#pragma link C++ class ROOT::Math::SMatrix<Double32_t,5,5>+;
-
-#pragma link C++ class ROOT::Math::MatRepSym<Double32_t,5>+;
-#pragma link C++ class ROOT::Math::SMatrix<Double32_t,5,5,ROOT::Math::MatRepSym<Double32_t,5> >+;
-
+#pragma link C++ class ROOT::Math::SMatrix<double,5,5,ROOT::Math::MatRepSym<double,5> >+;
 // #pragma link C++ class ROOT::Math::SMatrix<double,3,3>+;
 // #pragma link C++ class ROOT::Math::SMatrix<double,4,4>+;
 // #pragma link C++ class ROOT::Math::SMatrix<double,5,5>+;
diff --git a/smatrix/inc/Math/BinaryOperators.h b/smatrix/inc/Math/BinaryOperators.h
index 152be70dc6a5881b2e4fe72186dd573b7c106328..b75a807cd62922ee33e56ff2fd2b2747c294715c 100644
--- a/smatrix/inc/Math/BinaryOperators.h
+++ b/smatrix/inc/Math/BinaryOperators.h
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: BinaryOperators.h,v 1.3 2006/02/28 15:54:33 moneta Exp $
+// @(#)root/smatrix:$Name:  $:$Id: BinaryOperators.h,v 1.4 2006/03/20 17:11:44 moneta Exp $
 // Authors: T. Glebe, L. Moneta    2005  
 
 #ifndef ROOT_Math_BinaryOperators
@@ -42,6 +42,12 @@ public:
 };
 
 
+/**
+   Addition of two vectors v3 = v1+v2
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // operator+ (SVector, binary)
 //==============================================================================
@@ -90,6 +96,12 @@ inline VecExpr<BinaryOp<AddOp<T>, VecExpr<A,T,D>, VecExpr<B,T,D>, T>, T, D>
 }
 
 
+/**
+   Addition of a scalar to a each vector element:  v2(i) = v1(i) + a 
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // operator+ (SVector, binary, Constant)
 //==============================================================================
@@ -101,6 +113,12 @@ inline VecExpr<BinaryOpCopyR<AddOp<T>, SVector<T,D>, Constant<A>, T>, T, D>
   return VecExpr<AddOpBinOp,T,D>(AddOpBinOp(AddOp<T>(),lhs,Constant<A>(rhs)));
 }
 
+/**
+   Addition of a scalar to each vector element v2(i) = a + v1(i)
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // operator+ (SVector, binary, Constant)
 //==============================================================================
@@ -136,6 +154,12 @@ inline VecExpr<BinaryOpCopyL<AddOp<T>, Constant<A>, VecExpr<B,T,D>, T>, T, D>
 }
 
 
+/**
+   Addition of two matrices C = A+B
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // operator+ (SMatrix, binary)
 //==============================================================================
@@ -184,6 +208,12 @@ inline Expr<BinaryOp<AddOp<T>, Expr<A,T,D,D2,R1>, Expr<B,T,D,D2,R2>, T>, T, D, D
 }
 
 
+/**
+   Addition element by element of matrix and a scalar  C(i,j) = A(i,j) + s
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //=============================================================================
 // operator+ (SMatrix, binary, Constant)
 //=============================================================================
@@ -195,6 +225,12 @@ inline Expr<BinaryOpCopyR<AddOp<T>, SMatrix<T,D,D2,R>, Constant<A>, T>, T, D, D2
   return Expr<AddOpBinOp,T,D,D2,R>(AddOpBinOp(AddOp<T>(),lhs,Constant<A>(rhs)));
 }
 
+/**
+   Addition element by element of matrix and a scalar  C(i,j) = s + A(i,j) 
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // operator+ (SMatrix, binary, Constant)
 //==============================================================================
@@ -245,6 +281,12 @@ public:
 };
 
 
+/**
+   Vector Subtraction:  v3 = v1 - v2
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // operator- (SVector, binary)
 //==============================================================================
@@ -293,6 +335,12 @@ inline VecExpr<BinaryOp<MinOp<T>, VecExpr<A,T,D>, VecExpr<B,T,D>, T>, T, D>
 }
 
 
+/**
+   Subtraction of a scalar from each vector element:  v2(i) = v1(i) - a
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // operator- (SVector, binary, Constant)
 //==============================================================================
@@ -304,6 +352,12 @@ inline VecExpr<BinaryOpCopyR<MinOp<T>, SVector<T,D>, Constant<A>, T>, T, D>
   return VecExpr<MinOpBinOp,T,D>(MinOpBinOp(MinOp<T>(),lhs,Constant<A>(rhs)));
 }
 
+/**
+   Subtraction  scalar vector (for each vector element) v2(i) = a - v1(i)
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // operator- (SVector, binary, Constant)
 //==============================================================================
@@ -339,6 +393,12 @@ inline VecExpr<BinaryOpCopyL<MinOp<T>, Constant<A>, VecExpr<B,T,D>, T>, T, D>
 }
 
 
+/**
+   Subtraction of two matrices  C = A-B
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // operator- (SMatrix, binary)
 //==============================================================================
@@ -387,6 +447,12 @@ inline Expr<BinaryOp<MinOp<T>, Expr<A,T,D,D2,R1>, Expr<B,T,D,D2,R2>, T>, T, D, D
 }
 
 
+/**
+   Subtraction of a scalar and a matrix (element wise)  B(i,j)  = A(i,j) - s 
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // operator- (SMatrix, binary, Constant)
 //==============================================================================
@@ -399,6 +465,12 @@ inline Expr<BinaryOpCopyR<MinOp<T>, SMatrix<T,D,D2,R>, Constant<A>, T>, T, D, D2
                                               lhs,Constant<A>(rhs)));
 }
 
+/**
+   Subtraction of a scalar and a matrix (element wise)  B(i,j)  = s - A(i,j) 
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // operator- (SMatrix, binary, Constant)
 //==============================================================================
@@ -445,7 +517,13 @@ public:
   }
 };
 
+/**
+   Element by element vector product v3(i) = v1(i)*v2(i) 
+   returning a vector expression.
+   Note this is NOT the Dot, Cross or Tensor product. 
 
+   @ingroup VectFunction
+*/
 //==============================================================================
 // operator* (SVector, binary)
 //==============================================================================
@@ -542,6 +620,13 @@ inline VecExpr<BinaryOpCopyL<MulOp<T>, Constant<A>, VecExpr<B,T,D>, T>, T, D>
   return VecExpr<MulOpBinOp,T,D>(MulOpBinOp(MulOp<T>(),Constant<A>(lhs),rhs));
 }
 
+/**
+   Element by element matrix multiplication  C(i,j) = A(i,j)*B(i,j) 
+   returning a matrix expression. This is not a matrix-matrix multiplication and works only 
+   for matrices of the same dimensions. 
+
+   @ingroup MatrixFunctions
+*/
 // Times:  Function for element - wise multiplication
 //==============================================================================
 // Times (SMatrix, binary)
@@ -591,6 +676,12 @@ inline Expr<BinaryOp<MulOp<T>, Expr<A,T,D,D2,R1>, Expr<B,T,D,D2,R2>, T>, T, D, D
 }
 
 
+/**
+   Multiplication (element wise) of a matrix and a scalar, B(i,j) = A(i,j) * s
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //=============================================================================
 // operator* (SMatrix, binary, Constant)
 //=============================================================================
@@ -603,6 +694,12 @@ inline Expr<BinaryOpCopyR<MulOp<T>, SMatrix<T,D,D2,R>, Constant<A>, T>, T, D, D2
                                               lhs,Constant<A>(rhs)));
 }
 
+/**
+   Multiplication (element wise) of a matrix and a scalar, B(i,j) = s * A(i,j) 
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //=============================================================================
 // operator* (SMatrix, binary, Constant)
 //=============================================================================
@@ -652,7 +749,12 @@ public:
   }
 };
 
+/**
+   Element by element division of vectors of the same dimension:   v3(i) = v1(i)/v2(i)
+   returning a vector expression
 
+   @ingroup VectFunction
+ */
 //==============================================================================
 // operator/ (SVector, binary)
 //==============================================================================
@@ -700,6 +802,12 @@ inline VecExpr<BinaryOp<DivOp<T>, VecExpr<A,T,D>, VecExpr<B,T,D>, T>, T, D>
 }
 
 
+/**
+   Division of the vector element by a scalar value:  v2(i) = v1(i)/a
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // operator/ (SVector, binary, Constant)
 //==============================================================================
@@ -711,6 +819,12 @@ inline VecExpr<BinaryOpCopyR<DivOp<T>, SVector<T,D>, Constant<A>, T>, T, D>
   return VecExpr<DivOpBinOp,T,D>(DivOpBinOp(DivOp<T>(),lhs,Constant<A>(rhs)));
 }
 
+/**
+   Division of a scalar value by the vector element:  v2(i) = a/v1(i) 
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // operator/ (SVector, binary, Constant)
 //==============================================================================
@@ -746,6 +860,12 @@ inline VecExpr<BinaryOpCopyL<DivOp<T>, Constant<A>, VecExpr<B,T,D>, T>, T, D>
 }
 
 
+/**
+   Division (element wise) of two matrices of the same dimensions:  C(i,j) = A(i,j) / B(i,j)
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // operator/ (SMatrix, binary)
 //==============================================================================
@@ -794,6 +914,12 @@ inline Expr<BinaryOp<DivOp<T>, Expr<A,T,D,D2,R1>, Expr<B,T,D,D2,R2>, T>, T, D, D
 }
 
 
+/**
+   Division (element wise) of a matrix and a scalar, B(i,j) = A(i,j) / s
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //=============================================================================
 // operator/ (SMatrix, binary, Constant)
 //=============================================================================
@@ -806,6 +932,12 @@ inline Expr<BinaryOpCopyR<DivOp<T>, SMatrix<T,D,D2,R>, Constant<A>, T>, T, D, D2
                                               lhs,Constant<A>(rhs)));
 }
 
+/**
+   Division (element wise) of a matrix and a scalar, B(i,j) = s / A(i,j) 
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // operator/ (SMatrix, binary, Constant)
 //==============================================================================
diff --git a/smatrix/inc/Math/Dfact.h b/smatrix/inc/Math/Dfact.h
index 0db02f59195aa8aa12867b7dd147d7bd4a4939df..44483a49367c13b2676a0870f7f91ba59841a4e0 100644
--- a/smatrix/inc/Math/Dfact.h
+++ b/smatrix/inc/Math/Dfact.h
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: Dfact.h,v 1.2 2006/02/08 14:45:35 moneta Exp $
+// @(#)root/smatrix:$Name:  $:$Id: Dfact.h,v 1.3 2006/02/28 15:54:33 moneta Exp $
 // Authors: T. Glebe, L. Moneta    2005  
 
 #ifndef ROOT_Math_Dfact
@@ -37,8 +37,8 @@ namespace ROOT {
 
 
 /** Dfact.
-    Function to compute the determinant from a square matrix ($\det(A)$) of
-    dimension $idim$ and order $n$.
+    Function to compute the determinant from a square matrix (\f$ \det(A)\f$) of
+    dimension idim and order n.
 
     @author T. Glebe
 */
diff --git a/smatrix/inc/Math/Dfactir.h b/smatrix/inc/Math/Dfactir.h
index 7eaf2b654a1aa84807e0f0bbfa6e3379d7ac830a..9c363b987a644f0950fef38ef5282af5130512fb 100644
--- a/smatrix/inc/Math/Dfactir.h
+++ b/smatrix/inc/Math/Dfactir.h
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: Dfactir.h,v 1.1 2005/11/24 16:03:42 brun Exp $
+// @(#)root/smatrix:$Name:  $:$Id: Dfactir.h,v 1.2 2006/02/08 14:45:35 moneta Exp $
 // Authors: T. Glebe, L. Moneta    2005  
 
 #ifndef ROOT_Math_Dfactir
@@ -36,8 +36,8 @@ namespace ROOT {
 
 
 /** Dfactir.
-    Function to compute the determinant from a square matrix ($\det(A)$) of
-    dimension $idim$ and order $n$. A working area $ir$ is returned which is
+    Function to compute the determinant from a square matrix, Det(A) of
+    dimension idim and order n. A working area ir is returned which is
     needed by the Dfinv routine.
 
     @author T. Glebe
diff --git a/smatrix/inc/Math/Dinv.h b/smatrix/inc/Math/Dinv.h
index baf42e99c11217f6c3fa82218e77b53d3cbf0ef9..a2e4eb2cdbee493c7ebcbdf55d88f85bd0c55de1 100644
--- a/smatrix/inc/Math/Dinv.h
+++ b/smatrix/inc/Math/Dinv.h
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: Dinv.h,v 1.4 2006/02/08 14:45:35 moneta Exp $
+// @(#)root/smatrix:$Name:  $:$Id: Dinv.h,v 1.5 2006/05/12 08:12:16 moneta Exp $
 // Authors: T. Glebe, L. Moneta    2005  
 
 #ifndef  ROOT_Math_Dinv
@@ -43,7 +43,7 @@ namespace ROOT {
 
 /** Inverter.
     Class to specialize calls to Dinv. Dinv computes the inverse of a square
-    matrix if dimension $idim$ and order $n$. The content of the matrix will be
+    matrix if dimension idim and order n. The content of the matrix will be
     replaced by its inverse. In case the inversion fails, the matrix content is
     destroyed. Invert specializes Dinv by the matrix order. E.g. if the order
     of the matrix is two, the routine Inverter<2> is called which implements
@@ -164,7 +164,7 @@ public:
     
 
 /** Inverter<1>.
-    $1\times1$ (sub-)matrix. $a_{11} \to 1/a_{11}$
+    1x1 (sub-)matrix. \f$a_{11} \to 1/a_{11}\f$
 
     @author T. Glebe
 */
@@ -188,7 +188,7 @@ public:
 
 
 /** Inverter<2>.
-    $2\times2$ (sub-)matrix. Use Cramers rule.
+    2x2 (sub-)matrix. Use Cramers rule.
 
     @author T. Glebe
 */
@@ -244,7 +244,7 @@ public:
 
 
 /** Inverter<3>.
-    $3\times3$ (sub-)matrix. Use pivotisation.
+    3x3 (sub-)matrix. Use pivotisation.
 
     @author T. Glebe
 */
@@ -266,7 +266,8 @@ public:
 };
 
 /** 
-    Inverter<4> Using Cramers rule.
+    Inverter<4> 
+    4x4 matrix inversion using Cramers rule.
 */
 template <>
 class Inverter<4> {
@@ -281,7 +282,8 @@ public:
 };
 
 /** 
-    Inverter<5> Using Cramers rule.
+    Inverter<5> 
+    5x5 Matrix inversion using Cramers rule.
 */
 template <>
 class Inverter<5> {
@@ -296,7 +298,8 @@ public:
 };
 
 /** 
-    Inverter<6> Using Cramers rule.
+    Inverter<6> 
+    6x6 matrix inversion using Cramers rule.
 */
 template <>
 class Inverter<6> {
diff --git a/smatrix/inc/Math/Functions.h b/smatrix/inc/Math/Functions.h
index a8be3b246d2e290788a67cc0705fd41ebc784780..ac8beb0a3435bf5f70e18df67d8e071796035b7f 100644
--- a/smatrix/inc/Math/Functions.h
+++ b/smatrix/inc/Math/Functions.h
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: Functions.h,v 1.2 2005/12/11 00:24:49 rdm Exp $
+// @(#)root/smatrix:$Name:  $:$Id: Functions.h,v 1.3 2006/02/08 14:45:35 moneta Exp $
 // Authors: T. Glebe, L. Moneta    2005
 
 #ifndef ROOT_Math_Functions
@@ -34,6 +34,19 @@
 #include <cmath>
 #include "Math/Expression.h"
 
+/**
+   @defgroup TempFunction Template Functions 
+
+   These functions apply for any type T, such as a scalar, a vector or a matrix. 
+ */
+/**
+   @defgroup VectFunction Vector Functions
+
+   These functions apply to SVector types (and also to Vector expressions) and can 
+   return a vector expression or 
+   a scalar, like in the Dot product, or a matrix, like in the Tensor product 
+ */
+
 
 namespace ROOT {
 
@@ -44,9 +57,10 @@ namespace ROOT {
 template <class T, unsigned int D> class SVector;
 
 
-/** square.
-    Template to compute $x\cdot x$
+/** square  
+    Template function to compute \f$x\cdot x$, for any type T returning a type T
 
+    @ingroup TempFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -56,8 +70,9 @@ template <class T>
 inline const T Square(const T& x) { return x*x; }
 
 /** maximum.
-    Template to compute $\max(i,j)$
+    Template to find max(a,b) where a,b are of type T
 
+    @ingroup TempFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -69,8 +84,9 @@ inline const T Maximum(const T& lhs, const T& rhs) {
 }
 
 /** minimum.
-    Template to compute $\min(i,j)$
+    Template to find min(a,b) where a,b are of type T
 
+    @ingroup TempFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -82,8 +98,8 @@ inline const T Minimum(const T& lhs, const T& rhs) {
 }
 
 /** round.
-    Template to compute nearest integer value.
-
+    Template to compute nearest integer value for any type T
+    @ingroup TempFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -96,8 +112,9 @@ inline int Round(const T& x) {
 
 
 /** sign.
-    Template to compute the sign of a number $\textrm{sgn}(i)$.
+    Template to compute the sign of a number 
 
+    @ingroup TempFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -130,9 +147,11 @@ struct meta_dot<0> {
 };
 
 
-/** dot.
-    Template to compute $\vec{a}\cdot\vec{b} = \sum_i a_i\cdot b_i$.
+/** 
+    Vector dot product. 
+    Template to compute \f$\vec{a}\cdot\vec{b} = \sum_i a_i\cdot b_i \f$.
 
+    @ingroup VectFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -193,9 +212,11 @@ struct meta_mag<0> {
 };
 
 
-/** mag2.
-    Template to compute $|\vec{v}|^2 = \sum_iv_i^2$.
+/** 
+    Vector magnitude square
+    Template to compute \f$|\vec{v}|^2 = \sum_iv_i^2 \f$.
 
+    @ingroup VectFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -214,9 +235,11 @@ inline T Mag2(const VecExpr<A,T,D>& rhs) {
   return meta_mag<D-1>::f(rhs, T());
 }
 
-/** mag.
-    Length of a vector: $|\vec{v}| = \sqrt{\sum_iv_i^2}$.
+/** 
+    Vector magnitude (Euclidian norm) 
+    Compute : \f$ |\vec{v}| = \sqrt{\sum_iv_i^2} \f$.
 
+    @ingroup VectFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -236,9 +259,10 @@ inline T Mag(const VecExpr<A,T,D>& rhs) {
 }
 
 
-/** Lmag2.
-    Template to compute $|\vec{v}|^2 = v_0^2 - v_1^2 - v_2^2 -v_3^2$.
+/** Lmag2: Square of Minkowski Lorentz-Vector norm (only for 4D Vectors)
+    Template to compute \f$ |\vec{v}|^2 = v_0^2 - v_1^2 - v_2^2 -v_3^2 \f$.
 
+    @ingroup VectFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -258,10 +282,11 @@ inline T Lmag2(const VecExpr<A,T,4>& rhs) {
     - Square(rhs.apply(1)) - Square(rhs.apply(2)) - Square(rhs.apply(3));
 }
 
-/** Lmag.
-    Length of a vector Lorentz-Vector: $|\vec{v}| = \sqrt{v_0^2 -
-    v_1^2 - v_2^2 -v_3^2}$.
+/** Lmag: Minkowski Lorentz-Vector norm (only for 4-dim vectors)
+    Length of a vector Lorentz-Vector: 
+    \f$ |\vec{v}| = \sqrt{v_0^2 - v_1^2 - v_2^2 -v_3^2} \f$.
 
+    @ingroup VectFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -281,9 +306,10 @@ inline T Lmag(const VecExpr<A,T,4>& rhs) {
 }
 
 
-/** cross.
-    Cross product of two 3-dim vectors: $\vec{c} = \vec{a}\times\vec{b}$.
+/** Vector Cross Product (only for 3-dim vectors)
+    \f$ \vec{c} = \vec{a}\times\vec{b} \f$.
 
+    @ingroup VectFunction
     @author T. Glebe
 */
 //==============================================================================
@@ -340,8 +366,9 @@ inline SVector<T,3> Cross(const VecExpr<A,T,3>& lhs, const VecExpr<B,T,3>& rhs)
 
 
 /** Unit.
-    Return a vector of unit lenght: $\vec{e}_v = \vec{v}/|\vec{v}|$.
+    Return a vector of unit lenght: \f$ \vec{e}_v = \vec{v}/|\vec{v}| \f$.
 
+    @ingroup VectFunction
     @author T. Glebe
 */
 //==============================================================================
diff --git a/smatrix/inc/Math/MatrixFunctions.h b/smatrix/inc/Math/MatrixFunctions.h
index 761421eeb08bc2e2b77b52445b87ae18f8b4506e..3d286709114dec5e740b5ccac7b34746963fb18d 100644
--- a/smatrix/inc/Math/MatrixFunctions.h
+++ b/smatrix/inc/Math/MatrixFunctions.h
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: MatrixFunctions.h,v 1.11 2006/05/12 08:12:16 moneta Exp $
+// @(#)root/smatrix:$Name:  $:$Id: MatrixFunctions.h,v 1.12 2006/05/12 14:15:32 moneta Exp $
 // Authors: T. Glebe, L. Moneta    2005  
 
 #ifndef ROOT_Math_MatrixFunctions
@@ -30,6 +30,15 @@
 //
 // ********************************************************************
 
+//doxygen tag
+/**
+   @defgroup MatrixFunctions Matrix Functions
+
+   These function apply to matrices (and also Matrix expression) and can return a 
+   matrix expression of a particular defined type, like in the matrix multiplication or 
+   a vector, like in the matrix-vector product or a scalar like in the Similarity vector-matrix product.
+*/
+
 #include "Math/BinaryOpPolicy.h"
 
 namespace ROOT { 
@@ -99,7 +108,7 @@ public:
   ///
   ~VectorMatrixRowOp() {}
 
-  /// calc $\sum_{j} a_{ij} * v_j$
+  /// calc \f$ \sum_{j} a_{ij} * v_j \f$
   inline typename Matrix::value_type apply(unsigned int i) const {
     return meta_row_dot<D2-1>::f(lhs_, rhs_, i*D2);
   }
@@ -149,7 +158,7 @@ public:
   ///
   ~VectorMatrixColOp() {}
 
-  /// calc $\sum_{j} a_{ij} * v_j$
+  /// calc \f$ \sum_{j} a_{ij} * v_j \f$
   inline typename Matrix::value_type apply(unsigned int i) const {
     return meta_col_dot<D1-1>::f(rhs_, lhs_, i);
   }
@@ -159,6 +168,12 @@ protected:
   const Matrix&    rhs_;
 };
 
+/**
+   Matrix *  Vector multiplication   \f$ a(i) = \sum_{j} M(i,j) * b(j) \f$
+   returning a vector expression 
+
+   @ingroup MatrixFunctions
+ */
 //==============================================================================
 // operator*: SMatrix * SVector
 //==============================================================================
@@ -303,7 +318,7 @@ public:
   ///
   ~MatrixMulOp() {}
 
-  /// calc $\sum_{j} a_{ik} * b_{kj}$
+  /// calc \f$\sum_{j} a_{ik} * b_{kj}\f$
   inline T apply(unsigned int i) const {
     return meta_matrix_dot<D-1>::f(lhs_, rhs_, i);
   }
@@ -323,6 +338,12 @@ protected:
 };
 
 
+/**
+   Matrix *  Matrix multiplication , \f$ C(i,j) = \sum_{k} A(i,k) * B(k,j)\f$ 
+   returning a matrix expression 
+
+   @ingroup MatrixFunctions
+ */
 //==============================================================================
 // operator* (SMatrix * SMatrix, binary)
 //==============================================================================
@@ -464,6 +485,12 @@ protected:
 };
 
 
+/**
+   Matrix Transpose   B(i,j) = A(j,i) 
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+ */
 //==============================================================================
 // transpose
 //==============================================================================
@@ -583,9 +610,12 @@ inline T Product(const VecExpr<A,T,D>& lhs, const Expr<B,T,D,D,R>& rhs) {
 }
 #endif
 
-//---------------------------------------------------------------------------
-//Similarity (for vector equaal to product) 
-//---------------------------------------------------------------------------
+/**
+   Similarity Vector - Matrix Product:  v^T * A * v
+   returning a scalar value of type T   \f$ s = \sum_{i,j} v(i) * A(i,j) * v(j)\f$ 
+
+   @ingroup MatrixFunctions
+ */
 
 //==============================================================================
 // product: SMatrix/SVector calculate v^T * A * v
@@ -652,6 +682,13 @@ inline T Similarity(const VecExpr<A,T,D>& lhs, const Expr<B,T,D,D,R>& rhs) {
 }
 
 
+/**
+   Similarity Matrix Product :  B = U * A * U^T for A symmetric 
+   returning a symmetric matrix expression: 
+   \f$ B(i,j) = \sum_{k,l} U(i,k) * A(k,l) * U(j,l) \f$ 
+
+   @ingroup MatrixFunctions
+ */
 //==============================================================================
 // product: SMatrix/SMatrix calculate M * A * M^T where A is a symmetric matrix
 // return matrix will be nrows M x nrows M
@@ -696,6 +733,12 @@ inline SMatrix<T,D1,D1,MatRepSym<T,D1> > Similarity(const SMatrix<T,D1,D1,MatRep
 #endif
 
 
+/**
+   Transpose Similarity Matrix Product :  B = U^T * A * U for A symmetric
+   returning a symmetric matrix expression: \f$ B(i,j) = \sum_{k,l} U(k,i) * A(k,l) * U(l,j) \f$ 
+
+   @ingroup MatrixFunctions
+ */
 //==============================================================================
 // product: SMatrix/SMatrix calculate M^T * A * M where A is a symmetric matrix
 // return matrix will be ncolsM x ncols M
@@ -777,6 +820,12 @@ protected:
 
 
 
+/**
+   Tensor Vector Product : M(i,j) = v(i) * v(j) 
+   returning a matrix expression 
+
+   @ingroup VectFunction
+ */
 
 #ifndef _WIN32
 
diff --git a/smatrix/inc/Math/MatrixRepresentationsStatic.h b/smatrix/inc/Math/MatrixRepresentationsStatic.h
index acdf79fe4144d3a6c22ae4a04deb2a4009884a0e..e2f4a128b448656502a80de880b0d46c53a8bbdb 100644
--- a/smatrix/inc/Math/MatrixRepresentationsStatic.h
+++ b/smatrix/inc/Math/MatrixRepresentationsStatic.h
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: MatrixRepresentationsStatic.h,v 1.5 2006/03/17 15:11:35 moneta Exp $
+// @(#)root/smatrix:$Name:  $:$Id: MatrixRepresentationsStatic.h,v 1.6 2006/04/25 13:54:01 moneta Exp $
 // Authors: L. Moneta, J. Palacios    2006  
 
 #ifndef ROOT_Math_MatrixRepresentationsStatic_h
@@ -6,22 +6,39 @@
 
 // Include files
 
-/** @class MatrixRepresentationsStatic MatrixRepresentationsStatic.h Math/MatrixRepresentationsStatic.h
- *  
- *
- *  @author Juan Palacios
- *  @date   2006-01-15
- *
- *  Classes MatRepStd and MatRepSym for gneeric and symmetric matrix
- *  data storage and manipulation. Define data storage and access, plus
- *  operators =, +=, -=, ==.
- *
+/** 
+    @defgroup MatRep Matrix Storage Representation 
+ 
+    @author Juan Palacios
+    @date   2006-01-15
+ 
+    Classes MatRepStd and MatRepSym for generic and symmetric matrix
+    data storage and manipulation. Define data storage and access, plus
+    operators =, +=, -=, ==.
+ 
  */
 #include <iostream>
 #include "Math/StaticCheck.h"
 
 namespace ROOT {
   namespace Math {
+    
+    /**
+       Standard Matrix representation for a general D1 x D2 matrix. 
+       This class is itself a template on the contained type T, the number of rows and the number of columns.
+       Its data member is an array T[nrows*ncols] containing the matrix data. 
+       The data are stored in the row-major C convention. 
+       For example, for a matrix, M, of size 3x3, the data \f$ \left[a_0,a_1,a_2,.......,a_7,a_8 \right] \f$d are stored in the following order: 
+         \f[
+         M = \left( \begin{array}{ccc} 
+         a_0 & a_1 & a_2  \\ 
+         a_3 & a_4  & a_5  \\ 
+		 a_6 & a_7  & a_8   \end{array} \right)
+      \f]
+
+       @ingroup MatRep
+     */
+
 
     template <class T, unsigned int D1, unsigned int D2=D1>
     class MatRepStd {
@@ -94,7 +111,10 @@ namespace ROOT {
 // 	return off;
 //       }
 
-
+    /**
+       Static structure to keep the conversion from (i,j) to offsets in the storage data for a 
+       symmetric matrix
+     */
 
     template<unsigned int D>
     struct RowOffsets {
@@ -116,6 +136,23 @@ namespace ROOT {
     };
 
 
+    /**
+       Matrix storage representation for a symmetric matrix of dimension NxN
+       This class is a template on the contained type and on the symmetric matrix size, N. 
+       It has as data member an array of type T of size N*(N+1)/2, 
+       containing the lower diagonal block of the matrix.
+       The order follows the lower diagonal block, still in a row-major convention. 
+       For example for a symmetric 3x3 matrix the order of the 6 elements 
+       \f$ \left[a_0,a_1.....a_5 \right]\f$ is: 
+       \f[
+       M = \left( \begin{array}{ccc} 
+       a_0 & a_1  & a_3  \\ 
+       a_1 & a_2  & a_4  \\
+       a_3 & a_4 & a_5   \end{array} \right)
+       \f]
+
+       @ingroup MatRep 
+    */
     template <class T, unsigned int D>
     class MatRepSym {
 
diff --git a/smatrix/inc/Math/SMatrix.h b/smatrix/inc/Math/SMatrix.h
index bfc5eaf8eb1ba5f62c3002dd3de68a0f96b25c14..f70c29cc6e21036849fdc91bfd3a6392c3e0289c 100644
--- a/smatrix/inc/Math/SMatrix.h
+++ b/smatrix/inc/Math/SMatrix.h
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: SMatrix.h,v 1.20 2006/04/25 13:54:01 moneta Exp $
+// @(#)root/smatrix:$Name:  $:$Id: SMatrix.h,v 1.21 2006/05/12 08:12:16 moneta Exp $
 // Authors: T. Glebe, L. Moneta    2005
 
 #ifndef ROOT_Math_SMatrix
@@ -42,15 +42,22 @@
 #include <iosfwd>
 
 
+//doxygen tag
+/**
+   @defgroup SMatrix Matrix and Vector classes
+
+   <ul>
+    <li>\ref SVectorDoc
+    <li>\ref SMatrixDoc
+   </ul>
+*/
+
+
 // expression engine
 
 #include "Math/Expression.h"
 //#include "Math/MatrixRepresentations.h"
 #include "Math/MatrixRepresentationsStatic.h"
-//doxygen tag
-/**
-   @defgroup SMatrix Matrix and Vector classes
-*/
 
 
 namespace ROOT {
@@ -64,9 +71,10 @@ namespace ROOT {
  
 
 /** 
-    SMatrix: a generic fixed size n x m Matrix class.
+    SMatrix: a generic fixed size D1 x D2 Matrix class.
     The class is template on the scalar type and on the matrix sizes: 
     D1 = number of rows and D2 = number of columns.
+    See \ref SMatrixDoc.
     
     @ingroup SMatrix
     @memo SMatrix
@@ -111,7 +119,7 @@ public:
   */ 
   SMatrix(const SMatrix<T,D1,D2,R>& rhs);
   /**
-     construct from a matrix with different representation
+     construct from a matrix with different representation.
      Works only from symmetric to general and not viceversa. 
    */ 
   template <class R2>
@@ -128,33 +136,36 @@ public:
 
   // new constructs using STL iterator interface
   /**
-   * Constructor with STL iterator interface. The data will be copied into the matrix
-   * \param triang if true only the triangular lower/upper part of the matrix is filled from the iterators 
-   * \param lower if true the lower triangular part is filled 
-   * 
-   * Size of the matrix must match size of the iterators if triang is false, otherwise the size of the 
-   * triangular block 
-   * In the case of symmetric matrices triang is considered always to be true (what-ever the user specifies) and 
-   * the size of the iterators must be equal to the size of the symmetric representation (number of independent 
-   * elements), N*(N+1)/2 
-   * 
-   * 
-   */
+     Constructor with STL iterator interface. The data will be copied into the matrix
+     \param begin start iterator position
+     \param end end iterator position
+     \param triang if true only the triangular lower/upper part of the matrix is filled from the iterators 
+     \param lower if true the lower triangular part is filled 
+     
+     Size of the matrix must match size of the iterators if triang is false, otherwise the size of the 
+     triangular block 
+     In the case of symmetric matrices triang is considered always to be true (what-ever the user specifies) and 
+     the size of the iterators must be equal to the size of the symmetric representation (number of independent 
+     elements), N*(N+1)/2 
+     
+  */
   template<class InputIterator>
   SMatrix(InputIterator begin, InputIterator end, bool triang = false, bool lower = true);
 
   /**
-   * Constructor with STL iterator interface. The data will be copied into the matrix
-   * \param triang if true only the triangular lower/upper part of the matrix is filled from the iterators 
-   * \param lower if true the lower triangular part is filled 
-   * 
-   * Size of the matrix must match size of the iterators if triang is false, otherwise the size of the 
-   * triangular block 
-   * In the case of symmetric matrices triang is considered always to be true (what-ever the user specifies) and 
-   * the size of the iterators must be equal to the size of the symmetric representation (number of independent 
-   * elements), N*(N+1)/2 
-   * 
-   */
+    Constructor with STL iterator interface. The data will be copied into the matrix
+    \param begin  start iterator position
+    \param size   iterator size 
+    \param triang if true only the triangular lower/upper part of the matrix is filled from the iterators 
+    \param lower if true the lower triangular part is filled 
+    
+    Size of the matrix must match size of the iterators if triang is false, otherwise the size of the 
+    triangular block 
+    In the case of symmetric matrices triang is considered always to be true (what-ever the user specifies) and 
+    the size of the iterators must be equal to the size of the symmetric representation (number of independent 
+    elements), N*(N+1)/2 
+    
+  */
   template<class InputIterator>
   SMatrix(InputIterator begin, unsigned int size, bool triang = false, bool lower = true);
 
@@ -239,8 +250,8 @@ public:
       \f[
        M = \left( \begin{array}{ccc} 
        a_0 & a_1 & a_3  \\ 
-       a1 & a_2  & a_4  \\
-       a3 & a_4 & a_5   \end{array} \right)
+       a_1 & a_2  & a_4  \\
+       a_3 & a_4 & a_5   \end{array} \right)
        \f]
   */
 
diff --git a/smatrix/inc/Math/SMatrix.icc b/smatrix/inc/Math/SMatrix.icc
index 7efd8041916a35a3f3a861322388c5822fd06cb2..142ebddbb89444caf56fdcdee97461fb9cf1a570 100644
--- a/smatrix/inc/Math/SMatrix.icc
+++ b/smatrix/inc/Math/SMatrix.icc
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: SMatrix.icc,v 1.20 2006/04/25 13:54:01 moneta Exp $
+// @(#)root/smatrix:$Name:  $:$Id: SMatrix.icc,v 1.21 2006/05/12 08:12:16 moneta Exp $
 // Authors: T. Glebe, L. Moneta    2005  
 
 #ifndef ROOT_Math_SMatrix_icc
@@ -46,6 +46,10 @@
 #include "Math/StaticCheck.h"
 
 
+
+
+
+
 namespace ROOT { 
 
   namespace Math { 
diff --git a/smatrix/inc/Math/SVector.h b/smatrix/inc/Math/SVector.h
index 22239f94654a82d2e3f1176f2098f10287ae78f6..1f4cd82f7dc8b71a1fb5b6475596a5e8f6d38010 100644
--- a/smatrix/inc/Math/SVector.h
+++ b/smatrix/inc/Math/SVector.h
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: SVector.h,v 1.8 2006/04/20 13:13:21 moneta Exp $
+// @(#)root/smatrix:$Name:  $:$Id: SVector.h,v 1.9 2006/05/12 08:12:16 moneta Exp $
 // Authors: T. Glebe, L. Moneta    2005  
 
 #ifndef ROOT_Math_SVector
@@ -57,7 +57,7 @@ namespace ROOT {
 /** 
     SVector: a generic fixed size Vector class.
     The class is template on the scalar type and on the vector size D. 
-
+    See \ref SVectorDoc
 
 
     @ingroup SMatrix
diff --git a/smatrix/inc/Math/UnaryOperators.h b/smatrix/inc/Math/UnaryOperators.h
index 222c1313f2a9d435087750c474839104af76fbbf..2421b5aaa2cf3f7b55ef8b9e1707e8baea7994b5 100644
--- a/smatrix/inc/Math/UnaryOperators.h
+++ b/smatrix/inc/Math/UnaryOperators.h
@@ -1,4 +1,4 @@
-// @(#)root/smatrix:$Name:  $:$Id: UnaryOperators.h,v 1.1 2005/11/24 16:03:42 brun Exp $
+// @(#)root/smatrix:$Name:  $:$Id: UnaryOperators.h,v 1.2 2006/02/08 14:45:35 moneta Exp $
 // Authors: T. Glebe, L. Moneta    2005  
 
 #ifndef  ROOT_Math_UnaryOperators
@@ -53,6 +53,12 @@ inline VecExpr<UnaryOp<Minus<T>, VecExpr<A,T,D>, T>, T, D>
 }
 
 
+/**
+   Unary - operator   v2 = -v1 .
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // operator- (SVector, unary)
 //==============================================================================
@@ -76,6 +82,12 @@ inline Expr<UnaryOp<Minus<T>, Expr<A,T,D,D2,R>, T>, T, D, D2,R>
 }
 
 
+/**
+   Unary - operator   B  = - A
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // operator- (SMatrix, unary)
 //==============================================================================
@@ -111,6 +123,12 @@ inline VecExpr<UnaryOp<Fabs<T>, VecExpr<A,T,D>, T>, T, D>
 }
 
 
+/**
+   abs of a vector : v2(i) = | v1(i) | 
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // fabs (SVector, unary)
 //==============================================================================
@@ -134,6 +152,12 @@ inline Expr<UnaryOp<Fabs<T>, Expr<A,T,D,D2,R>, T>, T, D, D2, R>
 }
 
 
+/**
+   abs of a matrix  m2(i,j) = | m1(i,j) | 
+   returning a matrix epression
+
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // fabs (SMatrix, unary)
 //==============================================================================
@@ -169,6 +193,12 @@ inline VecExpr<UnaryOp<Sqr<T>, VecExpr<A,T,D>, T>, T, D>
 }
 
 
+/**
+   square of a vector   v2(i) = v1(i)*v1(i) .  
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // sqr (SVector, unary)
 //==============================================================================
@@ -192,6 +222,12 @@ inline Expr<UnaryOp<Sqr<T>, Expr<A,T,D,D2,R>, T>, T, D, D2, R>
 }
 
 
+/**
+   square of a matrix B(i,j)  = A(i,j)*A(i,j)
+   returning a matrix expression
+
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // sqr (SMatrix, unary)
 //==============================================================================
@@ -227,6 +263,12 @@ inline VecExpr<UnaryOp<Sqrt<T>, VecExpr<A,T,D>, T>, T, D>
 }
 
 
+/**
+   square root of a vector (element by element) v2(i) = sqrt( v1(i) )  
+   returning a vector expression
+
+   @ingroup VectFunction
+*/
 //==============================================================================
 // sqrt (SVector, unary)
 //==============================================================================
@@ -249,7 +291,12 @@ inline Expr<UnaryOp<Sqrt<T>, Expr<A,T,D,D2,R>, T>, T, D, D2, R>
   return Expr<SqrtUnaryOp,T,D,D2,R>(SqrtUnaryOp(Sqrt<T>(),rhs));
 }
 
+/**
+   square root of a matrix (element by element) m2(i,j) = sqrt ( m1(i,j) )
+   returning a matrix expression
 
+   @ingroup MatrixFunctions
+*/
 //==============================================================================
 // sqrt (SMatrix, unary)
 //==============================================================================