]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONLocalStruct.h
DQM configure file
[u/mrichter/AliRoot.git] / MUON / AliMUONLocalStruct.h
index 696ce1896eb34a9ad12052ae5a6ec1ec8e93e15e..84620b5e2e7f3176e0e0eb0df8e90143d1177207 100644 (file)
@@ -7,12 +7,14 @@
 
 /// \ingroup raw
 /// \class AliMUONLocalStruct
-/// \brief rawdata local card structure for trigger
+/// \brief Rawdata local card structure for trigger
 ///
 //  Author Christian Finck
 
 #include <TObject.h>
 #include <TMath.h>
+#include <TArrayS.h>
+
 
 class AliMUONLocalStruct : public TObject{
  
@@ -36,6 +38,10 @@ public:
    UShort_t GetX4() const {return (fData[1] >> 16) &  0xFFFF;}
             /// Return X3
    UShort_t GetX3() const {return (fData[1])       &  0xFFFF;}
+           /// return X pattern array
+   void    GetXPattern(TArrayS& array) const;
+           /// return Y pattern array
+   void    GetYPattern(TArrayS& array) const;
 
             /// Return Y2
    UShort_t GetY2() const {return (fData[2] >> 16) &  0xFFFF;}
@@ -50,14 +56,20 @@ public:
    UChar_t  GetId()  const  {return fData[4] >> 19 &  0xF;}
             /// Return Dec
    UChar_t  GetDec() const  {return fData[4] >> 15 &  0xF;}
+            /// Return TrigY
+   Bool_t   GetTrigY() const {return (fData[4] >> 14 & 0x1);}
             /// Return TriggerY
-   Bool_t   GetTriggerY() const {return (fData[4] >> 14 & 0x1);}
+   Bool_t   GetTriggerY() const {return !(GetTrigY() && GetYPos()==15);}
             /// Return Upos
    UChar_t  GetYPos() const {return fData[4] >> 10 &  0xF;}
-            /// Return Xdev
-   UChar_t  GetXDev() const {return fData[4] >> 5  &  0x1F;}
+            /// Get Sign of X deviation 
+   UChar_t  GetSXDev() const {return fData[4] >> 9  &  0x1;}
+            /// Get X deviation 
+   UChar_t  GetXDev() const {return fData[4] >> 5  &  0xF;}
             /// Return TriggerX
-   Bool_t   GetTriggerX() const {return ((GetXDev() >> 4  & 0x1) && !(GetXDev() & 0xF));}
+   Bool_t   GetTriggerX() const {return !(GetSXDev() &&
+                                         !GetXDev() &&
+                                         GetXPos()==0);}   
             /// Return Xpos
    UChar_t  GetXPos() const {return fData[4]       &  0x1F;}
 
@@ -80,27 +92,27 @@ public:
             /// Return local clock
    UInt_t  GetClock()   const {return fClk;}
             /// Return switch
-   UChar_t GetSwitch()  const {return (fEOS >> 2) & 0x3FF;}
+   UShort_t GetSwitch()  const {return (fEOS >> 1) & 0x3FF;}
             /// Return ComptXY
-   UChar_t GetComptXY() const {return  fEOS & 3;}
+   UChar_t GetComptXY() const {return  fEOS & 1;}
 
             /// Return XY1
-   UShort_t GetXY1(Int_t n) const {return  (n % 2 == 0) ?
+   UShort_t GetXY1(Int_t n) const {return  (n % 2 == 1) ?
        (fScaler[TMath::Nint(Float_t(n/2))] &  0xFFFF) : 
        (fScaler[TMath::Nint(Float_t(n/2))] >> 16) &  0xFFFF;}
 
             /// Return XY2
-   UShort_t GetXY2(Int_t n) const {return  (n % 2 == 0) ?
+   UShort_t GetXY2(Int_t n) const {return  (n % 2 == 1) ?
        (fScaler[8 + TMath::Nint(Float_t(n/2))] &  0xFFFF) : 
        (fScaler[8 + TMath::Nint(Float_t(n/2))] >> 16) &  0xFFFF;}
 
             /// Return XY3
-   UShort_t GetXY3(Int_t n) const {return  (n % 2 == 0) ?
+   UShort_t GetXY3(Int_t n) const {return  (n % 2 == 1) ?
        (fScaler[8*2 + TMath::Nint(Float_t(n/2))] &  0xFFFF) : 
        (fScaler[8*2 + TMath::Nint(Float_t(n/2))] >> 16) &  0xFFFF;}
 
             /// Return XY4
-   UShort_t GetXY4(Int_t n) const {return  (n % 2 == 0) ?
+   UShort_t GetXY4(Int_t n) const {return  (n % 2 == 1) ?
        (fScaler[8*3 + TMath::Nint(Float_t(n/2))] &  0xFFFF) : 
        (fScaler[8*3 + TMath::Nint(Float_t(n/2))] >> 16) &  0xFFFF;}
 
@@ -151,6 +163,6 @@ public:
    static const UInt_t fgkEndOfLocal;   ///< end of local info word
    static const UInt_t fgkDisableWord;  ///< Word for "empty" slots
 
-   ClassDef(AliMUONLocalStruct,3)
+   ClassDef(AliMUONLocalStruct,3) //Rawdata local card structure for trigger
 };
 #endif