salut Matthieu, 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? I don't know about TLorentzRotation Class, but it looks to me what you want to do is: TLorentzVector v4Beam(0., 0., fEnergy, fEnergy); TLorentzVector v4Target(0., 0., 0, c_fProtonMass); TLorentzVector v4In = v4Beam+v4Target; // incoming 4-V v4Beam.Boost(-v4In.BoostVector()); // boost to system CM v4target.Boost(-v4In.BoostVector()); // boost to system CM (BTW check in CLAS packages clasroot/clasana/TClasAnaUtils.cc for exemples of using TLorentzVectors..) don't know about you second question.. Eric
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:37 MET