]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Correct TRU online mapping for the 2 1/3 SM
authorguernane <guernane@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 May 2012 11:32:45 +0000 (11:32 +0000)
committerguernane <guernane@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 May 2012 11:32:45 +0000 (11:32 +0000)
EMCAL/AliEMCALGeometry.cxx

index e46a5e60b3344c784ad2ddb48147831eaf238362..cab671e6e206581ff2ffa13167f18f7f1bc35a70 100644 (file)
@@ -1449,6 +1449,11 @@ Bool_t AliEMCALGeometry::GetTRUIndexFromOnlineIndex(const Int_t id, Int_t& idx)
                return kFALSE;
        }
        
+       if (id == 31) {
+           idx = 31;
+           return kTRUE;
+       }
+
        idx = ((id % 6) < 3) ? 6 * int(id / 6) + 2 * (id % 3) : 6 * int(id / 6) + 2 * (2 - (id % 3)) + 1;
 
        return kTRUE;
@@ -1463,7 +1468,11 @@ Int_t AliEMCALGeometry::GetTRUIndexFromOnlineIndex(const Int_t id) const
        {
                AliError(Form("TRU index out of range: %d",id));
        }
-       
+
+       if (id == 31) {
+           return 31;
+       }
+
        Int_t idx = ((id % 6) < 3) ? 6 * int(id / 6) + 2 * (id % 3) : 6 * int(id / 6) + 2 * (2 - (id % 3)) + 1;
        
        return idx;
@@ -1480,6 +1489,11 @@ Bool_t AliEMCALGeometry::GetOnlineIndexFromTRUIndex(const Int_t id, Int_t& idx)
                return kFALSE;
        }
        
+       if (id == 31) {
+           idx = 31;
+           return kTRUE;
+       }
+
        idx = (id % 2) ? int((6 - (id % 6)) / 2) + 3 * (2 * int(id / 6) + 1) : 3 * int(id / 6) + int(id / 2);
        
        return kTRUE;
@@ -1494,6 +1508,10 @@ Int_t AliEMCALGeometry::GetOnlineIndexFromTRUIndex(const Int_t id) const
        {
                AliError(Form("TRU index out of range: %d",id));
        }
+
+       if (id == 31) {
+           return 31;
+       }
        
        Int_t idx = (id % 2) ? int((6 - (id % 6)) / 2) + 3 * (2 * int(id / 6) + 1) : 3 * int(id / 6) + int(id / 2);