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