AliRoot Core  edcc906 (edcc906)
AliESDMuonGlobalTrack.h
Go to the documentation of this file.
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 
31 
32 public:
33 
35  AliESDMuonGlobalTrack(Double_t px, Double_t py, Double_t pz);
36  virtual ~AliESDMuonGlobalTrack() {;}
39  virtual void Copy(TObject &obj) const;
40 
41  void SetCharge(Int_t charge) { fCharge = charge; }
42  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  Double_t GetChi2OverNdf() const { return fChi2OverNdf; } // chi2/ndf
53  void SetChi2OverNdf(Double_t chi2) { fChi2OverNdf = chi2; } // chi2/ndf
54 
55  Double_t GetChi2MatchTrigger() const { return fChi2MatchTrigger; }
56  void SetChi2MatchTrigger(Double_t chi2MatchTrigger) { fChi2MatchTrigger = chi2MatchTrigger; }
57 
58  // Get and Set methods for various info copied and pasted from the MUON track
59  UShort_t GetHitsPatternInTrigCh() const {return fHitsPatternInTrigCh;}
60  void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh) {fHitsPatternInTrigCh = hitsPatternInTrigCh;}
62  void SetHitsPatternInTrigChTrk(UInt_t hitsPatternInTrigChTrk) {fHitsPatternInTrigChTrk = hitsPatternInTrigChTrk;}
63  UInt_t GetMuonClusterMap() const {return fMuonClusterMap;}
64  void SetMuonClusterMap(UInt_t muonClusterMap) {fMuonClusterMap = muonClusterMap;}
65  Int_t GetLoCircuit() const { return fLoCircuit; }
66  void SetLoCircuit(Int_t loCircuit) { fLoCircuit = loCircuit; }
67  Bool_t IsConnected() const { return fIsConnected; }
68  void Connected(Bool_t flag) { fIsConnected = flag; }
69 
70  // Get and Set methods for trigger matching
71  void SetMatchTrigger(Int_t matchTrigger) { fMatchTrigger = matchTrigger; }
72  Int_t GetMatchTrigger() { return fMatchTrigger; }
73 
74  void SetNMFTClusters(Int_t nMFTClusters) { fNMFTClusters = nMFTClusters; }
75  Short_t GetNMFTClusters() { return fNMFTClusters; }
76 
77  void SetNWrongMFTClustersMC(Int_t nWrongMFTClustersMC) { fNWrongMFTClustersMC = nWrongMFTClustersMC; }
79 
80  void SetMFTClusterPattern(ULong_t mftClusterPattern) { fMFTClusterPattern = mftClusterPattern; }
82 
83  // Kinematics
84  Double_t Pt() const { return fPt; }
85  Double_t Eta() const { return fEta; }
86  Double_t Rapidity() const { return fRapidity; }
87  Double_t Px() const { return fPx; }
88  Double_t Py() const { return fPy; }
89  Double_t Pz() const { return fPz; }
90  Double_t P() const { return fP; }
91 
92  Bool_t PxPyPz(Double_t p[3]) const { p[0] = Px(); p[1] = Py(); p[2] = Pz(); return kTRUE; }
93 
94  void SetFirstTrackingPoint(Double_t x, Double_t y, Double_t z) {fFirstTrackingPointX = x; fFirstTrackingPointY = y; fFirstTrackingPointZ = z; }
96 
97  void SetXYAtVertex(Double_t x, Double_t y) { fXAtVertex = x; fYAtVertex = y; }
98  void GetXYAtVertex(Double_t x[2]) { x[0] = fXAtVertex; x[1] = fYAtVertex; }
99 
100  Double_t GetRAtAbsorberEnd() { return fRAtAbsorberEnd; }
101  void SetRAtAbsorberEnd(Double_t r) { fRAtAbsorberEnd = r; }
102 
103  // Additional methods to comply with AliVParticle
104  Double_t Xv() const {return -999.;} // put reasonable values here
105  Double_t Yv() const {return -999.;} //
106  Double_t Zv() const {return -999.;} //
107  Bool_t XvYvZv(Double_t x[3]) const { x[0] = Xv(); x[1] = Yv(); x[2] = Zv(); return kTRUE; }
108  Double_t OneOverPt() const { return (Pt() != 0.) ? 1./Pt() : FLT_MAX; }
109  Double_t Phi() const { return TMath::Pi()+TMath::ATan2(-Py(), -Px()); }
110  Double_t Theta() const { return TMath::ATan2(Pt(), Pz()); }
111  Double_t E() const { return TMath::Sqrt(M()*M() + P()*P()); }
112  Double_t M() const { return TDatabasePDG::Instance()->GetParticle("mu-")->Mass(); }
113  Double_t Y() const { return Rapidity(); }
114  Short_t Charge() const { return fCharge; }
115 
116  // Return kTRUE if the track contain tracker data
117  Bool_t ContainTrackerData() const {return (fMuonClusterMap>0) ? kTRUE : kFALSE;}
118 
119  // Dummy
120  const Double_t *PID() const { return (Double_t*)0x0; }
121  Int_t PdgCode() const { return 0; }
122 
123  // Set the corresponding MC track number
124  void SetLabel(Int_t label) { fLabel = label; }
125  // Return the corresponding MC track number
126  Int_t GetLabel() const { return fLabel; }
127 
128  void SetProdVertexXYZ(Double_t x, Double_t y, Double_t z) { fProdVertexXYZ[0]=x; fProdVertexXYZ[1]=y; fProdVertexXYZ[2]=z; }
129  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  AliESDEvent* GetESDEvent() const { return fESDEvent; }
135  void SetESDEvent(AliESDEvent* evt) { fESDEvent = evt; }
136 
137 protected:
138 
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
147 
148  // transverse coordinates at DCA to the primary vertex (offset)
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 
170 
171  ClassDef(AliESDMuonGlobalTrack,4) // MUON+MFT ESD track class
172 
173 };
174 
175 //====================================================================================================================================================
176 
177 #endif
Bool_t ContainTrackerData() const
void GetFirstTrackingPoint(Double_t x[3])
void SetProdVertexXYZ(Double_t x, Double_t y, Double_t z)
void SetFirstTrackingPoint(Double_t x, Double_t y, Double_t z)
void SetRAtAbsorberEnd(Double_t r)
void SetNWrongMFTClustersMC(Int_t nWrongMFTClustersMC)
void SetPxPyPz(Double_t px, Double_t py, Double_t pz)
void SetMatchTrigger(Int_t matchTrigger)
void Connected(Bool_t flag)
void SetLoCircuit(Int_t loCircuit)
UInt_t GetMuonClusterMap() const
void SetXYAtVertex(Double_t x, Double_t y)
Float_t p[]
Definition: kNNTest.C:133
AliESDEvent * GetESDEvent() const
const TMatrixD & GetCovariances() const
void SetCharge(Int_t charge)
void SetNMFTClusters(Int_t nMFTClusters)
void GetProdVertexXYZ(Double_t *vertex)
Double_t Rapidity() const
Double_t GetChi2MatchTrigger() const
void SetHitsPatternInTrigCh(UShort_t hitsPatternInTrigCh)
Double_t chi2
Definition: AnalyzeLaser.C:7
void SetESDEvent(AliESDEvent *evt)
void SetHitsPatternInTrigChTrk(UInt_t hitsPatternInTrigChTrk)
void GetXYAtVertex(Double_t x[2])
void SetCovariances(const TMatrixD &covariances)
Bool_t XvYvZv(Double_t x[3]) const
Bool_t PxPyPz(Double_t p[3]) const
virtual void Copy(TObject &obj) const
const Double_t * PID() const
void SetChi2MatchTrigger(Double_t chi2MatchTrigger)
UShort_t GetHitsPatternInTrigCh() const
UInt_t GetHitsPatternInTrigChTrk() const
AliESDMuonGlobalTrack & operator=(const AliESDMuonGlobalTrack &esdTrack)
void SetMFTClusterPattern(ULong_t mftClusterPattern)
Double_t GetChi2OverNdf() const
void SetMuonClusterMap(UInt_t muonClusterMap)
void SetChi2OverNdf(Double_t chi2)
class TMatrixT< Double_t > TMatrixD