//
#include "TMath.h"
+#include "AliExternalTrackParam.h"
+
#include "AliRsnDaughter.h"
#include "AliRsnCutBetheBloch.h"
}
//_____________________________________________________________________________
-Double_t AliRsnCutBetheBloch::BetheBloch(AliRsnDaughter * const track)
+Double_t AliRsnCutBetheBloch::BetheBloch(AliRsnDaughter * const trackRef)
{
//
// Computes the theoretical dE/dx according to
AliPID pid;
Double_t mass = pid.ParticleMass(fType);
- Double_t betaGamma = track->P() / mass;
+ // get the track momentum at the inner wall of TPC
+ AliExternalTrackParam track(*trackRef->GetRefESD()->GetInnerParam());
+
+ Double_t betaGamma = track.P() / mass;
Double_t beta = betaGamma / TMath::Sqrt(1.0 + betaGamma * betaGamma);
Double_t aa = TMath::Power(beta, fConst[3]);
Double_t bb = TMath::Power(1.0 / betaGamma, fConst[4]);