]>
Commit | Line | Data |
---|---|---|
672b5f43 | 1 | #ifndef ALIESDMUONTRACK_H |
2 | #define ALIESDMUONTRACK_H | |
3 | ||
af7ba10c | 4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
d5efea33 | 5 | * See cxx source for full Copyright notice */ |
af7ba10c | 6 | |
7 | /* $Id$ */ | |
8 | ||
9 | // Class to describe the MUON tracks | |
10 | // in the Event Summary Data class | |
11 | // Author: G.Martinez | |
12 | ||
13 | ||
ad85871a | 14 | #include <TMath.h> |
60765b06 | 15 | #include <TMatrixD.h> |
16 | #include <TDatabasePDG.h> | |
ad85871a | 17 | |
18 | #include "AliVParticle.h" | |
672b5f43 | 19 | |
d5efea33 | 20 | class AliESDMuonCluster; |
21 | class TClonesArray; | |
39b8d0dd | 22 | class TLorentzVector; |
23 | ||
ad85871a | 24 | class AliESDMuonTrack : public AliVParticle { |
5ec1b3bc | 25 | public: |
90e48c0c | 26 | AliESDMuonTrack(); //Constructor |
d5efea33 | 27 | virtual ~AliESDMuonTrack(); // Destructor |
af7ba10c | 28 | AliESDMuonTrack(const AliESDMuonTrack& esdm); |
29 | AliESDMuonTrack& operator=(const AliESDMuonTrack& esdm); | |
5ec1b3bc | 30 | |
4c510ac5 | 31 | virtual void Clear(Option_t* opt = ""); |
32 | ||
d5efea33 | 33 | // Get and Set methods for data at vertex |
5ec1b3bc | 34 | Double_t GetInverseBendingMomentum(void) const {return fInverseBendingMomentum;} |
39b8d0dd | 35 | void SetInverseBendingMomentum(Double_t InverseBendingMomentum) |
36 | {fInverseBendingMomentum = InverseBendingMomentum;} | |
5ec1b3bc | 37 | Double_t GetThetaX(void) const {return fThetaX;} |
39b8d0dd | 38 | void SetThetaX(Double_t ThetaX) {fThetaX = ThetaX;} |
5ec1b3bc | 39 | Double_t GetThetaY(void) const {return fThetaY;} |
39b8d0dd | 40 | void SetThetaY(Double_t ThetaY) {fThetaY = ThetaY;} |
5ec1b3bc | 41 | Double_t GetZ(void) const {return fZ;} |
39b8d0dd | 42 | void SetZ(Double_t Z) {fZ = Z;} |
5ec1b3bc | 43 | Double_t GetBendingCoor(void) const {return fBendingCoor;} |
39b8d0dd | 44 | void SetBendingCoor(Double_t BendingCoor) {fBendingCoor = BendingCoor;} |
5ec1b3bc | 45 | Double_t GetNonBendingCoor(void) const {return fNonBendingCoor;} |
39b8d0dd | 46 | void SetNonBendingCoor(Double_t NonBendingCoor) {fNonBendingCoor = NonBendingCoor;} |
47 | ||
d5efea33 | 48 | // Get and Set methods for data at Distance of Closest Approach in the vertex plane |
49 | Double_t GetInverseBendingMomentumAtDCA(void) const {return fInverseBendingMomentumAtDCA;} | |
50 | void SetInverseBendingMomentumAtDCA(Double_t InverseBendingMomentum) | |
51 | {fInverseBendingMomentumAtDCA = InverseBendingMomentum;} | |
52 | Double_t GetThetaXAtDCA(void) const {return fThetaXAtDCA;} | |
53 | void SetThetaXAtDCA(Double_t ThetaX) {fThetaXAtDCA = ThetaX;} | |
54 | Double_t GetThetaYAtDCA(void) const {return fThetaYAtDCA;} | |
55 | void SetThetaYAtDCA(Double_t ThetaY) {fThetaYAtDCA = ThetaY;} | |
56 | Double_t GetBendingCoorAtDCA(void) const {return fBendingCoorAtDCA;} | |
57 | void SetBendingCoorAtDCA(Double_t BendingCoor) {fBendingCoorAtDCA = BendingCoor;} | |
58 | Double_t GetNonBendingCoorAtDCA(void) const {return fNonBendingCoorAtDCA;} | |
59 | void SetNonBendingCoorAtDCA(Double_t NonBendingCoor) {fNonBendingCoorAtDCA = NonBendingCoor;} | |
60 | Double_t GetDCA(void) const {return TMath::Sqrt(fNonBendingCoorAtDCA*fNonBendingCoorAtDCA + | |
61 | fBendingCoorAtDCA*fBendingCoorAtDCA);} | |
62 | ||
63 | // Get and Set methods for data at first station | |
39b8d0dd | 64 | Double_t GetInverseBendingMomentumUncorrected(void) const {return fInverseBendingMomentumUncorrected;} |
65 | void SetInverseBendingMomentumUncorrected(Double_t InverseBendingMomentum) | |
66 | {fInverseBendingMomentumUncorrected = InverseBendingMomentum;} | |
67 | Double_t GetThetaXUncorrected(void) const {return fThetaXUncorrected;} | |
68 | void SetThetaXUncorrected(Double_t ThetaX) {fThetaXUncorrected = ThetaX;} | |
69 | Double_t GetThetaYUncorrected(void) const {return fThetaYUncorrected;} | |
70 | void SetThetaYUncorrected(Double_t ThetaY) {fThetaYUncorrected = ThetaY;} | |
71 | Double_t GetZUncorrected(void) const {return fZUncorrected;} | |
72 | void SetZUncorrected(Double_t Z) {fZUncorrected = Z;} | |
73 | Double_t GetBendingCoorUncorrected(void) const {return fBendingCoorUncorrected;} | |
74 | void SetBendingCoorUncorrected(Double_t BendingCoor) {fBendingCoorUncorrected = BendingCoor;} | |
75 | Double_t GetNonBendingCoorUncorrected(void) const {return fNonBendingCoorUncorrected;} | |
76 | void SetNonBendingCoorUncorrected(Double_t NonBendingCoor) {fNonBendingCoorUncorrected = NonBendingCoor;} | |
d5efea33 | 77 | |
78 | // Get and Set methods for covariance matrix of data at first station | |
60765b06 | 79 | void GetCovariances(TMatrixD& cov) const; |
80 | void SetCovariances(const TMatrixD& cov); | |
81 | void GetCovarianceXYZPxPyPz(Double_t cov[21]) const; | |
d5efea33 | 82 | |
83 | // Get and Set methods for global tracking info | |
5ec1b3bc | 84 | Double_t GetChi2(void) const {return fChi2;} |
39b8d0dd | 85 | void SetChi2(Double_t Chi2) {fChi2 = Chi2;} |
4f036e6e | 86 | UChar_t GetNHit(void) const {return fNHit;} |
39b8d0dd | 87 | void SetNHit(UInt_t NHit) {fNHit = NHit;} |
d5efea33 | 88 | |
89 | // Get and Set methods for trigger matching | |
423b32ca | 90 | Int_t GetMatchTrigger() const; |
8252d536 | 91 | Double_t GetChi2MatchTrigger() const {return fChi2MatchTrigger;} |
39b8d0dd | 92 | void SetChi2MatchTrigger(Double_t Chi2MatchTrigger) {fChi2MatchTrigger = Chi2MatchTrigger;} |
fbc3395d | 93 | UShort_t GetHitsPatternInTrigCh() const {return fHitsPatternInTrigCh;} |
94 | void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) {fHitsPatternInTrigCh = hitsPatternInTrigCh;} | |
423b32ca | 95 | void SetLocalTrigger(Int_t locTrig) { fLocalTrigger = locTrig; } |
01413742 | 96 | Int_t LoCircuit(void) const { return fLocalTrigger & 0xFF; } |
423b32ca | 97 | Int_t LoStripX(void) const { return fLocalTrigger >> 8 & 0x1F; } |
98 | Int_t LoStripY(void) const { return fLocalTrigger >> 13 & 0x0F; } | |
99 | Int_t LoDev(void) const { return fLocalTrigger >> 17 & 0x1F; } | |
100 | Int_t LoLpt(void) const { return fLocalTrigger >> 22 & 0x03; } | |
101 | Int_t LoHpt(void) const { return fLocalTrigger >> 24 & 0x03; } | |
39b8d0dd | 102 | |
d5efea33 | 103 | // Get and Set methods for muon cluster map |
60765b06 | 104 | UInt_t GetMuonClusterMap() const {return fMuonClusterMap;} |
105 | void SetMuonClusterMap(UInt_t muonClusterMap) {fMuonClusterMap = muonClusterMap;} | |
106 | void AddInMuonClusterMap(Int_t chamber); | |
107 | Bool_t IsInMuonClusterMap(Int_t chamber) const; | |
108 | ||
d5efea33 | 109 | // Methods to get, fill and check the array of associated clusters |
4c510ac5 | 110 | Int_t GetNClusters() const; |
d5efea33 | 111 | TClonesArray& GetClusters() const; |
112 | void AddCluster(const AliESDMuonCluster &cluster); | |
113 | Bool_t ClustersStored() const; | |
114 | ||
115 | // Methods to compute track momentum | |
39b8d0dd | 116 | Double_t Px() const; |
117 | Double_t Py() const; | |
118 | Double_t Pz() const; | |
119 | Double_t P() const; | |
c683ddc2 | 120 | Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; } |
39b8d0dd | 121 | void LorentzP(TLorentzVector& vP) const; |
d5efea33 | 122 | Double_t PxAtDCA() const; |
123 | Double_t PyAtDCA() const; | |
124 | Double_t PzAtDCA() const; | |
125 | Double_t PAtDCA() const; | |
126 | Bool_t PxPyPzAtDCA(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; } | |
127 | void LorentzPAtDCA(TLorentzVector& vP) const; | |
39b8d0dd | 128 | Double_t PxUncorrected() const; |
129 | Double_t PyUncorrected() const; | |
130 | Double_t PzUncorrected() const; | |
131 | Double_t PUncorrected() const; | |
d5efea33 | 132 | Bool_t PxPyPzUncorrected(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; } |
39b8d0dd | 133 | void LorentzPUncorrected(TLorentzVector& vP) const; |
134 | ||
ad85871a | 135 | // additional methods to comply with AliVParticle |
c683ddc2 | 136 | Double_t Xv() const {return -999.;} // put reasonable values here |
137 | Double_t Yv() const {return -999.;} // | |
138 | Double_t Zv() const {return -999.;} // | |
139 | Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; } | |
ad85871a | 140 | Double_t Pt() const { return TMath::Sqrt(Px()*Px() + Py()*Py()); } |
4c510ac5 | 141 | Double_t OneOverPt() const { return (Pt() != 0.) ? 1./Pt() : FLT_MAX; } |
ad85871a | 142 | Double_t Phi() const { return TMath::ATan2(Py(), Px()); } |
143 | Double_t Theta() const { return TMath::ATan2(Pt(), Pz()); } | |
60765b06 | 144 | Double_t E() const { return TMath::Sqrt(M()*M() + P()*P()); } |
145 | Double_t M() const { return TDatabasePDG::Instance()->GetParticle("mu-")->Mass(); } | |
ad85871a | 146 | Double_t Eta() const { return -TMath::Log(TMath::Tan(0.5 * Theta()));} |
4c510ac5 | 147 | Double_t Y() const { return (Pz()/E() != 1.) ? TMath::ATanH(Pz()/E()) : FLT_MAX; } |
60765b06 | 148 | Short_t Charge() const { return (Short_t)TMath::Sign(1., GetInverseBendingMomentum()); } |
ad85871a | 149 | const Double_t *PID() const { return (Double_t*)0x0; } |
d5efea33 | 150 | |
39b8d0dd | 151 | |
5ec1b3bc | 152 | protected: |
d5efea33 | 153 | // parameters at vertex |
60765b06 | 154 | Double32_t fInverseBendingMomentum; ///< Inverse bending momentum (GeV/c ** -1) times the charge |
155 | Double32_t fThetaX; ///< Angle of track at vertex in X direction (rad) | |
156 | Double32_t fThetaY; ///< Angle of track at vertex in Y direction (rad) | |
157 | Double32_t fZ; ///< Z coordinate (cm) | |
158 | Double32_t fBendingCoor; ///< bending coordinate (cm) | |
159 | Double32_t fNonBendingCoor; ///< non bending coordinate (cm) | |
39b8d0dd | 160 | |
d5efea33 | 161 | // parameters at Distance of Closest Approach in the vertex plane |
162 | Double32_t fInverseBendingMomentumAtDCA; ///< Inverse bending momentum (GeV/c ** -1) times the charge | |
163 | Double32_t fThetaXAtDCA; ///< Angle of track at vertex in X direction (rad) | |
164 | Double32_t fThetaYAtDCA; ///< Angle of track at vertex in Y direction (rad) | |
165 | Double32_t fBendingCoorAtDCA; ///< bending coordinate (cm) | |
166 | Double32_t fNonBendingCoorAtDCA; ///< non bending coordinate (cm) | |
167 | ||
168 | // parameters at first tracking station | |
60765b06 | 169 | Double32_t fInverseBendingMomentumUncorrected; ///< Inverse bending momentum (GeV/c ** -1) times the charge |
170 | Double32_t fThetaXUncorrected; ///< Angle of track at vertex in X direction (rad) | |
171 | Double32_t fThetaYUncorrected; ///< Angle of track at vertex in Y direction (rad) | |
172 | Double32_t fZUncorrected; ///< Z coordinate (cm) | |
173 | Double32_t fBendingCoorUncorrected; ///< bending coordinate (cm) | |
174 | Double32_t fNonBendingCoorUncorrected; ///< non bending coordinate (cm) | |
39b8d0dd | 175 | |
d5efea33 | 176 | /// reduced covariance matrix of UNCORRECTED track parameters, ordered as follow: <pre> |
177 | /// [0] = <X,X> | |
178 | /// [1] =<X,ThetaX> [2] =<ThetaX,ThetaX> | |
179 | /// [3] = <X,Y> [4] = <Y,ThetaX> [5] = <Y,Y> | |
180 | /// [6] =<X,ThetaY> [7] =<ThetaX,ThetaY> [8] =<Y,ThetaY> [9] =<ThetaY,ThetaY> | |
181 | /// [10]=<X,InvP_yz> [11]=<ThetaX,InvP_yz> [12]=<Y,InvP_yz> [13]=<ThetaY,InvP_yz> [14]=<InvP_yz,InvP_yz> </pre> | |
60765b06 | 182 | Double32_t fCovariances[15]; ///< \brief reduced covariance matrix of parameters AT FIRST CHAMBER |
423b32ca | 183 | |
d5efea33 | 184 | // global tracking info |
60765b06 | 185 | Double32_t fChi2; ///< chi2 in the MUON track fit |
60765b06 | 186 | Double32_t fChi2MatchTrigger; ///< chi2 of trigger/track matching |
4f036e6e | 187 | Int_t fLocalTrigger; ///< packed local trigger information |
d5efea33 | 188 | |
60765b06 | 189 | UInt_t fMuonClusterMap; ///< Map of clusters in tracking chambers |
4f036e6e | 190 | UShort_t fHitsPatternInTrigCh; ///< Word containing info on the hits left in trigger chambers |
191 | UChar_t fNHit; ///< number of hit in the track | |
d5efea33 | 192 | |
193 | mutable TClonesArray* fClusters; ///< Array of clusters attached to the track | |
194 | ||
195 | ClassDef(AliESDMuonTrack,9) // MUON ESD track class | |
672b5f43 | 196 | }; |
197 | ||
198 | #endif |