1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////
20 // Handling of the attributes of a reconstructed particle track.
25 // Float_t a[4]={195.,1.2,-0.04,8.5};
27 // pmu.SetVector(a,"car");
29 // t1.Set4Momentum(pmu);
31 // Float_t b[3]={1.2,-0.04,8.5};
33 // p.SetVector(b,"car");
35 // t2.Set3Momentum(p);
42 // Float_t pi=acos(-1.);
43 // Float_t thcms=0.2*pi; // decay theta angle in cms
44 // Float_t phicms=pi/4.; // decay theta angle in cms
47 // t2.Decay(m1,m2,thcms,phicms); // Track t2 decay : Lambda -> proton + pion
51 // Int_t ndec=t2.GetNdecay();
52 // AliTrack* d1=t2.GetDecayTrack(1); // Access to decay track number 1
53 // AliTrack* d2=t2.GetDecayTrack(2); // Access to decay track number 2
55 // AliSignal s1,s2,s3,s4;
57 // .... // Code (e.g. detector readout) to fill AliSignal data
59 // AliTrack trec; // Track which will be reconstructed from signals
60 // trec.AddSignal(s1);
61 // trec.AddSignal(s3);
62 // trec.AddSignal(s4);
67 // ... // Code which accesses signals from trec and reconstructs
68 // 3-momentum P, charge Q, mass M etc...
70 // trec.Set3Momentum(P);
74 // Float_t r1[3]={1.6,-3.8,25.7};
75 // Float_t er1[3]={0.2,0.5,1.8};
76 // Float_t r2[3]={8.6,23.8,-6.7};
77 // Float_t er2[3]={0.93,1.78,0.8};
78 // AliPosition begin,end;
79 // begin.SetPosition(r1,"car");
80 // begin.SetPositionErrors(er1,"car");
81 // end.SetPosition(r2,"car");
82 // end.SetPositionErrors(er2,"car");
83 // trec.SetBeginPoint(begin);
84 // trec.SetEndPoint(end);
86 // Note : All quantities are in GeV, GeV/c or GeV/c**2
88 //--- Author: Nick van Eijndhoven 10-jul-1997 UU-SAP Utrecht
89 //- Modified: NvE $Date$ UU-SAP Utrecht
90 ///////////////////////////////////////////////////////////////////////////
93 #include "Riostream.h"
95 ClassImp(AliTrack) // Class implementation to enable ROOT I/O
97 AliTrack::AliTrack() : TNamed(),Ali4Vector()
99 // Default constructor
100 // All variables initialised to 0
104 ///////////////////////////////////////////////////////////////////////////
105 void AliTrack::Init()
107 // Initialisation of pointers etc...
119 ///////////////////////////////////////////////////////////////////////////
120 AliTrack::~AliTrack()
122 // Destructor to delete memory allocated for decay tracks array.
123 // This destructor automatically cleares the pointer of this AliTrack
124 // from all the link slots of the related AliSignal objects.
126 Int_t nsig=GetNsignals();
127 for (Int_t i=1; i<=nsig; i++)
129 AliSignal* s=GetSignal(i);
130 if (s) s->ResetLink(this);
180 ///////////////////////////////////////////////////////////////////////////
181 AliTrack::AliTrack(AliTrack& t) : TNamed(t),Ali4Vector(t)
188 if (t.fBegin) fBegin=new AliPositionObj(*(t.fBegin));
189 if (t.fEnd) fEnd=new AliPositionObj(*(t.fEnd));
190 if (t.fImpactXY) fImpactXY=new AliPositionObj(*(t.fImpactXY));
191 if (t.fImpactXZ) fImpactXZ=new AliPositionObj(*(t.fImpactXZ));
192 if (t.fImpactYZ) fImpactYZ=new AliPositionObj(*(t.fImpactYZ));
193 if (t.fClosest) fClosest=new AliPositionObj(*(t.fClosest));
200 Int_t ndec=t.GetNdecay();
203 fDecays=new TObjArray(ndec);
205 for (Int_t it=1; it<=ndec; it++)
207 AliTrack* tx=t.GetDecayTrack(it);
208 fDecays->Add(new AliTrack(*tx));
212 Int_t nsig=t.GetNsignals();
215 fSignals=new TObjArray(nsig);
216 for (Int_t is=1; is<=nsig; is++)
218 AliSignal* sx=t.GetSignal(is);
223 Int_t nhyp=t.GetNhypotheses();
226 fHypotheses=new TObjArray(nhyp);
227 fHypotheses->SetOwner();
228 for (Int_t ih=1; ih<=nhyp; ih++)
230 AliTrack* tx=t.GetTrackHypothesis(ih);
231 fHypotheses->Add(new AliTrack(*tx));
235 ///////////////////////////////////////////////////////////////////////////
236 void AliTrack::Reset()
238 // Reset all variables to 0 and delete all auto-generated decay tracks.
245 Double_t a[4]={0,0,0,0};
295 ///////////////////////////////////////////////////////////////////////////
296 void AliTrack::Set3Momentum(Ali3Vector& p)
298 // Set the track parameters according to the 3-momentum p
301 ///////////////////////////////////////////////////////////////////////////
302 void AliTrack::Set4Momentum(Ali4Vector& p)
304 // Set the track parameters according to the 4-momentum p
305 Double_t E=p.GetScalar();
306 Double_t dE=p.GetResultError();
307 Ali3Vector pv=p.Get3Vector();
311 ///////////////////////////////////////////////////////////////////////////
312 void AliTrack::SetMass(Double_t m,Double_t dm)
314 // Set the particle mass
315 // The default value for the error dm is 0.
316 Double_t inv=pow(m,2);
317 Double_t dinv=fabs(2.*m*dm);
318 SetInvariant(inv,dinv);
320 ///////////////////////////////////////////////////////////////////////////
321 void AliTrack::SetCharge(Float_t q)
323 // Set the particle charge
326 ///////////////////////////////////////////////////////////////////////////
327 void AliTrack::Data(TString f)
329 // Provide track information within the coordinate frame f
330 Double_t m=GetMass();
331 Double_t dm=GetResultError();
332 const char* name=GetName();
333 const char* title=GetTitle();
335 cout << " *" << ClassName() << "::Data*";
336 if (strlen(name)) cout << " Name : " << GetName();
337 if (strlen(title)) cout << " Title : " << GetTitle();
339 cout << " Id : " << fUserId << " Code : " << fCode
340 << " m : " << m << " dm : " << dm << " Charge : " << fQ
341 << " p : " << GetMomentum() << endl;
342 cout << " Nhypotheses : " << GetNhypotheses() << " Ndecay-tracks : " << GetNdecay()
343 << " Nsignals : " << GetNsignals() << endl;
346 ///////////////////////////////////////////////////////////////////////////
347 void AliTrack::List(TString f)
349 // Provide current track and decay level 1 information within coordinate frame f
351 Data(f); // Information of the current track
353 // Decay products of this track
355 for (Int_t id=1; id<=GetNdecay(); id++)
357 td=GetDecayTrack(id);
360 cout << " ---Level 1 sec. track no. " << id << endl;
365 cout << " *AliTrack::List* Error : Empty decay track slot." << endl;
369 ///////////////////////////////////////////////////////////////////////////
370 void AliTrack::ListAll(TString f)
372 // Provide complete track and decay information within the coordinate frame f
374 Data(f); // Information of the current track
375 if (fBegin) { cout << " Begin-point :"; fBegin->Data(f); }
376 if (fEnd) { cout << " End-point :"; fEnd->Data(f); }
378 Int_t nhyp=GetNhypotheses();
381 cout << " List of the " << nhyp << " track hypotheses : " << endl;
382 for (Int_t ih=1; ih<=nhyp; ih++)
384 AliTrack* tx=GetTrackHypothesis(ih);
389 Int_t nsig=GetNsignals();
392 cout << " List of the " << nsig << " related signals : " << endl;
393 for (Int_t is=1; is<=nsig; is++)
395 AliSignal* sx=GetSignal(is);
401 Dumps(t,1,f); // Information of all decay products
403 //////////////////////////////////////////////////////////////////////////
404 void AliTrack::Dumps(AliTrack* t,Int_t n,TString f)
406 // Recursively provide the info of all decay levels of this track
408 for (Int_t id=1; id<=t->GetNdecay(); id++)
410 td=t->GetDecayTrack(id);
413 cout << " ---Level " << n << " sec. track no. " << id << endl;
416 Int_t nhyp=td->GetNhypotheses();
419 cout << " List of the " << nhyp << " track hypotheses : " << endl;
420 for (Int_t ih=1; ih<=nhyp; ih++)
422 AliTrack* tx=td->GetTrackHypothesis(ih);
427 Int_t nsig=td->GetNsignals();
430 cout << " List of the " << nsig << " related signals : " << endl;
431 for (Int_t is=1; is<=nsig; is++)
433 AliSignal* sx=td->GetSignal(is);
438 // Go for next decay level of this decay track recursively
443 cout << " *AliTrack::Dumps* Error : Empty decay track slot." << endl;
447 //////////////////////////////////////////////////////////////////////////
448 Double_t AliTrack::GetMomentum()
450 // Provide the value of the track 3-momentum.
451 // The error can be obtained by invoking GetResultError() after
452 // invokation of GetMomentum().
453 Double_t norm=fV.GetNorm();
454 fDresult=fV.GetResultError();
457 ///////////////////////////////////////////////////////////////////////////
458 Ali3Vector AliTrack::Get3Momentum()
460 // Provide the track 3-momentum
461 return (Ali3Vector)Get3Vector();
463 ///////////////////////////////////////////////////////////////////////////
464 Double_t AliTrack::GetMass()
466 // Provide the particle mass.
467 // The error can be obtained by invoking GetResultError() after
468 // invokation of GetMass().
469 Double_t inv=GetInvariant();
470 Double_t dinv=GetResultError();
474 Double_t m=sqrt(inv);
475 if (m) dm=dinv/(2.*m);
481 cout << "*AliTrack::GetMass* Unphysical situation m**2 = " << inv << endl;
482 cout << " Value 0 will be returned." << endl;
487 ///////////////////////////////////////////////////////////////////////////
488 Float_t AliTrack::GetCharge()
490 // Provide the particle charge
493 ///////////////////////////////////////////////////////////////////////////
494 Double_t AliTrack::GetEnergy()
496 // Provide the particle's energy.
497 // The error can be obtained by invoking GetResultError() after
498 // invokation of GetEnergy().
499 Double_t E=GetScalar();
506 cout << "*AliTrack::GetEnergy* Unphysical situation E = " << E << endl;
507 cout << " Value 0 will be returned." << endl;
511 ///////////////////////////////////////////////////////////////////////////
512 void AliTrack::Decay(Double_t m1,Double_t m2,Double_t thcms,Double_t phicms)
514 // Perform 2-body decay of current track
515 // m1 : mass of decay product 1
516 // m2 : mass of decay product 2
517 // thcms : cms theta decay angle (in rad.) of m1
518 // phicms : cms phi decay angle (in rad.) of m1
520 Double_t M=GetMass();
522 // Compute the 4-momenta of the decay products in the cms
523 // Note : p2=p1=pnorm for a 2-body decay
525 if (M) e1=((M*M)+(m1*m1)-(m2*m2))/(2.*M);
527 if (M) e2=((M*M)+(m2*m2)-(m1*m1))/(2.*M);
528 Double_t pnorm=(e1*e1)-(m1*m1);
543 p.SetVector(a,"sph");
546 pprim1.SetVector(e1,p);
547 pprim1.SetInvariant(m1*m1);
551 pprim2.SetVector(e2,p);
552 pprim2.SetInvariant(m2*m2);
554 // Determine boost parameters from the parent particle
555 Double_t E=GetEnergy();
563 Ali4Vector p1=q.Inverse(pprim1); // Boost decay product 1
564 Ali4Vector p2=q.Inverse(pprim2); // Boost decay product 2
566 // Enter the boosted data into the decay tracks array
572 fDecays=new TObjArray(2);
575 fDecays->Add(new AliTrack);
576 ((AliTrack*)fDecays->At(0))->Set4Momentum(p1);
577 ((AliTrack*)fDecays->At(0))->SetMass(m1);
578 fDecays->Add(new AliTrack);
579 ((AliTrack*)fDecays->At(1))->Set4Momentum(p2);
580 ((AliTrack*)fDecays->At(1))->SetMass(m2);
582 ///////////////////////////////////////////////////////////////////////////
583 Int_t AliTrack::GetNdecay()
585 // Provide the number of decay produced tracks
587 if (fDecays) ndec=fDecays->GetEntries();
590 ///////////////////////////////////////////////////////////////////////////
591 AliTrack* AliTrack::GetDecayTrack(Int_t j)
593 // Provide decay produced track number j
594 // Note : j=1 denotes the first decay track
597 cout << " *AliTrack::GetDecayTrack* No tracks present." << endl;
602 if ((j >= 1) && (j <= GetNdecay()))
604 return (AliTrack*)fDecays->At(j-1);
608 cout << " *AliTrack* decay track number : " << j << " out of range."
609 << " Ndec = " << GetNdecay() << endl;
614 ///////////////////////////////////////////////////////////////////////////
615 void AliTrack::RemoveDecays()
617 // Remove all decay tracks from this track.
624 ///////////////////////////////////////////////////////////////////////////
625 void AliTrack::AddSignal(AliSignal& s)
627 // Relate an AliSignal object to this track.
628 if (!fSignals) fSignals=new TObjArray(1);
630 // Check if this signal is already stored for this track
631 Int_t nsig=GetNsignals();
632 for (Int_t i=0; i<nsig; i++)
634 if (&s==fSignals->At(i)) return;
639 ///////////////////////////////////////////////////////////////////////////
640 void AliTrack::RemoveSignal(AliSignal& s)
642 // Remove related AliSignal object from this track.
645 AliSignal* test=(AliSignal*)fSignals->Remove(&s);
646 if (test) fSignals->Compress();
649 ///////////////////////////////////////////////////////////////////////////
650 void AliTrack::RemoveSignals()
652 // Remove all related AliSignal objects from this track.
660 ///////////////////////////////////////////////////////////////////////////
661 Int_t AliTrack::GetNsignals()
663 // Provide the number of related AliSignals.
665 if (fSignals) nsig=fSignals->GetEntries();
668 ///////////////////////////////////////////////////////////////////////////
669 AliSignal* AliTrack::GetSignal(Int_t j)
671 // Provide the related AliSignal number j.
672 // Note : j=1 denotes the first signal.
675 cout << " *AliTrack::GetSignal* No signals present." << endl;
680 if ((j >= 1) && (j <= GetNsignals()))
682 return (AliSignal*)fSignals->At(j-1);
686 cout << " *AliTrack* signal number : " << j << " out of range."
687 << " Nsig = " << GetNsignals() << endl;
692 ///////////////////////////////////////////////////////////////////////////
693 void AliTrack::AddTrackHypothesis(AliTrack& t)
695 // Relate a track hypothesis to this track.
696 // Note : a private copy of the input track will be made via the Clone()
700 fHypotheses=new TObjArray(1);
701 fHypotheses->SetOwner();
703 fHypotheses->Add(t.Clone());
705 ///////////////////////////////////////////////////////////////////////////
706 void AliTrack::AddTrackHypothesis(Double_t prob,Double_t m,Double_t dm)
708 // Add a track hypothesis by explicitly setting the mass and probability.
709 // This will affect e.g. the hypothesis track's energy, since the momentum
710 // and all other attributes will be copied from the current track.
714 // prob=probalility m=mass value dm=error on the mass value.
715 // The default value for the mass error dm is 0.
719 t.RemoveTrackHypotheses();
721 t.SetTitle("Mass hypothesis");
724 AddTrackHypothesis(t);
726 ///////////////////////////////////////////////////////////////////////////
727 void AliTrack::RemoveTrackHypothesis(AliTrack& t)
729 // Remove the specified track hypothesis from this track.
732 AliTrack* test=(AliTrack*)fHypotheses->Remove(&t);
733 if (test) fHypotheses->Compress();
736 ///////////////////////////////////////////////////////////////////////////
737 void AliTrack::RemoveTrackHypotheses()
739 // Remove all track hypotheses from this track.
746 ///////////////////////////////////////////////////////////////////////////
747 Int_t AliTrack::GetNhypotheses()
749 // Provide the number of track hypotheses.
751 if (fHypotheses) nhyp=fHypotheses->GetEntries();
754 ///////////////////////////////////////////////////////////////////////////
755 AliTrack* AliTrack::GetTrackHypothesis(Int_t j)
757 // Provide the j-th track hypothesis.
758 // Note : j=1 denotes the first hypothesis.
759 // Default : j=0 ==> Hypothesis with highest probability.
761 if (!fHypotheses) return 0;
763 Int_t nhyp=GetNhypotheses();
765 // Check validity of index j
768 cout << " *AliTrack* hypothesis number : " << j << " out of range."
769 << " Nhyp = " << nhyp << endl;
775 if (j==0) // Provide track hypothesis with highest probability
778 t=(AliTrack*)fHypotheses->At(0);
779 if (t) prob=t->GetProb();
781 for (Int_t ih=1; ih<nhyp; ih++)
783 AliTrack* tx=(AliTrack*)fHypotheses->At(ih);
787 if (probx > prob) t=tx;
792 else // Provide requested j-th track hypothesis
794 return (AliTrack*)fHypotheses->At(j-1);
797 ///////////////////////////////////////////////////////////////////////////
798 void AliTrack::SetBeginPoint(AliPosition& p)
800 // Store the position of the track begin-point.
803 fBegin=new AliPositionObj(p);
810 ///////////////////////////////////////////////////////////////////////////
811 AliPosition* AliTrack::GetBeginPoint()
813 // Provide the position of the track begin-point.
816 ///////////////////////////////////////////////////////////////////////////
817 void AliTrack::SetEndPoint(AliPosition& p)
819 // Store the position of the track end-point.
822 fEnd=new AliPositionObj(p);
829 ///////////////////////////////////////////////////////////////////////////
830 AliPosition* AliTrack::GetEndPoint()
832 // Provide the position of the track end-point.
835 ///////////////////////////////////////////////////////////////////////////
836 void AliTrack::SetMass()
838 // Set the mass and error to the value of the hypothesis with highest prob.
842 // Select mass hypothesis with highest probability
843 AliTrack* t=GetTrackHypothesis(0);
847 dm=t->GetResultError();
852 cout << " *AliTrack::SetMass()* No hypothesis present => No action." << endl;
855 ///////////////////////////////////////////////////////////////////////////
856 Double_t AliTrack::GetPt()
858 // Provide trans. momentum value w.r.t. z-axis.
859 // The error on the value can be obtained by GetResultError()
860 // after invokation of GetPt().
863 Double_t norm=v.GetNorm();
864 fDresult=v.GetResultError();
868 ///////////////////////////////////////////////////////////////////////////
869 Double_t AliTrack::GetPl()
871 // Provide long. momentum value w.r.t. z-axis.
872 // Note : the returned value can also be negative.
873 // The error on the value can be obtained by GetResultError()
874 // after invokation of GetPl().
878 Double_t pl=v.GetNorm();
879 fDresult=v.GetResultError();
882 v.GetVector(a,"sph");
883 if (cos(a[1])<0) pl=-pl;
887 ///////////////////////////////////////////////////////////////////////////
888 Double_t AliTrack::GetEt()
890 // Provide trans. energy value w.r.t. z-axis.
891 // The error on the value can be obtained by GetResultError()
892 // after invokation of GetEt().
893 Double_t et=GetScaTrans();
897 ///////////////////////////////////////////////////////////////////////////
898 Double_t AliTrack::GetEl()
900 // Provide long. energy value w.r.t. z-axis.
901 // Note : the returned value can also be negative.
902 // The error on the value can be obtained by GetResultError()
903 // after invokation of GetEl().
904 Double_t el=GetScaLong();
908 ///////////////////////////////////////////////////////////////////////////
909 Double_t AliTrack::GetMt()
911 // Provide transverse mass value w.r.t. z-axis.
912 // The error on the value can be obtained by GetResultError()
913 // after invokation of GetMt().
915 Double_t dpt=GetResultError();
916 Double_t m=GetMass();
917 Double_t dm=GetResultError();
919 Double_t mt=sqrt(pt*pt+m*m);
921 if (mt) dmt2=(pow((pt*dpt),2)+pow((m*dm),2))/(mt*mt);
926 ///////////////////////////////////////////////////////////////////////////
927 Double_t AliTrack::GetRapidity()
929 // Provide rapidity value w.r.t. z-axis.
930 // The error on the value can be obtained by GetResultError()
931 // after invokation of GetRapidity().
932 // Note : Also GetPseudoRapidity() is available since this class is
933 // derived from Ali4Vector.
934 Double_t e=GetEnergy();
935 Double_t de=GetResultError();
937 Double_t dpl=GetResultError();
941 Double_t y=9999,dy2=0;
942 if (sum && dif) y=0.5*log(sum/dif);
944 if (sum*dif) dy2=(1./(sum*dif))*(pow((pl*de),2)+pow((e*dpl),2));
949 ///////////////////////////////////////////////////////////////////////////
950 void AliTrack::SetImpactPoint(AliPosition& p,TString q)
952 // Store the position of the impact-point in the plane "q=0".
953 // Here q denotes one of the axes X, Y or Z.
954 // Note : The character to denote the axis may be entered in lower or
957 if (q=="x" || q=="X") axis=1;
958 if (q=="y" || q=="Y") axis=2;
959 if (q=="z" || q=="Z") axis=3;
963 case 1: // Impact-point in the plane X=0
966 fImpactYZ=new AliPositionObj(p);
974 case 2: // Impact-point in the plane Y=0
977 fImpactXZ=new AliPositionObj(p);
985 case 3: // Impact-point in the plane Z=0
988 fImpactXY=new AliPositionObj(p);
996 default: // Unsupported axis
997 cout << "*AliTrack::SetImpactPoint* Unsupported axis : " << q << endl
998 << " Possible axes are 'X', 'Y' and 'Z'." << endl;
1002 ///////////////////////////////////////////////////////////////////////////
1003 AliPosition* AliTrack::GetImpactPoint(TString q)
1005 // Provide the position of the impact-point in the plane "q=0".
1006 // Here q denotes one of the axes X, Y or Z.
1007 // Note : The character to denote the axis may be entered in lower or
1010 if (q=="x" || q=="X") axis=1;
1011 if (q=="y" || q=="Y") axis=2;
1012 if (q=="z" || q=="Z") axis=3;
1016 case 1: // Impact-point in the plane X=0
1019 case 2: // Impact-point in the plane Y=0
1022 case 3: // Impact-point in the plane Z=0
1025 default: // Unsupported axis
1026 cout << "*AliTrack::GetImpactPoint* Unsupported axis : " << q << endl
1027 << " Possible axes are 'X', 'Y' and 'Z'." << endl;
1031 ///////////////////////////////////////////////////////////////////////////
1032 void AliTrack::SetId(Int_t id)
1034 // Set a user defined unique identifier for this track.
1037 ///////////////////////////////////////////////////////////////////////////
1038 Int_t AliTrack::GetId()
1040 // Provide the user defined unique identifier of this track.
1043 ///////////////////////////////////////////////////////////////////////////
1044 void AliTrack::SetClosestPoint(AliPosition& p)
1046 // Set position p as the point of closest approach w.r.t. some reference
1049 fClosest=new AliPositionObj(p);
1056 ///////////////////////////////////////////////////////////////////////////
1057 AliPosition* AliTrack::GetClosestPoint()
1059 // Provide the point of closest approach w.r.t. some reference
1062 ///////////////////////////////////////////////////////////////////////////
1063 void AliTrack::SetChi2(Float_t chi2)
1065 // Set the chi-squared value of the track fit.
1068 cout << " *AliTrack::SetChi2* Invalid chi2 value : " << chi2 << endl;
1075 ///////////////////////////////////////////////////////////////////////////
1076 void AliTrack::SetNdf(Int_t ndf)
1078 // Set the number of degrees of freedom for the track fit.
1081 cout << " *AliTrack::SetNdf* Invalid ndf value : " << ndf << endl;
1088 ///////////////////////////////////////////////////////////////////////////
1089 Float_t AliTrack::GetChi2()
1091 // Provide the chi-squared value of the track fit.
1094 ///////////////////////////////////////////////////////////////////////////
1095 Int_t AliTrack::GetNdf()
1097 // Provide the number of degrees of freedom for the track fit.
1100 ///////////////////////////////////////////////////////////////////////////
1101 void AliTrack::SetParticleCode(Int_t code)
1103 // Set the user defined particle id code (e.g. the PDF convention).
1106 ///////////////////////////////////////////////////////////////////////////
1107 Int_t AliTrack::GetParticleCode()
1109 // Provide the user defined particle id code.
1112 ///////////////////////////////////////////////////////////////////////////
1113 void AliTrack::SetParentTrack(AliTrack* t)
1115 // Set pointer to the parent track.
1118 ///////////////////////////////////////////////////////////////////////////
1119 AliTrack* AliTrack::GetParentTrack()
1121 // Provide pointer to the parent track.
1124 ///////////////////////////////////////////////////////////////////////////
1125 void AliTrack::SetProb(Double_t prob)
1127 // Set hypothesis probability for this track.
1130 ///////////////////////////////////////////////////////////////////////////
1131 Float_t AliTrack::GetProb()
1133 // Provide the hypothesis probability for this track.
1136 ///////////////////////////////////////////////////////////////////////////
1137 TObject* AliTrack::Clone(const char* name)
1139 // Make a deep copy of the current object and provide the pointer to the copy.
1140 // This memberfunction enables automatic creation of new objects of the
1141 // correct type depending on the object type, a feature which may be very useful
1142 // for containers when adding objects in case the container owns the objects.
1143 // This feature allows e.g. AliJet to store either AliTrack objects or
1144 // objects derived from AliTrack via the AddTrack memberfunction, provided
1145 // these derived classes also have a proper Clone memberfunction.
1147 AliTrack* trk=new AliTrack(*this);
1150 if (strlen(name)) trk->SetName(name);
1154 ///////////////////////////////////////////////////////////////////////////