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