]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliTrack.h
Correction for rotation matrix 209
[u/mrichter/AliRoot.git] / RALICE / AliTrack.h
1 #ifndef ALITRACK_H
2 #define ALITRACK_H
3 ///////////////////////////////////////////////////////////////////////////
4 // Class AliTrack
5 // Handling of the attributes of a reconstructed particle track.
6 //
7 // Coding example :
8 // ----------------
9 //
10 // Float_t a[4]={195.,1.2,-0.04,8.5};
11 // Ali4Vector pmu;
12 // pmu.SetVector(a,"car");
13 // AliTrack t1;
14 // t1.Set4Momentum(pmu);
15 //
16 // Float_t b[3]={1.2,-0.04,8.5};
17 // Ali3Vector p;
18 // p.SetVector(b,"car");
19 // AliTrack t2;
20 // t2.Set3Momentum(p);
21 // t2.SetCharge(0);
22 // t2.SetMass(1.115);
23 //
24 // t1.Info();
25 // t2.Info();
26 //
27 // Float_t pi=acos(-1.);
28 // Float_t thcms=0.2*pi; // decay theta angle in cms
29 // Float_t phicms=pi/4.; // decay theta angle in cms
30 // Float_t m1=0.938;
31 // Float_t m2=0.140;
32 // t2.Decay(m1,m2,thcms,phicms); // Track t2 decay : Lambda -> proton + pion
33 //
34 // t2.List();
35 //
36 // Int_t ndec=t2.GetNdecay();
37 // AliTrack* d1=t2.GetDecayTrack(1); // Access to decay track number 1
38 // AliTrack* d2=t2.GetDecayTrack(2); // Access to decay track number 2
39 //
40 // Note : All quantities are in GeV, GeV/c or GeV/c**2
41 //
42 //--- NvE 10-jul-1997 UU-SAP Utrecht
43 //--- Modified : NvE 06-apr-1999 UU-SAP Utrecht to inherit from Ali4Vector
44 ///////////////////////////////////////////////////////////////////////////
45  
46 #include "TObject.h"
47 #include "TObjArray.h"
48  
49 #include "AliBoost.h"
50  
51 class AliTrack : public TObject,public Ali4Vector
52 {
53  public:
54   AliTrack();                       // Default constructor
55   ~AliTrack();                      // Destructor
56   void Reset();                     // Reset all values to 0
57   void Set4Momentum(Ali4Vector& p); // Set track 4-momentum
58   void Set3Momentum(Ali3Vector& p); // Set track 3-momentum
59   void SetMass(Double_t m);         // Set particle mass
60   void SetCharge(Float_t q);        // Set particle charge
61   void Info(TString f="car");       // Print track information for coord. frame f
62   void List(TString f="car");       // Print track and decay level 1 information for coord. frame f
63   void ListAll(TString f="car");    // Print track and all decay level information for coord. frame f
64   Ali3Vector Get3Momentum();        // Provide track 3-momentum
65   Double_t GetMomentum();           // Provide value of track 3-momentum
66   Double_t GetMass();               // Provide particle mass
67   Float_t GetCharge();              // Provide particle charge
68   Double_t GetEnergy();             // Provide particle total energy
69   void Decay(Double_t m1,Double_t m2,Double_t thcms,Double_t phicms); // Perform 2-body decay
70   Int_t GetNdecay();                // Provide number of decay products
71   AliTrack* GetDecayTrack(Int_t j); // Access to decay produced track number j
72  
73  protected:
74   Double_t fM;        // The mass of the particle
75   Float_t fQ;         // The charge of the particle
76   Int_t fNdec;        // The number of decay products
77   TObjArray* fDecays; // The array of decay produced tracks for output
78
79  private:
80   void Dump(AliTrack* t,Int_t n,TString f); // Recursively print all decay levels
81  
82  ClassDef(AliTrack,1) // Class definition to enable ROOT I/O
83 };
84 #endif