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