]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDtrackV1.cxx
Introduce an enumerator for PID methods
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackV1.cxx
CommitLineData
d9950a5a 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
eb38ed55 18#include "AliESDtrack.h"
41880fac 19#include "AliTracker.h"
eb38ed55 20
d9950a5a 21#include "AliTRDtrackV1.h"
22#include "AliTRDcluster.h"
23#include "AliTRDcalibDB.h"
24#include "AliTRDrecoParam.h"
25
d9950a5a 26ClassImp(AliTRDtrackV1)
27
0906e73e 28///////////////////////////////////////////////////////////////////////////////
29// //
30// Represents a reconstructed TRD track //
31// Local TRD Kalman track //
32// //
33// Authors: //
34// Alex Bercuci <A.Bercuci@gsi.de> //
35// Markus Fasel <M.Fasel@gsi.de> //
36// //
37///////////////////////////////////////////////////////////////////////////////
d9950a5a 38
39//_______________________________________________________________
3b57a3f7 40AliTRDtrackV1::AliTRDtrackV1() : AliKalmanTrack()
41 ,fPIDquality(0)
42 ,fDE(0.)
43 ,fBackupTrack(0x0)
0906e73e 44{
d9950a5a 45 //
46 // Default constructor
47 //
3b57a3f7 48 for(int i =0; i<3; i++) fBudget[i] = 0.;
49
50 Float_t pid = 1./AliPID::kSPECIES;
51 for(int is =0; is<AliPID::kSPECIES; is++) fPID[is] = pid;
52
53 for(int ip=0; ip<kNplane; ip++){
54 fTrackletIndex[ip] = 0xffff;
55 fTracklet[ip] = 0x0;
56 }
d9950a5a 57}
58
59//_______________________________________________________________
3b57a3f7 60AliTRDtrackV1::AliTRDtrackV1(const AliTRDtrackV1 &ref) : AliKalmanTrack(ref)
61 ,fPIDquality(ref.fPIDquality)
62 ,fDE(ref.fDE)
63 ,fBackupTrack(0x0)
d9950a5a 64{
65 //
3b57a3f7 66 // Copy constructor
d9950a5a 67 //
68
3b57a3f7 69 for(int ip=0; ip<kNplane; ip++){
70 fTrackletIndex[ip] = ref.fTrackletIndex[ip];
71 fTracklet[ip] = ref.fTracklet[ip];
72 }
73
74 for (Int_t i = 0; i < 3;i++) fBudget[i] = ref.fBudget[i];
75
76 for(Int_t is = 0; is<AliPID::kSPECIES; is++) fPID[is] = ref.fPID[is];
77
78 AliKalmanTrack::SetNumberOfClusters(ref.GetNumberOfClusters());
d9950a5a 79}
80
81//_______________________________________________________________
3b57a3f7 82AliTRDtrackV1::AliTRDtrackV1(const AliESDtrack &t) : AliKalmanTrack()
83 ,fPIDquality(0)
84 ,fDE(0.)
85 ,fBackupTrack(0x0)
d9950a5a 86{
87 //
3b57a3f7 88 // Constructor from AliESDtrack
d9950a5a 89 //
90
3b57a3f7 91 SetLabel(t.GetLabel());
92 SetChi2(0.0);
93 SetMass(t.GetMass());
94 AliKalmanTrack::SetNumberOfClusters(t.GetTRDncls());
95 Int_t ti[kNplane]; t.GetTRDtracklets(&ti[0]);
96 for(int ip=0; ip<kNplane; ip++){
97 fTrackletIndex[ip] = ti[ip] < 0 ? 0xffff : ti[ip];
98 fTracklet[ip] = 0x0;
99 }
100 for(int i =0; i<3; i++) fBudget[i] = 0.;
101
102 Float_t pid = 1./AliPID::kSPECIES;
103 for(int is =0; is<AliPID::kSPECIES; is++) fPID[is] = pid;
104
105 const AliExternalTrackParam *par = &t;
106 if (t.GetStatus() & AliESDtrack::kTRDbackup) {
107 par = t.GetOuterParam();
108 if (!par) {
109 AliError("No backup info!");
110 par = &t;
111 }
112 }
113 Set(par->GetX()
114 ,par->GetAlpha()
115 ,par->GetParameter()
116 ,par->GetCovariance());
117
118 if(t.GetStatus() & AliESDtrack::kTIME) {
119 StartTimeIntegral();
120 Double_t times[10];
121 t.GetIntegratedTimes(times);
122 SetIntegratedTimes(times);
123 SetIntegratedLength(t.GetIntegratedLength());
124 }
d9950a5a 125}
126
d9950a5a 127//_______________________________________________________________
eb38ed55 128AliTRDtrackV1::AliTRDtrackV1(AliTRDseedV1 *trklts, const Double_t p[5], const Double_t cov[15]
3b57a3f7 129 , Double_t x, Double_t alpha) : AliKalmanTrack()
130 ,fPIDquality(0)
131 ,fDE(0.)
132 ,fBackupTrack(0x0)
d9950a5a 133{
0906e73e 134 //
135 // The stand alone tracking constructor
136 // TEMPORARY !!!!!!!!!!!
137 // to check :
138 // 1. covariance matrix
139 // 2. dQdl calculation
140 //
d9950a5a 141
0906e73e 142 Double_t cnv = 1.0 / (GetBz() * kB2C);
d9950a5a 143
144 Double_t pp[5] = { p[0]
145 , p[1]
146 , x*p[4] - p[2]
147 , p[3]
148 , p[4]*cnv };
149
150 Double_t c22 = x*x*cov[14] - 2*x*cov[12] + cov[ 5];
151 Double_t c32 = x*cov[13] - cov[ 8];
152 Double_t c20 = x*cov[10] - cov[ 3];
153 Double_t c21 = x*cov[11] - cov[ 4];
154 Double_t c42 = x*cov[14] - cov[12];
155
156 Double_t cc[15] = { cov[ 0]
157 , cov[ 1], cov[ 2]
158 , c20, c21, c22
159 , cov[ 6], cov[ 7], c32, cov[ 9]
160 , cov[10]*cnv, cov[11]*cnv, c42*cnv, cov[13]*cnv, cov[14]*cnv*cnv };
161
162 Set(x,alpha,pp,cc);
41702fec 163 Int_t ncls = 0;
3b57a3f7 164 for(int iplane=0; iplane<kNplane; iplane++){
41702fec 165 fTrackletIndex[iplane] = 0xffff;
166 if(!trklts[iplane].IsOK()) fTracklet[iplane] = 0x0;
167 else{
168 fTracklet[iplane] = new AliTRDseedV1(trklts[iplane]);
169 ncls += fTracklet[iplane]->GetN();
170 }
d9950a5a 171 }
41702fec 172 AliKalmanTrack::SetNumberOfClusters(ncls);
173 for(int i =0; i<3; i++) fBudget[i] = 0.;
174
175 Float_t pid = 1./AliPID::kSPECIES;
176 for(int is =0; is<AliPID::kSPECIES; is++) fPID[is] = pid;
177
d9950a5a 178}
179
bb56afff 180//_______________________________________________________________
3b57a3f7 181AliTRDtrackV1::~AliTRDtrackV1()
bb56afff 182{
3b57a3f7 183 if(fBackupTrack) {
184 delete fBackupTrack;
185 }
186 fBackupTrack = 0x0;
bb56afff 187
3b57a3f7 188 if(TestBit(1)){
189 for(Int_t ip=0; ip<kNplane; ip++){
190 if(fTracklet[ip]) delete fTracklet[ip];
191 fTracklet[ip] = 0x0;
192 }
193 }
194}
195
196//_______________________________________________________________
197Bool_t AliTRDtrackV1::CookLabel(Float_t wrong)
198{
199 // set MC label for this track
200
bb56afff 201 Int_t s[kMAXCLUSTERSPERTRACK][2];
202 for (Int_t i = 0; i < kMAXCLUSTERSPERTRACK; i++) {
203 s[i][0] = -1;
204 s[i][1] = 0;
205 }
3b57a3f7 206
bb56afff 207 Bool_t labelAdded;
3b57a3f7 208 Int_t label;
209 AliTRDcluster *c = 0x0;
210 for (Int_t ip = 0; ip < kNplane; ip++) {
211 if(fTrackletIndex[ip] == 0xffff) continue;
212 for (Int_t ic = 0; ic < AliTRDseed::knTimebins; ic++) {
213 if(!(c = fTracklet[ip]->GetClusters(ic))) continue;
214 for (Int_t k = 0; k < 3; k++) {
215 label = c->GetLabel(k);
216 labelAdded = kFALSE;
217 Int_t j = 0;
218 if (label >= 0) {
219 while ((!labelAdded) && (j < kMAXCLUSTERSPERTRACK)) {
220 if ((s[j][0] == label) ||
221 (s[j][1] == 0)) {
222 s[j][0] = label;
223 s[j][1]++;
224 labelAdded = kTRUE;
225 }
226 j++;
227 }
228 }
229 }
230 }
231 }
232
bb56afff 233 Int_t max = 0;
234 label = -123456789;
235 for (Int_t i = 0; i < kMAXCLUSTERSPERTRACK; i++) {
236 if (s[i][1] <= max) continue;
3b57a3f7 237 max = s[i][1];
238 label = s[i][0];
bb56afff 239 }
3b57a3f7 240
bb56afff 241 if ((1. - Float_t(max)/GetNumberOfClusters()) > wrong) label = -label;
3b57a3f7 242
bb56afff 243 SetLabel(label);
3b57a3f7 244
245 return kTRUE;
bb56afff 246}
247
d9950a5a 248//_______________________________________________________________
249Bool_t AliTRDtrackV1::CookPID()
250{
0906e73e 251 //
252 // Cook the PID information
253 //
3b57a3f7 254
255 // Reset the a priori probabilities
256 Double_t pid = 1. / AliPID::kSPECIES;
0906e73e 257 for(int ispec=0; ispec<AliPID::kSPECIES; ispec++) {
3b57a3f7 258 fPID[ispec] = pid;
259 }
260 fPIDquality = 0;
261
262 // steer PID calculation @ tracklet level
263 Double_t *prob = 0x0;
264 for(int ip=0; ip<kNplane; ip++){
265 if(fTrackletIndex[ip] == 0xffff) continue;
266 if(!fTracklet[ip]->IsOK()) continue;
267 if(!(prob = fTracklet[ip]->GetProbability())) return kFALSE;
268
269 Int_t nspec = 0; // quality check of tracklet dEdx
270 for(int ispec=0; ispec<AliPID::kSPECIES; ispec++){
271 if(prob[ispec] < 0.) continue;
272 fPID[ispec] *= prob[ispec];
273 nspec++;
274 }
275 if(!nspec) continue;
276
277 fPIDquality++;
0906e73e 278 }
0906e73e 279
280 // no tracklet found for PID calculations
281 if(!fPIDquality) return kTRUE;
3b57a3f7 282
283 // slot for PID calculation @ track level
284
285
0906e73e 286 // normalize probabilities
287 Double_t probTotal = 0.0;
288 for (Int_t is = 0; is < AliPID::kSPECIES; is++) probTotal += fPID[is];
3b57a3f7 289
290
0906e73e 291 if (probTotal <= 0.0) {
292 AliWarning("The total probability over all species <= 0. This may be caused by some error in the reference data.");
d9950a5a 293 return kFALSE;
294 }
3b57a3f7 295
0906e73e 296 for (Int_t iSpecies = 0; iSpecies < AliPID::kSPECIES; iSpecies++) fPID[iSpecies] /= probTotal;
3b57a3f7 297
0906e73e 298 return kTRUE;
d9950a5a 299}
300
3b57a3f7 301//_____________________________________________________________________________
302Double_t AliTRDtrackV1::GetBz() const
0906e73e 303{
304 //
3b57a3f7 305 // Returns Bz component of the magnetic field (kG)
0906e73e 306 //
307
3b57a3f7 308 if (AliTracker::UniformField()) return AliTracker::GetBz();
309
310 Double_t r[3];
311 GetXYZ(r);
312 return AliTracker::GetBz(r);
313}
314
315//_______________________________________________________________
316Int_t AliTRDtrackV1::GetClusterIndex(Int_t id) const
317{
318 Int_t n = 0;
319 for(Int_t ip=0; ip<kNplane; ip++){
320 if(!fTracklet[ip]) continue;
321 if(n+fTracklet[ip]->GetN() < id){
322 n+=fTracklet[ip]->GetN();
323 continue;
324 }
325 for(Int_t ic=34; ic>=0; ic--){
326 if(!fTracklet[ip]->GetClusters(ic)) continue;
327 n++;
328 if(n<id) continue;
329 return fTracklet[ip]->GetIndexes(ic);
330 }
331 }
332 return -1;
0906e73e 333}
d9950a5a 334
335//_______________________________________________________________
336Double_t AliTRDtrackV1::GetPredictedChi2(const AliTRDseedV1 *trklt) const
337{
338 //
0906e73e 339 // Get the predicted chi2
d9950a5a 340 //
3b57a3f7 341
d9950a5a 342 Double_t x = trklt->GetX0();
343 Double_t p[2] = { trklt->GetYat(x)
344 , trklt->GetZat(x) };
345 Double_t cov[3];
3b57a3f7 346 trklt->GetCovAt(x, cov);
347
d9950a5a 348 return AliExternalTrackParam::GetPredictedChi2(p, cov);
3b57a3f7 349}
d9950a5a 350
3b57a3f7 351
352//_____________________________________________________________________________
353void AliTRDtrackV1::MakeBackupTrack()
354{
355 //
356 // Creates a backup track
357 //
358
359 if(fBackupTrack) {
360 fBackupTrack->~AliTRDtrackV1();
361 new(fBackupTrack) AliTRDtrackV1((AliTRDtrackV1&)(*this));
362 }
363 fBackupTrack = new AliTRDtrackV1((AliTRDtrackV1&)(*this));
d9950a5a 364}
365
3b57a3f7 366//_____________________________________________________________________________
367Int_t AliTRDtrackV1::GetProlongation(Double_t xk, Double_t &y, Double_t &z)
368{
369 //
370 // Find a prolongation at given x
371 // Return 0 if it does not exist
372 //
373
374 Double_t bz = GetBz();
375 if (!AliExternalTrackParam::GetYAt(xk,bz,y)) return 0;
376 if (!AliExternalTrackParam::GetZAt(xk,bz,z)) return 0;
377
378 return 1;
379
380}
381
382//_____________________________________________________________________________
383Bool_t AliTRDtrackV1::PropagateTo(Double_t xk, Double_t xx0, Double_t xrho)
0906e73e 384{
385 //
3b57a3f7 386 // Propagates this track to a reference plane defined by "xk" [cm]
387 // correcting for the mean crossed material.
0906e73e 388 //
3b57a3f7 389 // "xx0" - thickness/rad.length [units of the radiation length]
390 // "xrho" - thickness*density [g/cm^2]
391 //
0906e73e 392
3b57a3f7 393 if (xk == GetX()) {
394 return kTRUE;
395 }
396
397 Double_t oldX = GetX();
398 Double_t oldY = GetY();
399 Double_t oldZ = GetZ();
400
401 Double_t bz = GetBz();
402
403 if (!AliExternalTrackParam::PropagateTo(xk,bz)) {
404 return kFALSE;
405 }
406
407 Double_t x = GetX();
408 Double_t y = GetY();
409 Double_t z = GetZ();
410
411 if (oldX < xk) {
412 xrho = -xrho;
413 if (IsStartedTimeIntegral()) {
414 Double_t l2 = TMath::Sqrt((x-oldX)*(x-oldX)
415 + (y-oldY)*(y-oldY)
416 + (z-oldZ)*(z-oldZ));
417 Double_t crv = AliExternalTrackParam::GetC(bz);
418 if (TMath::Abs(l2*crv) > 0.0001) {
419 // Make correction for curvature if neccesary
420 l2 = 0.5 * TMath::Sqrt((x-oldX)*(x-oldX)
421 + (y-oldY)*(y-oldY));
422 l2 = 2.0 * TMath::ASin(l2 * crv) / crv;
423 l2 = TMath::Sqrt(l2*l2 + (z-oldZ)*(z-oldZ));
424 }
425 AddTimeStep(l2);
426 }
427 }
428
429 if (!AliExternalTrackParam::CorrectForMeanMaterial(xx0,xrho,GetMass())) {
430 return kFALSE;
431 }
432
433 {
434
435 // Energy losses
436 Double_t p2 = (1.0 + GetTgl()*GetTgl()) / (GetSigned1Pt()*GetSigned1Pt());
437 Double_t beta2 = p2 / (p2 + GetMass()*GetMass());
438 if ((beta2 < 1.0e-10) ||
439 ((5940.0 * beta2/(1.0 - beta2 + 1.0e-10) - beta2) < 0.0)) {
440 return kFALSE;
441 }
442
443 Double_t dE = 0.153e-3 / beta2
444 * (TMath::Log(5940.0 * beta2/(1.0 - beta2 + 1.0e-10)) - beta2)
445 * xrho;
446 fBudget[0] += xrho;
447
448 /*
449 // Suspicious part - think about it ?
450 Double_t kinE = TMath::Sqrt(p2);
451 if (dE > 0.8*kinE) dE = 0.8 * kinE; //
452 if (dE < 0) dE = 0.0; // Not valid region for Bethe bloch
453 */
454
455 fDE += dE;
456
457 /*
458 // Suspicious ! I.B.
459 Double_t sigmade = 0.07 * TMath::Sqrt(TMath::Abs(dE)); // Energy loss fluctuation
460 Double_t sigmac2 = sigmade*sigmade*fC*fC*(p2+GetMass()*GetMass())/(p2*p2);
461 fCcc += sigmac2;
462 fCee += fX*fX * sigmac2;
463 */
464
465 }
466
467 return kTRUE;
0906e73e 468}
3b57a3f7 469
87a7fa94 470//_____________________________________________________________________________
3b57a3f7 471Int_t AliTRDtrackV1::PropagateToR(Double_t r,Double_t step)
87a7fa94 472{
473 //
3b57a3f7 474 // Propagate track to the radial position
475 // Rotation always connected to the last track position
87a7fa94 476 //
477
3b57a3f7 478 Double_t xyz0[3];
479 Double_t xyz1[3];
480 Double_t y;
481 Double_t z;
482
483 Double_t radius = TMath::Sqrt(GetX()*GetX() + GetY()*GetY());
484 // Direction +-
485 Double_t dir = (radius > r) ? -1.0 : 1.0;
486
487 for (Double_t x = radius+dir*step; dir*x < dir*r; x += dir*step) {
488
489 GetXYZ(xyz0);
490 Double_t alpha = TMath::ATan2(xyz0[1],xyz0[0]);
491 Rotate(alpha,kTRUE);
492 GetXYZ(xyz0);
493 GetProlongation(x,y,z);
494 xyz1[0] = x * TMath::Cos(alpha) + y * TMath::Sin(alpha);
495 xyz1[1] = x * TMath::Sin(alpha) - y * TMath::Cos(alpha);
496 xyz1[2] = z;
497 Double_t param[7];
498 AliTracker::MeanMaterialBudget(xyz0,xyz1,param);
499 if (param[1] <= 0) {
500 param[1] = 100000000;
501 }
502 PropagateTo(x,param[1],param[0]*param[4]);
503
504 }
505
506 GetXYZ(xyz0);
507 Double_t alpha = TMath::ATan2(xyz0[1],xyz0[0]);
508 Rotate(alpha,kTRUE);
509 GetXYZ(xyz0);
510 GetProlongation(r,y,z);
511 xyz1[0] = r * TMath::Cos(alpha) + y * TMath::Sin(alpha);
512 xyz1[1] = r * TMath::Sin(alpha) - y * TMath::Cos(alpha);
513 xyz1[2] = z;
514 Double_t param[7];
515 AliTracker::MeanMaterialBudget(xyz0,xyz1,param);
516
517 if (param[1] <= 0) {
518 param[1] = 100000000;
87a7fa94 519 }
3b57a3f7 520 PropagateTo(r,param[1],param[0]*param[4]);
521
522 return 0;
523
87a7fa94 524}
525
3b57a3f7 526//_____________________________________________________________________________
527Bool_t AliTRDtrackV1::Rotate(Double_t alpha, Bool_t absolute)
528{
529 //
530 // Rotates track parameters in R*phi plane
531 // if absolute rotation alpha is in global system
532 // otherwise alpha rotation is relative to the current rotation angle
533 //
534
535 if (absolute) alpha -= GetAlpha();
536 //else fNRotate++;
537
538 return AliExternalTrackParam::Rotate(GetAlpha()+alpha);
539}
87a7fa94 540
eb38ed55 541//___________________________________________________________
542void AliTRDtrackV1::SetNumberOfClusters()
543{
544// Calculate the number of clusters attached to this track
545
3b57a3f7 546 Int_t ncls = 0;
547 for(int ip=0; ip<kNplane; ip++){
548 if(fTracklet[ip] && fTrackletIndex[ip] != 0xffff) ncls += fTracklet[ip]->GetN();
549 }
550 AliKalmanTrack::SetNumberOfClusters(ncls);
eb38ed55 551}
552
553
0906e73e 554//_______________________________________________________________
3b57a3f7 555void AliTRDtrackV1::SetOwner()
0906e73e 556{
557 //
558 // Toggle ownership of tracklets
559 //
560
3b57a3f7 561 if(TestBit(1)) return;
562 for (Int_t ip = 0; ip < kNplane; ip++) {
563 if(fTrackletIndex[ip] == 0xffff) continue;
564 fTracklet[ip] = new AliTRDseedV1(*fTracklet[ip]);
565 fTracklet[ip]->SetOwner();
566 }
567 SetBit(1);
0906e73e 568}
569
d9950a5a 570//_______________________________________________________________
3b57a3f7 571void AliTRDtrackV1::SetTracklet(AliTRDseedV1 *trklt, Int_t index)
d9950a5a 572{
573 //
0906e73e 574 // Set the tracklets
d9950a5a 575 //
3b57a3f7 576 Int_t plane = trklt->GetPlane();
41702fec 577 if(fTrackletIndex[plane]==0xffff && fTracklet[plane]){
578 delete fTracklet[plane];
579 }
3b57a3f7 580 fTracklet[plane] = trklt;
581 fTrackletIndex[plane] = index;
d9950a5a 582}
583
584//_______________________________________________________________
0906e73e 585Bool_t AliTRDtrackV1::Update(AliTRDseedV1 *trklt, Double_t chisq)
d9950a5a 586{
587 //
3b57a3f7 588 // Update track and tracklet parameters
d9950a5a 589 //
3b57a3f7 590
0906e73e 591 Double_t x = trklt->GetX0();
d9950a5a 592 Double_t p[2] = { trklt->GetYat(x)
593 , trklt->GetZat(x) };
594 Double_t cov[3];
3b57a3f7 595 trklt->GetCovAt(x, cov);
596
597
d9950a5a 598 if(!AliExternalTrackParam::Update(p, cov)) return kFALSE;
3b57a3f7 599
600 AliTRDcluster *c = 0x0;
601 Int_t ic = 0; while(!(c = trklt->GetClusters(ic))) ic++;
602 AliTracker::FillResiduals(this, p, cov, c->GetVolumeId());
603
604
d9950a5a 605 // Register info to track
3b57a3f7 606 SetNumberOfClusters();
d9950a5a 607 SetChi2(GetChi2() + chisq);
3b57a3f7 608
609 // update tracklet
610 trklt->SetMomentum(GetP());
611 trklt->SetSnp(GetSnp());
612 trklt->SetTgl(GetTgl());
613 return kTRUE;
d9950a5a 614}
615
616//_______________________________________________________________
0906e73e 617void AliTRDtrackV1::UpdateESDtrack(AliESDtrack *track)
d9950a5a 618{
619 //
6984f7c1 620 // Update the TRD PID information in the ESD track
d9950a5a 621 //
6984f7c1 622
623 track->SetNumberOfTRDslices(kNslice);
3b57a3f7 624
6984f7c1 625 for (Int_t ip = 0; ip < kNplane; ip++) {
3b57a3f7 626 if(fTrackletIndex[ip] == 0xffff) continue;
627 fTracklet[ip]->CookdEdx(kNslice);
628 Float_t *dedx = fTracklet[ip]->GetdEdx();
629 for (Int_t js = 0; js < kNslice; js++) track->SetTRDslice(dedx[js], ip, js);
6984f7c1 630 }
0906e73e 631
6984f7c1 632 // copy PID to ESD
633 track->SetTRDpid(fPID);
634 track->SetTRDpidQuality(fPIDquality);
d9950a5a 635}