]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliTrack.h
- AliPhysicsSelection: protected writing of fHistBunchCrossing and fHistTriggerPattern
[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 class TObjArray;
11  
12 class AliPosition;
13 class AliPositionObj;
14 class AliSignal;
15 class AliTimestamp;
16 #include "Ali4Vector.h"
17  
18 class AliTrack : public TNamed,public Ali4Vector
19 {
20  public:
21   AliTrack();                             // Default constructor
22   virtual ~AliTrack();                    // Destructor
23   AliTrack(const AliTrack& t);            // Copy constructor
24   virtual TObject* Clone(const char* name="") const; // 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 hyp. with highest prob.
30   void SetCharge(Float_t q);              // Set particle charge
31   virtual void Data(TString f="car",TString u="rad"); // Print track information for frame f and ang units u
32   virtual void List(TString f="car",TString u="rad"); // Track and decay level 1 info for frame f and ang units u
33   virtual void ListAll(TString f="car",TString u="rad");// Track and all decay level info for frame f and ang units u
34   Ali3Vector Get3Momentum(Float_t scale=-1) const; // Provide track 3-momentum
35   Double_t GetMomentum(Float_t scale=-1); // Provide value of track 3-momentum
36   Double_t GetMass(Float_t scale=-1);     // Provide particle mass
37   Float_t GetCharge() const;              // Provide particle charge
38   Double_t GetEnergy(Float_t scale=-1);   // 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() const;                // Provide number of decay products
41   AliTrack* GetDecayTrack(Int_t j) const; // Access to decay produced track number j
42   void RemoveDecays();                    // Remove all the decay products of this track
43   void AddSignal(AliSignal& s,Int_t mode=0);    // Relate an AliSignal to this track
44   void RemoveSignal(AliSignal& s,Int_t mode=1); // Remove related AliSignal from this track
45   void RemoveSignals(Int_t mode=1);             // Remove all related AliSignals from this track
46   Int_t GetNsignals() const;              // Provide number of related AliSignals
47   Int_t GetNsignals(const char* classname) const; // Provide the number of selected signals
48   AliSignal* GetSignal(Int_t j) const;    // Access to the related AliSignal number j
49   void SetBeginPoint(AliPosition& p);     // Set the track begin-point
50   AliPosition* GetBeginPoint() const;           // Provide the track begin-point
51   void SetEndPoint(AliPosition& p);       // Set the track end-point
52   AliPosition* GetEndPoint() const;             // Provide the track end-point
53   void SetReferencePoint(AliPosition& p); // Set the track reference-point for the 3-momentum vector
54   AliPosition* GetReferencePoint() const;       // Provide the track reference-point for the 3-momentum vector
55   void AddTrackHypothesis(AliTrack& t);   // Add track hypothesis
56   void AddTrackHypothesis(Double_t prob,Double_t m,Double_t dm=0); // Add track hypothesis with mass data
57   Int_t GetNhypotheses() const;           // Provide number of track hypotheses
58   AliTrack* GetTrackHypothesis(Int_t j=0) const; // Provide the j-th track hypothesis 
59   void RemoveTrackHypothesis(AliTrack& t);// Remove the specified track hypothesis 
60   void RemoveTrackHypotheses();           // Remove all track hypotheses 
61   Double_t GetPt(Float_t scale=-1);       // Provide trans. momentum w.r.t. z-axis
62   Double_t GetPl(Float_t scale=-1);       // Provide long. momentum w.r.t. z-axis
63   Double_t GetEt(Float_t scale=-1);       // Provide trans. energy w.r.t. z-axis
64   Double_t GetEl(Float_t scale=-1);       // Provide long. energy w.r.t. z-axis
65   Double_t GetMt(Float_t scale=-1);       // Provide trans. mass w.r.t. z-axis
66   Double_t GetRapidity();                 // Provide rapidity value w.r.t. z-axis
67   void SetImpactPoint(AliPosition& p,TString q); // Set the impact-point in plane "q=0"
68   AliPosition* GetImpactPoint(TString q) const;        // Provide the impact-point in plane "q=0"
69   void SetId(Int_t id);                   // Set the user defined unique track identifier
70   Int_t GetId() const;                    // Provide the user defined unique track identifier
71   void SetClosestPoint(AliPosition& p);   // Set position p as point of closest approach w.r.t. some reference
72   AliPosition* GetClosestPoint() const;         // Provide point of closest approach w.r.t. some reference
73   void SetParticleCode(Int_t code);       // Set the user defined particle id code (e.g. the PDF convention)
74   Int_t GetParticleCode() const;          // Provide the user defined particle id code
75   void SetParentTrack(AliTrack * const t);       // Set pointer to the parent track
76   AliTrack* GetParentTrack() const;             // Provide pointer to the parent track
77   void SetProb(Double_t prob);            // Set the hypothesis probability for this track
78   Float_t GetProb() const;                // Provide the hypothesis probability for this track
79   void SetFitDetails(const TObject* obj);       // Enter the object containing the fit details
80   void SetFitDetails(const TObject& obj) { SetFitDetails(&obj); }
81   TObject* GetFitDetails() const;               // Provide pointer to the object containing the fit details
82   void SetTimestamp(AliTimestamp& t);     // Set the track timestamp
83   AliTimestamp* GetTimestamp() const;           // Provide the track timestamp
84   void RemoveTimestamp();                 // Remove timestamp from this track
85   Double_t GetDistance(AliPosition* const p,Float_t scale=-1);   // Provide distance to position p
86   Double_t GetDistance(AliPosition& p,Float_t scale=-1) { return GetDistance(&p,scale); }
87   Double_t GetDistance(AliTrack* const t,Float_t scale=-1);      // Provide distance to track t
88   Double_t GetDistance(AliTrack& t,Float_t scale=-1) { return GetDistance(&t,scale); }
89   void SetEscale(Float_t scale);          // Set the scale of the energy-momentum units of the track
90   Float_t GetEscale() const;              // Provide the scale of the energy-momentum units of the track
91  
92  protected:
93   void Init();               // Initialisation of pointers etc...
94   Float_t fQ;                // The charge of the particle
95   TObjArray* fDecays;        // The array of decay produced tracks
96   TObjArray* fSignals;       // The array of related AliSignals
97   TObjArray* fHypotheses;    // The array of track hypotheses
98   AliPositionObj* fBegin;    // The begin-point of the track 
99   AliPositionObj* fEnd;      // The end-point of the track 
100   AliPositionObj* fRef;      // The reference-point of the track for the 3-momentum vector
101   AliPositionObj* fImpactXY; // The (extrapolated) impact-point in the plane z=0
102   AliPositionObj* fImpactXZ; // The (extrapolated) impact-point in the plane y=0
103   AliPositionObj* fImpactYZ; // The (extrapolated) impact-point in the plane x=0
104   Int_t fUserId;             // The user defined identifier
105   AliPositionObj* fClosest;  // The (extrapolated) point of closest approach w.r.t some reference
106   Int_t fCode;               // The user defined particle id code
107   AliTrack* fParent;         // Pointer to the parent track
108   Float_t fProb;             // Probability for this track as a hypothesis
109   TObject* fFit;             // Object containing details of the fit
110   AliTimestamp* fTstamp;     // The track timestamp
111   Float_t fEscale;           // The scale of the energy-momentum units of the track
112
113  private:
114
115   AliTrack& operator=(const AliTrack &); // Not implemented
116
117   void Dumps(const AliTrack* t,Int_t n,TString f,TString u); // Recursively print all decay levels
118  
119  ClassDef(AliTrack,21) // Handling of the attributes of a reconstructed particle track.
120 };
121 #endif