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(const 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.
299 // In case the mass was not yet set, the energy is set to correspond to m=0.
301 Double_t inv=GetInvariant();
302 if (inv<0) SetMass(0.);
304 ///////////////////////////////////////////////////////////////////////////
305 void AliTrack::Set4Momentum(Ali4Vector& p)
307 // Set the track parameters according to the 4-momentum p
308 Double_t E=p.GetScalar();
309 Double_t dE=p.GetResultError();
310 Ali3Vector pv=p.Get3Vector();
314 ///////////////////////////////////////////////////////////////////////////
315 void AliTrack::SetMass(Double_t m,Double_t dm)
317 // Set the particle mass
318 // The default value for the error dm is 0.
319 Double_t inv=pow(m,2);
320 Double_t dinv=fabs(2.*m*dm);
321 SetInvariant(inv,dinv);
323 ///////////////////////////////////////////////////////////////////////////
324 void AliTrack::SetCharge(Float_t q)
326 // Set the particle charge
329 ///////////////////////////////////////////////////////////////////////////
330 void AliTrack::Data(TString f)
332 // Provide track information within the coordinate frame f
333 Double_t m=GetMass();
334 Double_t dm=GetResultError();
335 const char* name=GetName();
336 const char* title=GetTitle();
338 cout << " *" << ClassName() << "::Data*";
339 if (strlen(name)) cout << " Name : " << GetName();
340 if (strlen(title)) cout << " Title : " << GetTitle();
342 cout << " Id : " << fUserId << " Code : " << fCode
343 << " m : " << m << " dm : " << dm << " Charge : " << fQ
344 << " p : " << GetMomentum() << endl;
345 cout << " Nhypotheses : " << GetNhypotheses() << " Ndecay-tracks : " << GetNdecay()
346 << " Nsignals : " << GetNsignals() << endl;
349 ///////////////////////////////////////////////////////////////////////////
350 void AliTrack::List(TString f)
352 // Provide current track and decay level 1 information within coordinate frame f
354 Data(f); // Information of the current track
356 // Decay products of this track
358 for (Int_t id=1; id<=GetNdecay(); id++)
360 td=GetDecayTrack(id);
363 cout << " ---Level 1 sec. track no. " << id << endl;
368 cout << " *AliTrack::List* Error : Empty decay track slot." << endl;
372 ///////////////////////////////////////////////////////////////////////////
373 void AliTrack::ListAll(TString f)
375 // Provide complete track and decay information within the coordinate frame f
377 Data(f); // Information of the current track
378 if (fBegin) { cout << " Begin-point :"; fBegin->Data(f); }
379 if (fEnd) { cout << " End-point :"; fEnd->Data(f); }
381 Int_t nhyp=GetNhypotheses();
384 cout << " List of the " << nhyp << " track hypotheses : " << endl;
385 for (Int_t ih=1; ih<=nhyp; ih++)
387 AliTrack* tx=GetTrackHypothesis(ih);
392 Int_t nsig=GetNsignals();
395 cout << " List of the corresponding slots for the " << nsig
396 << " related signals : " << endl;
400 for (Int_t is=1; is<=nsig; is++)
402 AliSignal* sx=GetSignal(is);
405 nrefs=sx->GetIndices(this,slotarr,0);
406 for (Int_t jref=0; jref<nrefs; jref++)
408 jslot=slotarr.At(jref);
419 Dumps(t,1,f); // Information of all decay products
421 //////////////////////////////////////////////////////////////////////////
422 void AliTrack::Dumps(AliTrack* t,Int_t n,TString f)
424 // Recursively provide the info of all decay levels of this track
426 for (Int_t id=1; id<=t->GetNdecay(); id++)
428 td=t->GetDecayTrack(id);
431 cout << " ---Level " << n << " sec. track no. " << id << endl;
434 Int_t nhyp=td->GetNhypotheses();
437 cout << " List of the " << nhyp << " track hypotheses : " << endl;
438 for (Int_t ih=1; ih<=nhyp; ih++)
440 AliTrack* tx=td->GetTrackHypothesis(ih);
445 Int_t nsig=td->GetNsignals();
448 cout << " List of the " << nsig << " related signals : " << endl;
449 for (Int_t is=1; is<=nsig; is++)
451 AliSignal* sx=td->GetSignal(is);
456 // Go for next decay level of this decay track recursively
461 cout << " *AliTrack::Dumps* Error : Empty decay track slot." << endl;
465 //////////////////////////////////////////////////////////////////////////
466 Double_t AliTrack::GetMomentum()
468 // Provide the value of the track 3-momentum.
469 // The error can be obtained by invoking GetResultError() after
470 // invokation of GetMomentum().
471 Double_t norm=fV.GetNorm();
472 fDresult=fV.GetResultError();
475 ///////////////////////////////////////////////////////////////////////////
476 Ali3Vector AliTrack::Get3Momentum() const
478 // Provide the track 3-momentum
479 return (Ali3Vector)Get3Vector();
481 ///////////////////////////////////////////////////////////////////////////
482 Double_t AliTrack::GetMass()
484 // Provide the particle mass.
485 // The error can be obtained by invoking GetResultError() after
486 // invokation of GetMass().
487 Double_t inv=GetInvariant();
488 Double_t dinv=GetResultError();
492 Double_t m=sqrt(inv);
493 if (m) dm=dinv/(2.*m);
499 cout << "*AliTrack::GetMass* Unphysical situation m**2 = " << inv << endl;
500 cout << " Value 0 will be returned." << endl;
505 ///////////////////////////////////////////////////////////////////////////
506 Float_t AliTrack::GetCharge() const
508 // Provide the particle charge
511 ///////////////////////////////////////////////////////////////////////////
512 Double_t AliTrack::GetEnergy()
514 // Provide the particle's energy.
515 // The error can be obtained by invoking GetResultError() after
516 // invokation of GetEnergy().
517 Double_t E=GetScalar();
524 cout << "*AliTrack::GetEnergy* Unphysical situation E = " << E << endl;
525 cout << " Value 0 will be returned." << endl;
529 ///////////////////////////////////////////////////////////////////////////
530 void AliTrack::Decay(Double_t m1,Double_t m2,Double_t thcms,Double_t phicms)
532 // Perform 2-body decay of current track
533 // m1 : mass of decay product 1
534 // m2 : mass of decay product 2
535 // thcms : cms theta decay angle (in rad.) of m1
536 // phicms : cms phi decay angle (in rad.) of m1
538 Double_t M=GetMass();
540 // Compute the 4-momenta of the decay products in the cms
541 // Note : p2=p1=pnorm for a 2-body decay
543 if (M) e1=((M*M)+(m1*m1)-(m2*m2))/(2.*M);
545 if (M) e2=((M*M)+(m2*m2)-(m1*m1))/(2.*M);
546 Double_t pnorm=(e1*e1)-(m1*m1);
561 p.SetVector(a,"sph");
564 pprim1.SetVector(e1,p);
565 pprim1.SetInvariant(m1*m1);
569 pprim2.SetVector(e2,p);
570 pprim2.SetInvariant(m2*m2);
572 // Determine boost parameters from the parent particle
573 Double_t E=GetEnergy();
581 Ali4Vector p1=q.Inverse(pprim1); // Boost decay product 1
582 Ali4Vector p2=q.Inverse(pprim2); // Boost decay product 2
584 // Enter the boosted data into the decay tracks array
590 fDecays=new TObjArray(2);
593 fDecays->Add(new AliTrack);
594 ((AliTrack*)fDecays->At(0))->Set4Momentum(p1);
595 ((AliTrack*)fDecays->At(0))->SetMass(m1);
596 fDecays->Add(new AliTrack);
597 ((AliTrack*)fDecays->At(1))->Set4Momentum(p2);
598 ((AliTrack*)fDecays->At(1))->SetMass(m2);
600 ///////////////////////////////////////////////////////////////////////////
601 Int_t AliTrack::GetNdecay() const
603 // Provide the number of decay produced tracks
605 if (fDecays) ndec=fDecays->GetEntries();
608 ///////////////////////////////////////////////////////////////////////////
609 AliTrack* AliTrack::GetDecayTrack(Int_t j) const
611 // Provide decay produced track number j
612 // Note : j=1 denotes the first decay track
615 cout << " *AliTrack::GetDecayTrack* No tracks present." << endl;
620 if ((j >= 1) && (j <= GetNdecay()))
622 return (AliTrack*)fDecays->At(j-1);
626 cout << " *AliTrack* decay track number : " << j << " out of range."
627 << " Ndec = " << GetNdecay() << endl;
632 ///////////////////////////////////////////////////////////////////////////
633 void AliTrack::RemoveDecays()
635 // Remove all decay tracks from this track.
642 ///////////////////////////////////////////////////////////////////////////
643 void AliTrack::AddSignal(AliSignal& s)
645 // Relate an AliSignal object to this track.
646 if (!fSignals) fSignals=new TObjArray(1);
648 // Check if this signal is already stored for this track
649 Int_t nsig=GetNsignals();
650 for (Int_t i=0; i<nsig; i++)
652 if (&s==fSignals->At(i)) return;
657 ///////////////////////////////////////////////////////////////////////////
658 void AliTrack::RemoveSignal(AliSignal& s)
660 // Remove related AliSignal object from this track.
663 AliSignal* test=(AliSignal*)fSignals->Remove(&s);
664 if (test) fSignals->Compress();
667 ///////////////////////////////////////////////////////////////////////////
668 void AliTrack::RemoveSignals()
670 // Remove all related AliSignal objects from this track.
678 ///////////////////////////////////////////////////////////////////////////
679 Int_t AliTrack::GetNsignals() const
681 // Provide the number of related AliSignals.
683 if (fSignals) nsig=fSignals->GetEntries();
686 ///////////////////////////////////////////////////////////////////////////
687 AliSignal* AliTrack::GetSignal(Int_t j) const
689 // Provide the related AliSignal number j.
690 // Note : j=1 denotes the first signal.
693 cout << " *AliTrack::GetSignal* No signals present." << endl;
698 if ((j >= 1) && (j <= GetNsignals()))
700 return (AliSignal*)fSignals->At(j-1);
704 cout << " *AliTrack* signal number : " << j << " out of range."
705 << " Nsig = " << GetNsignals() << endl;
710 ///////////////////////////////////////////////////////////////////////////
711 void AliTrack::AddTrackHypothesis(AliTrack& t)
713 // Relate a track hypothesis to this track.
714 // Note : a private copy of the input track will be made via the Clone()
718 fHypotheses=new TObjArray(1);
719 fHypotheses->SetOwner();
721 fHypotheses->Add(t.Clone());
723 ///////////////////////////////////////////////////////////////////////////
724 void AliTrack::AddTrackHypothesis(Double_t prob,Double_t m,Double_t dm)
726 // Add a track hypothesis by explicitly setting the mass and probability.
727 // This will affect e.g. the hypothesis track's energy, since the momentum
728 // and all other attributes will be copied from the current track.
732 // prob=probalility m=mass value dm=error on the mass value.
733 // The default value for the mass error dm is 0.
737 t.RemoveTrackHypotheses();
739 t.SetTitle("Mass hypothesis");
742 AddTrackHypothesis(t);
744 ///////////////////////////////////////////////////////////////////////////
745 void AliTrack::RemoveTrackHypothesis(AliTrack& t)
747 // Remove the specified track hypothesis from this track.
750 AliTrack* test=(AliTrack*)fHypotheses->Remove(&t);
751 if (test) fHypotheses->Compress();
754 ///////////////////////////////////////////////////////////////////////////
755 void AliTrack::RemoveTrackHypotheses()
757 // Remove all track hypotheses from this track.
764 ///////////////////////////////////////////////////////////////////////////
765 Int_t AliTrack::GetNhypotheses() const
767 // Provide the number of track hypotheses.
769 if (fHypotheses) nhyp=fHypotheses->GetEntries();
772 ///////////////////////////////////////////////////////////////////////////
773 AliTrack* AliTrack::GetTrackHypothesis(Int_t j) const
775 // Provide the j-th track hypothesis.
776 // Note : j=1 denotes the first hypothesis.
777 // Default : j=0 ==> Hypothesis with highest probability.
779 if (!fHypotheses) return 0;
781 Int_t nhyp=GetNhypotheses();
783 // Check validity of index j
786 cout << " *AliTrack* hypothesis number : " << j << " out of range."
787 << " Nhyp = " << nhyp << endl;
793 if (j==0) // Provide track hypothesis with highest probability
796 t=(AliTrack*)fHypotheses->At(0);
797 if (t) prob=t->GetProb();
799 for (Int_t ih=1; ih<nhyp; ih++)
801 AliTrack* tx=(AliTrack*)fHypotheses->At(ih);
805 if (probx > prob) t=tx;
810 else // Provide requested j-th track hypothesis
812 return (AliTrack*)fHypotheses->At(j-1);
815 ///////////////////////////////////////////////////////////////////////////
816 void AliTrack::SetBeginPoint(AliPosition& p)
818 // Store the position of the track begin-point.
821 fBegin=new AliPositionObj(p);
828 ///////////////////////////////////////////////////////////////////////////
829 AliPosition* AliTrack::GetBeginPoint()
831 // Provide the position of the track begin-point.
834 ///////////////////////////////////////////////////////////////////////////
835 void AliTrack::SetEndPoint(AliPosition& p)
837 // Store the position of the track end-point.
840 fEnd=new AliPositionObj(p);
847 ///////////////////////////////////////////////////////////////////////////
848 AliPosition* AliTrack::GetEndPoint()
850 // Provide the position of the track end-point.
853 ///////////////////////////////////////////////////////////////////////////
854 void AliTrack::SetMass()
856 // Set the mass and error to the value of the hypothesis with highest prob.
860 // Select mass hypothesis with highest probability
861 AliTrack* t=GetTrackHypothesis(0);
865 dm=t->GetResultError();
870 cout << " *AliTrack::SetMass()* No hypothesis present => No action." << endl;
873 ///////////////////////////////////////////////////////////////////////////
874 Double_t AliTrack::GetPt()
876 // Provide trans. momentum value w.r.t. z-axis.
877 // The error on the value can be obtained by GetResultError()
878 // after invokation of GetPt().
881 Double_t norm=v.GetNorm();
882 fDresult=v.GetResultError();
886 ///////////////////////////////////////////////////////////////////////////
887 Double_t AliTrack::GetPl()
889 // Provide long. momentum value w.r.t. z-axis.
890 // Note : the returned value can also be negative.
891 // The error on the value can be obtained by GetResultError()
892 // after invokation of GetPl().
896 Double_t pl=v.GetNorm();
897 fDresult=v.GetResultError();
900 v.GetVector(a,"sph");
901 if (cos(a[1])<0) pl=-pl;
905 ///////////////////////////////////////////////////////////////////////////
906 Double_t AliTrack::GetEt()
908 // Provide trans. energy value w.r.t. z-axis.
909 // The error on the value can be obtained by GetResultError()
910 // after invokation of GetEt().
911 Double_t et=GetScaTrans();
915 ///////////////////////////////////////////////////////////////////////////
916 Double_t AliTrack::GetEl()
918 // Provide long. energy value w.r.t. z-axis.
919 // Note : the returned value can also be negative.
920 // The error on the value can be obtained by GetResultError()
921 // after invokation of GetEl().
922 Double_t el=GetScaLong();
926 ///////////////////////////////////////////////////////////////////////////
927 Double_t AliTrack::GetMt()
929 // Provide transverse mass value w.r.t. z-axis.
930 // The error on the value can be obtained by GetResultError()
931 // after invokation of GetMt().
933 Double_t dpt=GetResultError();
934 Double_t m=GetMass();
935 Double_t dm=GetResultError();
937 Double_t mt=sqrt(pt*pt+m*m);
939 if (mt) dmt2=(pow((pt*dpt),2)+pow((m*dm),2))/(mt*mt);
944 ///////////////////////////////////////////////////////////////////////////
945 Double_t AliTrack::GetRapidity()
947 // Provide rapidity value w.r.t. z-axis.
948 // The error on the value can be obtained by GetResultError()
949 // after invokation of GetRapidity().
950 // Note : Also GetPseudoRapidity() is available since this class is
951 // derived from Ali4Vector.
952 Double_t e=GetEnergy();
953 Double_t de=GetResultError();
955 Double_t dpl=GetResultError();
959 Double_t y=9999,dy2=0;
960 if (sum && dif) y=0.5*log(sum/dif);
962 if (sum*dif) dy2=(1./(sum*dif))*(pow((pl*de),2)+pow((e*dpl),2));
967 ///////////////////////////////////////////////////////////////////////////
968 void AliTrack::SetImpactPoint(AliPosition& p,TString q)
970 // Store the position of the impact-point in the plane "q=0".
971 // Here q denotes one of the axes X, Y or Z.
972 // Note : The character to denote the axis may be entered in lower or
975 if (q=="x" || q=="X") axis=1;
976 if (q=="y" || q=="Y") axis=2;
977 if (q=="z" || q=="Z") axis=3;
981 case 1: // Impact-point in the plane X=0
984 fImpactYZ=new AliPositionObj(p);
992 case 2: // Impact-point in the plane Y=0
995 fImpactXZ=new AliPositionObj(p);
1003 case 3: // Impact-point in the plane Z=0
1006 fImpactXY=new AliPositionObj(p);
1014 default: // Unsupported axis
1015 cout << "*AliTrack::SetImpactPoint* Unsupported axis : " << q << endl
1016 << " Possible axes are 'X', 'Y' and 'Z'." << endl;
1020 ///////////////////////////////////////////////////////////////////////////
1021 AliPosition* AliTrack::GetImpactPoint(TString q)
1023 // Provide the position of the impact-point in the plane "q=0".
1024 // Here q denotes one of the axes X, Y or Z.
1025 // Note : The character to denote the axis may be entered in lower or
1028 if (q=="x" || q=="X") axis=1;
1029 if (q=="y" || q=="Y") axis=2;
1030 if (q=="z" || q=="Z") axis=3;
1034 case 1: // Impact-point in the plane X=0
1037 case 2: // Impact-point in the plane Y=0
1040 case 3: // Impact-point in the plane Z=0
1043 default: // Unsupported axis
1044 cout << "*AliTrack::GetImpactPoint* Unsupported axis : " << q << endl
1045 << " Possible axes are 'X', 'Y' and 'Z'." << endl;
1049 ///////////////////////////////////////////////////////////////////////////
1050 void AliTrack::SetId(Int_t id)
1052 // Set a user defined unique identifier for this track.
1055 ///////////////////////////////////////////////////////////////////////////
1056 Int_t AliTrack::GetId() const
1058 // Provide the user defined unique identifier of this track.
1061 ///////////////////////////////////////////////////////////////////////////
1062 void AliTrack::SetClosestPoint(AliPosition& p)
1064 // Set position p as the point of closest approach w.r.t. some reference
1067 fClosest=new AliPositionObj(p);
1074 ///////////////////////////////////////////////////////////////////////////
1075 AliPosition* AliTrack::GetClosestPoint()
1077 // Provide the point of closest approach w.r.t. some reference
1080 ///////////////////////////////////////////////////////////////////////////
1081 void AliTrack::SetChi2(Float_t chi2)
1083 // Set the chi-squared value of the track fit.
1086 cout << " *AliTrack::SetChi2* Invalid chi2 value : " << chi2 << endl;
1093 ///////////////////////////////////////////////////////////////////////////
1094 void AliTrack::SetNdf(Int_t ndf)
1096 // Set the number of degrees of freedom for the track fit.
1099 cout << " *AliTrack::SetNdf* Invalid ndf value : " << ndf << endl;
1106 ///////////////////////////////////////////////////////////////////////////
1107 Float_t AliTrack::GetChi2() const
1109 // Provide the chi-squared value of the track fit.
1112 ///////////////////////////////////////////////////////////////////////////
1113 Int_t AliTrack::GetNdf() const
1115 // Provide the number of degrees of freedom for the track fit.
1118 ///////////////////////////////////////////////////////////////////////////
1119 void AliTrack::SetParticleCode(Int_t code)
1121 // Set the user defined particle id code (e.g. the PDF convention).
1124 ///////////////////////////////////////////////////////////////////////////
1125 Int_t AliTrack::GetParticleCode() const
1127 // Provide the user defined particle id code.
1130 ///////////////////////////////////////////////////////////////////////////
1131 void AliTrack::SetParentTrack(AliTrack* t)
1133 // Set pointer to the parent track.
1136 ///////////////////////////////////////////////////////////////////////////
1137 AliTrack* AliTrack::GetParentTrack()
1139 // Provide pointer to the parent track.
1142 ///////////////////////////////////////////////////////////////////////////
1143 void AliTrack::SetProb(Double_t prob)
1145 // Set hypothesis probability for this track.
1148 ///////////////////////////////////////////////////////////////////////////
1149 Float_t AliTrack::GetProb() const
1151 // Provide the hypothesis probability for this track.
1154 ///////////////////////////////////////////////////////////////////////////
1155 TObject* AliTrack::Clone(const char* name) const
1157 // Make a deep copy of the current object and provide the pointer to the copy.
1158 // This memberfunction enables automatic creation of new objects of the
1159 // correct type depending on the object type, a feature which may be very useful
1160 // for containers when adding objects in case the container owns the objects.
1161 // This feature allows e.g. AliJet to store either AliTrack objects or
1162 // objects derived from AliTrack via the AddTrack memberfunction, provided
1163 // these derived classes also have a proper Clone memberfunction.
1165 AliTrack* trk=new AliTrack(*this);
1168 if (strlen(name)) trk->SetName(name);
1172 ///////////////////////////////////////////////////////////////////////////