]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSGeometry.cxx
z-sign bugs fixed
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGeometry.cxx
index 32b883a11ff4c9feebe91a073841296a2d9f9513..4a8e2efcdf8261096f6158a883c25e6a9cf70e3e 100644 (file)
@@ -318,7 +318,7 @@ void AliPHOSGeometry::ImpactOnEmc(Double_t * vtx, Double_t theta, Double_t phi,
   // calculates the impact coordinates on PHOS of a neutral particle  
   // emitted in the vertex vtx[3] with direction theta and phi in the ALICE global coordinate system
   TVector3 p(TMath::Sin(theta)*TMath::Cos(phi),TMath::Sin(theta)*TMath::Sin(phi),TMath::Cos(theta)) ;
-  TVector3 v(vtx[0],vtx[1],-vtx[2]) ;
+  TVector3 v(vtx[0],vtx[1],vtx[2]) ;
 
   //calculate offset to crystal surface
   Float_t * inthermo = fGeometryEMCA->GetInnerThermoHalfSize() ;
@@ -702,7 +702,8 @@ void AliPHOSGeometry::Local2Global(Int_t mod, Float_t x, Float_t z,
 //____________________________________________________________________________
 void AliPHOSGeometry::GetIncidentVector(const TVector3 &vtx, Int_t module, Float_t x,Float_t z, TVector3 &vInc) const {
   //Calculates vector pointing from vertex to current poisition in module local frame
+  //Note that PHOS local system and ALICE global have opposite z directions
 
   Global2Local(vInc,vtx,module) ; 
-  vInc.SetXYZ(vInc.X()+x,vInc.Y(),vInc.Z()+z) ;
+  vInc.SetXYZ(vInc.X()+x,vInc.Y(),vInc.Z()-z) ;
 }