Tracks momentum value for PID taken from GetOuterHmpPxPyPz()
authorgvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 23 Nov 2009 09:43:58 +0000 (09:43 +0000)
committergvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 23 Nov 2009 09:43:58 +0000 (09:43 +0000)
HMPID/AliHMPIDPid.cxx

index 25f8af6..78ac467 100644 (file)
@@ -48,8 +48,15 @@ void AliHMPIDPid::FindPid(AliESDtrack *pTrk,Int_t nsp,Double_t *prob)
     for(Int_t iPart=0;iPart<nsp;iPart++) prob[iPart]=1.0/(Float_t)nsp;
     return;
   } 
-
-  Double_t pmod = pTrk->GetP();                  // Momentum of the charged particle
+  
+  Double_t p[3] = {0}, pmod = 0;
+  if(pTrk->GetOuterHmpPxPyPz(p))  pmod = TMath::Sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);  // Momentum of the charged particle
+  
+  else {                                         
+    for(Int_t iPart=0;iPart<nsp;iPart++) prob[iPart]=1.0/(Float_t)nsp;
+    return;
+  } 
+  
   Double_t hTot=0;                               // Initialize the total height of the amplitude method
   Double_t *h = new Double_t [nsp];              // number of charged particles to be considered