]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTriggerTrack.h
bug fixed
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerTrack.h
index 4623532b8be4df24c2955b549157c7f821d604f0..fbd6de5bde73d8dc93482666e07f23cc5377478f 100644 (file)
@@ -12,6 +12,8 @@
 /// \author Philippe Crochet
 
 #include <TObject.h>
+#include <TMatrixD.h>
+#include <TMath.h>
 
 class AliMUONTrackReconstructor;
 
@@ -22,7 +24,8 @@ class AliMUONTriggerTrack : public TObject
     virtual ~AliMUONTriggerTrack(); // Destructor
     AliMUONTriggerTrack (const AliMUONTriggerTrack& AliMUONTriggerTrack); // copy constructor
     AliMUONTriggerTrack& operator=(const AliMUONTriggerTrack& AliMUONTriggerTrack); // assignment operator
-    AliMUONTriggerTrack(Float_t x11, Float_t y11, Float_t thetax, Float_t thetay,
+    AliMUONTriggerTrack(Float_t x11, Float_t y11, Float_t z11, Float_t z21,
+                       Float_t slopeX, Float_t slopeY,
                        Int_t iloTrg, Long_t theGTPattern, UShort_t hitsPatternInTrigCh=0); 
     
     // getters
@@ -31,10 +34,18 @@ class AliMUONTriggerTrack : public TObject
     Float_t GetX11()    const {return fx11;}
     /// Return y position of fired X strip in MC11
     Float_t GetY11()    const {return fy11;}
+    /// Return z position of fired X strip in MC11
+    Float_t GetZ11()    const {return fz11;}
+    /// Return z position of fired X strip in MC21
+    Float_t GetZ21()    const {return fz21;}
     /// Return track theta angle in X 
-    Float_t GetThetax() const {return fthetax;}
+    Float_t GetThetax() const {return TMath::ATan(fSlopeX);}
     /// Return track theta angle in Y
-    Float_t GetThetay() const {return fthetay;}
+    Float_t GetThetay() const {return TMath::ATan(fSlopeY);}
+    /// Return track slope in X 
+    Float_t GetSlopeX() const {return fSlopeX;}
+    /// Return track slope in Y
+    Float_t GetSlopeY() const {return fSlopeY;}
     /// Return local trigger number
     Int_t   GetLoTrgNum() const {return floTrgNum;}    
 
@@ -44,10 +55,14 @@ class AliMUONTriggerTrack : public TObject
     void SetX11(Float_t x)     {fx11 = x;}
     /// Set y position of fired X strip in MC11
     void SetY11(Float_t y)     {fy11 = y;}
-    /// Set track theta angle in X 
-    void SetThetax(Float_t tx) {fthetax = tx;}
-    /// Set track theta angle in Y
-    void SetThetay(Float_t ty) {fthetay = ty;}
+    /// Set z position of fired X strip in MC11
+    void SetZ11(Float_t z)     {fz11 = z;}
+    /// Set z position of fired X strip in MC21
+    void SetZ21(Float_t z)     {fz21 = z;}
+    /// Set track slope in X 
+    void SetSlopeX(Float_t slopeX) {fSlopeX = slopeX;}
+    /// Set track slope in Y
+    void SetSlopeY(Float_t slopeY) {fSlopeY = slopeY;}
     /// Set local trigger number
     void SetLoTrgNum(Int_t loTrgNum) {floTrgNum = loTrgNum;}    
 
@@ -61,19 +76,28 @@ class AliMUONTriggerTrack : public TObject
     /// set word telling which trigger chambers where hit by track
     void     SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) {fHitsPatternInTrigCh = hitsPatternInTrigCh;}
     
-    virtual void Print(Option_t* opt="") const;
+    virtual void Print(Option_t* opt="FULL") const;
+
+    const TMatrixD& GetCovariances() const;
+    void  SetCovariances(const TMatrixD& covariances);
+    void  SetCovariances(const Double_t matrix[3][3]);
+  
+    Bool_t Match(AliMUONTriggerTrack &track, Double_t sigmaCut) const;
     
 protected:
   private:
   Float_t fx11;    ///< x position of fired Y strip in MC11
   Float_t fy11;    ///< y position of fired X strip in MC11
-  Float_t fthetax; ///< track theta angle in X   
-  Float_t fthetay; ///< track theta angle in Y
+  Float_t fz11;    ///< z position of fired X strip in MC11
+  Float_t fz21;    ///< z position of fired X strip in MC21
+  Float_t fSlopeX; ///< track slope in X   
+  Float_t fSlopeY; ///< track slope in Y
   Int_t   floTrgNum; ///< local trigger number
   UChar_t fGTPattern; ///< Global trigger pattern  (do not work with static statement)
   UShort_t fHitsPatternInTrigCh; ///< Word containing info on the hits left in trigger chambers
+  mutable TMatrixD *fCovariances; ///< Covariance matrix of track parameters 
 
-  ClassDef(AliMUONTriggerTrack, 5) // Reconstructed trigger track in ALICE dimuon spectrometer
+  ClassDef(AliMUONTriggerTrack, 6) // Reconstructed trigger track in ALICE dimuon spectrometer
     };
        
 #endif