]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
azimuthal angle computed in 0, 2*Pi range
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Oct 2007 12:44:43 +0000 (12:44 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Oct 2007 12:44:43 +0000 (12:44 +0000)
ITS/AliITSMultReconstructor.cxx

index 164cef6dad829c7bad30772096febb4704cd14bc..118d8e11cc2a5ad16fd871f283088f4543689119 100644 (file)
@@ -1,5 +1,5 @@
 /**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
  * Author: The ALICE Off-line Project.                                    *
  * Contributors are mentioned in the code where appropriate.              *
@@ -258,9 +258,9 @@ AliITSMultReconstructor::Reconstruct(TTree* clusterTree, Float_t* vtx, Float_t*
                               TMath::Power(y,2) +
                               TMath::Power(z,2));
     
-    fClustersLay1[iC1][0] = TMath::ACos(z/r);  // Store Theta
-    fClustersLay1[iC1][1] = TMath::ATan2(y,x);  // Store Phi
-    fClustersLay1[iC1][2] = z/r;               // Store scaled z
+    fClustersLay1[iC1][0] = TMath::ACos(z/r);                   // Store Theta
+    fClustersLay1[iC1][1] = TMath::Pi() + TMath::ATan2(-y,-x);  // Store Phi
+    fClustersLay1[iC1][2] = z/r;                                // Store scaled z
     if (fHistOn) {
       Float_t eta=fClustersLay1[iC1][0];
       eta= TMath::Tan(eta/2.);
@@ -280,9 +280,9 @@ AliITSMultReconstructor::Reconstruct(TTree* clusterTree, Float_t* vtx, Float_t*
                               TMath::Power(y,2) +
                               TMath::Power(z,2));
     
-    fClustersLay2[iC2][0] = TMath::ACos(z/r);  // Store Theta
-    fClustersLay2[iC2][1] = TMath::ATan2(y,x);  // Store Phi
-    fClustersLay2[iC2][2] = z;                 // Store z
+    fClustersLay2[iC2][0] = TMath::ACos(z/r);                   // Store Theta
+    fClustersLay2[iC2][1] = TMath::Pi() + TMath::ATan2(-y,-x);  // Store Phi
+    fClustersLay2[iC2][2] = z;                                  // Store z
 
  // this only needs to be initialized for the fNClustersLay2 first associations
     fAssociationFlag[iC2] = kFALSE;
@@ -530,3 +530,4 @@ AliITSMultReconstructor::SaveHists() {
   fhphiClustersLay1->Write();
 }
 
+