# class TLorentzRotation: public TObject

```The Physics Vector package
-*                    ==========================
-* The Physics Vector package consists of five classes:
-*   - TVector2
-*   - TVector3
-*   - TRotation
-*   - TLorentzVector
-*   - TLorentzRotation
-* It is a combination of CLHEPs Vector package written by
-* Leif Lonnblad, Andreas Nilsson and Evgueni Tcherniaev
-* and a ROOT package written by Pasha Murat.
-* for CLHEP see:  http://wwwinfo.cern.ch/asd/lhc++/clhep/
*

```

## TLorentzRotation

The TLorentzRotation class describes Lorentz transformations including Lorentz boosts and rotations (see TRotation)

| xx  xy  xz  xt |
|                |
| yx  yy  yz  yt |
lambda = |                |
| zx  zy  zz  zt |
|                |
| tx  ty  tz  tt |

### Declaration

By default it is initialized to the identity matrix, but it may also be intialized by an other TLorentzRotation,
by a pure TRotation or by a boost:

TLorentzRotation l;      // l is initialized as identity
TLorentzRotation m(l);   // m = l
TRotation r;
TLorentzRotation lr(r);
TLorentzRotation lb1(bx,by,bz);
TVector3 b;
TLorentzRotation lb2(b);

The Matrix for a Lorentz boosts is:

| 1+gamma'*bx*bx  gamma'*bx*by   gamma'*bx*bz  gamma*bx |
|  gamma'*by*bx  1+gamma'*by*by  gamma'*by*bz  gamma*by |
|  gamma'*bz*bx   gamma'*bz*by  1+gamma'*bz*bz gamma*bz |
|    gamma*bx       gamma*by       gamma*bz     gamma   |

with the boost vector b=(bx,by,bz) and gamma=1/Sqrt(1-beta*beta) and gamma'=(gamma-1)/beta*beta.

Access to the matrix components is possible through the member functions XX(), XY() .. TT(),
through the operator (int,int):

Double_t xx;
TLorentzRotation l;
xx = l.XX();    // gets the xx component
xx = l(0,0);    // gets the xx component

if (l==m) {...}  // test for equality
if (l !=m) {...} // test for inequality
if (l.IsIdentity()) {...} // test for identity

### Transformations of a LorentzRotation

##### Compound transformations
There are four possibilities to find the product of two TLorentzRotation transformations:

TLorentzRotation a,b,c;
c = b*a;                       // product
c = a.MatrixMultiplication(b);  // a is unchanged
a *= b;                        // Attention: a=a*b
c = a.Transform(b)             // a=b*a then c=a

##### Lorentz boosts
Double_t bx, by, bz;
TVector3 v(bx,by,bz);
TLorentzRotation l;
l.Boost(v);
l.Boost(bx,by,bz);

##### Rotations
TVector3 axis;
l.RotateX(TMath::Pi());   //  rotation around x-axis
l.Rotate(.5,axis);               //  rotation around specified vector
##### Inverse transformation
The matrix for the inverse transformation of a TLorentzRotation is as follows:
| xx  yx  zx -tx |
|                |
| xy  yy  zy -ty |
|                |
| xz  yz  zz -tz |
|                |
|-xt -yt -zt  tt |
To return the inverse transformation keeping the current unchanged use the memberfunction Inverse().
Invert() inverts the current TLorentzRotation:

l1 = l2.Inverse();  // l1 is inverse of l2, l2 unchanged
l1 = l2.Invert();   // invert l2, then  l1=l2

### Transformation of a TLorentzVector

To apply TLorentzRotation to TLorentzVector you can use either the VectorMultiplication() member function or the * operator. You can also use the Transform() function and the *= operator of the TLorentzVector class.:

TLorentzVector v;
...
v=l.VectorMultiplication(v);
v = l * v;

v.Transform(l);
v *= l;  // Attention v = l*v

```
```

## Function Members (Methods)

