[ROOT] TLorentzVector trouble

From: Matthieu Guillo (guillo@jlab.org)
Date: Wed Feb 21 2001 - 05:53:06 MET


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).


Thanks for your help.

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