From: hristov Date: Wed, 22 Jun 2005 07:55:13 +0000 (+0000) Subject: Calculation of the transverse impact parameter w.r.t. (x,y) (Yu.Belikov) X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=038834e74979fd8b5ced0dd9371fab6a49660a50 Calculation of the transverse impact parameter w.r.t. (x,y) (Yu.Belikov) --- diff --git a/STEER/AliESDtrack.cxx b/STEER/AliESDtrack.cxx index de33b519e3a..6cc10168d11 100644 --- a/STEER/AliESDtrack.cxx +++ b/STEER/AliESDtrack.cxx @@ -576,6 +576,27 @@ Double_t AliESDtrack::GetP() const { return pt*TMath::Sqrt(1.+ fRp[3]*fRp[3]); } +//_______________________________________________________________________ +Double_t AliESDtrack::GetD(Double_t x, Double_t y) const { + //------------------------------------------------------------------ + // This function calculates the transverse impact parameter + // with respect to a point with global coordinates (x,y) + //------------------------------------------------------------------ + Double_t rp4=fRp[4]/AliKalmanTrack::GetConvConst(); + + Double_t xt=fRx, yt=fRp[0]; + + Double_t sn=TMath::Sin(fRalpha), cs=TMath::Cos(fRalpha); + Double_t a = x*cs + y*sn; + y = -x*sn + y*cs; x=a; + xt-=x; yt-=y; + + sn=rp4*xt - fRp[2]; cs=rp4*yt + TMath::Sqrt(1.- fRp[2]*fRp[2]); + a=2*(xt*fRp[2] - yt*TMath::Sqrt(1.- fRp[2]*fRp[2]))-rp4*(xt*xt + yt*yt); + if (rp4<0) a=-a; + return a/(1 + TMath::Sqrt(sn*sn + cs*cs)); +} + Bool_t Local2GlobalMomentum(Double_t p[3],Double_t alpha) { //---------------------------------------------------------------- // This function performs local->global transformation of the @@ -1043,7 +1064,7 @@ void AliESDtrack::Print(Option_t *) const { printf("\n signal = %f\n", GetTOFsignal()) ; } if( IsOn(kRICHpid) ){ - printf("From TOF: ") ; + printf("From RICH: ") ; GetRICHpid(p) ; for(index = 0 ; index < AliPID::kSPECIES; index++) printf("%f, ", p[index]) ; diff --git a/STEER/AliESDtrack.h b/STEER/AliESDtrack.h index e1610f5f8fa..c3ba585080b 100644 --- a/STEER/AliESDtrack.h +++ b/STEER/AliESDtrack.h @@ -60,6 +60,7 @@ public: Bool_t GetXYZAt(Double_t x, Double_t r[3]) const; void GetImpactParameters(Float_t &xy,Float_t &z) const {xy=fD; z=fZ;} + Double_t GetD(Double_t x=0, Double_t y=0) const; //calculate the transverse impact parameter w.r.t. (x,y) Double_t GetIntegratedLength() const {return fTrackLength;} void GetIntegratedTimes(Double_t *times) const; Double_t GetMass() const;