ClassImp(AliTPCpidESD)
//_________________________________________________________________________
-AliTPCpidESD::AliTPCpidESD(Double_t *param)
+ AliTPCpidESD::AliTPCpidESD(Double_t *param):
+ fMIP(0.),
+ fRes(0.),
+ fRange(0.)
{
//
// The main constructor
// This is the Bethe-Bloch function normalised to 1 at the minimum
//
Double_t bg2=bg*bg;
- Double_t bethe=(1.+ bg2)/bg2*(log(5940*bg2) - bg2/(1.+ bg2));
+ Double_t bethe;
+ if (bg<3.5e1)
+ bethe=(1.+ bg2)/bg2*(log(5940*bg2) - bg2/(1.+ bg2));
+ else // Density effect ( approximately :)
+ bethe=1.15*(1.+ bg2)/bg2*(log(3.5*5940*bg) - bg2/(1.+ bg2));
return bethe/11.091;
}
//
// This function calculates the "detector response" PID probabilities
//
- static const Double_t masses[]={
- 0.000511, 0.105658, 0.139570, 0.493677, 0.938272, 1.875613
- };
Int_t ntrk=event->GetNumberOfTracks();
for (Int_t i=0; i<ntrk; i++) {
AliESDtrack *t=event->GetTrack(i);
if ((t->GetStatus()&AliESDtrack::kTPCin )==0)
if ((t->GetStatus()&AliESDtrack::kTPCout)==0) continue;
- Int_t ns=AliESDtrack::kSPECIES;
+ Int_t ns=AliPID::kSPECIES;
Double_t p[10];
for (Int_t j=0; j<ns; j++) {
- Double_t mass=masses[j];
+ Double_t mass=AliPID::ParticleMass(j);
Double_t mom=t->GetP();
Double_t dedx=t->GetTPCsignal()/fMIP;
Double_t bethe=Bethe(mom/mass);