X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TPC%2FAliTPCv4.cxx;h=21149f135ece614b5df5e4ebd183fc3d7e1e618f;hb=11a246fab7a191469187fcc17f43daf1e24f8551;hp=cb1b9b1686e172904e066ca8e2496fb3713f61bc;hpb=d23650edc8365acee97f470ee8d5f10bd03c19f0;p=u%2Fmrichter%2FAliRoot.git diff --git a/TPC/AliTPCv4.cxx b/TPC/AliTPCv4.cxx index cb1b9b1686e..21149f135ec 100644 --- a/TPC/AliTPCv4.cxx +++ b/TPC/AliTPCv4.cxx @@ -41,6 +41,7 @@ TPC version for the krypton runs (Marek) #include #include #include "AliLog.h" +#include "AliMathBase.h" #include "AliTPCParam.h" #include "AliTPCTrackHitsV2.h" #include "AliTPCv4.h" @@ -1083,7 +1084,7 @@ void AliTPCv4::SetOuterChambersAlignable() const } //_____________________________________________________________________________ -void AliTPCv4::DrawDetector() +void AliTPCv4::DrawDetector() const { // // Draw a shaded view of the Time Projection Chamber version 1 @@ -1207,7 +1208,7 @@ void AliTPCv4::Init() // Initialises version 2 of the TPC after that it has been built // - Int_t *idtmed = fIdtmed->GetArray(); + //Int_t *idtmed = fIdtmed->GetArray(); AliTPC::Init(); @@ -1219,7 +1220,7 @@ void AliTPCv4::Init() gMC->SetMaxNStep(-30000); // max. number of steps increased - gMC->Gstpar(idtmed[20],"LOSS",6); // specific energy loss + // specific energy loss set in galice.cuts AliInfo("*** TPC version 4 initialized ***"); AliInfo(Form("Maximum number of steps = %d",gMC->GetMaxNStep())); @@ -1282,8 +1283,8 @@ void AliTPCv4::StepManager() fTPCParam->AdjustCosSin(sector,cos,sin); Float_t x1=p[0]*cos + p[1]*sin; // check if within sector's limits - if(x1>=fTPCParam->GetInnerRadiusLow()&&x1<=fTPCParam->GetInnerRadiusUp() - ||x1>=fTPCParam->GetOuterRadiusLow()&&x1<=fTPCParam->GetOuterRadiusUp()){ + if((x1>=fTPCParam->GetInnerRadiusLow()&&x1<=fTPCParam->GetInnerRadiusUp()) + ||(x1>=fTPCParam->GetOuterRadiusLow()&&x1<=fTPCParam->GetOuterRadiusUp())){ // calculate real sector number... if (x1>fTPCParam->GetOuterRadiusLow()){ sector = TMath::Nint((angle-fTPCParam->GetOuterAngleShift())/ @@ -1391,7 +1392,7 @@ void AliTPCv4::StepManager() { betaGamma = TMath::Max(betaGamma,(Float_t)7.e-3); // protection against too small bg - pp=kprim*BetheBloch(betaGamma); + pp=kprim*AliMathBase::BetheBlochAleph(betaGamma); if(TMath::Abs(charge) > 1.) pp *= (charge*charge); } @@ -1403,28 +1404,3 @@ void AliTPCv4::StepManager() } -//_____________________________________________________________________________ -Float_t AliTPCv4::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)); -} - -