]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/ESD/AliESDMuonGlobalTrack.cxx
Adding MFT (Antonio)
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDMuonGlobalTrack.cxx
CommitLineData
d3eabe96 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16//====================================================================================================================================================
17//
18// ESD description of an ALICE muon forward track, combining the information of the Muon Spectrometer and the Muon Forward Tracker
19//
20// Contact author: antonio.uras@cern.ch
21//
22//====================================================================================================================================================
23
24#include "AliESDMuonGlobalTrack.h"
25#include "AliESDEvent.h"
26
27#include "TClonesArray.h"
28#include "TLorentzVector.h"
29#include "TMath.h"
30#include "TDatabasePDG.h"
31
32ClassImp(AliESDMuonGlobalTrack)
33
34//====================================================================================================================================================
35
36AliESDMuonGlobalTrack::AliESDMuonGlobalTrack():
37 AliVParticle(),
38 fCharge(0),
39 fMatchTrigger(0),
40 fPx(0),
41 fPy(0),
42 fPz(0),
43 fPt(0),
44 fP(0),
45 fEta(0),
46 fRapidity(0),
47 fChi2(0),
48 fChi2MatchTrigger(0),
49 fLabel(-1),
50 fESDEvent(0)
51{
52
53 // Default constructor
54
55}
56
57//====================================================================================================================================================
58
59AliESDMuonGlobalTrack::AliESDMuonGlobalTrack(Double_t px, Double_t py, Double_t pz):
60 AliVParticle(),
61 fCharge(0),
62 fMatchTrigger(0),
63 fPx(0),
64 fPy(0),
65 fPz(0),
66 fPt(0),
67 fP(0),
68 fEta(0),
69 fRapidity(0),
70 fChi2(0),
71 fChi2MatchTrigger(0),
72 fLabel(-1),
73 fESDEvent(0)
74{
75
76 // Constructor with kinematics
77
78 SetPxPyPz(px, py, pz);
79
80}
81
82//====================================================================================================================================================
83
84AliESDMuonGlobalTrack::AliESDMuonGlobalTrack(const AliESDMuonGlobalTrack& muonTrack):
85 AliVParticle(muonTrack),
86 fCharge(muonTrack.fCharge),
87 fMatchTrigger(muonTrack.fMatchTrigger),
88 fPx(muonTrack.fPx),
89 fPy(muonTrack.fPy),
90 fPz(muonTrack.fPz),
91 fPt(muonTrack.fPt),
92 fP(muonTrack.fP),
93 fEta(muonTrack.fEta),
94 fRapidity(muonTrack.fRapidity),
95 fChi2(muonTrack.fChi2),
96 fChi2MatchTrigger(muonTrack.fChi2MatchTrigger),
97 fLabel(muonTrack.fLabel),
98 fESDEvent(muonTrack.fESDEvent)
99{
100
101 // Copy constructor
102
103}
104
105//====================================================================================================================================================
106
107AliESDMuonGlobalTrack& AliESDMuonGlobalTrack::operator=(const AliESDMuonGlobalTrack& muonTrack) {
108
109 // Assignment operator
110
111 if (this == &muonTrack) return *this;
112
113 // Base class assignement
114 AliVParticle::operator=(muonTrack);
115
116 fCharge = muonTrack.fCharge;
117 fMatchTrigger = muonTrack.fMatchTrigger;
118 fPx = muonTrack.fPx;
119 fPy = muonTrack.fPy;
120 fPz = muonTrack.fPz;
121 fPt = muonTrack.fPt;
122 fP = muonTrack.fP;
123 fEta = muonTrack.fEta;
124 fRapidity = muonTrack.fRapidity;
125 fChi2 = muonTrack.fChi2;
126 fChi2MatchTrigger = muonTrack.fChi2MatchTrigger;
127 fLabel = muonTrack.fLabel;
128 fESDEvent = muonTrack.fESDEvent;
129
130 return *this;
131
132}
133
134//====================================================================================================================================================
135
136void AliESDMuonGlobalTrack::Copy(TObject &obj) const {
137
138 // This overwrites the virtual TObject::Copy()
139 // to allow run time copying without casting
140 // in AliESDEvent
141
142 if (this==&obj) return;
143 AliESDMuonGlobalTrack *robj = dynamic_cast<AliESDMuonGlobalTrack*>(&obj);
144 if (!robj) return; // not an AliESDMuonGlobalTrack
145 *robj = *this;
146
147}
148
149//====================================================================================================================================================
150
151void AliESDMuonGlobalTrack::SetPxPyPz(Double_t px, Double_t py, Double_t pz) {
152
153 Double_t mMu = TDatabasePDG::Instance()->GetParticle("mu-")->Mass();
154 Double_t eMu = TMath::Sqrt(mMu*mMu + px*px + py*py + pz*pz);
155
156 TLorentzVector kinem(px, py, pz, eMu);
157
158 fPx = kinem.Px();
159 fPy = kinem.Py();
160 fPz = kinem.Pz();
161 fP = kinem.P();
162 fPt = kinem.Pt();
163 fEta = kinem.Eta();
164 fRapidity = kinem.Rapidity();
165
166}
167
168//====================================================================================================================================================