public:
 TLorentzRotation() TLorentzRotation(const TRotation&) TLorentzRotation(const TLorentzRotation&) TLorentzRotation(const TVector3&) TLorentzRotation(Double_t, Double_t, Double_t) ~TLorentzRotation() void TObject::AbstractMethod(const char* method) const virtual void TObject::AppendPad(Option_t* option = "") TLorentzRotation& Boost(const TVector3& b) TLorentzRotation& Boost(Double_t bx, Double_t by, Double_t bz) virtual void TObject::Browse(TBrowser* b) static TClass* Class() virtual const char* TObject::ClassName() const virtual void TObject::Clear(Option_t* = "") virtual TObject* TObject::Clone(const char* newname = "") const virtual Int_t TObject::Compare(const TObject* obj) const virtual void TObject::Copy(TObject& object) const virtual void TObject::Delete(Option_t* option = "")MENU virtual Int_t TObject::DistancetoPrimitive(Int_t px, Int_t py) virtual void TObject::Draw(Option_t* option = "") virtual void TObject::DrawClass() constMENU virtual TObject* TObject::DrawClone(Option_t* option = "") constMENU virtual void TObject::Dump() constMENU virtual void TObject::Error(const char* method, const char* msgfmt) const virtual void TObject::Execute(const char* method, const char* params, Int_t* error = 0) virtual void TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) virtual void TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) virtual void TObject::Fatal(const char* method, const char* msgfmt) const virtual TObject* TObject::FindObject(const char* name) const virtual TObject* TObject::FindObject(const TObject* obj) const virtual Option_t* TObject::GetDrawOption() const static Long_t TObject::GetDtorOnly() virtual const char* TObject::GetIconName() const virtual const char* TObject::GetName() const virtual char* TObject::GetObjectInfo(Int_t px, Int_t py) const static Bool_t TObject::GetObjectStat() virtual Option_t* TObject::GetOption() const virtual const char* TObject::GetTitle() const virtual UInt_t TObject::GetUniqueID() const virtual Bool_t TObject::HandleTimer(TTimer* timer) virtual ULong_t TObject::Hash() const virtual void TObject::Info(const char* method, const char* msgfmt) const virtual Bool_t TObject::InheritsFrom(const char* classname) const virtual Bool_t TObject::InheritsFrom(const TClass* cl) const virtual void TObject::Inspect() constMENU TLorentzRotation Inverse() const TLorentzRotation& Invert() void TObject::InvertBit(UInt_t f) virtual TClass* IsA() const virtual Bool_t TObject::IsEqual(const TObject* obj) const virtual Bool_t TObject::IsFolder() const Bool_t IsIdentity() const Bool_t TObject::IsOnHeap() const virtual Bool_t TObject::IsSortable() const Bool_t TObject::IsZombie() const virtual void TObject::ls(Option_t* option = "") const TLorentzRotation MatrixMultiplication(const TLorentzRotation&) const void TObject::MayNotUse(const char* method) const virtual Bool_t TObject::Notify() void TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const static void TObject::operator delete(void* ptr) static void TObject::operator delete(void* ptr, void* vp) static void TObject::operator delete[](void* ptr) static void TObject::operator delete[](void* ptr, void* vp) void* TObject::operator new(size_t sz) void* TObject::operator new(size_t sz, void* vp) void* TObject::operator new[](size_t sz) void* TObject::operator new[](size_t sz, void* vp) Bool_t operator!=(const TLorentzRotation& r) const Double_t operator()(int, int) const TLorentzVector operator*(const TLorentzVector& p) const TLorentzRotation operator*(const TLorentzRotation& m) const TLorentzRotation& operator*=(const TLorentzRotation& m) TLorentzRotation& operator=(const TLorentzRotation& r) TLorentzRotation& operator=(const TRotation& r) Bool_t operator==(const TLorentzRotation& r) const TLorentzRotation::TLorentzRotationRow operator[](int i) const virtual void TObject::Paint(Option_t* option = "") virtual void TObject::Pop() virtual void TObject::Print(Option_t* option = "") const virtual Int_t TObject::Read(const char* name) virtual void TObject::RecursiveRemove(TObject* obj) void TObject::ResetBit(UInt_t f) TLorentzRotation& Rotate(Double_t angle, const TVector3& axis) TLorentzRotation& Rotate(Double_t angle, const TVector3* axis) TLorentzRotation& RotateX(Double_t angle) TLorentzRotation& RotateY(Double_t angle) TLorentzRotation& RotateZ(Double_t angle) virtual void TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU virtual void TObject::SavePrimitive(ostream& out, Option_t* option = "") void TObject::SetBit(UInt_t f) void TObject::SetBit(UInt_t f, Bool_t set) virtual void TObject::SetDrawOption(Option_t* option = "")MENU static void TObject::SetDtorOnly(void* obj) static void TObject::SetObjectStat(Bool_t stat) virtual void TObject::SetUniqueID(UInt_t uid) virtual void ShowMembers(TMemberInspector& insp) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void TObject::SysError(const char* method, const char* msgfmt) const Bool_t TObject::TestBit(UInt_t f) const Int_t TObject::TestBits(UInt_t f) const TLorentzRotation& Transform(const TLorentzRotation& m) TLorentzRotation& Transform(const TRotation& m) Double_t TT() const Double_t TX() const Double_t TY() const Double_t TZ() const virtual void TObject::UseCurrentStyle() TLorentzVector VectorMultiplication(const TLorentzVector& p) const virtual void TObject::Warning(const char* method, const char* msgfmt) const virtual Int_t TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) virtual Int_t TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const Double_t XT() const Double_t XX() const Double_t XY() const Double_t XZ() const Double_t YT() const Double_t YX() const Double_t YY() const Double_t YZ() const Double_t ZT() const Double_t ZX() const Double_t ZY() const Double_t ZZ() const
