]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCv3.cxx
Bug fix - Extrapolation as constant
[u/mrichter/AliRoot.git] / TPC / AliTPCv3.cxx
index 28f70102faa3b8864bd5490ac342d91e3b25a116..f90ba17aa4fbfa472e724d5d9860ff2267ef28a7 100644 (file)
@@ -41,6 +41,7 @@
 
 #include "AliConst.h"
 #include "AliRun.h"
+#include "AliMathBase.h"
 #include "AliTPCDigitsArray.h"
 #include "AliTPCParam.h"
 #include "AliTPCParamSR.h"
@@ -905,7 +906,8 @@ void AliTPCv3::CreateGeometry()
     upar[2]=126.54; //upper
     z=127.06;
     if(i==15){
-      v9->AddNode(hvrv,1,new TGeoTranslation(x,y,z));//A-side only
+      //v9->AddNode(hvrv,1,new TGeoTranslation(x,y,z));//A-side only
+      v9->AddNode(hvrv,1,new TGeoTranslation(x,y,127.14));//A-side only
       gGeoManager->Node("TPC_Rod",i+55,"TPC_Drift",x,y,-z,0,kTRUE,upar,3);
     }
     else if(i==11){
@@ -927,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
@@ -1050,7 +1052,7 @@ void AliTPCv3::Init()
   //
   // Initialises version 3 of the TPC after that it has been built
   //
-  Int_t *idtmed = fIdtmed->GetArray();
+  //Int_t *idtmed = fIdtmed->GetArray();
 
   AliTPC::Init();
 
@@ -1058,7 +1060,7 @@ void AliTPCv3::Init()
 
   gMC->SetMaxNStep(-30000); // max. number of steps increased
 
-  gMC->Gstpar(idtmed[2],"LOSS",5);
+  // specific energy loss is now set in galice.cuts
 
   printf("%s: *** TPC version 3 initialized***\n",ClassName());
 
@@ -1160,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);
     }
   
@@ -1169,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));
-}