From aa2f9ec7829ae4f271db45e56212d2a626f98bee Mon Sep 17 00:00:00 2001 From: miranov25 Date: Tue, 13 Apr 2021 15:30:09 +0200 Subject: [PATCH] PWGPP-620 - floating error protection -use 0 as minimal momenta --- STEER/ESD/AliESDv0.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/STEER/ESD/AliESDv0.cxx b/STEER/ESD/AliESDv0.cxx index c2a9f554c90..a66a4b5dd2d 100644 --- a/STEER/ESD/AliESDv0.cxx +++ b/STEER/ESD/AliESDv0.cxx @@ -994,8 +994,8 @@ Double_t AliESDv0::GetKFInfoScale(UInt_t p1, UInt_t p2, Int_t type, Double_t d1p Double_t mass2=AliPID::ParticleMass(p2); Double_t E1 = paramP.P()*paramP.P()+mass1*mass1+eLoss*dE1; Double_t E2 = paramN.P()*paramN.P()+mass2*mass2+eLoss*dE2; - Double_t dP1=TMath::Sqrt(E1*E1-mass1*mass1)-paramP.P(); - Double_t dP2=TMath::Sqrt(E2*E2-mass2*mass2)-paramN.P(); + Double_t dP1=TMath::Sqrt(TMath::Max(E1*E1-mass1*mass1,0.0))-paramP.P(); + Double_t dP2=TMath::Sqrt(TMath::Max(E2*E2-mass2*mass2,0.0))-paramN.P(); Double_t *pparam1 = (Double_t*)paramP.GetParameter(); Double_t *pparam2 = (Double_t*)paramN.GetParameter();