protected:
 TLorentzRotation(Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t, Double_t) virtual void TObject::DoError(int level, const char* location, const char* fmt, va_list va) const void TObject::MakeZombie() void SetBoost(Double_t, Double_t, Double_t)

## Data Members

public:
 enum TObject::EStatusBits { kCanDelete kMustCleanup kObjInCanvas kIsReferenced kHasUUID kCannotPick kNoContextMenu kInvalidObject }; enum TObject::[unnamed] { kIsOnHeap kNotDeleted kZombie kBitMask kSingleKey kOverwrite kWriteDelete };
protected:
 Double_t ftt Double_t ftx Double_t fty Double_t ftz Double_t fxt Double_t fxx Double_t fxy Double_t fxz Double_t fyt Double_t fyx Double_t fyy Double_t fyz Double_t fzt Double_t fzx Double_t fzy Double_t fzz

## Function documentation

`{}`
TLorentzRotation(const TRotation& )
`{}`
TLorentzRotation(const TLorentzRotation& )
`{}`

`{}`

```constructor
```
TLorentzRotation(const TVector3& )
```copy constructor
```
void SetBoost(Double_t , Double_t , Double_t )
```boost this Lorentz vector
```
TLorentzRotation MatrixMultiplication(const TLorentzRotation& ) const
```multiply this vector by a matrix
```
Double_t XX() const
`{ return fxx; }`
Double_t XY() const
`{ return fxy; }`
Double_t XZ() const
`{ return fxz; }`
Double_t XT() const
`{ return fxt; }`
Double_t YX() const
`{ return fyx; }`
Double_t YY() const
`{ return fyy; }`
Double_t YZ() const
`{ return fyz; }`
Double_t YT() const
`{ return fyt; }`
Double_t ZX() const
`{ return fzx; }`
Double_t ZY() const
`{ return fzy; }`
Double_t ZZ() const
`{ return fzz; }`
Double_t ZT() const
`{ return fzt; }`
Double_t TX() const
`{ return ftx; }`
Double_t TY() const
`{ return fty; }`
Double_t TZ() const
`{ return ftz; }`
Double_t TT() const
`{ return ftt; }`
Bool_t IsIdentity() const
TLorentzVector VectorMultiplication(const TLorentzVector& p) const
TLorentzRotation & Transform(const TLorentzRotation& m)
TLorentzRotation & Transform(const TRotation& m)
TLorentzRotation Inverse() const

TLorentzRotation & Boost(const TVector3& b)
TLorentzRotation & RotateX(Double_t angle)
TLorentzRotation & RotateY(Double_t angle)
TLorentzRotation & RotateZ(Double_t angle)
TLorentzRotation & Rotate(Double_t angle, const TVector3& axis)
TLorentzRotation & Rotate(Double_t angle, const TVector3* axis)
return fRR-> operator()(fII,jj)