]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
fix for the new geometry (L. Gaudichet)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Mar 2007 13:45:57 +0000 (13:45 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Mar 2007 13:45:57 +0000 (13:45 +0000)
ITS/AliITStrackerMI.cxx
ITS/AliITStrackerV2.cxx

index 244b9b9dc087118c3128f267bbd69a8209d40915..63588b4c878ed0f43c6abc891544500bf840ba96 100644 (file)
@@ -1444,7 +1444,12 @@ FindDetectorIndex(Double_t phi, Double_t z) const {
   //--------------------------------------------------------------------
   //This function finds the detector crossed by the track
   //--------------------------------------------------------------------
-  Double_t dphi=-(phi-fPhiOffset);
+  Double_t dphi;
+  if (fZOffset<0)            // old geometry
+    dphi = -(phi-fPhiOffset);
+  else                       // new geometry
+    dphi = phi-fPhiOffset;
+
   if      (dphi <  0) dphi += 2*TMath::Pi();
   else if (dphi >= 2*TMath::Pi()) dphi -= 2*TMath::Pi();
   Int_t np=Int_t(dphi*fNladders*0.5/TMath::Pi()+0.5);
index 592064cb8655e8046f8d50c5d482a29be011fd87..d1b4c1309a23edcd21a082f0f84f84e46cdc0b16 100644 (file)
@@ -827,7 +827,12 @@ AliITStrackerV2::AliITSlayer::FindDetectorIndex(Double_t phi,Double_t z)const {
   //--------------------------------------------------------------------
   //This function finds the detector crossed by the track
   //--------------------------------------------------------------------
-  Double_t dphi=-(phi-fPhiOffset);
+  Double_t dphi;
+  if (fZOffset<0)            // old geometry
+    dphi = -(phi-fPhiOffset);
+  else                       // new geometry
+    dphi = phi-fPhiOffset;
+
   if      (dphi <  0) dphi += 2*TMath::Pi();
   else if (dphi >= 2*TMath::Pi()) dphi -= 2*TMath::Pi();
   Int_t np=Int_t(dphi*fNladders*0.5/TMath::Pi()+0.5);