Skip to content

Commit

Permalink
PWGPP-620 - floating error protection -use 0 as minimal momenta
Browse files Browse the repository at this point in the history
  • Loading branch information
miranov25 committed Apr 13, 2021
1 parent 69e501e commit aa2f9ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions STEER/ESD/AliESDv0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit aa2f9ec

Please sign in to comment.