]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliBoost.h
Addition of CPV library as a separate detector from PHOS
[u/mrichter/AliRoot.git] / RALICE / AliBoost.h
1 #ifndef ALIBOOST_H
2 #define ALIBOOST_H
3 ///////////////////////////////////////////////////////////////////////////
4 // Class AliBoost
5 // Perform various Lorentz transformations.
6 //
7 // Example :
8 // =========
9 //
10 // Float_t a[3]={0.1,0.2,0.3};
11 // Ali3Vector beta;
12 // beta.SetVector(a,"car");
13 //
14 // AliBoost b1;
15 // b1.SetBeta(beta);
16 // cout << " Boost b1 :" << endl;
17 // b1.Info();
18 //
19 // Float_t b[4]={14,1,2,3};
20 // Ali4Vector p;
21 // p.SetVector(b,"car");
22 // Ali4Vector pprim=b1.Boost(p);
23 // cout << " Boost b1 result p,pprim :" << endl;
24 // p.Info();
25 // pprim.Info();
26 //
27 // p=b1.Inverse(pprim);
28 // cout << " Inverse b1 result pprim,p :" << endl;
29 // pprim.Info();
30 // p.Info();
31 //
32 // Float_t c[4]={5,0,0,4};
33 // Ali4Vector q;
34 // q.SetVector(c,"car");
35 //
36 // AliBoost b2;
37 // b2.Set4Momentum(q);
38 // cout << " Lorbo b2 : " << endl;
39 // b2.Info("sph");
40 //
41 //--- NvE 14-may-1996 UU-SAP Utrecht
42 //--- Modified : NvE 01-apr-1999 UU-SAP Utrecht using Ali3Vector/Ali4Vector
43 ///////////////////////////////////////////////////////////////////////////
44  
45 #include <iostream.h>
46 #include <math.h>
47  
48 #include "TObject.h"
49
50 #include "Ali4Vector.h" 
51
52 class AliBoost : public TObject
53 {
54  public:
55   AliBoost();                             // Default constructor
56   ~AliBoost();                            // Default destructor
57   void SetBeta(Ali3Vector b);             // Set boost parameters by beta 3-vector
58   void SetGamma(Double_t g,Ali3Vector v); // Set boost parameters by gamma and direction 3-vector
59   void Set4Momentum(Ali4Vector& p);       // Set boost parameters by 4-momentum
60   Ali3Vector GetBetaVector();             // Provide the beta 3-vector
61   Double_t GetBeta();                     // Provide norm of beta 3-vector
62   Double_t GetGamma();                    // Provide gamma value
63   void Info(TString f="car");             // Print boost parameter info in coord. frame f
64   Ali4Vector Boost(Ali4Vector& v);        // Perform Lorentz boost on 4-vector v
65   Ali4Vector Inverse(Ali4Vector& v);      // Perform inverse Lorentz boost on 4-vector v
66  
67  protected:
68   Ali3Vector fBeta; // The beta 3-vector
69   Double_t fBeta2;  // beta**2
70   Double_t fGamma;  // The gamma factor
71  
72  ClassDef(AliBoost,1) // Class definition to enable ROOT I/O
73 };
74 #endif