Re: [ROOT] TLorentzVector trouble

From: Sven A. Schmidt (sven.schmidt@koch-schmidt.de)
Date: Wed Feb 21 2001 - 10:07:00 MET

```Hi Matthieu,

this is how I'm boosting LorentzVectors:

{

#include <TLorentzVector.h>

gROOT->Reset();

Double_t E = 3.2;
Double_t m = 0.94;

// target rest frame
TLorentzVector   b( 0, 0, E, E );
TLorentzVector   p( 0, 0, 0, m );

TLorentzVector cms = b + p;

// boost cms to its rest frame
cms.Boost( -cms.BoostVector() );

cout << cms.Px() << " " << cms.Py() << " " << cms.Pz() << " " << cms.E() << endl;

// gives:
// 0 0 -3.53016e-16 2.62671

}

On Wednesday, February 21, 2001, at 05:53 AM, Matthieu Guillo wrote:

> Hi Rooters,
>
> I am trying to use the TLorentzVector class along with the
> TLorentzRotation. I have some trouble understanding how it works, and the
> manual is not clear about it.
>
> 1) I want to perform a simple Lorentz Boost. I tried the following code:
>
>   float fEnergy = 3.2;
>   const float c_fProtonMass = 0.93827;
>
>   TLorentzVector v4Beam(0., 0., fEnergy, fEnergy);
>   TLorentzVector v4Target(0., 0., 0, c_fProtonMass);
>
>   // Boost to the CM
>
>   TLorentzRotation lzTransform;
>   lzTransform.Boost(-(v4Beam + v4Target).Beta());
>
>   v4Target.Transform(lzTransform);
>   v4Beam.Transform(lzTransform);
>
>   cout << (v4Target+v4Beam).X() << " " << (v4Target+v4Beam).Y() << " " <<
> (v4Target+v4Beam).Z() << endl;
>
> The components are not 0! What am I doing wrong?
>
> 2) I would like to perform rotations of a 4-vector using the standard
> Euler angles. The rotation can be written as R(alpha, beta, gamma). Until
> now I was using the painful way:
>
>   TLorentzVector v4Proton(fX, fY, fZ, fT);  // whatever components
>
>   TLorentzRotation lzRot1, lzRot2, lzRot3, lzTransform;
>   lzRot1.RotateZ(fGamma);
>   lzRot2.RotateY(fBeta);
>   lzRot3.RotateZ(fAlpha);
>   lzTransform = lzRot3 * lzRot2 * lzRot1;
>
>   v4Proton.Transform(lzTransform);
>
>
> Is this the correct way to do it? Isn't there a better method rather
> than involving 3 rotations (I couldn't guess from the class definition).
>
>
>
> Cheers
>
> Matthieu Guillo
> University of South Carolina
> Thomas Jefferson National Laboratory
> Office 71 trailer 16
> Phone: 757-269-5551
>
>
```

This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:37 MET