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->ResetLinks(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 corresponding slots for the " << nsig
393 << " related signals : " << endl;
397 for (Int_t is=1; is<=nsig; is++)
399 AliSignal* sx=GetSignal(is);
402 nrefs=sx->GetIndices(this,slotarr,0);
403 for (Int_t jref=0; jref<nrefs; jref++)
405 jslot=slotarr.At(jref);
416 Dumps(t,1,f); // Information of all decay products
418 //////////////////////////////////////////////////////////////////////////
419 void AliTrack::Dumps(AliTrack* t,Int_t n,TString f)
421 // Recursively provide the info of all decay levels of this track
423 for (Int_t id=1; id<=t->GetNdecay(); id++)
425 td=t->GetDecayTrack(id);
428 cout << " ---Level " << n << " sec. track no. " << id << endl;
431 Int_t nhyp=td->GetNhypotheses();
434 cout << " List of the " << nhyp << " track hypotheses : " << endl;
435 for (Int_t ih=1; ih<=nhyp; ih++)
437 AliTrack* tx=td->GetTrackHypothesis(ih);
442 Int_t nsig=td->GetNsignals();
445 cout << " List of the " << nsig << " related signals : " << endl;
446 for (Int_t is=1; is<=nsig; is++)
448 AliSignal* sx=td->GetSignal(is);
453 // Go for next decay level of this decay track recursively
458 cout << " *AliTrack::Dumps* Error : Empty decay track slot." << endl;
462 //////////////////////////////////////////////////////////////////////////
463 Double_t AliTrack::GetMomentum()
465 // Provide the value of the track 3-momentum.
466 // The error can be obtained by invoking GetResultError() after
467 // invokation of GetMomentum().
468 Double_t norm=fV.GetNorm();
469 fDresult=fV.GetResultError();
472 ///////////////////////////////////////////////////////////////////////////
473 Ali3Vector AliTrack::Get3Momentum()
475 // Provide the track 3-momentum
476 return (Ali3Vector)Get3Vector();
478 ///////////////////////////////////////////////////////////////////////////
479 Double_t AliTrack::GetMass()
481 // Provide the particle mass.
482 // The error can be obtained by invoking GetResultError() after
483 // invokation of GetMass().
484 Double_t inv=GetInvariant();
485 Double_t dinv=GetResultError();
489 Double_t m=sqrt(inv);
490 if (m) dm=dinv/(2.*m);
496 cout << "*AliTrack::GetMass* Unphysical situation m**2 = " << inv << endl;
497 cout << " Value 0 will be returned." << endl;
502 ///////////////////////////////////////////////////////////////////////////
503 Float_t AliTrack::GetCharge()
505 // Provide the particle charge
508 ///////////////////////////////////////////////////////////////////////////
509 Double_t AliTrack::GetEnergy()
511 // Provide the particle's energy.
512 // The error can be obtained by invoking GetResultError() after
513 // invokation of GetEnergy().
514 Double_t E=GetScalar();
521 cout << "*AliTrack::GetEnergy* Unphysical situation E = " << E << endl;
522 cout << " Value 0 will be returned." << endl;
526 ///////////////////////////////////////////////////////////////////////////
527 void AliTrack::Decay(Double_t m1,Double_t m2,Double_t thcms,Double_t phicms)
529 // Perform 2-body decay of current track
530 // m1 : mass of decay product 1
531 // m2 : mass of decay product 2
532 // thcms : cms theta decay angle (in rad.) of m1
533 // phicms : cms phi decay angle (in rad.) of m1
535 Double_t M=GetMass();
537 // Compute the 4-momenta of the decay products in the cms
538 // Note : p2=p1=pnorm for a 2-body decay
540 if (M) e1=((M*M)+(m1*m1)-(m2*m2))/(2.*M);
542 if (M) e2=((M*M)+(m2*m2)-(m1*m1))/(2.*M);
543 Double_t pnorm=(e1*e1)-(m1*m1);
558 p.SetVector(a,"sph");
561 pprim1.SetVector(e1,p);
562 pprim1.SetInvariant(m1*m1);
566 pprim2.SetVector(e2,p);
567 pprim2.SetInvariant(m2*m2);
569 // Determine boost parameters from the parent particle
570 Double_t E=GetEnergy();
578 Ali4Vector p1=q.Inverse(pprim1); // Boost decay product 1
579 Ali4Vector p2=q.Inverse(pprim2); // Boost decay product 2
581 // Enter the boosted data into the decay tracks array
587 fDecays=new TObjArray(2);
590 fDecays->Add(new AliTrack);
591 ((AliTrack*)fDecays->At(0))->Set4Momentum(p1);
592 ((AliTrack*)fDecays->At(0))->SetMass(m1);
593 fDecays->Add(new AliTrack);
594 ((AliTrack*)fDecays->At(1))->Set4Momentum(p2);
595 ((AliTrack*)fDecays->At(1))->SetMass(m2);
597 ///////////////////////////////////////////////////////////////////////////
598 Int_t AliTrack::GetNdecay()
600 // Provide the number of decay produced tracks
602 if (fDecays) ndec=fDecays->GetEntries();
605 ///////////////////////////////////////////////////////////////////////////
606 AliTrack* AliTrack::GetDecayTrack(Int_t j)
608 // Provide decay produced track number j
609 // Note : j=1 denotes the first decay track
612 cout << " *AliTrack::GetDecayTrack* No tracks present." << endl;
617 if ((j >= 1) && (j <= GetNdecay()))
619 return (AliTrack*)fDecays->At(j-1);
623 cout << " *AliTrack* decay track number : " << j << " out of range."
624 << " Ndec = " << GetNdecay() << endl;
629 ///////////////////////////////////////////////////////////////////////////
630 void AliTrack::RemoveDecays()
632 // Remove all decay tracks from this track.
639 ///////////////////////////////////////////////////////////////////////////
640 void AliTrack::AddSignal(AliSignal& s)
642 // Relate an AliSignal object to this track.
643 if (!fSignals) fSignals=new TObjArray(1);
645 // Check if this signal is already stored for this track
646 Int_t nsig=GetNsignals();
647 for (Int_t i=0; i<nsig; i++)
649 if (&s==fSignals->At(i)) return;
654 ///////////////////////////////////////////////////////////////////////////
655 void AliTrack::RemoveSignal(AliSignal& s)
657 // Remove related AliSignal object from this track.
660 AliSignal* test=(AliSignal*)fSignals->Remove(&s);
661 if (test) fSignals->Compress();
664 ///////////////////////////////////////////////////////////////////////////
665 void AliTrack::RemoveSignals()
667 // Remove all related AliSignal objects from this track.
675 ///////////////////////////////////////////////////////////////////////////
676 Int_t AliTrack::GetNsignals()
678 // Provide the number of related AliSignals.
680 if (fSignals) nsig=fSignals->GetEntries();
683 ///////////////////////////////////////////////////////////////////////////
684 AliSignal* AliTrack::GetSignal(Int_t j)
686 // Provide the related AliSignal number j.
687 // Note : j=1 denotes the first signal.
690 cout << " *AliTrack::GetSignal* No signals present." << endl;
695 if ((j >= 1) && (j <= GetNsignals()))
697 return (AliSignal*)fSignals->At(j-1);
701 cout << " *AliTrack* signal number : " << j << " out of range."
702 << " Nsig = " << GetNsignals() << endl;
707 ///////////////////////////////////////////////////////////////////////////
708 void AliTrack::AddTrackHypothesis(AliTrack& t)
710 // Relate a track hypothesis to this track.
711 // Note : a private copy of the input track will be made via the Clone()
715 fHypotheses=new TObjArray(1);
716 fHypotheses->SetOwner();
718 fHypotheses->Add(t.Clone());
720 ///////////////////////////////////////////////////////////////////////////
721 void AliTrack::AddTrackHypothesis(Double_t prob,Double_t m,Double_t dm)
723 // Add a track hypothesis by explicitly setting the mass and probability.
724 // This will affect e.g. the hypothesis track's energy, since the momentum
725 // and all other attributes will be copied from the current track.
729 // prob=probalility m=mass value dm=error on the mass value.
730 // The default value for the mass error dm is 0.
734 t.RemoveTrackHypotheses();
736 t.SetTitle("Mass hypothesis");
739 AddTrackHypothesis(t);
741 ///////////////////////////////////////////////////////////////////////////
742 void AliTrack::RemoveTrackHypothesis(AliTrack& t)
744 // Remove the specified track hypothesis from this track.
747 AliTrack* test=(AliTrack*)fHypotheses->Remove(&t);
748 if (test) fHypotheses->Compress();
751 ///////////////////////////////////////////////////////////////////////////
752 void AliTrack::RemoveTrackHypotheses()
754 // Remove all track hypotheses from this track.
761 ///////////////////////////////////////////////////////////////////////////
762 Int_t AliTrack::GetNhypotheses()
764 // Provide the number of track hypotheses.
766 if (fHypotheses) nhyp=fHypotheses->GetEntries();
769 ///////////////////////////////////////////////////////////////////////////
770 AliTrack* AliTrack::GetTrackHypothesis(Int_t j)
772 // Provide the j-th track hypothesis.
773 // Note : j=1 denotes the first hypothesis.
774 // Default : j=0 ==> Hypothesis with highest probability.
776 if (!fHypotheses) return 0;
778 Int_t nhyp=GetNhypotheses();
780 // Check validity of index j
783 cout << " *AliTrack* hypothesis number : " << j << " out of range."
784 << " Nhyp = " << nhyp << endl;
790 if (j==0) // Provide track hypothesis with highest probability
793 t=(AliTrack*)fHypotheses->At(0);
794 if (t) prob=t->GetProb();
796 for (Int_t ih=1; ih<nhyp; ih++)
798 AliTrack* tx=(AliTrack*)fHypotheses->At(ih);
802 if (probx > prob) t=tx;
807 else // Provide requested j-th track hypothesis
809 return (AliTrack*)fHypotheses->At(j-1);
812 ///////////////////////////////////////////////////////////////////////////
813 void AliTrack::SetBeginPoint(AliPosition& p)
815 // Store the position of the track begin-point.
818 fBegin=new AliPositionObj(p);
825 ///////////////////////////////////////////////////////////////////////////
826 AliPosition* AliTrack::GetBeginPoint()
828 // Provide the position of the track begin-point.
831 ///////////////////////////////////////////////////////////////////////////
832 void AliTrack::SetEndPoint(AliPosition& p)
834 // Store the position of the track end-point.
837 fEnd=new AliPositionObj(p);
844 ///////////////////////////////////////////////////////////////////////////
845 AliPosition* AliTrack::GetEndPoint()
847 // Provide the position of the track end-point.
850 ///////////////////////////////////////////////////////////////////////////
851 void AliTrack::SetMass()
853 // Set the mass and error to the value of the hypothesis with highest prob.
857 // Select mass hypothesis with highest probability
858 AliTrack* t=GetTrackHypothesis(0);
862 dm=t->GetResultError();
867 cout << " *AliTrack::SetMass()* No hypothesis present => No action." << endl;
870 ///////////////////////////////////////////////////////////////////////////
871 Double_t AliTrack::GetPt()
873 // Provide trans. momentum value w.r.t. z-axis.
874 // The error on the value can be obtained by GetResultError()
875 // after invokation of GetPt().
878 Double_t norm=v.GetNorm();
879 fDresult=v.GetResultError();
883 ///////////////////////////////////////////////////////////////////////////
884 Double_t AliTrack::GetPl()
886 // Provide long. momentum value w.r.t. z-axis.
887 // Note : the returned value can also be negative.
888 // The error on the value can be obtained by GetResultError()
889 // after invokation of GetPl().
893 Double_t pl=v.GetNorm();
894 fDresult=v.GetResultError();
897 v.GetVector(a,"sph");
898 if (cos(a[1])<0) pl=-pl;
902 ///////////////////////////////////////////////////////////////////////////
903 Double_t AliTrack::GetEt()
905 // Provide trans. energy value w.r.t. z-axis.
906 // The error on the value can be obtained by GetResultError()
907 // after invokation of GetEt().
908 Double_t et=GetScaTrans();
912 ///////////////////////////////////////////////////////////////////////////
913 Double_t AliTrack::GetEl()
915 // Provide long. energy value w.r.t. z-axis.
916 // Note : the returned value can also be negative.
917 // The error on the value can be obtained by GetResultError()
918 // after invokation of GetEl().
919 Double_t el=GetScaLong();
923 ///////////////////////////////////////////////////////////////////////////
924 Double_t AliTrack::GetMt()
926 // Provide transverse mass value w.r.t. z-axis.
927 // The error on the value can be obtained by GetResultError()
928 // after invokation of GetMt().
930 Double_t dpt=GetResultError();
931 Double_t m=GetMass();
932 Double_t dm=GetResultError();
934 Double_t mt=sqrt(pt*pt+m*m);
936 if (mt) dmt2=(pow((pt*dpt),2)+pow((m*dm),2))/(mt*mt);
941 ///////////////////////////////////////////////////////////////////////////
942 Double_t AliTrack::GetRapidity()
944 // Provide rapidity value w.r.t. z-axis.
945 // The error on the value can be obtained by GetResultError()
946 // after invokation of GetRapidity().
947 // Note : Also GetPseudoRapidity() is available since this class is
948 // derived from Ali4Vector.
949 Double_t e=GetEnergy();
950 Double_t de=GetResultError();
952 Double_t dpl=GetResultError();
956 Double_t y=9999,dy2=0;
957 if (sum && dif) y=0.5*log(sum/dif);
959 if (sum*dif) dy2=(1./(sum*dif))*(pow((pl*de),2)+pow((e*dpl),2));
964 ///////////////////////////////////////////////////////////////////////////
965 void AliTrack::SetImpactPoint(AliPosition& p,TString q)
967 // Store the position of the impact-point in the plane "q=0".
968 // Here q denotes one of the axes X, Y or Z.
969 // Note : The character to denote the axis may be entered in lower or
972 if (q=="x" || q=="X") axis=1;
973 if (q=="y" || q=="Y") axis=2;
974 if (q=="z" || q=="Z") axis=3;
978 case 1: // Impact-point in the plane X=0
981 fImpactYZ=new AliPositionObj(p);
989 case 2: // Impact-point in the plane Y=0
992 fImpactXZ=new AliPositionObj(p);
1000 case 3: // Impact-point in the plane Z=0
1003 fImpactXY=new AliPositionObj(p);
1011 default: // Unsupported axis
1012 cout << "*AliTrack::SetImpactPoint* Unsupported axis : " << q << endl
1013 << " Possible axes are 'X', 'Y' and 'Z'." << endl;
1017 ///////////////////////////////////////////////////////////////////////////
1018 AliPosition* AliTrack::GetImpactPoint(TString q)
1020 // Provide the position of the impact-point in the plane "q=0".
1021 // Here q denotes one of the axes X, Y or Z.
1022 // Note : The character to denote the axis may be entered in lower or
1025 if (q=="x" || q=="X") axis=1;
1026 if (q=="y" || q=="Y") axis=2;
1027 if (q=="z" || q=="Z") axis=3;
1031 case 1: // Impact-point in the plane X=0
1034 case 2: // Impact-point in the plane Y=0
1037 case 3: // Impact-point in the plane Z=0
1040 default: // Unsupported axis
1041 cout << "*AliTrack::GetImpactPoint* Unsupported axis : " << q << endl
1042 << " Possible axes are 'X', 'Y' and 'Z'." << endl;
1046 ///////////////////////////////////////////////////////////////////////////
1047 void AliTrack::SetId(Int_t id)
1049 // Set a user defined unique identifier for this track.
1052 ///////////////////////////////////////////////////////////////////////////
1053 Int_t AliTrack::GetId()
1055 // Provide the user defined unique identifier of this track.
1058 ///////////////////////////////////////////////////////////////////////////
1059 void AliTrack::SetClosestPoint(AliPosition& p)
1061 // Set position p as the point of closest approach w.r.t. some reference
1064 fClosest=new AliPositionObj(p);
1071 ///////////////////////////////////////////////////////////////////////////
1072 AliPosition* AliTrack::GetClosestPoint()
1074 // Provide the point of closest approach w.r.t. some reference
1077 ///////////////////////////////////////////////////////////////////////////
1078 void AliTrack::SetChi2(Float_t chi2)
1080 // Set the chi-squared value of the track fit.
1083 cout << " *AliTrack::SetChi2* Invalid chi2 value : " << chi2 << endl;
1090 ///////////////////////////////////////////////////////////////////////////
1091 void AliTrack::SetNdf(Int_t ndf)
1093 // Set the number of degrees of freedom for the track fit.
1096 cout << " *AliTrack::SetNdf* Invalid ndf value : " << ndf << endl;
1103 ///////////////////////////////////////////////////////////////////////////
1104 Float_t AliTrack::GetChi2()
1106 // Provide the chi-squared value of the track fit.
1109 ///////////////////////////////////////////////////////////////////////////
1110 Int_t AliTrack::GetNdf()
1112 // Provide the number of degrees of freedom for the track fit.
1115 ///////////////////////////////////////////////////////////////////////////
1116 void AliTrack::SetParticleCode(Int_t code)
1118 // Set the user defined particle id code (e.g. the PDF convention).
1121 ///////////////////////////////////////////////////////////////////////////
1122 Int_t AliTrack::GetParticleCode()
1124 // Provide the user defined particle id code.
1127 ///////////////////////////////////////////////////////////////////////////
1128 void AliTrack::SetParentTrack(AliTrack* t)
1130 // Set pointer to the parent track.
1133 ///////////////////////////////////////////////////////////////////////////
1134 AliTrack* AliTrack::GetParentTrack()
1136 // Provide pointer to the parent track.
1139 ///////////////////////////////////////////////////////////////////////////
1140 void AliTrack::SetProb(Double_t prob)
1142 // Set hypothesis probability for this track.
1145 ///////////////////////////////////////////////////////////////////////////
1146 Float_t AliTrack::GetProb()
1148 // Provide the hypothesis probability for this track.
1151 ///////////////////////////////////////////////////////////////////////////
1152 TObject* AliTrack::Clone(const char* name)
1154 // Make a deep copy of the current object and provide the pointer to the copy.
1155 // This memberfunction enables automatic creation of new objects of the
1156 // correct type depending on the object type, a feature which may be very useful
1157 // for containers when adding objects in case the container owns the objects.
1158 // This feature allows e.g. AliJet to store either AliTrack objects or
1159 // objects derived from AliTrack via the AddTrack memberfunction, provided
1160 // these derived classes also have a proper Clone memberfunction.
1162 AliTrack* trk=new AliTrack(*this);
1165 if (strlen(name)) trk->SetName(name);
1169 ///////////////////////////////////////////////////////////////////////////