]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Calculation of the transverse impact parameter w.r.t. (x,y) (Yu.Belikov)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 Jun 2005 07:55:13 +0000 (07:55 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 22 Jun 2005 07:55:13 +0000 (07:55 +0000)
STEER/AliESDtrack.cxx
STEER/AliESDtrack.h

index de33b519e3ab9443192e8848ca112699e6c03693..6cc10168d117b00022e7aff8e8a1e14de942bfe7 100644 (file)
@@ -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]) ;
index e1610f5f8fab9083a0575f019540407a145388d4..c3ba585080b425446cff55694208f97d6f1ae491 100644 (file)
@@ -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;