]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Bug correction
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Oct 2004 11:05:52 +0000 (11:05 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Oct 2004 11:05:52 +0000 (11:05 +0000)
ANALYSIS/AliAODPair.cxx

index ff29c5d1b682ef9f7df5be6b43f28c4087765a89..436c8d9aeb7fee1c32e3c0ec71546e6cde612013 100644 (file)
@@ -522,7 +522,13 @@ Double_t AliAODPair::GetR()
 //Returns distance between particles vertexes in thir CMS
 
   CalculateDiffs();
-  return TMath::Sqrt( fPxDiff*fPxDiff + fPyDiff*fPyDiff + fPzDiff*fPzDiff);
+  
+  Double_t  vxDiff = fPart1->Vx() - fPart2->Vx();
+  Double_t  vyDiff = fPart1->Vy() - fPart2->Vy();
+  Double_t  vzDiff = fPart1->Vz() - fPart2->Vz();
+  
+  Double_t r = TMath::Sqrt( vxDiff*vxDiff + vyDiff*vyDiff + vzDiff*vzDiff );
+  return r;
   
 }
 /************************************************************************/