Re: new ROOT LorentzVector class

From: Nick van Eijndhoven (Nick@phys.uu.nl)
Date: Thu Jul 08 1999 - 10:12:17 MEST


Pasha Murat wrote:
> 
> Hi Rooters,
>         I finally got to looking at the updated TLorentzVector class and I have
> a few quick comments:
> 
> - it would be very nice to have a TVector3::Pt() and TLorentzVector::Pt()
>   methods - the name `Perp()' is not good enough for particle physics...
>   Pt() was available in the previous version, why was it abandoned?
> 
> - it would also be very nice if calculation of particle Pt would not require
>   construction of a new 3-vector which `Perp' method does right now:
> 
> inline Double_t TLorentzVector::Perp2() const   { return TVector3(X(),Y(),Z()).Perp2(); }
> 
> - the same holds for all the rotations, for example in the present
>   implementation RotateUz looks as follows:
> 
> inline void TLorentzVector::RotateUz(TVector3 &v) {
>   TVector3 p( Vect() );
>   p.RotateUz(v);
>   SetVect( p );
> }
> 
>   so one needs to call a constructor for `p', then to rotate new vector,
>   then to do backward assignment from `p' to `this' and finally to
>   destruct `p'...
> 
> - it looks like all these complications arize from the single design choice
>   where LorentzVector doesn't know anything about its 3-vector. May be we
>   need to discuss pro's and contra's of this design. It seems to me that
>   having TLorentzVector inheriting from TVector3 simplifies many methods
>   and improves their efficiency with respect to the current implementation.
> 
>                         What do you think ? - Best, Pasha
> 

Hi Pasha,
This is exactly the reason why I introduced for the ALICE software a class Ali4Vector.
This thing is inheriting from Ali3Vector and that works very well.
Furthermore, there is no need for Pt() or Perp() or whatever memberfunctions.
Just GetVector() and GetScalar() will do much better to obtain the 3-vector and scalar part
resp. The way I implemented it the user can also specify the frame (cartesian, spherical,....)
he/she wants to obtain 3-vector components in. This makes things completely general without
the need to specify how components had been stored in the first place.
In addition it enables to store data always in the most accurate way, which might become
crucial as I experienced by tesing it on analysis of WA98 and AMANDA data (i.e. very low
and very high particle energies resp.).
Boosting between frames is performed via AliBoost.
The code can be found in the RALICE directory of the AliRoot framework.
Please use the official channel (via Federico Carminati) to get hold of AliRoot in case
you want to have a look.
P.S. I have not yet implemented rotations (since there was no urgent need for it so far),
but this is trivial to do within the existing structure.       
-- 

                                              Cheers,
                                               Nick.

*----------------------------------------------------------------------*
 Dr. Nick van Eijndhoven                Department of Subatomic Physics
 email : nick@phys.uu.nl                Utrecht University / NIKHEF
 tel. +31-30-2532331 (direct)           P.O. Box 80.000
 tel. +31-30-2531492 (secr.)            NL-3508 TA Utrecht
 fax. +31-30-2518689                    The Netherlands
 WWW : http://www.phys.uu.nl/~nick      Office : Ornstein lab. 172
 ----------------------------------------------------------------------
 tel. +41-22-7679751 (direct)           CERN PPE Division / ALICE exp.
 tel. +41-22-7675857 (secr.)            CH-1211 Geneva 23
 fax. +41-22-7679480                    Switzerland
 CERN beep : 13+7294                    Office : B 160 1-012
*----------------------------------------------------------------------*



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:35 MET