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