Line data Source code
1 : #ifndef AliMFTTrackParam_H
2 : #define AliMFTTrackParam_H
3 :
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : /// \ingroup MFTrec
8 : /// \class AliMFTTrackParam
9 : /// \brief Class holding the parameter of a MFT Standalone Track
10 : ///
11 : ///
12 : ///
13 : /// \author Raphael Tieulent <raphael.tieulent@cern.ch>, IPN-Lyon
14 : /// \date April 28th, 2015
15 :
16 : #include "TObject.h"
17 : #include <TMatrixD.h>
18 : #include <TMath.h>
19 :
20 : //=============================================================================================
21 :
22 0 : class AliMFTTrackParam : public TObject {
23 :
24 : public:
25 :
26 : AliMFTTrackParam();
27 : virtual ~AliMFTTrackParam();
28 : AliMFTTrackParam(const AliMFTTrackParam& theMFTTrackParam);
29 :
30 : /// set Cluster coordinates (cm)
31 0 : void SetClusterPos(Double_t x, Double_t y, Double_t z) {fX = x;fY = y;fZ = z;}
32 : /// return cluster X coordinate (cm)
33 0 : Double_t GetClusterX() const {return fX;}
34 : /// return cluster Y coordinate (cm)
35 0 : Double_t GetClusterY() const {return fY;}
36 :
37 : /// return Z coordinate (cm)
38 0 : Double_t GetZ() const {return fZ;}
39 : /// set Z coordinate (cm)
40 0 : void SetZ(Double_t z) {fZ = z;}
41 : /// return X coordinate (cm)
42 0 : Double_t GetX() const {return fParameters(0,0);}
43 : /// set X coordinate (cm)
44 0 : void SetX(Double_t val) {fParameters(0,0) = val;}
45 : /// return Y coordinate (cm)
46 0 : Double_t GetY() const {return fParameters(1,0);}
47 : /// set Y coordinate (cm)
48 0 : void SetY(Double_t val) {fParameters(1,0) = val;}
49 : /// return X slope
50 0 : Double_t GetSlopeX() const {return fParameters(2,0);}
51 : /// set X slope
52 0 : void SetSlopeX(Double_t val) {fParameters(2,0) = val;}
53 : /// return Y slope
54 0 : Double_t GetSlopeY() const {return fParameters(3,0);}
55 : /// set Y slope
56 0 : void SetSlopeY(Double_t val) {fParameters(3,0) = val;}
57 : /// return Inverse Momentum
58 0 : Double_t GetInverseTransverseMomentum() const {return fParameters(4,0);}
59 : /// set Inverse Momentum
60 0 : void SetInverseTransverseMomentum(Double_t val) {fParameters(4,0) = val;}
61 : /// return the charge (assumed forward motion)
62 0 : Double_t GetCharge() const {return TMath::Sign(1.,fParameters(4,0));}
63 : /// set the charge (assumed forward motion)
64 0 : void SetCharge(Double_t charge) {if (charge*fParameters(4,0) < 0.) fParameters(4,0) *= -1.;}
65 : /// return Polar angle theta
66 0 : Double_t GetTheta() const {return TMath::ATan(TMath::Sqrt(fParameters(2,0)*fParameters(2,0) + fParameters(3,0)*fParameters(3,0)));}
67 : /// return Azimuthal angle phi
68 0 : Double_t GetPhi() const {return TMath::ATan2(fParameters(3,0),fParameters(2,0)) ;}
69 :
70 :
71 : /// return track parameters
72 0 : const TMatrixD& GetParameters() const {return fParameters;}
73 : /// set track parameters
74 0 : void SetParameters(const TMatrixD& parameters) {fParameters = parameters;}
75 : /// add track parameters
76 0 : void AddParameters(const TMatrixD& parameters) {fParameters += parameters;}
77 : /// return kTRUE if the covariance matrix exist, kFALSE if not
78 0 : Bool_t CovariancesExist() const {return (fCovariances) ? kTRUE : kFALSE;}
79 :
80 : /// return the chi2 of the track when the associated cluster was attached
81 0 : Double_t GetTrackChi2() const {return fTrackChi2;}
82 : /// set the chi2 of the track when the associated cluster was attached
83 0 : void SetTrackChi2(Double_t chi2) {fTrackChi2 = chi2;}
84 : /// return the local chi2 of the associated cluster with respect to the track
85 0 : Double_t GetLocalChi2() const {return fLocalChi2;}
86 : /// set the local chi2 of the associated cluster with respect to the track
87 0 : void SetLocalChi2(Double_t chi2) {fLocalChi2 = chi2;}
88 :
89 : const TMatrixD& GetCovariances() const;
90 : void SetCovariances(const TMatrixD& covariances);
91 : void SetCovariances(const Double_t matrix[5][5]);
92 : void SetVariances(const Double_t matrix[5][5]);
93 : void DeleteCovariances();
94 :
95 :
96 : const TMatrixD& GetPropagator() const;
97 : void ResetPropagator();
98 : void UpdatePropagator(const TMatrixD& propagator);
99 :
100 : virtual void Print(Option_t* opt="") const;
101 :
102 : /// return total momentum
103 : Double_t P() const;
104 :
105 :
106 : protected:
107 : mutable TMatrixD *fCovariances; ///< \brief Covariance matrix of track parameters
108 : mutable TMatrixD *fPropagator; ///< Jacobian used to extrapolate the track parameters and covariances to the actual z position
109 : mutable TMatrixD *fExtrapParameters; //!<! Track parameters extrapolated to the actual z position (not filtered by Kalman)
110 : mutable TMatrixD *fExtrapCovariances; //!<! Covariance matrix extrapolated to the actual z position (not filtered by Kalman)
111 :
112 : mutable TMatrixD *fSmoothParameters; //!<! Track parameters obtained using smoother
113 : mutable TMatrixD *fSmoothCovariances; //!<! Covariance matrix obtained using smoother
114 :
115 : /// Track parameters ordered as follow: <pre>
116 : /// param0: local X-coordinate of a track (cm)
117 : /// param1: local Y-coordinate of a track (cm)
118 : /// param2: Slope X/Z
119 : /// param3: Slope Y/Z
120 : /// param4: Q/p_t (1/(GeV/c)) </pre>
121 : TMatrixD fParameters; ///< Track parameters
122 :
123 : Double_t fX; ///< Cluster X coordinate (cm)
124 : Double_t fY; ///< Cluster Y coordinate (cm)
125 : Double_t fZ; ///< Cluster Z coordinate (cm)
126 :
127 : Double_t fTrackChi2; ///< Chi2 of the track when the associated cluster was attached
128 : Double_t fLocalChi2; ///< Local chi2 of the associated cluster with respect to the track
129 :
130 : /// \cond CLASSIMP
131 12 : ClassDef(AliMFTTrackParam,1);
132 : /// \endcond
133 : };
134 :
135 : //=============================================================================================
136 :
137 : #endif
|