]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Bug fixed in GetXY1-4 methods (Valerie)
authorpcrochet <pcrochet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Oct 2006 15:36:25 +0000 (15:36 +0000)
committerpcrochet <pcrochet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 25 Oct 2006 15:36:25 +0000 (15:36 +0000)
MUON/AliMUONLocalStruct.h

index 9c533de6ea831a2ee180428748720736706805b4..69ab6362f5ccc7e293b313675b71f9b4bfd8812c 100644 (file)
@@ -12,6 +12,7 @@
 /// \author Christian Finck
 
 #include <TObject.h>
+#include <TMath.h>
 
 class AliMUONLocalStruct : public TObject{
  
@@ -57,14 +58,21 @@ public:
    UChar_t GetSwitch()  const {return (fEOS >> 2) & 0x3FF;}
    UChar_t GetComptXY() const {return  fEOS & 3;}
 
-   UShort_t GetXY1(Int_t n) const {return  (n % 2 == 0) ? 
-       (fScaler[n] &  0xFFFF) : (fScaler[n] >> 16) &  0xFFFF;}
-   UShort_t GetXY2(Int_t n) const {return  (n % 2 == 0) ? 
-       (fScaler[8 + n] &  0xFFFF) : (fScaler[8 + n] >> 16) &  0xFFFF;}
-   UShort_t GetXY3(Int_t n) const {return  (n % 2 == 0) ? 
-       (fScaler[8*2 + n] &  0xFFFF) : (fScaler[8*2 + n] >> 16) &  0xFFFF;}
-   UShort_t GetXY4(Int_t n) const {return  (n % 2 == 0) ? 
-       (fScaler[8*3 + n] &  0xFFFF) : (fScaler[8*3 + n] >> 16) &  0xFFFF;}
+   UShort_t GetXY1(Int_t n) const {return  (n % 2 == 0) ?
+       (fScaler[TMath::Nint(Float_t(n/2))] &  0xFFFF) : 
+       (fScaler[TMath::Nint(Float_t(n/2))] >> 16) &  0xFFFF;}
+
+   UShort_t GetXY2(Int_t n) const {return  (n % 2 == 0) ?
+       (fScaler[8 + TMath::Nint(Float_t(n/2))] &  0xFFFF) : 
+       (fScaler[8 + TMath::Nint(Float_t(n/2))] >> 16) &  0xFFFF;}
+
+   UShort_t GetXY3(Int_t n) const {return  (n % 2 == 0) ?
+       (fScaler[8*2 + TMath::Nint(Float_t(n/2))] &  0xFFFF) : 
+       (fScaler[8*2 + TMath::Nint(Float_t(n/2))] >> 16) &  0xFFFF;}
+
+   UShort_t GetXY4(Int_t n) const {return  (n % 2 == 0) ?
+       (fScaler[8*3 + TMath::Nint(Float_t(n/2))] &  0xFFFF) : 
+       (fScaler[8*3 + TMath::Nint(Float_t(n/2))] >> 16) &  0xFFFF;}
 
    UInt_t* GetScalers()  {return &fL0;}