]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCv3.cxx
PWG2 resonances wagon included. Still problems so disabled for the moment.
[u/mrichter/AliRoot.git] / TPC / AliTPCv3.cxx
index 9c613f884bb687f9be146705f2e0a87a3c00b40f..53faf0ca1b4318708e871968c965cc7895b80eda 100644 (file)
@@ -41,6 +41,7 @@
 
 #include "AliConst.h"
 #include "AliRun.h"
+#include "AliMathBase.h"
 #include "AliTPCDigitsArray.h"
 #include "AliTPCParam.h"
 #include "AliTPCParamSR.h"
@@ -928,7 +929,7 @@ void AliTPCv3::CreateGeometry()
 } // end of function
  
 //_____________________________________________________________________________
-void AliTPCv3::DrawDetector()
+void AliTPCv3::DrawDetector() const
 {
   //
   // Draw a shaded view of the Time Projection Chamber version 3
@@ -1161,7 +1162,7 @@ void AliTPCv3::StepManager()
   else
     {
       betaGamma = TMath::Max(betaGamma,(Float_t)7.e-3); 
-      pp=kprim*BetheBloch(betaGamma);    
+      pp=kprim*AliMathBase::BetheBlochAleph(betaGamma);    
       if(TMath::Abs(charge) > 1.) pp *= (charge*charge);
     }
   
@@ -1170,27 +1171,3 @@ void AliTPCv3::StepManager()
   gMC->SetMaxStep(-TMath::Log(rnd)/pp);
   
 }
-
-//_____________________________________________________________________________
-Float_t AliTPCv3::BetheBloch(Float_t bg)
-{
-  //
-  // Bethe-Bloch energy loss formula
-  //
-  const Double_t kp1=0.76176e-1;
-  const Double_t kp2=10.632;
-  const Double_t kp3=0.13279e-4;
-  const Double_t kp4=1.8631;
-  const Double_t kp5=1.9479;
-
-  Double_t dbg = (Double_t) bg;
-
-  Double_t beta = dbg/TMath::Sqrt(1.+dbg*dbg);
-
-  Double_t aa = TMath::Power(beta,kp4);
-  Double_t bb = TMath::Power(1./dbg,kp5);
-
-  bb=TMath::Log(kp3+bb);
-  
-  return ((Float_t)((kp2-aa-bb)*kp1/aa));
-}