for TPC pid get the momentum at tpc inner wall
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowTasks / AliFlowTrackCuts.cxx
index 4f207ae9fa5a041554e283a66e7b704af599d2aa..7382c99734f2d013874939c5936d508a0aa6eb1d 100644 (file)
@@ -958,7 +958,9 @@ Bool_t AliFlowTrackCuts::PassesTPCpidCut(AliESDtrack* track)
     return kFALSE;
   }
 
-  Float_t sigExp = fESDpid.GetTPCResponse().GetExpectedSignal(track->GetP(), fAliPID);
+  const AliExternalTrackParam* tpcparam = track->GetInnerParam(); //tpc only params at the inner wall
+  if (!tpcparam) return kFALSE;
+  Float_t sigExp = fESDpid.GetTPCResponse().GetExpectedSignal(tpcparam->GetP(), fAliPID);
   Float_t sigTPC = track->GetTPCsignal();
   Float_t s = (sigTPC-sigExp)/sigExp;
   Double_t pt = track->Pt();