Line data Source code
1 : #ifndef AliESDMuonGlobalTrack_H
2 : #define AliESDMuonGlobalTrack_H
3 :
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : //====================================================================================================================================================
8 : //
9 : // ESD description of an ALICE muon forward track, combining the information of the Muon Spectrometer and the Muon Forward Tracker
10 : //
11 : // Contact author: antonio.uras@cern.ch
12 : //
13 : //====================================================================================================================================================
14 :
15 : #include "TMath.h"
16 : #include "TMatrixD.h"
17 : #include "TDatabasePDG.h"
18 : #include "TArrayI.h"
19 : #include "TLorentzVector.h"
20 : #include "AliESDVertex.h"
21 : #include "TRef.h"
22 :
23 : #include "AliVParticle.h"
24 :
25 : class AliESDEvent;
26 : class TClonesArray;
27 :
28 : //====================================================================================================================================================
29 :
30 : class AliESDMuonGlobalTrack : public AliVParticle {
31 :
32 : public:
33 :
34 : AliESDMuonGlobalTrack();
35 : AliESDMuonGlobalTrack(Double_t px, Double_t py, Double_t pz);
36 24 : virtual ~AliESDMuonGlobalTrack() {;}
37 : AliESDMuonGlobalTrack(const AliESDMuonGlobalTrack& esdTrack);
38 : AliESDMuonGlobalTrack& operator=(const AliESDMuonGlobalTrack& esdTrack);
39 : virtual void Copy(TObject &obj) const;
40 :
41 0 : void SetCharge(Int_t charge) { fCharge = charge; }
42 0 : Short_t GetCharge() const { return fCharge; }
43 :
44 : /* Double_t GetOffset(Double_t x, Double_t y, Double_t z); */
45 : /* Double_t GetOffsetX(Double_t x, Double_t z); */
46 : /* Double_t GetOffsetY(Double_t y, Double_t z); */
47 :
48 : // Set and Get methods for kinematics at primary vertex
49 : void SetPxPyPz(Double_t px, Double_t py, Double_t pz);
50 :
51 : // Get and Set methods for global tracking info
52 0 : Double_t GetChi2OverNdf() const { return fChi2OverNdf; } // chi2/ndf
53 0 : void SetChi2OverNdf(Double_t chi2) { fChi2OverNdf = chi2; } // chi2/ndf
54 :
55 0 : Double_t GetChi2MatchTrigger() const { return fChi2MatchTrigger; }
56 0 : void SetChi2MatchTrigger(Double_t chi2MatchTrigger) { fChi2MatchTrigger = chi2MatchTrigger; }
57 :
58 : // Get and Set methods for various info copied and pasted from the MUON track
59 0 : UShort_t GetHitsPatternInTrigCh() const {return fHitsPatternInTrigCh;}
60 0 : void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) {fHitsPatternInTrigCh = hitsPatternInTrigCh;}
61 0 : UInt_t GetHitsPatternInTrigChTrk() const {return fHitsPatternInTrigChTrk;}
62 0 : void SetHitsPatternInTrigChTrk(UInt_t hitsPatternInTrigChTrk) {fHitsPatternInTrigChTrk = hitsPatternInTrigChTrk;}
63 0 : UInt_t GetMuonClusterMap() const {return fMuonClusterMap;}
64 0 : void SetMuonClusterMap(UInt_t muonClusterMap) {fMuonClusterMap = muonClusterMap;}
65 0 : Int_t GetLoCircuit() const { return fLoCircuit; }
66 0 : void SetLoCircuit(Int_t loCircuit) { fLoCircuit = loCircuit; }
67 0 : Bool_t IsConnected() const { return fIsConnected; }
68 0 : void Connected(Bool_t flag) { fIsConnected = flag; }
69 :
70 : // Get and Set methods for trigger matching
71 0 : void SetMatchTrigger(Int_t matchTrigger) { fMatchTrigger = matchTrigger; }
72 0 : Int_t GetMatchTrigger() { return fMatchTrigger; }
73 :
74 0 : void SetNMFTClusters(Int_t nMFTClusters) { fNMFTClusters = nMFTClusters; }
75 0 : Short_t GetNMFTClusters() { return fNMFTClusters; }
76 :
77 0 : void SetNWrongMFTClustersMC(Int_t nWrongMFTClustersMC) { fNWrongMFTClustersMC = nWrongMFTClustersMC; }
78 0 : Short_t GetNWrongMFTClustersMC() { return fNWrongMFTClustersMC; }
79 :
80 0 : void SetMFTClusterPattern(ULong_t mftClusterPattern) { fMFTClusterPattern = mftClusterPattern; }
81 0 : ULong_t GetMFTClusterPattern() { return fMFTClusterPattern; }
82 :
83 : // Kinematics
84 0 : Double_t Pt() const { return fPt; }
85 0 : Double_t Eta() const { return fEta; }
86 0 : Double_t Rapidity() const { return fRapidity; }
87 0 : Double_t Px() const { return fPx; }
88 0 : Double_t Py() const { return fPy; }
89 0 : Double_t Pz() const { return fPz; }
90 0 : Double_t P() const { return fP; }
91 :
92 0 : Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
93 :
94 0 : void SetFirstTrackingPoint(Double_t x, Double_t y, Double_t z) {fFirstTrackingPointX = x; fFirstTrackingPointY = y; fFirstTrackingPointZ = z; }
95 0 : void GetFirstTrackingPoint(Double_t x[3]) { x[0] = fFirstTrackingPointX; x[1] = fFirstTrackingPointY; x[2] = fFirstTrackingPointZ; }
96 :
97 0 : void SetXYAtVertex(Double_t x, Double_t y) { fXAtVertex = x; fYAtVertex = y; }
98 0 : void GetXYAtVertex(Double_t x[2]) { x[0] = fXAtVertex; x[1] = fYAtVertex; }
99 :
100 0 : Double_t GetRAtAbsorberEnd() { return fRAtAbsorberEnd; }
101 0 : void SetRAtAbsorberEnd(Double_t r) { fRAtAbsorberEnd = r; }
102 :
103 : // Additional methods to comply with AliVParticle
104 0 : Double_t Xv() const {return -999.;} // put reasonable values here
105 0 : Double_t Yv() const {return -999.;} //
106 0 : Double_t Zv() const {return -999.;} //
107 0 : Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
108 0 : Double_t OneOverPt() const { return (Pt() != 0.) ? 1./Pt() : FLT_MAX; }
109 0 : Double_t Phi() const { return TMath::Pi()+TMath::ATan2(-Py(), -Px()); }
110 0 : Double_t Theta() const { return TMath::ATan2(Pt(), Pz()); }
111 0 : Double_t E() const { return TMath::Sqrt(M()*M() + P()*P()); }
112 0 : Double_t M() const { return TDatabasePDG::Instance()->GetParticle("mu-")->Mass(); }
113 0 : Double_t Y() const { return Rapidity(); }
114 0 : Short_t Charge() const { return fCharge; }
115 :
116 : // Return kTRUE if the track contain tracker data
117 0 : Bool_t ContainTrackerData() const {return (fMuonClusterMap>0) ? kTRUE : kFALSE;}
118 :
119 : // Dummy
120 0 : const Double_t *PID() const { return (Double_t*)0x0; }
121 0 : Int_t PdgCode() const { return 0; }
122 :
123 : // Set the corresponding MC track number
124 0 : void SetLabel(Int_t label) { fLabel = label; }
125 : // Return the corresponding MC track number
126 0 : Int_t GetLabel() const { return fLabel; }
127 :
128 0 : void SetProdVertexXYZ(Double_t x, Double_t y, Double_t z) { fProdVertexXYZ[0]=x; fProdVertexXYZ[1]=y; fProdVertexXYZ[2]=z; }
129 0 : void GetProdVertexXYZ(Double_t *vertex) { vertex[0]=fProdVertexXYZ[0]; vertex[1]=fProdVertexXYZ[1]; vertex[2]=fProdVertexXYZ[2]; }
130 :
131 : const TMatrixD& GetCovariances() const;
132 : void SetCovariances(const TMatrixD& covariances);
133 :
134 0 : AliESDEvent* GetESDEvent() const { return fESDEvent; }
135 0 : void SetESDEvent(AliESDEvent* evt) { fESDEvent = evt; }
136 :
137 : protected:
138 :
139 : Short_t fCharge, fMatchTrigger, fNMFTClusters, fNWrongMFTClustersMC;
140 : ULong_t fMFTClusterPattern; // Tells us which MFT clusters are contained in the track, and which one is a good one (if MC)
141 :
142 : // kinematics at vertex
143 : Double_t fPx, fPy, fPz, fPt, fP, fEta, fRapidity;
144 :
145 : // coordinates of the first tracking point
146 : Double_t fFirstTrackingPointX, fFirstTrackingPointY, fFirstTrackingPointZ;
147 :
148 : // transverse coordinates at DCA to the primary vertex (offset)
149 : Double_t fXAtVertex, fYAtVertex;
150 :
151 : Double_t fRAtAbsorberEnd;
152 :
153 : mutable TMatrixD *fCovariances; // Covariance matrix of track parameters (see AliMUONTrackParam)
154 :
155 : // global tracking info
156 : Double_t fChi2OverNdf; // chi2/ndf in the MUON+MFT track fit
157 : Double_t fChi2MatchTrigger; // chi2 of trigger/track matching
158 :
159 : Int_t fLabel; // point to the corresponding MC track
160 :
161 : UInt_t fMuonClusterMap; // Map of clusters in MUON tracking chambers
162 : UShort_t fHitsPatternInTrigCh; // Word containing info on the hits left in trigger chambers
163 : UInt_t fHitsPatternInTrigChTrk; // Trigger hit map from tracker track extrapolation
164 : Int_t fLoCircuit;
165 : Bool_t fIsConnected;
166 :
167 : Double_t fProdVertexXYZ[3]; // vertex of origin
168 :
169 : AliESDEvent *fESDEvent; //! Pointer back to event to which the track belongs
170 :
171 180 : ClassDef(AliESDMuonGlobalTrack,4) // MUON+MFT ESD track class
172 :
173 : };
174 :
175 : //====================================================================================================================================================
176 :
177 : #endif
|