#include <TPDGCode.h>
#include <TString.h>
#include "AliLog.h"
+#include "AliMathBase.h"
#include "AliTrackReference.h"
#include "AliTPCParam.h"
#include "AliTPCTrackHitsV2.h"
const Float_t kprim = 14.35; // number of primary collisions per 1 cm
const Float_t kpoti = 20.77e-9; // first ionization potential for Ne/CO2
const Float_t kwIon = 35.97e-9; // energy for the ion-electron pair creation
-
+ const Int_t kMaxDistRef =15; // maximal difference between 2 stored references
const Float_t kbig = 1.e10;
//
vol[0]=sector;
+
+ static Double_t lastReferenceR=0;
+ if (TMath::Abs(lastReferenceR-r)>kMaxDistRef){
+ AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kTPC);
+ lastReferenceR = r;
+ }
+
// check if change of sector
if(sector != fSecOld){
fSecOld=sector;
{
betaGamma = TMath::Max(betaGamma,(Float_t)7.e-3); // protection against too small bg
- pp=kprim*BetheBloch(betaGamma);
+ pp=kprim*AliMathBase::BetheBlochAleph(betaGamma);
}
}
-//_____________________________________________________________________________
-Float_t AliTPCv2::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));
-}
-