]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCpidESD.cxx
Changed binning for i0/i1 TH2F histogram.
[u/mrichter/AliRoot.git] / TPC / AliTPCpidESD.cxx
index c84c84da3d58fc1843ed161d6a2c34e19ebfc9a1..29f447e44dc992f28dde842b3cc96a1d90888736 100644 (file)
@@ -41,7 +41,11 @@ Double_t AliTPCpidESD::Bethe(Double_t bg) {
   // 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;
 }
 
@@ -68,10 +72,10 @@ Int_t AliTPCpidESD::MakePID(AliESD *event)
       Double_t bethe=Bethe(mom/mass); 
       Double_t sigma=fRes*bethe;
       if (TMath::Abs(dedx-bethe) > fRange*sigma) {
-       p[j]=0.;
+       p[j]=TMath::Exp(-0.5*fRange*fRange)/sigma;
         continue;
       }
-      p[j]=TMath::Exp(-0.5*(dedx-bethe)*(dedx-bethe)/(sigma*sigma));
+      p[j]=TMath::Exp(-0.5*(dedx-bethe)*(dedx-bethe)/(sigma*sigma))/sigma;
     }
     t->SetTPCpid(p);
   }