]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing the problem that was causing the dip (savannah bug 48080):
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 May 2009 16:56:01 +0000 (16:56 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 May 2009 16:56:01 +0000 (16:56 +0000)
the azimuth of the track momentum was used instead of the azimuth of the
track position. The protection introduced by Ruben and Martin (Rev 32258
and 32424) is not removed, because it makes sense (A. Dainese)

ITS/AliITStrackV2.cxx

index 1d18b1aa6ab6c9c684943547b4fb8e081167ffbf..e3b975b103a83e09022810cdbd0fb9b6978da6da 100644 (file)
@@ -471,10 +471,14 @@ GetPhiZat(Double_t r, Double_t &phi, Double_t &z) const {
   }
 
   Double_t rcurr=TMath::Sqrt(GetX()*GetX() + GetY()*GetY());
-  if (TMath::Abs(d) > rcurr) return kFALSE; 
-  Double_t phicurr=GetAlpha()+TMath::ASin(GetSnp());
+  if (TMath::Abs(d) > rcurr) return kFALSE;
+  Double_t globXYZcurr[3]; GetXYZ(globXYZcurr); 
+  Double_t phicurr=TMath::ATan2(globXYZcurr[1],globXYZcurr[0]);
 
   phi=phicurr+TMath::ASin(d/r)-TMath::ASin(d/rcurr);
+  // return a phi in [0,2pi[ 
+  if (phi<0.) phi+=2.*TMath::Pi();
+  else if (phi>=2.*TMath::Pi()) phi-=2.*TMath::Pi();
   z=GetZ()+GetTgl()*(TMath::Sqrt((r-d)*(r+d))-TMath::Sqrt((rcurr-d)*(rcurr+d)));
   return kTRUE;
 }
@@ -493,7 +497,8 @@ GetLocalXat(Double_t r,Double_t &xloc) const {
   } 
 
   Double_t rcurr=TMath::Sqrt(GetX()*GetX() + GetY()*GetY());
-  Double_t phicurr=GetAlpha()+TMath::ASin(GetSnp());
+  Double_t globXYZcurr[3]; GetXYZ(globXYZcurr); 
+  Double_t phicurr=TMath::ATan2(globXYZcurr[1],globXYZcurr[0]);
   Double_t phi=phicurr+TMath::ASin(d/r)-TMath::ASin(d/rcurr);
 
   xloc=r*(TMath::Cos(phi)*TMath::Cos(GetAlpha())