TLorentzVector

From: Peter Malzacher (malzache@fnal.gov)
Date: Tue Nov 02 1999 - 21:34:18 MET


Hi Martin, hi Pasha,

> inline void TLorentzVector::SetPPhiThetaM(Double_t p,
>                                           Double_t phi,
>                                           Double_t theta,
>                                           Double_t m)
> {
>   // initialize vector with spherical coordinates
>   SetX(p * TMath::Cos(phi) * TMath::Sin(theta));
>   SetY(p * TMath::Sin(phi) * TMath::Sin(theta));
>   SetZ(p * TMath::Cos(theta));
>   fE = TMath::Sqrt(p*p + m*m);
> }

I can implement setter functions in spherical coordinates,
but I prefer to name it SetRhoPhiTheta.

> I'd like to raise once again the issue of the relationship between 
> TLorentzVector and TVector3. I'm coming back to it every time I realize
> that I can't do something as efficient and convenient as I'd like to.

As announced some months ago we will cleanup the current implementation
of TLorentzVecter when the corresponding classes of ZOOM and CLHEP will
be merged. We will try to stay as close to their implementation as 
possible. 
The problem with inheriting from TVector3 occurs when one
uses methods which meke sense between 3-Vectors or between 4-Vectors
but not between 3 and 4 Vectors. What would you expect to get as result
of the scalar product between a 3-vector and a 4-vector ...
Therefore I think it is better to be explicit and get the 3-Vector
component
of a 4-Vector when you need it. Ok its slightly more inconvenient to
type, 
but if one gets a const reference to an internal 3-Vector its as
efficient as
inheritance.

Peter



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