]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTrackParam.h
Minor changes to complete the modification of the standard tracking algorithm (Ph...
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackParam.h
1 #ifndef ALIMUONTRACKPARAM_H
2 #define ALIMUONTRACKPARAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /*$Id$*/
7 // Revision of includes 07/05/2004
8
9 /// \ingroup rec
10 /// \class AliMUONTrackParam
11 /// \brief Track parameters in ALICE dimuon spectrometer
12 ///
13 ////////////////////////////////////////////////////
14 /// Track parameters in ALICE dimuon spectrometer
15 ////////////////////////////////////////////////////
16
17 #include <TObject.h>
18 #include <TMatrixDfwd.h>
19 #include "AliMUONHitForRec.h"
20
21 class AliESDMuonTrack;
22
23 class AliMUONTrackParam : public TObject 
24 {
25  public:
26   AliMUONTrackParam(); // Constructor
27   virtual ~AliMUONTrackParam(); // Destructor
28   
29   AliMUONTrackParam(const AliMUONTrackParam& theMUONTrackParam);
30   AliMUONTrackParam& operator=(const  AliMUONTrackParam& theMUONTrackParam);
31
32   void GetParamFrom(const AliESDMuonTrack& esdMuonTrack);
33   void SetParamFor(AliESDMuonTrack& esdMuonTrack);
34
35   // Get and Set methods for data
36         /// return inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)
37   Double_t GetInverseBendingMomentum(void) const {return fInverseBendingMomentum;}
38         /// set inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)
39   void     SetInverseBendingMomentum(Double_t inverseBendingMomentum) {fInverseBendingMomentum = inverseBendingMomentum;}
40         /// return bending slope (cm ** -1)
41   Double_t GetBendingSlope(void) const {return fBendingSlope;}
42         /// set bending slope (cm ** -1)
43   void     SetBendingSlope(Double_t bendingSlope) {fBendingSlope = bendingSlope;}
44         /// return non bending slope (cm ** -1)
45   Double_t GetNonBendingSlope(void) const {return fNonBendingSlope;}
46         /// set non bending slope (cm ** -1)
47   void     SetNonBendingSlope(Double_t nonBendingSlope) {fNonBendingSlope = nonBendingSlope;}
48         /// return Z coordinate (cm)
49   Double_t GetZ(void) const {return fZ;}
50         /// set Z coordinate (cm)
51   void     SetZ(Double_t z) {fZ = z;}
52         /// return bending coordinate (cm)
53   Double_t GetBendingCoor(void) const {return fBendingCoor;}
54         /// set bending coordinate (cm)
55   void     SetBendingCoor(Double_t bendingCoor) {fBendingCoor = bendingCoor;}
56         /// return non bending coordinate (cm)
57   Double_t GetNonBendingCoor(void) const {return fNonBendingCoor;}
58         /// set non bending coordinate (cm)
59   void     SetNonBendingCoor(Double_t nonBendingCoor) {fNonBendingCoor = nonBendingCoor;}
60   
61   void     SetTrackParam(AliMUONTrackParam& theMUONTrackParam);
62   
63   AliMUONHitForRec* GetHitForRecPtr(void) const;
64         /// set pointeur to associated HitForRec
65   void     SetHitForRecPtr(AliMUONHitForRec* hitForRec) {fHitForRecPtr = hitForRec;}
66   
67   Double_t Px() const;  // return px
68   Double_t Py() const;  // return py
69   Double_t Pz() const;  // return pz
70   Double_t P()  const;  // return total momentum
71
72         /// return kTRUE if the covariance matrix exist, kFALSE if not
73   Bool_t    CovariancesExist(void) {return (fCovariances) ? kTRUE : kFALSE;}
74   TMatrixD* GetCovariances(void);
75   void      SetCovariances(TMatrixD* covariances);
76   void      SetCovariances(Double_t matrix[5][5]);
77   void      SetVariances(Double_t matrix[5][5]);
78   void      DeleteCovariances(void);
79   
80   void EvalCovariances(AliMUONHitForRec* hit2);
81
82         /// necessary for sorting TClonesArray of TrackHit's
83   Bool_t IsSortable () const {return kTRUE;}
84   Int_t Compare(const TObject* trackParam) const;
85
86   virtual void Print(Option_t* opt="") const;
87  
88
89  private:
90   // Parameters
91   Double_t fNonBendingCoor; ///< Non bending coordinate (cm)
92   Double_t fNonBendingSlope; ///< Non bending slope (cm ** -1)
93   Double_t fBendingCoor; ///< Bending coordinate (cm)
94   Double_t fBendingSlope; ///< Bending slope (cm ** -1)
95   Double_t fInverseBendingMomentum; ///< Inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)
96   Double_t fZ; ///< Z coordinate (cm)
97   
98   /// Covariance matrix of track parameters, ordered as follow:
99   ///    <X,X>      <X,SlopeX>        <X,Y>      <X,SlopeY>       <X,InvP_yz>
100   /// <X,SlopeX>  <SlopeX,SlopeX>  <Y,SlopeX>  <SlopeX,SlopeY>  <SlopeX,InvP_yz>
101   ///    <X,Y>      <Y,SlopeX>        <Y,Y>      <Y,SlopeY>       <Y,InvP_yz>
102   /// <X,SlopeY>  <SlopeX,SlopeY>  <Y,SlopeY>  <SlopeY,SlopeY>  <SlopeY,InvP_yz>
103   /// <X,InvP_yz> <SlopeX,InvP_yz> <Y,InvP_yz> <SlopeY,InvP_yz> <InvP_yz,InvP_yz>
104   TMatrixD *fCovariances; //!
105   
106   AliMUONHitForRec *fHitForRecPtr; //!< Pointer to associated HitForRec if any
107   
108   ClassDef(AliMUONTrackParam, 2) // Track parameters in ALICE dimuon spectrometer
109 };
110         
111 #endif