]>
Commit | Line | Data |
---|---|---|
df9db588 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-2007, 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 | //------------------------------------------------------------------------- | |
4f6e22bd | 19 | // AOD track implementation of AliVTrack |
df9db588 | 20 | // Author: Markus Oldenburg, CERN |
0c5f89fb | 21 | // Markus.Oldenburg@cern.ch |
df9db588 | 22 | //------------------------------------------------------------------------- |
23 | ||
086400fc | 24 | #include <TVector3.h> |
8ac4fa64 | 25 | #include "AliLog.h" |
6dc40b1c | 26 | #include "AliExternalTrackParam.h" |
27 | #include "AliVVertex.h" | |
00a38d07 | 28 | #include "AliDetectorPID.h" |
aab77ed0 | 29 | #include "AliAODEvent.h" |
567624b5 | 30 | #include "AliAODHMPIDrings.h" |
31 | ||
32 | #include "AliAODTrack.h" | |
df9db588 | 33 | |
34 | ClassImp(AliAODTrack) | |
35 | ||
36 | //______________________________________________________________________________ | |
37 | AliAODTrack::AliAODTrack() : | |
4f6e22bd | 38 | AliVTrack(), |
f43586f0 | 39 | fRAtAbsorberEnd(0.), |
1912763f | 40 | fChi2perNDF(-999.), |
9333290e | 41 | fChi2MatchTrigger(0.), |
6efb741f | 42 | fFlags(0), |
df9db588 | 43 | fLabel(-999), |
a2c30af1 | 44 | fTOFLabel(), |
9b5c8b95 | 45 | fTrackLength(0), |
1912763f | 46 | fITSMuonClusterMap(0), |
0a2dcc83 | 47 | fMUONtrigHitsMapTrg(0), |
48 | fMUONtrigHitsMapTrk(0), | |
9333290e | 49 | fFilterMap(0), |
bcabd0e4 | 50 | fTPCFitMap(), |
d999f2e6 | 51 | fTPCClusterMap(), |
52 | fTPCSharedMap(), | |
3c01c166 | 53 | fTPCnclsF(0), |
820214a7 | 54 | fTPCNCrossedRows(0), |
02153d58 | 55 | fID(-999), |
9333290e | 56 | fCharge(-99), |
e1c744ca | 57 | fType(kUndef), |
a7d9ab9e | 58 | fCaloIndex(kEMCALNoMatch), |
9333290e | 59 | fCovMatrix(NULL), |
7be1db84 | 60 | fDetPid(NULL), |
00a38d07 | 61 | fDetectorPID(NULL), |
ed15417e | 62 | fProdVertex(NULL), |
63 | fTrackPhiOnEMCal(-999), | |
aab77ed0 | 64 | fTrackEtaOnEMCal(-999), |
539a5a59 | 65 | fTPCsignalTuned(0), |
a2c30af1 | 66 | fTOFsignalTuned(99999), |
aab77ed0 | 67 | fAODEvent(NULL) |
df9db588 | 68 | { |
69 | // default constructor | |
70 | ||
71 | SetP(); | |
72 | SetPosition((Float_t*)NULL); | |
6c954176 | 73 | SetXYAtDCA(-999., -999.); |
74 | SetPxPyPzAtDCA(-999., -999., -999.); | |
df9db588 | 75 | SetPID((Float_t*)NULL); |
a2c30af1 | 76 | for (Int_t i = 0; i < 3; i++) {fTOFLabel[i] = -1;} |
df9db588 | 77 | } |
78 | ||
79 | //______________________________________________________________________________ | |
02153d58 | 80 | AliAODTrack::AliAODTrack(Short_t id, |
df9db588 | 81 | Int_t label, |
82 | Double_t p[3], | |
83 | Bool_t cartesian, | |
84 | Double_t x[3], | |
85 | Bool_t isDCA, | |
86 | Double_t covMatrix[21], | |
87 | Short_t charge, | |
88 | UChar_t itsClusMap, | |
89 | Double_t pid[10], | |
90 | AliAODVertex *prodVertex, | |
1912763f | 91 | Bool_t usedForVtxFit, |
dc825b15 | 92 | Bool_t usedForPrimVtxFit, |
ec40c484 | 93 | AODTrk_t ttype, |
862ce351 | 94 | UInt_t selectInfo, |
95 | Float_t chi2perNDF) : | |
4f6e22bd | 96 | AliVTrack(), |
f43586f0 | 97 | fRAtAbsorberEnd(0.), |
862ce351 | 98 | fChi2perNDF(chi2perNDF), |
9333290e | 99 | fChi2MatchTrigger(0.), |
6efb741f | 100 | fFlags(0), |
df9db588 | 101 | fLabel(label), |
a2c30af1 | 102 | fTOFLabel(), |
9b5c8b95 | 103 | fTrackLength(0), |
6c954176 | 104 | fITSMuonClusterMap(0), |
0a2dcc83 | 105 | fMUONtrigHitsMapTrg(0), |
106 | fMUONtrigHitsMapTrk(0), | |
9333290e | 107 | fFilterMap(selectInfo), |
bcabd0e4 | 108 | fTPCFitMap(), |
d999f2e6 | 109 | fTPCClusterMap(), |
110 | fTPCSharedMap(), | |
3c01c166 | 111 | fTPCnclsF(0), |
820214a7 | 112 | fTPCNCrossedRows(0), |
02153d58 | 113 | fID(id), |
9333290e | 114 | fCharge(charge), |
e1c744ca | 115 | fType(ttype), |
a7d9ab9e | 116 | fCaloIndex(kEMCALNoMatch), |
9333290e | 117 | fCovMatrix(NULL), |
7be1db84 | 118 | fDetPid(NULL), |
00a38d07 | 119 | fDetectorPID(NULL), |
ed15417e | 120 | fProdVertex(prodVertex), |
121 | fTrackPhiOnEMCal(-999), | |
aab77ed0 | 122 | fTrackEtaOnEMCal(-999), |
539a5a59 | 123 | fTPCsignalTuned(0), |
a2c30af1 | 124 | fTOFsignalTuned(99999), |
aab77ed0 | 125 | fAODEvent(NULL) |
df9db588 | 126 | { |
127 | // constructor | |
128 | ||
129 | SetP(p, cartesian); | |
130 | SetPosition(x, isDCA); | |
6c954176 | 131 | SetXYAtDCA(-999., -999.); |
132 | SetPxPyPzAtDCA(-999., -999., -999.); | |
1912763f | 133 | SetUsedForVtxFit(usedForVtxFit); |
dc825b15 | 134 | SetUsedForPrimVtxFit(usedForPrimVtxFit); |
df9db588 | 135 | if(covMatrix) SetCovMatrix(covMatrix); |
136 | SetPID(pid); | |
6c954176 | 137 | SetITSClusterMap(itsClusMap); |
a2c30af1 | 138 | for (Int_t i=0;i<3;i++) {fTOFLabel[i]=-1;} |
df9db588 | 139 | } |
140 | ||
141 | //______________________________________________________________________________ | |
02153d58 | 142 | AliAODTrack::AliAODTrack(Short_t id, |
df9db588 | 143 | Int_t label, |
144 | Float_t p[3], | |
145 | Bool_t cartesian, | |
146 | Float_t x[3], | |
147 | Bool_t isDCA, | |
148 | Float_t covMatrix[21], | |
149 | Short_t charge, | |
150 | UChar_t itsClusMap, | |
151 | Float_t pid[10], | |
152 | AliAODVertex *prodVertex, | |
1912763f | 153 | Bool_t usedForVtxFit, |
dc825b15 | 154 | Bool_t usedForPrimVtxFit, |
ec40c484 | 155 | AODTrk_t ttype, |
862ce351 | 156 | UInt_t selectInfo, |
157 | Float_t chi2perNDF) : | |
4f6e22bd | 158 | AliVTrack(), |
f43586f0 | 159 | fRAtAbsorberEnd(0.), |
862ce351 | 160 | fChi2perNDF(chi2perNDF), |
9333290e | 161 | fChi2MatchTrigger(0.), |
6efb741f | 162 | fFlags(0), |
df9db588 | 163 | fLabel(label), |
a2c30af1 | 164 | fTOFLabel(), |
9b5c8b95 | 165 | fTrackLength(0), |
6c954176 | 166 | fITSMuonClusterMap(0), |
0a2dcc83 | 167 | fMUONtrigHitsMapTrg(0), |
168 | fMUONtrigHitsMapTrk(0), | |
9333290e | 169 | fFilterMap(selectInfo), |
bcabd0e4 | 170 | fTPCFitMap(), |
d999f2e6 | 171 | fTPCClusterMap(), |
172 | fTPCSharedMap(), | |
3c01c166 | 173 | fTPCnclsF(0), |
820214a7 | 174 | fTPCNCrossedRows(0), |
02153d58 | 175 | fID(id), |
9333290e | 176 | fCharge(charge), |
e1c744ca | 177 | fType(ttype), |
a7d9ab9e | 178 | fCaloIndex(kEMCALNoMatch), |
9333290e | 179 | fCovMatrix(NULL), |
7be1db84 | 180 | fDetPid(NULL), |
00a38d07 | 181 | fDetectorPID(NULL), |
ed15417e | 182 | fProdVertex(prodVertex), |
183 | fTrackPhiOnEMCal(-999), | |
aab77ed0 | 184 | fTrackEtaOnEMCal(-999), |
539a5a59 | 185 | fTPCsignalTuned(0), |
a2c30af1 | 186 | fTOFsignalTuned(99999), |
aab77ed0 | 187 | fAODEvent(NULL) |
df9db588 | 188 | { |
189 | // constructor | |
190 | ||
191 | SetP(p, cartesian); | |
192 | SetPosition(x, isDCA); | |
6c954176 | 193 | SetXYAtDCA(-999., -999.); |
194 | SetPxPyPzAtDCA(-999., -999., -999.); | |
1912763f | 195 | SetUsedForVtxFit(usedForVtxFit); |
dc825b15 | 196 | SetUsedForPrimVtxFit(usedForPrimVtxFit); |
df9db588 | 197 | if(covMatrix) SetCovMatrix(covMatrix); |
198 | SetPID(pid); | |
6c954176 | 199 | SetITSClusterMap(itsClusMap); |
a2c30af1 | 200 | for (Int_t i=0;i<3;i++) {fTOFLabel[i]=-1;} |
df9db588 | 201 | } |
202 | ||
df9db588 | 203 | //______________________________________________________________________________ |
204 | AliAODTrack::~AliAODTrack() | |
205 | { | |
206 | // destructor | |
207 | delete fCovMatrix; | |
7450f8ab | 208 | delete fDetPid; |
00a38d07 | 209 | delete fDetectorPID; |
df9db588 | 210 | } |
211 | ||
212 | ||
213 | //______________________________________________________________________________ | |
214 | AliAODTrack::AliAODTrack(const AliAODTrack& trk) : | |
4f6e22bd | 215 | AliVTrack(trk), |
f43586f0 | 216 | fRAtAbsorberEnd(trk.fRAtAbsorberEnd), |
1912763f | 217 | fChi2perNDF(trk.fChi2perNDF), |
9333290e | 218 | fChi2MatchTrigger(trk.fChi2MatchTrigger), |
6efb741f | 219 | fFlags(trk.fFlags), |
df9db588 | 220 | fLabel(trk.fLabel), |
a2c30af1 | 221 | fTOFLabel(), |
9b5c8b95 | 222 | fTrackLength(trk.fTrackLength), |
1912763f | 223 | fITSMuonClusterMap(trk.fITSMuonClusterMap), |
0a2dcc83 | 224 | fMUONtrigHitsMapTrg(trk.fMUONtrigHitsMapTrg), |
225 | fMUONtrigHitsMapTrk(trk.fMUONtrigHitsMapTrk), | |
9333290e | 226 | fFilterMap(trk.fFilterMap), |
bcabd0e4 | 227 | fTPCFitMap(trk.fTPCFitMap), |
d999f2e6 | 228 | fTPCClusterMap(trk.fTPCClusterMap), |
229 | fTPCSharedMap(trk.fTPCSharedMap), | |
3c01c166 | 230 | fTPCnclsF(trk.fTPCnclsF), |
820214a7 | 231 | fTPCNCrossedRows(trk.fTPCNCrossedRows), |
02153d58 | 232 | fID(trk.fID), |
9333290e | 233 | fCharge(trk.fCharge), |
e1c744ca | 234 | fType(trk.fType), |
a7d9ab9e | 235 | fCaloIndex(trk.fCaloIndex), |
9333290e | 236 | fCovMatrix(NULL), |
7be1db84 | 237 | fDetPid(NULL), |
00a38d07 | 238 | fDetectorPID(NULL), |
ed15417e | 239 | fProdVertex(trk.fProdVertex), |
240 | fTrackPhiOnEMCal(trk.fTrackPhiOnEMCal), | |
aab77ed0 | 241 | fTrackEtaOnEMCal(trk.fTrackEtaOnEMCal), |
539a5a59 | 242 | fTPCsignalTuned(trk.fTPCsignalTuned), |
a2c30af1 | 243 | fTOFsignalTuned(trk.fTOFsignalTuned), |
aab77ed0 | 244 | fAODEvent(trk.fAODEvent) |
df9db588 | 245 | { |
246 | // Copy constructor | |
247 | ||
248 | trk.GetP(fMomentum); | |
249 | trk.GetPosition(fPosition); | |
6c954176 | 250 | SetXYAtDCA(trk.XAtDCA(), trk.YAtDCA()); |
251 | SetPxPyPzAtDCA(trk.PxAtDCA(), trk.PyAtDCA(), trk.PzAtDCA()); | |
1912763f | 252 | SetUsedForVtxFit(trk.GetUsedForVtxFit()); |
dc825b15 | 253 | SetUsedForPrimVtxFit(trk.GetUsedForPrimVtxFit()); |
5d62ce04 | 254 | if(trk.fCovMatrix) fCovMatrix=new AliAODRedCov<6>(*trk.fCovMatrix); |
7be1db84 | 255 | if(trk.fDetPid) fDetPid=new AliAODPid(*trk.fDetPid); |
df9db588 | 256 | SetPID(trk.fPID); |
00a38d07 | 257 | if (trk.fDetectorPID) fDetectorPID = new AliDetectorPID(*trk.fDetectorPID); |
a2c30af1 | 258 | for (Int_t i = 0; i < 3; i++) {fTOFLabel[i] = trk.fTOFLabel[i];} |
df9db588 | 259 | } |
260 | ||
261 | //______________________________________________________________________________ | |
262 | AliAODTrack& AliAODTrack::operator=(const AliAODTrack& trk) | |
263 | { | |
264 | // Assignment operator | |
265 | if(this!=&trk) { | |
266 | ||
4f6e22bd | 267 | AliVTrack::operator=(trk); |
df9db588 | 268 | |
269 | trk.GetP(fMomentum); | |
270 | trk.GetPosition(fPosition); | |
6c954176 | 271 | SetXYAtDCA(trk.XAtDCA(), trk.YAtDCA()); |
272 | SetPxPyPzAtDCA(trk.PxAtDCA(), trk.PyAtDCA(), trk.PzAtDCA()); | |
05f9607e | 273 | fRAtAbsorberEnd = trk.fRAtAbsorberEnd; |
274 | fChi2perNDF = trk.fChi2perNDF; | |
275 | fChi2MatchTrigger = trk.fChi2MatchTrigger; | |
276 | trk.GetPID(fPID); | |
277 | fFlags = trk.fFlags; | |
278 | fLabel = trk.fLabel; | |
9b5c8b95 | 279 | fTrackLength = trk.fTrackLength; |
9333290e | 280 | fITSMuonClusterMap = trk.fITSMuonClusterMap; |
0a2dcc83 | 281 | fMUONtrigHitsMapTrg = trk.fMUONtrigHitsMapTrg; |
282 | fMUONtrigHitsMapTrk = trk.fMUONtrigHitsMapTrk; | |
05f9607e | 283 | fFilterMap = trk.fFilterMap; |
bcabd0e4 | 284 | fTPCFitMap = trk.fTPCFitMap; |
05f9607e | 285 | fTPCClusterMap = trk.fTPCClusterMap; |
286 | fTPCSharedMap = trk.fTPCSharedMap; | |
287 | fTPCnclsF = trk.fTPCnclsF; | |
820214a7 | 288 | fTPCNCrossedRows = trk.fTPCNCrossedRows; |
05f9607e | 289 | fID = trk.fID; |
290 | fCharge = trk.fCharge; | |
291 | fType = trk.fType; | |
292 | fCaloIndex = trk.fCaloIndex; | |
ed15417e | 293 | fTrackPhiOnEMCal = trk.fTrackPhiOnEMCal; |
294 | fTrackEtaOnEMCal = trk.fTrackEtaOnEMCal; | |
539a5a59 | 295 | fTPCsignalTuned = trk.fTPCsignalTuned; |
a2c30af1 | 296 | fTOFsignalTuned = trk.fTOFsignalTuned; |
a7d9ab9e | 297 | |
df9db588 | 298 | delete fCovMatrix; |
5d62ce04 | 299 | if(trk.fCovMatrix) fCovMatrix=new AliAODRedCov<6>(*trk.fCovMatrix); |
df9db588 | 300 | else fCovMatrix=NULL; |
df9db588 | 301 | |
05f9607e | 302 | |
303 | fProdVertex = trk.fProdVertex; | |
1912763f | 304 | SetUsedForVtxFit(trk.GetUsedForVtxFit()); |
dc825b15 | 305 | SetUsedForPrimVtxFit(trk.GetUsedForPrimVtxFit()); |
7be1db84 | 306 | |
00a38d07 | 307 | //detector raw signals |
7be1db84 | 308 | delete fDetPid; |
309 | if(trk.fDetPid) fDetPid=new AliAODPid(*trk.fDetPid); | |
310 | else fDetPid=NULL; | |
05f9607e | 311 | |
00a38d07 | 312 | //calibrated PID cache |
313 | delete fDetectorPID; | |
314 | fDetectorPID=0x0; | |
315 | if (trk.fDetectorPID) fDetectorPID = new AliDetectorPID(*trk.fDetectorPID); | |
a2c30af1 | 316 | for (Int_t i = 0; i < 3; i++) {fTOFLabel[i] = trk.fTOFLabel[i];} |
df9db588 | 317 | } |
318 | ||
319 | return *this; | |
320 | } | |
321 | ||
4697e4fb | 322 | //______________________________________________________________________________ |
323 | Double_t AliAODTrack::M(AODTrkPID_t pid) const | |
324 | { | |
325 | // Returns the mass. | |
9861edc0 | 326 | // Masses for nuclei don't exist in the PDG tables, therefore they were put by hand. |
4697e4fb | 327 | |
328 | switch (pid) { | |
329 | ||
330 | case kElectron : | |
9861edc0 | 331 | return 0.000510999; //TDatabasePDG::Instance()->GetParticle(11/*::kElectron*/)->Mass(); |
4697e4fb | 332 | break; |
333 | ||
334 | case kMuon : | |
9861edc0 | 335 | return 0.1056584; //TDatabasePDG::Instance()->GetParticle(13/*::kMuonMinus*/)->Mass(); |
4697e4fb | 336 | break; |
337 | ||
338 | case kPion : | |
9861edc0 | 339 | return 0.13957; //TDatabasePDG::Instance()->GetParticle(211/*::kPiPlus*/)->Mass(); |
4697e4fb | 340 | break; |
341 | ||
342 | case kKaon : | |
9861edc0 | 343 | return 0.4937; //TDatabasePDG::Instance()->GetParticle(321/*::kKPlus*/)->Mass(); |
4697e4fb | 344 | break; |
345 | ||
346 | case kProton : | |
9861edc0 | 347 | return 0.9382720; //TDatabasePDG::Instance()->GetParticle(2212/*::kProton*/)->Mass(); |
4697e4fb | 348 | break; |
349 | ||
350 | case kDeuteron : | |
9861edc0 | 351 | return 1.8756; //TDatabasePDG::Instance()->GetParticle(1000010020)->Mass(); |
4697e4fb | 352 | break; |
353 | ||
354 | case kTriton : | |
9861edc0 | 355 | return 2.8089; //TDatabasePDG::Instance()->GetParticle(1000010030)->Mass(); |
4697e4fb | 356 | break; |
357 | ||
358 | case kHelium3 : | |
9861edc0 | 359 | return 2.8084; //TDatabasePDG::Instance()->GetParticle(1000020030)->Mass(); |
4697e4fb | 360 | break; |
361 | ||
362 | case kAlpha : | |
9861edc0 | 363 | return 3.7274; //TDatabasePDG::Instance()->GetParticle(1000020040)->Mass(); |
4697e4fb | 364 | break; |
365 | ||
366 | case kUnknown : | |
367 | return -999.; | |
368 | break; | |
369 | ||
370 | default : | |
371 | return -999.; | |
372 | } | |
373 | } | |
374 | ||
375 | //______________________________________________________________________________ | |
376 | Double_t AliAODTrack::E(AODTrkPID_t pid) const | |
377 | { | |
378 | // Returns the energy of the particle of a given pid. | |
379 | ||
380 | if (pid != kUnknown) { // particle was identified | |
381 | Double_t m = M(pid); | |
382 | return TMath::Sqrt(P()*P() + m*m); | |
383 | } else { // pid unknown | |
384 | return -999.; | |
385 | } | |
386 | } | |
387 | ||
388 | //______________________________________________________________________________ | |
389 | Double_t AliAODTrack::Y(AODTrkPID_t pid) const | |
390 | { | |
9861edc0 | 391 | // Returns the rapidity of a particle of a given pid. |
4697e4fb | 392 | |
393 | if (pid != kUnknown) { // particle was identified | |
394 | Double_t e = E(pid); | |
395 | Double_t pz = Pz(); | |
396 | if (e>=0 && e!=pz) { // energy was positive (e.g. not -999.) and not equal to pz | |
397 | return 0.5*TMath::Log((e+pz)/(e-pz)); | |
398 | } else { // energy not known or equal to pz | |
399 | return -999.; | |
400 | } | |
401 | } else { // pid unknown | |
402 | return -999.; | |
403 | } | |
404 | } | |
405 | ||
406 | //______________________________________________________________________________ | |
407 | Double_t AliAODTrack::Y(Double_t m) const | |
408 | { | |
9861edc0 | 409 | // Returns the rapidity of a particle of a given mass. |
4697e4fb | 410 | |
411 | if (m >= 0.) { // mass makes sense | |
412 | Double_t e = E(m); | |
413 | Double_t pz = Pz(); | |
414 | if (e>=0 && e!=pz) { // energy was positive (e.g. not -999.) and not equal to pz | |
415 | return 0.5*TMath::Log((e+pz)/(e-pz)); | |
416 | } else { // energy not known or equal to pz | |
417 | return -999.; | |
418 | } | |
419 | } else { // pid unknown | |
420 | return -999.; | |
421 | } | |
422 | } | |
423 | ||
a2c30af1 | 424 | void AliAODTrack::SetTOFLabel(const Int_t *p) { |
425 | // Sets (in TOF) | |
426 | for (Int_t i = 0; i < 3; i++) fTOFLabel[i]=p[i]; | |
427 | } | |
428 | ||
429 | //_______________________________________________________________________ | |
430 | void AliAODTrack::GetTOFLabel(Int_t *p) const { | |
431 | // Gets (in TOF) | |
432 | for (Int_t i=0; i<3; i++) p[i]=fTOFLabel[i]; | |
433 | } | |
434 | ||
4697e4fb | 435 | //______________________________________________________________________________ |
436 | AliAODTrack::AODTrkPID_t AliAODTrack::GetMostProbablePID() const | |
437 | { | |
438 | // Returns the most probable PID array element. | |
439 | ||
440 | Int_t nPID = 10; | |
7ba6f91a | 441 | AODTrkPID_t loc = kUnknown; |
442 | Double_t max = 0.; | |
443 | Bool_t allTheSame = kTRUE; | |
444 | ||
445 | for (Int_t iPID = 0; iPID < nPID; iPID++) { | |
446 | if (fPID[iPID] >= max) { | |
447 | if (fPID[iPID] > max) { | |
448 | allTheSame = kFALSE; | |
449 | max = fPID[iPID]; | |
450 | loc = (AODTrkPID_t)iPID; | |
451 | } else { | |
452 | allTheSame = kTRUE; | |
4697e4fb | 453 | } |
454 | } | |
4697e4fb | 455 | } |
7ba6f91a | 456 | return allTheSame ? kUnknown : loc; |
4697e4fb | 457 | } |
458 | ||
459 | //______________________________________________________________________________ | |
460 | void AliAODTrack::ConvertAliPIDtoAODPID() | |
461 | { | |
462 | // Converts AliPID array. | |
463 | // The numbering scheme is the same for electrons, muons, pions, kaons, and protons. | |
464 | // Everything else has to be set to zero. | |
465 | ||
466 | fPID[kDeuteron] = 0.; | |
8a1418dc | 467 | fPID[kTriton] = 0.; |
468 | fPID[kHelium3] = 0.; | |
469 | fPID[kAlpha] = 0.; | |
470 | fPID[kUnknown] = 0.; | |
4697e4fb | 471 | |
472 | return; | |
473 | } | |
474 | ||
475 | ||
df9db588 | 476 | //______________________________________________________________________________ |
cdd730d0 | 477 | template <typename T> void AliAODTrack::SetP(const T *p, const Bool_t cartesian) |
df9db588 | 478 | { |
8a1418dc | 479 | // Set the momentum |
df9db588 | 480 | |
481 | if (p) { | |
482 | if (cartesian) { | |
16b65f2a | 483 | Double_t pt2 = p[0]*p[0] + p[1]*p[1]; |
0c5f89fb | 484 | Double_t pp = TMath::Sqrt(pt2 + p[2]*p[2]); |
df9db588 | 485 | |
16b65f2a | 486 | fMomentum[0] = TMath::Sqrt(pt2); // pt |
b1a9edc8 | 487 | fMomentum[1] = (pt2 != 0.) ? TMath::Pi()+TMath::ATan2(-p[1], -p[0]) : -999; // phi |
0c5f89fb | 488 | fMomentum[2] = (pp != 0.) ? TMath::ACos(p[2] / pp) : -999.; // theta |
df9db588 | 489 | } else { |
16b65f2a | 490 | fMomentum[0] = p[0]; // pt |
df9db588 | 491 | fMomentum[1] = p[1]; // phi |
492 | fMomentum[2] = p[2]; // theta | |
493 | } | |
494 | } else { | |
495 | fMomentum[0] = -999.; | |
496 | fMomentum[1] = -999.; | |
497 | fMomentum[2] = -999.; | |
498 | } | |
499 | } | |
500 | ||
6e78367a | 501 | /* |
df9db588 | 502 | //______________________________________________________________________________ |
cdd730d0 | 503 | template <typename T> void AliAODTrack::SetPosition(const T *x, const Bool_t dca) |
df9db588 | 504 | { |
505 | // set the position | |
506 | ||
507 | if (x) { | |
508 | if (!dca) { | |
509 | ResetBit(kIsDCA); | |
510 | ||
511 | fPosition[0] = x[0]; | |
512 | fPosition[1] = x[1]; | |
513 | fPosition[2] = x[2]; | |
514 | } else { | |
515 | SetBit(kIsDCA); | |
516 | // don't know any better yet | |
517 | fPosition[0] = -999.; | |
518 | fPosition[1] = -999.; | |
519 | fPosition[2] = -999.; | |
520 | } | |
521 | } else { | |
522 | ResetBit(kIsDCA); | |
523 | ||
524 | fPosition[0] = -999.; | |
525 | fPosition[1] = -999.; | |
526 | fPosition[2] = -999.; | |
527 | } | |
528 | } | |
6e78367a | 529 | */ |
df9db588 | 530 | //______________________________________________________________________________ |
531 | void AliAODTrack::SetDCA(Double_t d, Double_t z) | |
532 | { | |
533 | // set the dca | |
534 | fPosition[0] = d; | |
535 | fPosition[1] = z; | |
536 | fPosition[2] = 0.; | |
537 | SetBit(kIsDCA); | |
538 | } | |
539 | ||
540 | //______________________________________________________________________________ | |
541 | void AliAODTrack::Print(Option_t* /* option */) const | |
542 | { | |
543 | // prints information about AliAODTrack | |
544 | ||
545 | printf("Object name: %s Track type: %s\n", GetName(), GetTitle()); | |
546 | printf(" px = %f\n", Px()); | |
547 | printf(" py = %f\n", Py()); | |
548 | printf(" pz = %f\n", Pz()); | |
549 | printf(" pt = %f\n", Pt()); | |
550 | printf(" 1/pt = %f\n", OneOverPt()); | |
551 | printf(" theta = %f\n", Theta()); | |
552 | printf(" phi = %f\n", Phi()); | |
1912763f | 553 | printf(" chi2/NDF = %f\n", Chi2perNDF()); |
df9db588 | 554 | printf(" charge = %d\n", Charge()); |
df9db588 | 555 | } |
556 | ||
2200238e | 557 | //______________________________________________________________________________ |
558 | void AliAODTrack::SetMatchTrigger(Int_t matchTrig) | |
559 | { | |
560 | // Set the MUON trigger information | |
8ac4fa64 | 561 | switch(matchTrig){ |
e1c744ca | 562 | case 0: // 0 track does not match trigger |
563 | fITSMuonClusterMap=fITSMuonClusterMap&0x3fffffff; | |
564 | break; | |
565 | case 1: // 1 track match but does not pass pt cut | |
566 | fITSMuonClusterMap=(fITSMuonClusterMap&0x3fffffff)|0x40000000; | |
567 | break; | |
568 | case 2: // 2 track match Low pt cut | |
569 | fITSMuonClusterMap=(fITSMuonClusterMap&0x3fffffff)|0x80000000; | |
570 | break; | |
571 | case 3: // 3 track match High pt cut | |
572 | fITSMuonClusterMap=fITSMuonClusterMap|0xc0000000; | |
573 | break; | |
574 | default: | |
575 | fITSMuonClusterMap=fITSMuonClusterMap&0x3fffffff; | |
8ac4fa64 | 576 | AliWarning(Form("unknown case for matchTrig: %d\n",matchTrig)); |
e1c744ca | 577 | } |
578 | } | |
579 | ||
2200238e | 580 | //______________________________________________________________________________ |
581 | Bool_t AliAODTrack::HitsMuonChamber(Int_t MuonChamber, Int_t cathode) const | |
582 | { | |
583 | // return kTRUE if the track fires the given tracking or trigger chamber. | |
584 | // If the chamber is a trigger one: | |
585 | // - if cathode = 0 or 1, the track matches the corresponding cathode | |
586 | // - if cathode = -1, the track matches both cathodes | |
587 | ||
588 | if (MuonChamber < 0) return kFALSE; | |
589 | ||
590 | if (MuonChamber < 10) return TESTBIT(GetMUONClusterMap(), MuonChamber); | |
591 | ||
592 | if (MuonChamber < 14) { | |
593 | ||
594 | if (cathode < 0) return TESTBIT(GetHitsPatternInTrigCh(), 13-MuonChamber) && | |
595 | TESTBIT(GetHitsPatternInTrigCh(), 13-MuonChamber+4); | |
596 | ||
597 | if (cathode < 2) return TESTBIT(GetHitsPatternInTrigCh(), 13-MuonChamber+(1-cathode)*4); | |
598 | ||
e1c744ca | 599 | } |
2200238e | 600 | |
601 | return kFALSE; | |
e1c744ca | 602 | } |
603 | ||
2200238e | 604 | //______________________________________________________________________________ |
605 | Bool_t AliAODTrack::MatchTriggerDigits() const | |
606 | { | |
607 | // return kTRUE if the track matches a digit on both planes of at least 2 trigger chambers | |
6c954176 | 608 | |
2200238e | 609 | Int_t nMatchedChambers = 0; |
610 | for (Int_t ich=10; ich<14; ich++) if (HitsMuonChamber(ich)) nMatchedChambers++; | |
611 | ||
612 | return (nMatchedChambers >= 2); | |
e1c744ca | 613 | } |
c683ddc2 | 614 | |
6dc40b1c | 615 | //______________________________________________________________________________ |
616 | Bool_t AliAODTrack::PropagateToDCA(const AliVVertex *vtx, | |
617 | Double_t b, Double_t maxd, Double_t dz[2], Double_t covar[3]) | |
618 | { | |
619 | // compute impact parameters to the vertex vtx and their covariance matrix | |
620 | // b is the Bz, needed to propagate correctly the track to vertex | |
621 | // only the track parameters are update after the propagation (pos and mom), | |
622 | // not the covariance matrix. This is OK for propagation over short distance | |
623 | // inside the beam pipe. | |
624 | // return kFALSE is something went wrong | |
625 | ||
626 | // convert to AliExternalTrackParam | |
4ec1ca0f | 627 | AliExternalTrackParam etp; etp.CopyFromVTrack(this); |
6dc40b1c | 628 | |
629 | Float_t xstart = etp.GetX(); | |
630 | if(xstart>3.) { | |
631 | AliError("This method can be used only for propagation inside the beam pipe"); | |
632 | return kFALSE; | |
633 | } | |
634 | ||
635 | if(!etp.PropagateToDCA(vtx,b,maxd,dz,covar)) return kFALSE; | |
636 | ||
637 | // update track position and momentum | |
638 | Double_t mom[3]; | |
639 | etp.GetPxPyPz(mom); | |
640 | SetP(mom,kTRUE); | |
641 | etp.GetXYZ(mom); | |
642 | SetPosition(mom,kFALSE); | |
643 | ||
644 | ||
645 | return kTRUE; | |
646 | } | |
647 | ||
c8fe2783 | 648 | //______________________________________________________________________________ |
649 | Bool_t AliAODTrack::GetPxPyPz(Double_t p[3]) const | |
650 | { | |
651 | //--------------------------------------------------------------------- | |
652 | // This function returns the global track momentum components | |
653 | //--------------------------------------------------------------------- | |
654 | p[0]=Px(); p[1]=Py(); p[2]=Pz(); | |
655 | return kTRUE; | |
656 | } | |
9006fe9c | 657 | |
25f906db | 658 | |
659 | //_______________________________________________________________________ | |
660 | Float_t AliAODTrack::GetTPCClusterInfo(Int_t nNeighbours/*=3*/, Int_t type/*=0*/, Int_t row0, Int_t row1, Int_t bitType ) const | |
9006fe9c | 661 | { |
662 | // | |
25f906db | 663 | // TPC cluster information |
9006fe9c | 664 | // type 0: get fraction of found/findable clusters with neighbourhood definition |
665 | // 1: findable clusters with neighbourhood definition | |
666 | // 2: found clusters | |
25f906db | 667 | // bitType: |
668 | // 0 - all cluster used | |
669 | // 1 - clusters used for the kalman update | |
9006fe9c | 670 | // definition of findable clusters: |
671 | // a cluster is defined as findable if there is another cluster | |
672 | // within +- nNeighbours pad rows. The idea is to overcome threshold | |
673 | // effects with a very simple algorithm. | |
674 | // | |
25f906db | 675 | |
9006fe9c | 676 | |
677 | Int_t found=0; | |
678 | Int_t findable=0; | |
679 | Int_t last=-nNeighbours; | |
25f906db | 680 | const TBits & clusterMap = (bitType%2==0) ? fTPCClusterMap : fTPCFitMap; |
9006fe9c | 681 | |
25f906db | 682 | Int_t upperBound=clusterMap.GetNbits(); |
683 | if (upperBound>row1) upperBound=row1; | |
684 | for (Int_t i=row0; i<upperBound; ++i){ | |
9006fe9c | 685 | //look to current row |
25f906db | 686 | if (clusterMap[i]) { |
9006fe9c | 687 | last=i; |
688 | ++found; | |
689 | ++findable; | |
690 | continue; | |
691 | } | |
692 | //look to nNeighbours before | |
693 | if ((i-last)<=nNeighbours) { | |
694 | ++findable; | |
695 | continue; | |
696 | } | |
697 | //look to nNeighbours after | |
698 | for (Int_t j=i+1; j<i+1+nNeighbours; ++j){ | |
25f906db | 699 | if (clusterMap[j]){ |
9006fe9c | 700 | ++findable; |
701 | break; | |
702 | } | |
703 | } | |
704 | } | |
25f906db | 705 | if (type==2) return found; |
9006fe9c | 706 | if (type==1) return findable; |
707 | ||
708 | if (type==0){ | |
709 | Float_t fraction=0; | |
25f906db | 710 | if (findable>0) |
9006fe9c | 711 | fraction=(Float_t)found/(Float_t)findable; |
25f906db | 712 | else |
9006fe9c | 713 | fraction=0; |
714 | return fraction; | |
25f906db | 715 | } |
9006fe9c | 716 | return 0; // undefined type - default value |
717 | } | |
fd21ec8d | 718 | |
25f906db | 719 | |
fd21ec8d | 720 | //______________________________________________________________________________ |
721 | Double_t AliAODTrack::GetTRDslice(Int_t plane, Int_t slice) const { | |
722 | // | |
723 | // return TRD Pid information | |
724 | // | |
725 | if (!fDetPid) return -1; | |
6736efd5 | 726 | Double32_t *trdSlices=fDetPid->GetTRDslices(); |
fd21ec8d | 727 | if (!trdSlices) return -1; |
728 | if ((plane<0) || (plane>=kTRDnPlanes)) { | |
729 | return -1.; | |
730 | } | |
731 | ||
99e9d5ec | 732 | Int_t ns=fDetPid->GetTRDnSlices()/kTRDnPlanes; |
fd21ec8d | 733 | if ((slice<-1) || (slice>=ns)) { |
734 | return -1.; | |
735 | } | |
736 | ||
737 | if(slice>=0) return trdSlices[plane*ns + slice]; | |
738 | ||
739 | // return average of the dEdx measurements | |
740 | Double_t q=0.; Double32_t *s = &trdSlices[plane*ns]; | |
741 | for (Int_t i=0; i<ns; i++, s++) if((*s)>0.) q+=(*s); | |
742 | return q/ns; | |
743 | } | |
744 | ||
99e9d5ec | 745 | //______________________________________________________________________________ |
746 | UChar_t AliAODTrack::GetTRDntrackletsPID() const{ | |
747 | // | |
748 | // return number of tracklets calculated from the slices | |
749 | // | |
750 | if(!fDetPid) return -1; | |
59a8e853 | 751 | return fDetPid->GetTRDntrackletsPID(); |
752 | } | |
99e9d5ec | 753 | |
59a8e853 | 754 | //______________________________________________________________________________ |
755 | UChar_t AliAODTrack::GetTRDncls(Int_t layer) const { | |
756 | // | |
757 | // return number of TRD clusters | |
758 | // | |
759 | if(!fDetPid || layer > 5) return -1; | |
760 | if(layer < 0) return fDetPid->GetTRDncls(); | |
761 | else return fDetPid->GetTRDncls(layer); | |
99e9d5ec | 762 | } |
763 | ||
fd21ec8d | 764 | //______________________________________________________________________________ |
765 | Double_t AliAODTrack::GetTRDmomentum(Int_t plane, Double_t */*sp*/) const | |
766 | { | |
767 | //Returns momentum estimation | |
768 | // in TRD layer "plane". | |
769 | ||
770 | if (!fDetPid) return -1; | |
c997f0f9 | 771 | const Double_t *trdMomentum=fDetPid->GetTRDmomentum(); |
fd21ec8d | 772 | |
773 | if (!trdMomentum) { | |
774 | return -1.; | |
775 | } | |
776 | if ((plane<0) || (plane>=kTRDnPlanes)) { | |
777 | return -1.; | |
778 | } | |
779 | ||
780 | return trdMomentum[plane]; | |
781 | } | |
76e6ee6a | 782 | |
783 | //_______________________________________________________________________ | |
1cecd6e3 | 784 | Int_t AliAODTrack::GetTOFBunchCrossing(Double_t b, Bool_t) const |
76e6ee6a | 785 | { |
786 | // Returns the number of bunch crossings after trigger (assuming 25ns spacing) | |
76e6ee6a | 787 | const double kSpacing = 25e3; // min interbanch spacing |
788 | const double kShift = 0; | |
3f2db92f | 789 | Int_t bcid = kTOFBCNA; // defualt one |
a512bf97 | 790 | if (!IsOn(kTOFout) || !IsOn(kESDpid)) return bcid; // no info |
791 | // | |
792 | double tdif = GetTOFsignal(); | |
793 | if (IsOn(kTIME)) { // integrated time info is there | |
794 | int pid = (int)GetMostProbablePID(); | |
795 | double ttimes[10]; | |
796 | GetIntegratedTimes(ttimes); | |
797 | tdif -= ttimes[pid]; | |
798 | } | |
799 | else { // assume integrated time info from TOF radius and momentum | |
800 | const double kRTOF = 385.; | |
801 | const double kCSpeed = 3.e-2; // cm/ps | |
802 | double p = P(); | |
803 | if (p<0.001) p = 1.0; | |
804 | double m = M(); | |
805 | double path = kRTOF; // mean TOF radius | |
806 | if (TMath::Abs(b)>kAlmost0) { // account for curvature | |
807 | double curv = Pt()/(b*kB2C); | |
808 | if (curv>kAlmost0) { | |
809 | double tgl = Pz()/Pt(); | |
810 | path = 2./curv*TMath::ASin(kRTOF*curv/2.)*TMath::Sqrt(1.+tgl*tgl); | |
811 | } | |
812 | } | |
813 | tdif -= path/kCSpeed*TMath::Sqrt(1.+m*m/(p*p)); | |
814 | } | |
76e6ee6a | 815 | bcid = TMath::Nint((tdif - kShift)/kSpacing); |
816 | return bcid; | |
817 | } | |
086400fc | 818 | |
00a38d07 | 819 | void AliAODTrack::SetDetectorPID(const AliDetectorPID *pid) |
820 | { | |
821 | // | |
822 | // Set the detector PID | |
823 | // | |
824 | if (fDetectorPID) delete fDetectorPID; | |
825 | fDetectorPID=pid; | |
826 | ||
827 | } | |
828 | ||
567624b5 | 829 | //_____________________________________________________________________________ |
830 | Double_t AliAODTrack::GetHMPIDsignal() const | |
831 | { | |
832 | if(fAODEvent->GetHMPIDringForTrackID(fID)) return fAODEvent->GetHMPIDringForTrackID(fID)->GetHmpSignal(); | |
833 | else return -999.; | |
834 | } | |
835 | ||
836 | //_____________________________________________________________________________ | |
837 | Double_t AliAODTrack::GetHMPIDoccupancy() const | |
838 | { | |
839 | if(fAODEvent->GetHMPIDringForTrackID(fID)) return fAODEvent->GetHMPIDringForTrackID(fID)->GetHmpOccupancy(); | |
840 | else return -999.; | |
841 | } | |
842 | ||
843 | //_____________________________________________________________________________ | |
844 | Int_t AliAODTrack::GetHMPIDcluIdx() const | |
845 | { | |
846 | if(fAODEvent->GetHMPIDringForTrackID(fID)) return fAODEvent->GetHMPIDringForTrackID(fID)->GetHmpCluIdx(); | |
847 | else return -999; | |
848 | } | |
849 | ||
850 | //_____________________________________________________________________________ | |
851 | void AliAODTrack::GetHMPIDtrk(Float_t &x, Float_t &y, Float_t &th, Float_t &ph) const | |
852 | { | |
853 | x = -999; y = -999.; th = -999.; ph = -999.; | |
854 | ||
855 | const AliAODHMPIDrings *ring=fAODEvent->GetHMPIDringForTrackID(fID); | |
856 | if(ring){ | |
857 | x = ring->GetHmpTrackX(); | |
858 | y = ring->GetHmpTrackY(); | |
859 | th = ring->GetHmpTrackTheta(); | |
860 | ph = ring->GetHmpTrackPhi(); | |
861 | } | |
862 | } | |
863 | ||
864 | //_____________________________________________________________________________ | |
865 | void AliAODTrack::GetHMPIDmip(Float_t &x,Float_t &y,Int_t &q, Int_t &nph) const | |
866 | { | |
867 | x = -999; y = -999.; q = -999; nph = -999; | |
868 | ||
869 | const AliAODHMPIDrings *ring=fAODEvent->GetHMPIDringForTrackID(fID); | |
870 | if(ring){ | |
871 | x = ring->GetHmpMipX(); | |
872 | y = ring->GetHmpMipY(); | |
873 | q = (Int_t)ring->GetHmpMipCharge(); | |
874 | nph = (Int_t)ring->GetHmpNumOfPhotonClusters(); | |
875 | } | |
876 | } | |
877 | ||
878 | //_____________________________________________________________________________ | |
879 | Bool_t AliAODTrack::GetOuterHmpPxPyPz(Double_t *p) const | |
880 | { | |
881 | if(fAODEvent->GetHMPIDringForTrackID(fID)) {fAODEvent->GetHMPIDringForTrackID(fID)->GetHmpMom(p); return kTRUE;} | |
882 | ||
883 | else return kFALSE; | |
884 | } | |
086400fc | 885 | //_____________________________________________________________________________ |
886 | Bool_t AliAODTrack::GetXYZAt(Double_t x, Double_t b, Double_t *r) const | |
887 | { | |
888 | //--------------------------------------------------------------------- | |
889 | // This function returns the global track position extrapolated to | |
890 | // the radial position "x" (cm) in the magnetic field "b" (kG) | |
891 | //--------------------------------------------------------------------- | |
892 | ||
893 | //conversion of track parameter representation is | |
894 | //based on the implementation of AliExternalTrackParam::Set(...) | |
895 | //maybe some of this code can be moved to AliVTrack to avoid code duplication | |
896 | const double kSafe = 1e-5; | |
897 | Double_t alpha=0.0; | |
898 | Double_t radPos2 = fPosition[0]*fPosition[0]+fPosition[1]*fPosition[1]; | |
899 | Double_t radMax = 45.; // approximately ITS outer radius | |
900 | if (radPos2 < radMax*radMax) { // inside the ITS | |
901 | alpha = TMath::ATan2(fMomentum[1],fMomentum[0]); | |
902 | } else { // outside the ITS | |
903 | Float_t phiPos = TMath::Pi()+TMath::ATan2(-fPosition[1], -fPosition[0]); | |
904 | alpha = | |
905 | TMath::DegToRad()*(20*((((Int_t)(phiPos*TMath::RadToDeg()))/20))+10); | |
906 | } | |
907 | // | |
908 | Double_t cs=TMath::Cos(alpha), sn=TMath::Sin(alpha); | |
909 | // protection: avoid alpha being too close to 0 or +-pi/2 | |
910 | if (TMath::Abs(sn)<kSafe) { | |
911 | alpha = kSafe; | |
912 | cs=TMath::Cos(alpha); | |
913 | sn=TMath::Sin(alpha); | |
914 | } | |
915 | else if (cs<kSafe) { | |
916 | alpha -= TMath::Sign(kSafe, alpha); | |
917 | cs=TMath::Cos(alpha); | |
918 | sn=TMath::Sin(alpha); | |
919 | } | |
920 | ||
921 | // Get the vertex of origin and the momentum | |
922 | TVector3 ver(fPosition[0],fPosition[1],fPosition[2]); | |
923 | TVector3 mom(fMomentum[0],fMomentum[1],fMomentum[2]); | |
924 | // | |
925 | // avoid momenta along axis | |
926 | if (TMath::Abs(mom[0])<kSafe) mom[0] = TMath::Sign(kSafe*TMath::Abs(mom[1]), mom[0]); | |
927 | if (TMath::Abs(mom[1])<kSafe) mom[1] = TMath::Sign(kSafe*TMath::Abs(mom[0]), mom[1]); | |
928 | ||
929 | // Rotate to the local coordinate system | |
930 | ver.RotateZ(-alpha); | |
931 | mom.RotateZ(-alpha); | |
932 | ||
933 | Double_t param0 = ver.Y(); | |
934 | Double_t param1 = ver.Z(); | |
935 | Double_t param2 = TMath::Sin(mom.Phi()); | |
936 | Double_t param3 = mom.Pz()/mom.Pt(); | |
937 | Double_t param4 = TMath::Sign(1/mom.Pt(),(Double_t)fCharge); | |
938 | ||
939 | //calculate the propagated coordinates | |
940 | //this is based on AliExternalTrackParam::GetXYZAt(Double_t x, Double_t b, Double_t *r) | |
941 | Double_t dx=x-ver.X(); | |
942 | if(TMath::Abs(dx)<=kAlmost0) return GetXYZ(r); | |
943 | ||
944 | Double_t f1=param2; | |
945 | Double_t f2=f1 + dx*param4*b*kB2C; | |
946 | ||
947 | if (TMath::Abs(f1) >= kAlmost1) return kFALSE; | |
948 | if (TMath::Abs(f2) >= kAlmost1) return kFALSE; | |
949 | ||
950 | Double_t r1=TMath::Sqrt((1.-f1)*(1.+f1)), r2=TMath::Sqrt((1.-f2)*(1.+f2)); | |
951 | r[0] = x; | |
952 | r[1] = param0 + dx*(f1+f2)/(r1+r2); | |
953 | r[2] = param1 + dx*(r2 + f2*(f1+f2)/(r1+r2))*param3;//Thanks to Andrea & Peter | |
954 | ||
955 | return Local2GlobalPosition(r,alpha); | |
956 | } | |
957 | ||
958 | ||
74ca66e3 | 959 | //_______________________________________________________ |
960 | void AliAODTrack::GetITSdEdxSamples(Double_t s[4]) const | |
961 | { | |
962 | // get ITS dedx samples | |
963 | if (!fDetPid) for (int i=4;i--;) s[i]=0; | |
964 | else for (int i=4;i--;) s[i] = fDetPid->GetITSdEdxSample(i); | |
965 | } |