]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliTrack.h
5276b5bc3a176599dbb6454b60fdf39db69bab5d
[u/mrichter/AliRoot.git] / RALICE / AliTrack.h
1 #ifndef ALITRACK_H
2 #define ALITRACK_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9
10 #include "TObject.h"
11 #include "TObjArray.h"
12 #include "TArrayD.h"
13  
14 #include "AliSignal.h"
15 #include "AliBoost.h"
16 #include "AliPositionObj.h"
17  
18 class AliTrack : public TNamed,public Ali4Vector
19 {
20  public:
21   AliTrack();                           // Default constructor
22   virtual ~AliTrack();                  // Destructor
23   AliTrack(AliTrack& t);                // Copy constructor
24   virtual TObject* Clone(char* name="");// Make a deep copy and provide its pointer
25   virtual void Reset();                 // Reset all values to 0
26   void Set4Momentum(Ali4Vector& p);     // Set track 4-momentum
27   void Set3Momentum(Ali3Vector& p);     // Set track 3-momentum
28   void SetMass(Double_t m,Double_t dm=0); // Set particle mass and error
29   void SetMass();                       // Set mass and error to the values of the hypothesis with highest prob.
30   void SetCharge(Float_t q);            // Set particle charge
31   virtual void Data(TString f="car");   // Print track information for coord. frame f
32   virtual void List(TString f="car");   // Print track and decay level 1 information for coord. frame f
33   virtual void ListAll(TString f="car");// Print track and all decay level information for coord. frame f
34   Ali3Vector Get3Momentum();            // Provide track 3-momentum
35   Double_t GetMomentum();               // Provide value of track 3-momentum
36   Double_t GetMass();                   // Provide particle mass
37   Float_t GetCharge();                  // Provide particle charge
38   Double_t GetEnergy();                 // Provide particle total energy
39   void Decay(Double_t m1,Double_t m2,Double_t thcms,Double_t phicms); // Perform 2-body decay
40   Int_t GetNdecay();                    // Provide number of decay products
41   AliTrack* GetDecayTrack(Int_t j);     // Access to decay produced track number j
42   void RemoveDecays();                  // Remove all the decay products of this track
43   void AddSignal(AliSignal& s);         // Relate an AliSignal to this track
44   void RemoveSignal(AliSignal& s);      // Remove related AliSignal from this track
45   void RemoveSignals();                 // Remove all related AliSignals from this track
46   Int_t GetNsignals();                  // Provide number of related AliSignals
47   AliSignal* GetSignal(Int_t j);        // Access to the related AliSignal number j
48   void SetBeginPoint(AliPosition& p);   // Set the track begin-point
49   AliPosition* GetBeginPoint();         // Provide the track begin-point
50   void SetEndPoint(AliPosition& p);     // Set the track end-point
51   AliPosition* GetEndPoint();           // Provide the track end-point
52   void AddTrackHypothesis(AliTrack& t); // Add track hypothesis
53   void AddTrackHypothesis(Double_t prob,Double_t m,Double_t dm=0); // Add track hypothesis with mass data
54   Int_t GetNhypotheses();               // Provide number of track hypotheses
55   AliTrack* GetTrackHypothesis(Int_t j=0);  // Provide the j-th track hypothesis 
56   void RemoveTrackHypothesis(AliTrack& t);  // Remove the specified track hypothesis 
57   void RemoveTrackHypotheses();         // Remove all track hypotheses 
58   Double_t GetPt();                     // Provide trans. momentum w.r.t. z-axis
59   Double_t GetPl();                     // Provide long. momentum w.r.t. z-axis
60   Double_t GetEt();                     // Provide trans. energy w.r.t. z-axis
61   Double_t GetEl();                     // Provide long. energy w.r.t. z-axis
62   Double_t GetMt();                     // Provide trans. mass w.r.t. z-axis
63   Double_t GetRapidity();               // Provide rapidity value w.r.t. z-axis
64   void SetImpactPoint(AliPosition& p,TString q); // Set the impact-point in plane "q=0"
65   AliPosition* GetImpactPoint(TString q);        // Provide the impact-point in plane "q=0"
66   void SetId(Int_t id);                 // Set the user defined unique track identifier
67   Int_t GetId();                        // Provide the user defined unique track identifier
68   void SetClosestPoint(AliPosition& p); // Set position p as point of closest approach w.r.t. some reference
69   AliPosition* GetClosestPoint();       // Provide point of closest approach w.r.t. some reference
70   void SetChi2(Float_t chi2);           // Set the chi-squared value of the track fit
71   void SetNdf(Int_t ndf);               // Set the number of degrees of freedom for the track fit
72   Float_t GetChi2();                    // Provide the chi-squared value of the track fit
73   Int_t GetNdf();                       // Provide the number of degrees of freedom for the track fit
74   void SetParticleCode(Int_t code);     // Set the user defined particle id code (e.g. the PDF convention)
75   Int_t GetParticleCode();              // Provide the user defined particle id code
76   void SetParentTrack(AliTrack* t);     // Set pointer to the parent track
77   AliTrack* GetParentTrack();           // Provide pointer to the parent track
78   void SetProb(Double_t prob);          // Set the hypothesis probability for this track
79   Float_t GetProb();                    // Provide the hypothesis probability for this track
80
81  
82  protected:
83   void Init();               // Initialisation of pointers etc...
84   Float_t fQ;                // The charge of the particle
85   TObjArray* fDecays;        // The array of decay produced tracks
86   TObjArray* fSignals;       // The array of related AliSignals
87   TObjArray* fHypotheses;    // The array of track hypotheses
88   AliPositionObj* fBegin;    // The begin-point of the track 
89   AliPositionObj* fEnd;      // The end-point of the track 
90   AliPositionObj* fImpactXY; // The (extrapolated) impact-point in the plane z=0
91   AliPositionObj* fImpactXZ; // The (extrapolated) impact-point in the plane y=0
92   AliPositionObj* fImpactYZ; // The (extrapolated) impact-point in the plane x=0
93   Int_t fUserId;             // The user defined identifier
94   AliPositionObj* fClosest;  // The (extrapolated) point of closest approach w.r.t some reference
95   Float_t fChi2;             // The Chi-squared of the track fit
96   Int_t fNdf;                // The number of degrees of freedom of the track fit
97   Int_t fCode;               // The user defined particle id code
98   AliTrack* fParent;         // Pointer to the parent track
99   Float_t fProb;             // Probability for this track as a hypothesis
100
101  private:
102   void Dumps(AliTrack* t,Int_t n,TString f); // Recursively print all decay levels
103  
104  ClassDef(AliTrack,8) // Handling of the attributes of a reconstructed particle track.
105 };
106 #endif