]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
bug fix (L. Gaudichet)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Feb 2007 08:25:37 +0000 (08:25 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Feb 2007 08:25:37 +0000 (08:25 +0000)
ITS/AliITSgeom.cxx

index 1c659bc765269bce3c68bb4ea908e7e4ebf3c4ab..f618ab4fca518dc5c4d98ba79b645d16f300f1a1 100644 (file)
@@ -1486,10 +1486,14 @@ void AliITSgeom::DetLToTrackingV2(Int_t md, Float_t xin, Float_t zin, Float_t &y
 
   //Conversion from local coordinates on detectors to local
   //coordinates used for tracking ("v2")
-  Float_t x,y,z; Double_t rt[9];GetTrans(md,x,y,z);GetRotMatrix(md,rt);
+  Float_t x,y,z; 
+  Double_t rt[9];
+  GetTrans(md,x,y,z);
+  GetRotMatrix(md,rt);
   Double_t al=TMath::ATan2(rt[1],rt[0])+TMath::Pi();
   yout=-(-xin+(x*TMath::Cos(al)+y*TMath::Sin(al)));
-  if(md<(GetModuleIndex(2,1,1)-1))yout*=-1; zout=-zin+(Double_t)z; 
+  if ( md<(GetModuleIndex(2,1,1)) ) yout*=-1; 
+  zout=-zin+(Double_t)z; 
 }
 
 //_______________________________________________________________________
@@ -1497,9 +1501,12 @@ void AliITSgeom::TrackingV2ToDetL(Int_t md,Float_t yin,Float_t zin,Float_t &xout
   //Conversion from local coordinates used for tracking ("v2") to
   //local detector coordinates
   
-  Float_t x,y,z; Double_t rt[9];GetTrans(md,x,y,z);GetRotMatrix(md,rt);
+  Float_t x,y,z; Double_t rt[9];
+  GetTrans(md,x,y,z);
+  GetRotMatrix(md,rt);
   Double_t al=TMath::ATan2(rt[1],rt[0])+TMath::Pi();
-  xout=yin;if(md<(GetModuleIndex(2,1,1)-1))xout=-xout;
+  xout=yin;
+  if( md<(GetModuleIndex(2,1,1)) ) xout=-xout;
   xout+=(x*TMath::Cos(al)+y*TMath::Sin(al));
   zout=-zin+(Double_t)z; 
 }