]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
correct mapping in method GetAbsCellIdFromEtaPhi
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Apr 2010 13:52:03 +0000 (13:52 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Apr 2010 13:52:03 +0000 (13:52 +0000)
EMCAL/AliEMCALGeoUtils.cxx

index c6c75c34cbcecbca782e65150dd0f7ca98c52d7e..e4c9bab0514b7c95859dc5cb43dc49a57e81a106 100644 (file)
@@ -438,6 +438,17 @@ Bool_t AliEMCALGeoUtils::GetAbsCellIdFromEtaPhi(Double_t eta, Double_t phi, Int_
     AliDebug(2,Form(" ieta %i : dmin %f (eta=%f) : nSupMod %i ", ieta, dmin, eta, nSupMod));
 
     if(eta<0) iphi = (nphi-1) - iphi;
+         
+       //patch for mapping following alice convention  
+       if(nSupMod%2 == 0)                
+                 ieta = (fCentersOfCellsEtaDir.GetSize()-1)-ieta;// 47-ieta, revert the ordering on A side in order to keep convention.
+       else {
+               if(nSupMod<10) 
+                               iphi = (fCentersOfCellsPhiDir.GetSize()-1)  -iphi;// 23-iphi, revert the ordering on C side in order to keep convention.
+               else 
+                               iphi = (fCentersOfCellsPhiDir.GetSize()/2-1)-iphi;// 11-iphi, revert the ordering on C side in order to keep convention.
+       }
+  
     absId = GetAbsCellIdFromCellIndexes(nSupMod, iphi, ieta);
 
     return kTRUE;