]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 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$*/ | |
30178c30 | 7 | // Revision of includes 07/05/2004 |
a9e2aefa | 8 | |
692de412 | 9 | /// \ingroup rec |
10 | /// \class AliMUONTrackParam | |
11 | /// \brief Track parameters in ALICE dimuon spectrometer | |
12 | /// | |
13 | //////////////////////////////////////////////////// | |
14 | /// Track parameters in ALICE dimuon spectrometer | |
15 | //////////////////////////////////////////////////// | |
a9e2aefa | 16 | |
3831f268 | 17 | #include <TObject.h> |
ea94c18b | 18 | #include <TMatrixD.h> |
a9e2aefa | 19 | |
96ebe67e | 20 | class AliMUONVCluster; |
211c52eb | 21 | class AliESDMuonTrack; |
22 | ||
30178c30 | 23 | class AliMUONTrackParam : public TObject |
24 | { | |
a9e2aefa | 25 | public: |
30178c30 | 26 | AliMUONTrackParam(); // Constructor |
de2cd600 | 27 | virtual ~AliMUONTrackParam(); // Destructor |
61adb9bd | 28 | |
de2cd600 | 29 | AliMUONTrackParam(const AliMUONTrackParam& theMUONTrackParam); |
30 | AliMUONTrackParam& operator=(const AliMUONTrackParam& theMUONTrackParam); | |
211c52eb | 31 | |
32 | void GetParamFrom(const AliESDMuonTrack& esdMuonTrack); | |
ea94c18b | 33 | void SetParamFor(AliESDMuonTrack& esdMuonTrack) const; |
22ccc301 | 34 | void GetParamFromUncorrected(const AliESDMuonTrack& esdMuonTrack); |
ea94c18b | 35 | void SetParamForUncorrected(AliESDMuonTrack& esdMuonTrack) const; |
60765b06 | 36 | |
37 | void GetCovFrom(const AliESDMuonTrack& esdMuonTrack); | |
38 | void SetCovFor(AliESDMuonTrack& esdMuonTrack) const; | |
211c52eb | 39 | |
a9e2aefa | 40 | // Get and Set methods for data |
2457f726 | 41 | /// return Z coordinate (cm) |
ea94c18b | 42 | Double_t GetZ() const {return fZ;} |
2457f726 | 43 | /// set Z coordinate (cm) |
208f139e | 44 | void SetZ(Double_t z) {fZ = z;} |
2457f726 | 45 | /// return non bending coordinate (cm) |
ea94c18b | 46 | Double_t GetNonBendingCoor() const {return fParameters(0,0);} |
2457f726 | 47 | /// set non bending coordinate (cm) |
ea94c18b | 48 | void SetNonBendingCoor(Double_t nonBendingCoor) {fParameters(0,0) = nonBendingCoor;} |
49 | /// return non bending slope (cm ** -1) | |
50 | Double_t GetNonBendingSlope() const {return fParameters(1,0);} | |
51 | /// set non bending slope (cm ** -1) | |
52 | void SetNonBendingSlope(Double_t nonBendingSlope) {fParameters(1,0) = nonBendingSlope;} | |
53 | /// return bending coordinate (cm) | |
54 | Double_t GetBendingCoor() const {return fParameters(2,0);} | |
55 | /// set bending coordinate (cm) | |
56 | void SetBendingCoor(Double_t bendingCoor) {fParameters(2,0) = bendingCoor;} | |
57 | /// return bending slope (cm ** -1) | |
58 | Double_t GetBendingSlope() const {return fParameters(3,0);} | |
59 | /// set bending slope (cm ** -1) | |
60 | void SetBendingSlope(Double_t bendingSlope) {fParameters(3,0) = bendingSlope;} | |
61 | /// return inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) | |
62 | Double_t GetInverseBendingMomentum() const {return fParameters(4,0);} | |
63 | /// set inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) | |
64 | void SetInverseBendingMomentum(Double_t inverseBendingMomentum) {fParameters(4,0) = inverseBendingMomentum;} | |
65 | /// return the charge (assumed forward motion) | |
66 | Double_t GetCharge() const {return TMath::Sign(1.,fParameters(4,0));} | |
67 | /// set the charge (assumed forward motion) | |
68 | void SetCharge(Double_t charge) {if (charge*fParameters(4,0) < 0.) fParameters(4,0) *= -1.;} | |
208f139e | 69 | |
ea94c18b | 70 | /// return track parameters |
71 | const TMatrixD& GetParameters() const {return fParameters;} | |
72 | /// set track parameters | |
73 | void SetParameters(const TMatrixD& parameters) {fParameters = parameters;} | |
74 | /// add track parameters | |
75 | void AddParameters(const TMatrixD& parameters) {fParameters += parameters;} | |
de2cd600 | 76 | |
6464217e | 77 | Double_t Px() const; // return px |
78 | Double_t Py() const; // return py | |
79 | Double_t Pz() const; // return pz | |
80 | Double_t P() const; // return total momentum | |
a9e2aefa | 81 | |
208f139e | 82 | /// return kTRUE if the covariance matrix exist, kFALSE if not |
ea94c18b | 83 | Bool_t CovariancesExist() const {return (fCovariances) ? kTRUE : kFALSE;} |
84 | ||
85 | const TMatrixD& GetCovariances() const; | |
86 | void SetCovariances(const TMatrixD& covariances); | |
87 | void SetCovariances(const Double_t matrix[5][5]); | |
88 | void SetVariances(const Double_t matrix[5][5]); | |
89 | void DeleteCovariances(); | |
90 | ||
91 | const TMatrixD& GetPropagator() const; | |
92 | void ResetPropagator(); | |
93 | void UpdatePropagator(const TMatrixD& propagator); | |
94 | ||
95 | const TMatrixD& GetExtrapParameters() const; | |
96 | void SetExtrapParameters(const TMatrixD& parameters); | |
97 | ||
98 | const TMatrixD& GetExtrapCovariances() const; | |
99 | void SetExtrapCovariances(const TMatrixD& covariances); | |
100 | ||
101 | const TMatrixD& GetSmoothParameters() const; | |
102 | void SetSmoothParameters(const TMatrixD& parameters); | |
103 | ||
104 | const TMatrixD& GetSmoothCovariances() const; | |
105 | void SetSmoothCovariances(const TMatrixD& covariances); | |
106 | ||
96ebe67e | 107 | /// get pointeur to associated cluster |
108 | AliMUONVCluster* GetClusterPtr() const {return fClusterPtr;} | |
109 | /// set pointeur to associated cluster | |
110 | void SetClusterPtr(AliMUONVCluster* cluster, Bool_t owner = kFALSE) {fClusterPtr = cluster; fOwnCluster = owner;} | |
ea94c18b | 111 | |
96ebe67e | 112 | /// return kTRUE if the associated cluster can be removed from the track it belongs to |
ea94c18b | 113 | Bool_t IsRemovable() const {return fRemovable;} |
96ebe67e | 114 | /// set the flag telling whether the associated cluster can be removed from the track it belongs to or not |
ea94c18b | 115 | void SetRemovable(Bool_t removable) {fRemovable = removable;} |
116 | ||
96ebe67e | 117 | /// return kTRUE if the associated cluster alone in its chamber |
b709ac13 | 118 | Bool_t IsAloneInChamber() const {return fAloneInChamber;} |
119 | /// set the flag telling whether the associated hi alone in its chamber or not | |
120 | void SetAloneInChamber(Bool_t aloneInChamber) {fAloneInChamber = aloneInChamber;} | |
121 | ||
96ebe67e | 122 | /// return the chi2 of the track when the associated cluster was attached |
ea94c18b | 123 | Double_t GetTrackChi2() const {return fTrackChi2;} |
96ebe67e | 124 | /// set the chi2 of the track when the associated cluster was attached |
ea94c18b | 125 | void SetTrackChi2(Double_t chi2) {fTrackChi2 = chi2;} |
96ebe67e | 126 | /// return the local chi2 of the associated cluster with respect to the track |
ea94c18b | 127 | Double_t GetLocalChi2() const {return fLocalChi2;} |
96ebe67e | 128 | /// set the local chi2 of the associated cluster with respect to the track |
ea94c18b | 129 | void SetLocalChi2(Double_t chi2) {fLocalChi2 = chi2;} |
130 | ||
96ebe67e | 131 | /// necessary for sorting TClonesArray of AliMUONTrackParam |
2457f726 | 132 | Bool_t IsSortable () const {return kTRUE;} |
208f139e | 133 | Int_t Compare(const TObject* trackParam) const; |
de2cd600 | 134 | |
1a38e749 | 135 | virtual void Print(Option_t* opt="") const; |
136 | ||
686772dc | 137 | virtual void Clear(Option_t* opt=""); |
1a38e749 | 138 | |
a9e2aefa | 139 | private: |
ea94c18b | 140 | |
829425a5 | 141 | Double_t fZ; ///< Z coordinate (cm) |
208f139e | 142 | |
ea94c18b | 143 | /// Track parameters ordered as follow: <pre> |
144 | /// X = Non bending coordinate (cm) | |
145 | /// SlopeX = Non bending slope (cm ** -1) | |
146 | /// Y = Bending coordinate (cm) | |
147 | /// SlopeY = Bending slope (cm ** -1) | |
148 | /// InvP_yz = Inverse bending momentum (GeV/c ** -1) times the charge (assumed forward motion) </pre> | |
149 | TMatrixD fParameters; ///< \brief Track parameters | |
150 | ||
b58638a9 | 151 | /// Covariance matrix of track parameters, ordered as follow: <pre> |
208f139e | 152 | /// <X,X> <X,SlopeX> <X,Y> <X,SlopeY> <X,InvP_yz> |
153 | /// <X,SlopeX> <SlopeX,SlopeX> <Y,SlopeX> <SlopeX,SlopeY> <SlopeX,InvP_yz> | |
154 | /// <X,Y> <Y,SlopeX> <Y,Y> <Y,SlopeY> <Y,InvP_yz> | |
155 | /// <X,SlopeY> <SlopeX,SlopeY> <Y,SlopeY> <SlopeY,SlopeY> <SlopeY,InvP_yz> | |
b58638a9 | 156 | /// <X,InvP_yz> <SlopeX,InvP_yz> <Y,InvP_yz> <SlopeY,InvP_yz> <InvP_yz,InvP_yz> </pre> |
686772dc | 157 | mutable TMatrixD *fCovariances; ///< \brief Covariance matrix of track parameters |
208f139e | 158 | |
96ebe67e | 159 | mutable TMatrixD *fPropagator; //!< Jacobian used to extrapolate the track parameters and covariances to the actual z position |
160 | mutable TMatrixD *fExtrapParameters; //!< Track parameters extrapolated to the actual z position (not filtered by Kalman) | |
ea94c18b | 161 | mutable TMatrixD *fExtrapCovariances; //!< Covariance matrix extrapolated to the actual z position (not filtered by Kalman) |
162 | ||
96ebe67e | 163 | mutable TMatrixD *fSmoothParameters; //!< Track parameters obtained using smoother |
ea94c18b | 164 | mutable TMatrixD *fSmoothCovariances; //!< Covariance matrix obtained using smoother |
165 | ||
96ebe67e | 166 | AliMUONVCluster *fClusterPtr; //!< Pointer to associated cluster if any |
167 | Bool_t fOwnCluster; //!< Ownership of the associated cluster | |
de2cd600 | 168 | |
96ebe67e | 169 | Bool_t fRemovable; //!< kTRUE if the associated cluster can be removed from the track it belongs to |
ea94c18b | 170 | |
96ebe67e | 171 | Bool_t fAloneInChamber; //!< kTRUE if the associated cluster is alone in its chamber |
b709ac13 | 172 | |
96ebe67e | 173 | Double_t fTrackChi2; //!< Chi2 of the track when the associated cluster was attached |
174 | Double_t fLocalChi2; //!< Local chi2 of the associated cluster with respect to the track | |
ea94c18b | 175 | |
176 | ClassDef(AliMUONTrackParam, 4) // Track parameters in ALICE dimuon spectrometer | |
37827b29 | 177 | }; |
a9e2aefa | 178 | |
179 | #endif |