]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONLocalStruct.h
Using AliITSgeomTGeo
[u/mrichter/AliRoot.git] / MUON / AliMUONLocalStruct.h
index 9c533de6ea831a2ee180428748720736706805b4..84f2628fe019c19ad3cab1d9ab887fc77f9df3ee 100644 (file)
@@ -12,6 +12,7 @@
 /// \author Christian Finck
 
 #include <TObject.h>
+#include <TMath.h>
 
 class AliMUONLocalStruct : public TObject{
  
@@ -36,12 +37,13 @@ public:
    UShort_t GetY4() const {return (fData[3] >> 16) &  0xFFFF;}
    UShort_t GetY3() const {return (fData[3])       &  0xFFFF;}
 
-   UChar_t   GetId()  const  {return fData[4] >> 19 &  0xF;}
-   UChar_t   GetDec() const  {return fData[4] >> 15 &  0xF;}
-   UChar_t   GetTriggerY() const {return fData[4] >> 14 &  0x1;}
-   UChar_t   GetYPos() const {return fData[4] >> 10 &  0xF;}
-   UChar_t   GetXDev() const {return fData[4] >> 5  &  0x1F;}
-   UChar_t   GetXPos() const {return fData[4]       &  0x1F;}
+   UChar_t  GetId()  const  {return fData[4] >> 19 &  0xF;}
+   UChar_t  GetDec() const  {return fData[4] >> 15 &  0xF;}
+   Bool_t   GetTriggerY() const {return (fData[4] >> 14 & 0x1);}
+   UChar_t  GetYPos() const {return fData[4] >> 10 &  0xF;}
+   UChar_t  GetXDev() const {return fData[4] >> 5  &  0x1F;}
+   Bool_t   GetTriggerX() const {return ((GetXDev() >> 4  & 0x1) && !(GetXDev() & 0xF));}
+   UChar_t  GetXPos() const {return fData[4]       &  0x1F;}
 
    Int_t   GetLpt() const {return (GetDec() & 0x3);}
    Int_t   GetHpt() const {return (GetDec() >> 2) & 0x3;}
@@ -57,14 +59,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;}