]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliESDMuonTrack.h
Obsolete.
[u/mrichter/AliRoot.git] / STEER / AliESDMuonTrack.h
CommitLineData
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 20class AliESDMuonCluster;
21class TClonesArray;
39b8d0dd 22class TLorentzVector;
23
ad85871a 24class AliESDMuonTrack : public AliVParticle {
5ec1b3bc 25public:
90e48c0c 26 AliESDMuonTrack(); //Constructor
d5efea33 27 virtual ~AliESDMuonTrack(); // Destructor
af7ba10c 28 AliESDMuonTrack(const AliESDMuonTrack& esdm);
29 AliESDMuonTrack& operator=(const AliESDMuonTrack& esdm);
732a24fe 30 virtual void Copy(TObject &obj) const;
5ec1b3bc 31
4c510ac5 32 virtual void Clear(Option_t* opt = "");
33
12186235 34 void Reset();
35
36 // Return kTRUE if the track contain tracker data
37 Bool_t ContainTrackerData() const {return (fMuonClusterMap>0) ? kTRUE : kFALSE;}
38 // Return kTRUE if the track contain trigger data
39 Bool_t ContainTriggerData() const {return (LoCircuit()>0) ? kTRUE : kFALSE;}
40
d5efea33 41 // Get and Set methods for data at vertex
5ec1b3bc 42 Double_t GetInverseBendingMomentum(void) const {return fInverseBendingMomentum;}
39b8d0dd 43 void SetInverseBendingMomentum(Double_t InverseBendingMomentum)
44 {fInverseBendingMomentum = InverseBendingMomentum;}
5ec1b3bc 45 Double_t GetThetaX(void) const {return fThetaX;}
39b8d0dd 46 void SetThetaX(Double_t ThetaX) {fThetaX = ThetaX;}
5ec1b3bc 47 Double_t GetThetaY(void) const {return fThetaY;}
39b8d0dd 48 void SetThetaY(Double_t ThetaY) {fThetaY = ThetaY;}
5ec1b3bc 49 Double_t GetZ(void) const {return fZ;}
39b8d0dd 50 void SetZ(Double_t Z) {fZ = Z;}
5ec1b3bc 51 Double_t GetBendingCoor(void) const {return fBendingCoor;}
39b8d0dd 52 void SetBendingCoor(Double_t BendingCoor) {fBendingCoor = BendingCoor;}
5ec1b3bc 53 Double_t GetNonBendingCoor(void) const {return fNonBendingCoor;}
39b8d0dd 54 void SetNonBendingCoor(Double_t NonBendingCoor) {fNonBendingCoor = NonBendingCoor;}
55
d5efea33 56 // Get and Set methods for data at Distance of Closest Approach in the vertex plane
57 Double_t GetInverseBendingMomentumAtDCA(void) const {return fInverseBendingMomentumAtDCA;}
58 void SetInverseBendingMomentumAtDCA(Double_t InverseBendingMomentum)
59 {fInverseBendingMomentumAtDCA = InverseBendingMomentum;}
60 Double_t GetThetaXAtDCA(void) const {return fThetaXAtDCA;}
61 void SetThetaXAtDCA(Double_t ThetaX) {fThetaXAtDCA = ThetaX;}
62 Double_t GetThetaYAtDCA(void) const {return fThetaYAtDCA;}
63 void SetThetaYAtDCA(Double_t ThetaY) {fThetaYAtDCA = ThetaY;}
64 Double_t GetBendingCoorAtDCA(void) const {return fBendingCoorAtDCA;}
65 void SetBendingCoorAtDCA(Double_t BendingCoor) {fBendingCoorAtDCA = BendingCoor;}
66 Double_t GetNonBendingCoorAtDCA(void) const {return fNonBendingCoorAtDCA;}
67 void SetNonBendingCoorAtDCA(Double_t NonBendingCoor) {fNonBendingCoorAtDCA = NonBendingCoor;}
68 Double_t GetDCA(void) const {return TMath::Sqrt(fNonBendingCoorAtDCA*fNonBendingCoorAtDCA +
69 fBendingCoorAtDCA*fBendingCoorAtDCA);}
70
71 // Get and Set methods for data at first station
39b8d0dd 72 Double_t GetInverseBendingMomentumUncorrected(void) const {return fInverseBendingMomentumUncorrected;}
73 void SetInverseBendingMomentumUncorrected(Double_t InverseBendingMomentum)
74 {fInverseBendingMomentumUncorrected = InverseBendingMomentum;}
75 Double_t GetThetaXUncorrected(void) const {return fThetaXUncorrected;}
76 void SetThetaXUncorrected(Double_t ThetaX) {fThetaXUncorrected = ThetaX;}
77 Double_t GetThetaYUncorrected(void) const {return fThetaYUncorrected;}
78 void SetThetaYUncorrected(Double_t ThetaY) {fThetaYUncorrected = ThetaY;}
79 Double_t GetZUncorrected(void) const {return fZUncorrected;}
80 void SetZUncorrected(Double_t Z) {fZUncorrected = Z;}
81 Double_t GetBendingCoorUncorrected(void) const {return fBendingCoorUncorrected;}
82 void SetBendingCoorUncorrected(Double_t BendingCoor) {fBendingCoorUncorrected = BendingCoor;}
83 Double_t GetNonBendingCoorUncorrected(void) const {return fNonBendingCoorUncorrected;}
84 void SetNonBendingCoorUncorrected(Double_t NonBendingCoor) {fNonBendingCoorUncorrected = NonBendingCoor;}
d5efea33 85
86 // Get and Set methods for covariance matrix of data at first station
60765b06 87 void GetCovariances(TMatrixD& cov) const;
88 void SetCovariances(const TMatrixD& cov);
89 void GetCovarianceXYZPxPyPz(Double_t cov[21]) const;
d5efea33 90
91 // Get and Set methods for global tracking info
5ec1b3bc 92 Double_t GetChi2(void) const {return fChi2;}
39b8d0dd 93 void SetChi2(Double_t Chi2) {fChi2 = Chi2;}
4f036e6e 94 UChar_t GetNHit(void) const {return fNHit;}
39b8d0dd 95 void SetNHit(UInt_t NHit) {fNHit = NHit;}
d5efea33 96
97 // Get and Set methods for trigger matching
423b32ca 98 Int_t GetMatchTrigger() const;
8252d536 99 Double_t GetChi2MatchTrigger() const {return fChi2MatchTrigger;}
39b8d0dd 100 void SetChi2MatchTrigger(Double_t Chi2MatchTrigger) {fChi2MatchTrigger = Chi2MatchTrigger;}
fbc3395d 101 UShort_t GetHitsPatternInTrigCh() const {return fHitsPatternInTrigCh;}
102 void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) {fHitsPatternInTrigCh = hitsPatternInTrigCh;}
423b32ca 103 void SetLocalTrigger(Int_t locTrig) { fLocalTrigger = locTrig; }
01413742 104 Int_t LoCircuit(void) const { return fLocalTrigger & 0xFF; }
423b32ca 105 Int_t LoStripX(void) const { return fLocalTrigger >> 8 & 0x1F; }
106 Int_t LoStripY(void) const { return fLocalTrigger >> 13 & 0x0F; }
107 Int_t LoDev(void) const { return fLocalTrigger >> 17 & 0x1F; }
108 Int_t LoLpt(void) const { return fLocalTrigger >> 22 & 0x03; }
109 Int_t LoHpt(void) const { return fLocalTrigger >> 24 & 0x03; }
39b8d0dd 110
9dea53d8 111 // Get and Set methods for the hit strips pattern in the trigger chambers
12186235 112 UShort_t GetTriggerX1Pattern() const { return fX1Pattern; }
113 UShort_t GetTriggerY1Pattern() const { return fY1Pattern; }
114 UShort_t GetTriggerX2Pattern() const { return fX2Pattern; }
115 UShort_t GetTriggerY2Pattern() const { return fY2Pattern; }
116 UShort_t GetTriggerX3Pattern() const { return fX3Pattern; }
117 UShort_t GetTriggerY3Pattern() const { return fY3Pattern; }
118 UShort_t GetTriggerX4Pattern() const { return fX4Pattern; }
119 UShort_t GetTriggerY4Pattern() const { return fY4Pattern; }
9dea53d8 120 void SetTriggerX1Pattern(UShort_t pat) { fX1Pattern = pat; }
121 void SetTriggerY1Pattern(UShort_t pat) { fY1Pattern = pat; }
122 void SetTriggerX2Pattern(UShort_t pat) { fX2Pattern = pat; }
123 void SetTriggerY2Pattern(UShort_t pat) { fY2Pattern = pat; }
124 void SetTriggerX3Pattern(UShort_t pat) { fX3Pattern = pat; }
125 void SetTriggerY3Pattern(UShort_t pat) { fY3Pattern = pat; }
126 void SetTriggerX4Pattern(UShort_t pat) { fX4Pattern = pat; }
127 void SetTriggerY4Pattern(UShort_t pat) { fY4Pattern = pat; }
128
d5efea33 129 // Get and Set methods for muon cluster map
60765b06 130 UInt_t GetMuonClusterMap() const {return fMuonClusterMap;}
131 void SetMuonClusterMap(UInt_t muonClusterMap) {fMuonClusterMap = muonClusterMap;}
12186235 132 void AddInMuonClusterMap(Int_t chamber) {fMuonClusterMap |= BIT(chamber);}
133 Bool_t IsInMuonClusterMap(Int_t chamber) const {return (Bool_t) ((fMuonClusterMap & BIT(chamber)) != 0);}
60765b06 134
d5efea33 135 // Methods to get, fill and check the array of associated clusters
4c510ac5 136 Int_t GetNClusters() const;
d5efea33 137 TClonesArray& GetClusters() const;
138 void AddCluster(const AliESDMuonCluster &cluster);
139 Bool_t ClustersStored() const;
140
141 // Methods to compute track momentum
39b8d0dd 142 Double_t Px() const;
143 Double_t Py() const;
144 Double_t Pz() const;
145 Double_t P() const;
c683ddc2 146 Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
39b8d0dd 147 void LorentzP(TLorentzVector& vP) const;
d5efea33 148 Double_t PxAtDCA() const;
149 Double_t PyAtDCA() const;
150 Double_t PzAtDCA() const;
151 Double_t PAtDCA() const;
152 Bool_t PxPyPzAtDCA(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
153 void LorentzPAtDCA(TLorentzVector& vP) const;
39b8d0dd 154 Double_t PxUncorrected() const;
155 Double_t PyUncorrected() const;
156 Double_t PzUncorrected() const;
157 Double_t PUncorrected() const;
d5efea33 158 Bool_t PxPyPzUncorrected(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
39b8d0dd 159 void LorentzPUncorrected(TLorentzVector& vP) const;
160
ad85871a 161 // additional methods to comply with AliVParticle
c683ddc2 162 Double_t Xv() const {return -999.;} // put reasonable values here
163 Double_t Yv() const {return -999.;} //
164 Double_t Zv() const {return -999.;} //
165 Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
ad85871a 166 Double_t Pt() const { return TMath::Sqrt(Px()*Px() + Py()*Py()); }
4c510ac5 167 Double_t OneOverPt() const { return (Pt() != 0.) ? 1./Pt() : FLT_MAX; }
ad85871a 168 Double_t Phi() const { return TMath::ATan2(Py(), Px()); }
169 Double_t Theta() const { return TMath::ATan2(Pt(), Pz()); }
60765b06 170 Double_t E() const { return TMath::Sqrt(M()*M() + P()*P()); }
171 Double_t M() const { return TDatabasePDG::Instance()->GetParticle("mu-")->Mass(); }
ad85871a 172 Double_t Eta() const { return -TMath::Log(TMath::Tan(0.5 * Theta()));}
4c510ac5 173 Double_t Y() const { return (Pz()/E() != 1.) ? TMath::ATanH(Pz()/E()) : FLT_MAX; }
60765b06 174 Short_t Charge() const { return (Short_t)TMath::Sign(1., GetInverseBendingMomentum()); }
ad85871a 175 const Double_t *PID() const { return (Double_t*)0x0; }
3c43fb2b 176 Int_t GetLabel() const {return -1;} // Dummy
39b8d0dd 177
5ec1b3bc 178protected:
d5efea33 179 // parameters at vertex
60765b06 180 Double32_t fInverseBendingMomentum; ///< Inverse bending momentum (GeV/c ** -1) times the charge
181 Double32_t fThetaX; ///< Angle of track at vertex in X direction (rad)
182 Double32_t fThetaY; ///< Angle of track at vertex in Y direction (rad)
183 Double32_t fZ; ///< Z coordinate (cm)
184 Double32_t fBendingCoor; ///< bending coordinate (cm)
185 Double32_t fNonBendingCoor; ///< non bending coordinate (cm)
39b8d0dd 186
d5efea33 187 // parameters at Distance of Closest Approach in the vertex plane
188 Double32_t fInverseBendingMomentumAtDCA; ///< Inverse bending momentum (GeV/c ** -1) times the charge
189 Double32_t fThetaXAtDCA; ///< Angle of track at vertex in X direction (rad)
190 Double32_t fThetaYAtDCA; ///< Angle of track at vertex in Y direction (rad)
191 Double32_t fBendingCoorAtDCA; ///< bending coordinate (cm)
192 Double32_t fNonBendingCoorAtDCA; ///< non bending coordinate (cm)
193
194 // parameters at first tracking station
60765b06 195 Double32_t fInverseBendingMomentumUncorrected; ///< Inverse bending momentum (GeV/c ** -1) times the charge
196 Double32_t fThetaXUncorrected; ///< Angle of track at vertex in X direction (rad)
197 Double32_t fThetaYUncorrected; ///< Angle of track at vertex in Y direction (rad)
198 Double32_t fZUncorrected; ///< Z coordinate (cm)
199 Double32_t fBendingCoorUncorrected; ///< bending coordinate (cm)
200 Double32_t fNonBendingCoorUncorrected; ///< non bending coordinate (cm)
39b8d0dd 201
d5efea33 202 /// reduced covariance matrix of UNCORRECTED track parameters, ordered as follow: <pre>
203 /// [0] = <X,X>
204 /// [1] =<X,ThetaX> [2] =<ThetaX,ThetaX>
205 /// [3] = <X,Y> [4] = <Y,ThetaX> [5] = <Y,Y>
206 /// [6] =<X,ThetaY> [7] =<ThetaX,ThetaY> [8] =<Y,ThetaY> [9] =<ThetaY,ThetaY>
207 /// [10]=<X,InvP_yz> [11]=<ThetaX,InvP_yz> [12]=<Y,InvP_yz> [13]=<ThetaY,InvP_yz> [14]=<InvP_yz,InvP_yz> </pre>
60765b06 208 Double32_t fCovariances[15]; ///< \brief reduced covariance matrix of parameters AT FIRST CHAMBER
423b32ca 209
d5efea33 210 // global tracking info
60765b06 211 Double32_t fChi2; ///< chi2 in the MUON track fit
60765b06 212 Double32_t fChi2MatchTrigger; ///< chi2 of trigger/track matching
4f036e6e 213 Int_t fLocalTrigger; ///< packed local trigger information
9dea53d8 214
215 // hit strips pattern in the trigger chambers
216 UShort_t fX1Pattern; ///< x-strips pattern in st6/ch1
217 UShort_t fY1Pattern; ///< y-strips pattern in st6/ch1
218 UShort_t fX2Pattern; ///< x-strips pattern in st6/ch2
219 UShort_t fY2Pattern; ///< y-strips pattern in st6/ch2
220 UShort_t fX3Pattern; ///< x-strips pattern in st7/ch1
221 UShort_t fY3Pattern; ///< y-strips pattern in st7/ch1
222 UShort_t fX4Pattern; ///< x-strips pattern in st7/ch2
223 UShort_t fY4Pattern; ///< y-strips pattern in st7/ch2
d5efea33 224
12186235 225 UInt_t fMuonClusterMap; ///< Map of clusters in tracking chambers
226 UShort_t fHitsPatternInTrigCh; ///< Word containing info on the hits left in trigger chambers
227 UChar_t fNHit; ///< number of hit in the track
d5efea33 228
229 mutable TClonesArray* fClusters; ///< Array of clusters attached to the track
230
9dea53d8 231 ClassDef(AliESDMuonTrack,10) // MUON ESD track class
672b5f43 232};
233
234#endif