# Re: Proposal for new Physics Vector classes in ROOT * additional info *

From: Nick van Eijndhoven <Nick_at_phys.uu.nl>
Date: Tue, 7 Jun 2005 12:54:02 +0200

Hi Lorenzo,
Note that AliPosition also has the possibility to yield a correct distance if e.g. the units of one position are e.g. in cm and the other are e.g. in meters.
This is basically what I meant with my remark concerning the possibility to mix units (i.e. metric units). The returned distance (and error on it) is always given in the metric units of the original object for which the Distance() function was invoked.
Example :

AliPosition p1; // filled with mm as units AliPosition p2; // filled with km as units

Double_t dist=p2.GetDistance(p1); // distance in km

Cheers,
Nick.

• Original Message ----- From: "Lorenzo Moneta" <Lorenzo.Moneta_at_cern.ch> To: "Nick van Eijndhoven" <Nick_at_phys.uu.nl> Cc: <roottalk_at_cern.ch>; "Andras Zsenei" <Andras.Zsenei_at_cern.ch>; "Mf Mf" <mf_at_fnal.gov>; "Walter E Brown" <wb_at_fnal.gov> Sent: Tuesday, June 07, 2005 11:16 AM Subject: Re: [ROOT] Proposal for new Physics Vector classes in ROOT

> Dear Nick,
>
> I had looked before to these AliROOT classes and the functionality
> that Ali3Vector and AliPosition provide in terms of reference frame
> is present in the new classes.
> In the new Vector classes it is possible as well to get functions (as
> distance) between two points even if the units are different like in
> AliPosition. For example you can do:
>
> XYZPoint p1;
> Polar3DPoint p2;
>
> XYZVector v = p1 - p2;
> double distance = v1.r();
>
>
>
> I have not put so far the functionality of built-in error
> propagation because it adds complexity to the class itself.
> It would increase the size of the Vector classes and in addition it
> would also penalize the performance of vector operations (like
> additions). And this probably it is probably not acceptable for some
> users which do not need this functionality.
>
> If this is considered to be useful, I think it could eventually be
> VectorWithErrors) which would use the current Vectors.
>
> Cheers
>
> Lorenzo
>
> On 7 Jun 2005, at 09:38, Nick van Eijndhoven wrote:
>
> > Dear Lorenzo,
> > Maybe you could have a look at the AliRoot package as well at the
> > Alice CERN CVS repository.
> > In AliRoot/RALICE there exist already for quite some time the
> > classes Ali3Vector, Ali4Vector and AliPosition which basically
> > have the same functionality and also a built-in error access/
> > propagation procedure in case one performs operations with these
> > objects.
> > Maybe it would be nice to introduce in your classes (which will be
> > part of the standard ROOT 5 as far as I understand) also this error
> > handling facility.
> > Another item is that AliPosition allows to provide distances between
> > 2 locations even if the units used for the 2 locations are different.
> > This allows using data of different datasets/experiments.
> >
> > Cheers,
> > Nick.
> >
> > ----- Original Message -----
> > From: "Lorenzo Moneta" <Lorenzo.Moneta_at_cern.ch>
> > To: <roottalk_at_cern.ch>
> > Cc: "Andras Zsenei" <Andras.Zsenei_at_cern.ch>; "Mf Mf" <mf_at_fnal.gov>;
> > "Walter E Brown" <wb_at_fnal.gov>
> > Sent: Monday, June 06, 2005 10:51 AM
> > Subject: [ROOT] 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
> >>
> >> http://seal.web.cern.ch/seal/MathLibs/GenVector/0-1-0/html/
> >> 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)
> >>
> >>
> >
> >
>
Received on Tue Jun 07 2005 - 12:54:09 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:09 MET