From: nick Date: Tue, 24 Jul 2001 12:24:27 +0000 (+0000) Subject: 24-jul-2001 NvE Support for Chi2 and NDF information of track fit introduced in AliTrack. X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=2693cb4ea9d3cc0e828ff25a9676e9fab53bdecb 24-jul-2001 NvE Support for Chi2 and NDF information of track fit introduced in AliTrack. --- diff --git a/RALICE/AliTrack.cxx b/RALICE/AliTrack.cxx index 67ed2355edf..c38721eb21a 100644 --- a/RALICE/AliTrack.cxx +++ b/RALICE/AliTrack.cxx @@ -126,6 +126,8 @@ void AliTrack::Reset() { // Reset all variables to 0 and delete all auto-generated decay tracks. fQ=0; + fChi2=0; + fNdf=0; fUserId=0; fNdec=0; fNsig=0; @@ -870,3 +872,41 @@ AliPosition AliTrack::GetClosestPoint() return fClosest; } /////////////////////////////////////////////////////////////////////////// +void AliTrack::SetChi2(Float_t chi2) +{ +// Set the chi-squared value of the track fit. + if (chi2<0) + { + cout << " *AliTrack::SetChi2* Invalid chi2 value : " << chi2 << endl; + } + else + { + fChi2=chi2; + } +} +/////////////////////////////////////////////////////////////////////////// +void AliTrack::SetNdf(Int_t ndf) +{ +// Set the number of degrees of freedom for the track fit. + if (ndf<0) + { + cout << " *AliTrack::SetNdf* Invalid ndf value : " << ndf << endl; + } + else + { + fNdf=ndf; + } +} +/////////////////////////////////////////////////////////////////////////// +Float_t AliTrack::GetChi2() +{ +// Provide the chi-squared value of the track fit. + return fChi2; +} +/////////////////////////////////////////////////////////////////////////// +Int_t AliTrack::GetNdf() +{ +// Provide the number of degrees of freedom for the track fit. + return fNdf; +} +/////////////////////////////////////////////////////////////////////////// diff --git a/RALICE/AliTrack.h b/RALICE/AliTrack.h index 7bfb1ed5f18..77f8298b61d 100644 --- a/RALICE/AliTrack.h +++ b/RALICE/AliTrack.h @@ -63,6 +63,11 @@ class AliTrack : public TObject,public Ali4Vector Int_t GetId(); // Provide the user defined identifier void SetClosestPoint(AliPosition p); // Set position p as point of closest approach w.r.t. some reference AliPosition GetClosestPoint(); // Provide point of closest approach w.r.t. some reference + void SetChi2(Float_t chi2); // Set the chi-squared value of the track fit + void SetNdf(Int_t ndf); // Set the number of degrees of freedom for the track fit + Float_t GetChi2(); // Provide the chi-squared value of the track fit + Int_t GetNdf(); // Provide the number of degrees of freedom for the track fit + protected: Float_t fQ; // The charge of the particle @@ -81,6 +86,8 @@ class AliTrack : public TObject,public Ali4Vector AliPosition fImpactYZ; // The (extrapolated) impact-point in the plane x=0 Int_t fUserId; // The user defined identifier AliPosition fClosest; // The (extrapolated) point of closest approach w.r.t some reference + Float_t fChi2; // The Chi-squared of the track fit + Int_t fNdf; // The number of degrees of freedom of the track fit private: void Dump(AliTrack* t,Int_t n,TString f); // Recursively print all decay levels diff --git a/RALICE/history.txt b/RALICE/history.txt index d0ec5fae6ff..07cd44e5d2d 100644 --- a/RALICE/history.txt +++ b/RALICE/history.txt @@ -289,3 +289,4 @@ Also user identifier facility introduced for AliJet and AliVertex. 12-jul-2001 NvE Memberfunction GetDistance() introduced for AliPosition and support for point of closest approach introduced in AliTrack. +24-jul-2001 NvE Support for Chi2 and NDF information of track fit introduced in AliTrack.