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