# Proposal for new Physics Vector classes in ROOT

Dear ROOT users,

This is a proposal describing new Physics Vector classes for 3D
(geometrical Points and Vectors) and 4D (LorentzVectors) with their
operations and transformations (rotations).

The proposal is available, together with a prototype describing the
API for the classes at

seal.web.cern.ch/seal/MathLibs/G … index.html

These new classes will be part of the new mathcore package
(part of libCore) and also available as a standalone library (libMathCore).

The main characteristics as explained in the linked Web page are:

-possibility to have Vector based on various coordinate systems
such as Cartesian, Polar and Cylindrical
-distinction between position vectors (Points) and displacement vectors
-possibility to have classes based on arbitrary scalar type (they
are templated on the scalar value type)

An easy connection to Linear Algebra Vector and Matrices classes is
also provided.

The plan is to release a first version in the new ROOT version 5 at the
end of the month.
The current Physics classes, TVector3, TLorentzVector, … will be kept,
and eventually they will be reimplemented using the new Vector classes
(but still being back compatible).

It is also planned to add to libMathCore other classes such as

-Random number generators
-Numerical algorithms such as adaptive integration, differentiation, root finders

• Some basics mathematical functions

In addition we will provide a libMathMore library with a more complete set of functions and algorithms
based on the GNU GSL library.

Any comments, or feedback or criticism is highly welcomed,

Best Regards

Lorenzo Moneta (on behalf of the ROOT Math Library Team)

The 3x3 matrix approach is very inefficient. It’s useful to apply a transformation to a vector. But not to compute several product of transformations. You say that “A 3D transformation is composed of a rotation and a translation”. And the homothecy/scaling? Also for my, a points P is a vector V and this associated frame T. The frame T is a generic transformation. So a point is a vector V0 = T * V in the universal frame. About rotation, the natural way to represent it is the quaternion.

It would be nice to have in a scientific framework like Root a better mathematics approach for this vector package.

Hi,

thank you for your suggestion for quaternion. It is in did more efficient when applying multiple rotations to use quaternion that going through the multiplication of 3x3 matrices. However, when applying a single generic rotation to many different vectors is then more efficient to use 3x3 matrix.
In the current design, as we have already rotations based on 3x3 matrices or Euler Angles, we could then add one more type based on the quaternion.

For the transformation, I am refering for what is currently the code describing (the 3D Transformation class) and not what is mathematically a 3D transformations. Thanks for reporting this, I will correct the doc to be more clear and precise on these points,

Best Regards
Lorenzo