]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliAODVertex.cxx
Fix fixed-string length bug
[u/mrichter/AliRoot.git] / STEER / AliAODVertex.cxx
index 1600ea64b9eaabfcfcd437c6e270eb6c5586bfc0..44030031538b5f0427188030759dea549e83cff7 100644 (file)
@@ -35,7 +35,7 @@ AliAODVertex::AliAODVertex() :
   fID(-1),
   fType(kUndef),
   fCovMatrix(NULL),
-  fParent(0x0),
+  fParent(),
   fDaughters()
   {
   // default constructor
@@ -95,7 +95,7 @@ AliAODVertex::AliAODVertex(const Double_t position[3],
   fID(-1),
   fType(vtype),
   fCovMatrix(NULL),
-  fParent(0x0),
+  fParent(),
   fDaughters()
 {
   // constructor without covariance matrix
@@ -112,7 +112,7 @@ AliAODVertex::AliAODVertex(const Float_t position[3],
   fID(-1),
   fType(vtype),
   fCovMatrix(NULL),
-  fParent(0x0),
+  fParent(),
   fDaughters()
 {
   // constructor without covariance matrix
@@ -443,7 +443,7 @@ void AliAODVertex::PhiAndThetaToVertex(AliAODVertex *vtx, P &phi, T &theta) cons
   // rotation angles around z-axis (phi) and around new y-axis (theta)
   // with which vtx is seen (used by RotatedCovMatrix... methods)
 
-  phi = TMath::ATan2(vtx->GetY()-GetY(),vtx->GetX()-GetX());
+  phi = TMath::Pi()+TMath::ATan2(-vtx->GetY()+GetY(),-vtx->GetX()+GetX());
   Double_t vtxxphi = vtx->GetX()*TMath::Cos(phi)+vtx->GetY()*TMath::Sin(phi);
   Double_t xphi = GetX()*TMath::Cos(phi)+GetY()*TMath::Sin(phi);
   theta = TMath::ATan2(vtx->GetZ()-GetZ(),vtxxphi-xphi);