]>
Commit | Line | Data |
---|---|---|
af7ba10c | 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 | /* $Id$ */ | |
17 | ||
18 | /////////////////////////////////////////////////////////////////////////////// | |
19 | // | |
20 | // Class to describe the MUON tracks | |
21 | // in the Event Summary Data class | |
22 | // This is where the results of reconstruction | |
23 | // are stored for the muons | |
24 | // Author: G.Martinez | |
25 | // | |
26 | /////////////////////////////////////////////////////////////////////////////// | |
27 | ||
672b5f43 | 28 | #include "AliESDMuonTrack.h" |
29 | ||
39b8d0dd | 30 | #include <TLorentzVector.h> |
31 | #include <TMath.h> | |
32 | ||
af7ba10c | 33 | ClassImp(AliESDMuonTrack) |
34 | ||
90e48c0c | 35 | //_____________________________________________________________________________ |
36 | AliESDMuonTrack::AliESDMuonTrack (): | |
37 | TObject(), | |
38 | fInverseBendingMomentum(0), | |
39 | fThetaX(0), | |
40 | fThetaY(0), | |
41 | fZ(0), | |
42 | fBendingCoor(0), | |
43 | fNonBendingCoor(0), | |
39b8d0dd | 44 | fInverseBendingMomentumUncorrected(0), |
45 | fThetaXUncorrected(0), | |
46 | fThetaYUncorrected(0), | |
47 | fZUncorrected(0), | |
48 | fBendingCoorUncorrected(0), | |
49 | fNonBendingCoorUncorrected(0), | |
90e48c0c | 50 | fChi2(0), |
51 | fNHit(0), | |
52 | fMatchTrigger(0), | |
53 | fChi2MatchTrigger(0) | |
54 | { | |
55 | // Default constructor | |
56 | } | |
57 | ||
58 | ||
af7ba10c | 59 | //_____________________________________________________________________________ |
60 | AliESDMuonTrack::AliESDMuonTrack (const AliESDMuonTrack& MUONTrack): | |
90e48c0c | 61 | TObject(MUONTrack), |
62 | fInverseBendingMomentum(MUONTrack.fInverseBendingMomentum), | |
63 | fThetaX(MUONTrack.fThetaX), | |
64 | fThetaY(MUONTrack.fThetaY), | |
65 | fZ(MUONTrack.fZ), | |
66 | fBendingCoor(MUONTrack.fBendingCoor), | |
67 | fNonBendingCoor(MUONTrack.fNonBendingCoor), | |
39b8d0dd | 68 | fInverseBendingMomentumUncorrected(MUONTrack.fInverseBendingMomentumUncorrected), |
69 | fThetaXUncorrected(MUONTrack.fThetaXUncorrected), | |
70 | fThetaYUncorrected(MUONTrack.fThetaYUncorrected), | |
71 | fZUncorrected(MUONTrack.fZUncorrected), | |
72 | fBendingCoorUncorrected(MUONTrack.fBendingCoorUncorrected), | |
73 | fNonBendingCoorUncorrected(MUONTrack.fNonBendingCoorUncorrected), | |
90e48c0c | 74 | fChi2(MUONTrack.fChi2), |
75 | fNHit(MUONTrack.fNHit), | |
76 | fMatchTrigger(MUONTrack.fMatchTrigger), | |
77 | fChi2MatchTrigger(MUONTrack.fChi2MatchTrigger) | |
5ec1b3bc | 78 | { |
af7ba10c | 79 | // |
80 | // Copy constructor | |
81 | // Deep copy implemented | |
82 | // | |
5ec1b3bc | 83 | } |
84 | ||
af7ba10c | 85 | //_____________________________________________________________________________ |
5ec1b3bc | 86 | AliESDMuonTrack& AliESDMuonTrack::operator=(const AliESDMuonTrack& MUONTrack) |
87 | { | |
af7ba10c | 88 | // |
89 | // Equal operator for a deep copy | |
90 | // | |
5ec1b3bc | 91 | if (this == &MUONTrack) |
92 | return *this; | |
93 | ||
94 | fInverseBendingMomentum = MUONTrack.fInverseBendingMomentum; | |
8252d536 | 95 | fThetaX = MUONTrack.fThetaX; |
39b8d0dd | 96 | fThetaY = MUONTrack.fThetaY; |
8252d536 | 97 | fZ = MUONTrack.fZ; |
98 | fBendingCoor = MUONTrack.fBendingCoor; | |
99 | fNonBendingCoor = MUONTrack.fNonBendingCoor; | |
39b8d0dd | 100 | |
101 | fInverseBendingMomentumUncorrected = MUONTrack.fInverseBendingMomentumUncorrected; | |
102 | fThetaXUncorrected = MUONTrack.fThetaXUncorrected; | |
103 | fThetaYUncorrected = MUONTrack.fThetaYUncorrected; | |
104 | fZUncorrected = MUONTrack.fZUncorrected; | |
105 | fBendingCoorUncorrected = MUONTrack.fBendingCoorUncorrected; | |
106 | fNonBendingCoorUncorrected = MUONTrack.fNonBendingCoorUncorrected; | |
107 | ||
8252d536 | 108 | fChi2 = MUONTrack.fChi2; |
39b8d0dd | 109 | fNHit = MUONTrack.fNHit; |
8252d536 | 110 | |
111 | fMatchTrigger = MUONTrack.fMatchTrigger; | |
112 | fChi2MatchTrigger = MUONTrack.fChi2MatchTrigger; | |
113 | ||
5ec1b3bc | 114 | return *this; |
115 | } | |
116 | ||
39b8d0dd | 117 | //_____________________________________________________________________________ |
118 | Double_t AliESDMuonTrack::Px() const | |
119 | { | |
120 | // return p_x from track parameters | |
121 | Double_t nonBendingSlope = TMath::Tan(fThetaX); | |
122 | Double_t bendingSlope = TMath::Tan(fThetaY); | |
123 | Double_t pYZ = (fInverseBendingMomentum != 0.) ? TMath::Abs(1. / fInverseBendingMomentum) : 0.; | |
124 | Double_t pZ = -pYZ / TMath::Sqrt(1.0 + bendingSlope*bendingSlope); // spectro. (z<0) | |
125 | return pZ * nonBendingSlope; | |
126 | } | |
127 | ||
128 | //_____________________________________________________________________________ | |
129 | Double_t AliESDMuonTrack::Py() const | |
130 | { | |
131 | // return p_y from track parameters | |
132 | Double_t bendingSlope = TMath::Tan(fThetaY); | |
133 | Double_t pYZ = (fInverseBendingMomentum != 0.) ? TMath::Abs(1. / fInverseBendingMomentum) : 0.; | |
134 | Double_t pZ = -pYZ / TMath::Sqrt(1.0 + bendingSlope*bendingSlope); // spectro. (z<0) | |
135 | return pZ * bendingSlope; | |
136 | } | |
137 | ||
138 | //_____________________________________________________________________________ | |
139 | Double_t AliESDMuonTrack::Pz() const | |
140 | { | |
141 | // return p_z from track parameters | |
142 | Double_t bendingSlope = TMath::Tan(fThetaY); | |
143 | Double_t pYZ = (fInverseBendingMomentum != 0.) ? TMath::Abs(1. / fInverseBendingMomentum) : 0.; | |
144 | return -pYZ / TMath::Sqrt(1.0 + bendingSlope*bendingSlope); // spectro. (z<0) | |
145 | } | |
146 | ||
147 | //_____________________________________________________________________________ | |
148 | Double_t AliESDMuonTrack::P() const | |
149 | { | |
150 | // return p from track parameters | |
151 | Double_t nonBendingSlope = TMath::Tan(fThetaX); | |
152 | Double_t bendingSlope = TMath::Tan(fThetaY); | |
153 | Double_t pYZ = (fInverseBendingMomentum != 0.) ? TMath::Abs(1. / fInverseBendingMomentum) : 0.; | |
154 | Double_t pZ = -pYZ / TMath::Sqrt(1.0 + bendingSlope*bendingSlope); // spectro. (z<0) | |
155 | return -pZ * TMath::Sqrt(1.0 + bendingSlope*bendingSlope + nonBendingSlope*nonBendingSlope); | |
156 | } | |
157 | ||
158 | //_____________________________________________________________________________ | |
159 | void AliESDMuonTrack::LorentzP(TLorentzVector& vP) const | |
160 | { | |
161 | // return Lorentz momentum vector from track parameters | |
162 | Double_t muonMass = 0.105658369; | |
163 | Double_t nonBendingSlope = TMath::Tan(fThetaX); | |
164 | Double_t bendingSlope = TMath::Tan(fThetaY); | |
165 | Double_t pYZ = (fInverseBendingMomentum != 0.) ? TMath::Abs(1. / fInverseBendingMomentum) : 0.; | |
166 | Double_t pZ = -pYZ / TMath::Sqrt(1.0 + bendingSlope*bendingSlope); // spectro. (z<0) | |
167 | Double_t pX = pZ * nonBendingSlope; | |
168 | Double_t pY = pZ * bendingSlope; | |
169 | Double_t e = TMath::Sqrt(muonMass*muonMass + pX*pX + pY*pY + pZ*pZ); | |
170 | vP.SetPxPyPzE(pX, pY, pZ, e); | |
171 | } | |
172 | ||
173 | //_____________________________________________________________________________ | |
174 | Double_t AliESDMuonTrack::PxUncorrected() const | |
175 | { | |
176 | // return p_x from track parameters | |
177 | Double_t nonBendingSlope = TMath::Tan(fThetaXUncorrected); | |
178 | Double_t bendingSlope = TMath::Tan(fThetaYUncorrected); | |
179 | Double_t pYZ = (fInverseBendingMomentumUncorrected != 0.) ? TMath::Abs(1. / fInverseBendingMomentumUncorrected) : 0.; | |
180 | Double_t pZ = -pYZ / TMath::Sqrt(1.0 + bendingSlope*bendingSlope); // spectro. (z<0) | |
181 | return pZ * nonBendingSlope; | |
182 | } | |
183 | ||
184 | //_____________________________________________________________________________ | |
185 | Double_t AliESDMuonTrack::PyUncorrected() const | |
186 | { | |
187 | // return p_y from track parameters | |
188 | Double_t bendingSlope = TMath::Tan(fThetaYUncorrected); | |
189 | Double_t pYZ = (fInverseBendingMomentumUncorrected != 0.) ? TMath::Abs(1. / fInverseBendingMomentumUncorrected) : 0.; | |
190 | Double_t pZ = -pYZ / TMath::Sqrt(1.0 + bendingSlope*bendingSlope); // spectro. (z<0) | |
191 | return pZ * bendingSlope; | |
192 | } | |
193 | ||
194 | //_____________________________________________________________________________ | |
195 | Double_t AliESDMuonTrack::PzUncorrected() const | |
196 | { | |
197 | // return p_z from track parameters | |
198 | Double_t bendingSlope = TMath::Tan(fThetaYUncorrected); | |
199 | Double_t pYZ = (fInverseBendingMomentumUncorrected != 0.) ? TMath::Abs(1. / fInverseBendingMomentumUncorrected) : 0.; | |
200 | return -pYZ / TMath::Sqrt(1.0 + bendingSlope*bendingSlope); // spectro. (z<0) | |
201 | } | |
202 | ||
203 | //_____________________________________________________________________________ | |
204 | Double_t AliESDMuonTrack::PUncorrected() const | |
205 | { | |
206 | // return p from track parameters | |
207 | Double_t nonBendingSlope = TMath::Tan(fThetaXUncorrected); | |
208 | Double_t bendingSlope = TMath::Tan(fThetaYUncorrected); | |
209 | Double_t pYZ = (fInverseBendingMomentumUncorrected != 0.) ? TMath::Abs(1. / fInverseBendingMomentumUncorrected) : 0.; | |
210 | Double_t pZ = -pYZ / TMath::Sqrt(1.0 + bendingSlope*bendingSlope); // spectro. (z<0) | |
211 | return -pZ * TMath::Sqrt(1.0 + bendingSlope*bendingSlope + nonBendingSlope*nonBendingSlope); | |
212 | } | |
213 | ||
214 | //_____________________________________________________________________________ | |
215 | void AliESDMuonTrack::LorentzPUncorrected(TLorentzVector& vP) const | |
216 | { | |
217 | // return Lorentz momentum vector from track parameters | |
218 | Double_t muonMass = 0.105658369; | |
219 | Double_t nonBendingSlope = TMath::Tan(fThetaXUncorrected); | |
220 | Double_t bendingSlope = TMath::Tan(fThetaYUncorrected); | |
221 | Double_t pYZ = (fInverseBendingMomentumUncorrected != 0.) ? TMath::Abs(1. / fInverseBendingMomentumUncorrected) : 0.; | |
222 | Double_t pZ = -pYZ / TMath::Sqrt(1.0 + bendingSlope*bendingSlope); // spectro. (z<0) | |
223 | Double_t pX = pZ * nonBendingSlope; | |
224 | Double_t pY = pZ * bendingSlope; | |
225 | Double_t e = TMath::Sqrt(muonMass*muonMass + pX*pX + pY*pY + pZ*pZ); | |
226 | vP.SetPxPyPzE(pX, pY, pZ, e); | |
227 | } | |
672b5f43 | 228 |