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 */
7 // Revision of includes 07/05/2004
10 /// \class AliMUONTrackParam
11 /// \brief Track parameters in ALICE dimuon spectrometer
13 ////////////////////////////////////////////////////
14 /// Track parameters in ALICE dimuon spectrometer
15 ////////////////////////////////////////////////////
20 class AliMUONHitForRec;
21 class AliESDMuonTrack;
23 class AliMUONTrackParam : public TObject
26 AliMUONTrackParam(); // Constructor
27 virtual ~AliMUONTrackParam(); // Destructor
29 AliMUONTrackParam(const AliMUONTrackParam& theMUONTrackParam);
30 AliMUONTrackParam& operator=(const AliMUONTrackParam& theMUONTrackParam);
32 void GetParamFrom(const AliESDMuonTrack& esdMuonTrack);
33 void SetParamFor(AliESDMuonTrack& esdMuonTrack) const;
34 void GetParamFromUncorrected(const AliESDMuonTrack& esdMuonTrack);
35 void SetParamForUncorrected(AliESDMuonTrack& esdMuonTrack) const;
37 // Get and Set methods for data
38 /// return Z coordinate (cm)
39 Double_t GetZ() const {return fZ;}
40 /// set Z coordinate (cm)
41 void SetZ(Double_t z) {fZ = z;}
42 /// return non bending coordinate (cm)
43 Double_t GetNonBendingCoor() const {return fParameters(0,0);}
44 /// set non bending coordinate (cm)
45 void SetNonBendingCoor(Double_t nonBendingCoor) {fParameters(0,0) = nonBendingCoor;}
46 /// return non bending slope (cm ** -1)
47 Double_t GetNonBendingSlope() const {return fParameters(1,0);}
48 /// set non bending slope (cm ** -1)
49 void SetNonBendingSlope(Double_t nonBendingSlope) {fParameters(1,0) = nonBendingSlope;}
50 /// return bending coordinate (cm)
51 Double_t GetBendingCoor() const {return fParameters(2,0);}
52 /// set bending coordinate (cm)
53 void SetBendingCoor(Double_t bendingCoor) {fParameters(2,0) = bendingCoor;}
54 /// return bending slope (cm ** -1)
55 Double_t GetBendingSlope() const {return fParameters(3,0);}
56 /// set bending slope (cm ** -1)
57 void SetBendingSlope(Double_t bendingSlope) {fParameters(3,0) = bendingSlope;}
58 /// return inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)
59 Double_t GetInverseBendingMomentum() const {return fParameters(4,0);}
60 /// set inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion)
61 void SetInverseBendingMomentum(Double_t inverseBendingMomentum) {fParameters(4,0) = inverseBendingMomentum;}
62 /// return the charge (assumed forward motion)
63 Double_t GetCharge() const {return TMath::Sign(1.,fParameters(4,0));}
64 /// set the charge (assumed forward motion)
65 void SetCharge(Double_t charge) {if (charge*fParameters(4,0) < 0.) fParameters(4,0) *= -1.;}
67 /// return track parameters
68 const TMatrixD& GetParameters() const {return fParameters;}
69 /// set track parameters
70 void SetParameters(const TMatrixD& parameters) {fParameters = parameters;}
71 /// add track parameters
72 void AddParameters(const TMatrixD& parameters) {fParameters += parameters;}
74 Double_t Px() const; // return px
75 Double_t Py() const; // return py
76 Double_t Pz() const; // return pz
77 Double_t P() const; // return total momentum
79 /// return kTRUE if the covariance matrix exist, kFALSE if not
80 Bool_t CovariancesExist() const {return (fCovariances) ? kTRUE : kFALSE;}
82 const TMatrixD& GetCovariances() const;
83 void SetCovariances(const TMatrixD& covariances);
84 void SetCovariances(const Double_t matrix[5][5]);
85 void SetVariances(const Double_t matrix[5][5]);
86 void DeleteCovariances();
88 const TMatrixD& GetPropagator() const;
89 void ResetPropagator();
90 void UpdatePropagator(const TMatrixD& propagator);
92 const TMatrixD& GetExtrapParameters() const;
93 void SetExtrapParameters(const TMatrixD& parameters);
95 const TMatrixD& GetExtrapCovariances() const;
96 void SetExtrapCovariances(const TMatrixD& covariances);
98 const TMatrixD& GetSmoothParameters() const;
99 void SetSmoothParameters(const TMatrixD& parameters);
101 const TMatrixD& GetSmoothCovariances() const;
102 void SetSmoothCovariances(const TMatrixD& covariances);
104 AliMUONHitForRec* GetHitForRecPtr() const;
105 /// set pointeur to associated HitForRec
106 void SetHitForRecPtr(AliMUONHitForRec* hitForRec) {fHitForRecPtr = hitForRec;}
108 /// return kTRUE if the associated hit can be removed from the track it belongs to
109 Bool_t IsRemovable() const {return fRemovable;}
110 /// set the flag telling whether the associated hit can be removed from the track it belongs to or not
111 void SetRemovable(Bool_t removable) {fRemovable = removable;}
113 /// return the chi2 of the track when the associated HitForRec was attached
114 Double_t GetTrackChi2() const {return fTrackChi2;}
115 /// set the chi2 of the track when the associated HitForRec was attached
116 void SetTrackChi2(Double_t chi2) {fTrackChi2 = chi2;}
117 /// return the local chi2 of the associated HitForRec with respect to the track
118 Double_t GetLocalChi2() const {return fLocalChi2;}
119 /// set the local chi2 of the associated HitForRec with respect to the track
120 void SetLocalChi2(Double_t chi2) {fLocalChi2 = chi2;}
122 /// necessary for sorting TClonesArray of TrackHit's
123 Bool_t IsSortable () const {return kTRUE;}
124 Int_t Compare(const TObject* trackParam) const;
126 virtual void Print(Option_t* opt="") const;
128 virtual void Clear(Option_t* opt="");
132 Double_t fZ; ///< Z coordinate (cm)
134 /// Track parameters ordered as follow: <pre>
135 /// X = Non bending coordinate (cm)
136 /// SlopeX = Non bending slope (cm ** -1)
137 /// Y = Bending coordinate (cm)
138 /// SlopeY = Bending slope (cm ** -1)
139 /// InvP_yz = Inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) </pre>
140 TMatrixD fParameters; ///< \brief Track parameters
142 /// Covariance matrix of track parameters, ordered as follow: <pre>
143 /// <X,X> <X,SlopeX> <X,Y> <X,SlopeY> <X,InvP_yz>
144 /// <X,SlopeX> <SlopeX,SlopeX> <Y,SlopeX> <SlopeX,SlopeY> <SlopeX,InvP_yz>
145 /// <X,Y> <Y,SlopeX> <Y,Y> <Y,SlopeY> <Y,InvP_yz>
146 /// <X,SlopeY> <SlopeX,SlopeY> <Y,SlopeY> <SlopeY,SlopeY> <SlopeY,InvP_yz>
147 /// <X,InvP_yz> <SlopeX,InvP_yz> <Y,InvP_yz> <SlopeY,InvP_yz> <InvP_yz,InvP_yz> </pre>
148 mutable TMatrixD *fCovariances; ///< \brief Covariance matrix of track parameters
150 mutable TMatrixD *fPropagator; //!< Jacobian used to extrapolate the track parameters and covariances to the actual z position
151 mutable TMatrixD *fExtrapParameters; //!< Track parameters extrapolated to the actual z position (not filtered by Kalman)
152 mutable TMatrixD *fExtrapCovariances; //!< Covariance matrix extrapolated to the actual z position (not filtered by Kalman)
154 mutable TMatrixD *fSmoothParameters; //!< Track parameters obtained using smoother
155 mutable TMatrixD *fSmoothCovariances; //!< Covariance matrix obtained using smoother
157 AliMUONHitForRec *fHitForRecPtr; //!< Pointer to associated HitForRec if any
159 Bool_t fRemovable; //!< kTRUE if the associated hit can be removed from the track it belongs to
161 Double_t fTrackChi2; //!< Chi2 of the track when the associated HitForRec was attached
162 Double_t fLocalChi2; //!< Local chi2 of the associated HitForRec with respect to the track
164 ClassDef(AliMUONTrackParam, 4) // Track parameters in ALICE dimuon spectrometer