SetLabel(t.GetLabel());
SetChi2(0.0);
- SetMass(t.GetMass());
+
+ SetMass(t.GetMass()/*0.000510*/);
AliKalmanTrack::SetNumberOfClusters(t.GetTRDncls());
Int_t ti[kNplane]; t.GetTRDtracklets(&ti[0]);
for(int ip=0; ip<kNplane; ip++){
//_______________________________________________________________
Bool_t AliTRDtrackV1::CookPID()
{
- //
- // Cook the PID information
- //
+//
+// Cook the PID information for the track by delegating the omonim function of the tracklets.
+// Computes the number of tracklets used. The tracklet information are considered independent.
+// For the moment no global track measurement of PID is performed as for example to estimate
+// bremsstrahlung probability based on global chi2 of the track.
+//
+// The status bit AliESDtrack::kTRDpid is set during the call of AliTRDtrackV1::UpdateESDtrack().The PID performance of the
+//TRD for tracks with 6 tacklets is displayed below.
+//Begin_Html
+//<img src="TRD/trackPID.gif">
+//End_Html
+//
- // Reset the a priori probabilities
+ /*Reset the a priori probabilities*/
Double_t pid = 1. / AliPID::kSPECIES;
for(int ispec=0; ispec<AliPID::kSPECIES; ispec++) fPID[ispec] = pid;
// no tracklet found for PID calculations
if(!fPIDquality) return kFALSE;
- // slot for PID calculation @ track level
+ // slot for PID calculation @ track level for bremsstrahlung TODO
// normalize probabilities
Double_t probTotal = 0.0;
{
// Retrieve number of tracklets used for PID calculation.
- UChar_t fPIDquality = 0;
+ UChar_t nPID = 0;
Float_t *prob = 0x0;
for(int ip=0; ip<kNplane; ip++){
if(fTrackletIndex[ip] == 0xffff) continue;
if(!fTracklet[ip]->IsOK()) continue;
- if(!(prob = fTracklet[ip]->GetProbability(kFALSE))) return 0;
+ if(!(prob = fTracklet[ip]->GetProbability(kFALSE))) continue;
Int_t nspec = 0; // quality check of tracklet dEdx
for(int ispec=0; ispec<AliPID::kSPECIES; ispec++){
}
if(!nspec) continue;
- fPIDquality++;
+ fTracklet[ip]->SetPID();
+ nPID++;
}
- return fPIDquality;
+ return nPID;
}
//___________________________________________________________
{
//
// Find a prolongation at given x
- // Return 0 if it does not exist
+ // Return -1 if it does not exist
//
Double_t bz = GetBz();
- if (!AliExternalTrackParam::GetYAt(xk,bz,y)) return 0;
- if (!AliExternalTrackParam::GetZAt(xk,bz,z)) return 0;
+ if (!AliExternalTrackParam::GetYAt(xk,bz,y)) return -1;
+ if (!AliExternalTrackParam::GetZAt(xk,bz,z)) return -1;
return 1;
Double_t alpha = TMath::ATan2(xyz0[1],xyz0[0]);
Rotate(alpha,kTRUE);
GetXYZ(xyz0);
- GetProlongation(x,y,z);
+ if(GetProlongation(x,y,z)<0) return -1;
xyz1[0] = x * TMath::Cos(alpha) + y * TMath::Sin(alpha);
xyz1[1] = x * TMath::Sin(alpha) - y * TMath::Cos(alpha);
xyz1[2] = z;
Double_t alpha = TMath::ATan2(xyz0[1],xyz0[0]);
Rotate(alpha,kTRUE);
GetXYZ(xyz0);
- GetProlongation(r,y,z);
+ if(GetProlongation(r,y,z)<0) return -1;
xyz1[0] = r * TMath::Cos(alpha) + y * TMath::Sin(alpha);
xyz1[1] = r * TMath::Sin(alpha) - y * TMath::Cos(alpha);
xyz1[2] = z;
//
Int_t nslices = fReconstructor->IsEightSlices() ? (Int_t)AliTRDpidUtil::kNNslices : (Int_t)AliTRDpidUtil::kLQslices;
- track->SetNumberOfTRDslices(nslices);
-
- Int_t n = 0;
+ // number of tracklets used for PID calculation
+ UChar_t nPID = GetNumberOfTrackletsPID();
+ // number of tracklets attached to the track
+ UChar_t nTrk = GetNumberOfTracklets();
+ // pack the two numbers together and store them in the ESD
+ track->SetTRDntracklets(nPID | (nTrk<<3));
+ // allocate space to store raw PID signals dEdx & momentum
+ track->SetNumberOfTRDslices((nslices+2)*AliTRDgeometry::kNlayer);
+ // store raw signals
+ Float_t p, sp; Double_t spd;
for (Int_t ip = 0; ip < kNplane; ip++) {
if(fTrackletIndex[ip] == 0xffff) continue;
- n++;
- if(!fTracklet[ip]->IsOK()) continue;
- fTracklet[ip]->CookdEdx(nslices);
+ if(!fTracklet[ip]->HasPID()) continue;
Float_t *dedx = fTracklet[ip]->GetdEdx();
for (Int_t js = 0; js < nslices; js++, dedx++) track->SetTRDslice(*dedx, ip, js);
+ p = fTracklet[ip]->GetMomentum(&sp); spd = sp;
+ track->SetTRDmomentum(p, ip, &spd);
}
-
- UChar_t nPID = GetNumberOfTrackletsPID();
- if(!nPID) track->SetTRDntracklets(n);
- else {
- track->SetTRDpid(fPID);
- nPID |= (n<<3);
- track->SetTRDntracklets(nPID);
- }
+ // store PID probabilities
+ track->SetTRDpid(fPID);
}