]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSpidESD.cxx
Bug fix: range for azimuthal range set to 0 --> 2*pi
[u/mrichter/AliRoot.git] / ITS / AliITSpidESD.cxx
index 141c86307d6d2b56436c1b9484c7f7309bfbe6ca..ae32fc8f9b78eb3825c1a986024628eb15b5b016 100644 (file)
@@ -19,6 +19,8 @@
 //      Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
 //-----------------------------------------------------------------
 
+#include <TMath.h>
+
 #include "AliITSpidESD.h"
 #include "AliESDtrack.h"
 
@@ -30,16 +32,22 @@ AliITSpidESD::AliITSpidESD():TObject(){
   //Default constructor
  
 }
-Double_t AliITSpidESD::Bethe(Double_t bg) {
-  //
-  // This is the Bethe-Bloch function normalised to 1 at the minimum
-  //
-  Double_t bg2=bg*bg;
-  Double_t bethe;
-  /*if (bg<3.5) 
-     bethe=(1.+ bg2)/bg2*(log(5940*bg2) - bg2/(1.+ bg2));
-  else*/  // not 100% clear why...
-     bethe=(1.+ bg2)/bg2*(log(3.5*5940*bg) - bg2/(1.+ bg2));
-  return bethe/11.091;
-}
 
+Double_t AliITSpidESD::Bethe(Double_t p,Double_t mass) {
+
+  Double_t mom=p*1000;//MeV
+  Double_t Mass=mass*1000;//Mev
+  Float_t dens =2.33; //g cm-3
+  Double_t K=0.307075;//MeVcm^2/g
+  Double_t ZovA=0.49848;
+  Double_t me=0.511;//MeV/c^2
+  Double_t I=173./1000000.;//MeV
+  Double_t En=TMath::Sqrt(mom*mom+Mass*Mass);//MeV
+  Double_t gamma=En/Mass;
+  Double_t beta=mom/En;
+  Double_t Tmax=2*me*beta*beta*gamma*gamma/(1+2*gamma*me/Mass+(me/Mass)*(me/Mass));
+  Double_t deltaover2=28.816*1e-6*TMath::Sqrt(dens*ZovA)+TMath::Log(beta*gamma)-0.5;
+  return K*ZovA*1/(beta*beta)*(0.5*TMath::Log(2*me*beta*beta*gamma*gamma*Tmax/(I*I))-beta*beta-deltaover2)*2.33*1000*0.03-37;
+
+
+}