]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
A numerical protection for the new energy-loss correction formula
authorbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 18 May 2010 07:31:08 +0000 (07:31 +0000)
committerbelikov <belikov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 18 May 2010 07:31:08 +0000 (07:31 +0000)
STEER/AliExternalTrackParam.cxx

index ce208a0262aff3c53a9738d229dd5893910bf28b..153fb6c9344293998ad190c81dd5d2a38bd9e41f 100644 (file)
@@ -408,6 +408,7 @@ Bool_t AliExternalTrackParam::CorrectForMeanMaterialdEdx
      Double_t e=TMath::Sqrt(p2 + mass*mass);
      if ( TMath::Abs(dE) > 0.3*e ) return kFALSE; //30% energy loss is too much!
      //cP4 = (1.- e/p2*dE);
+     if ( (1.+ dE/p2*(dE + 2*e)) < 0. ) return kFALSE;
      cP4 = 1./TMath::Sqrt(1.+ dE/p2*(dE + 2*e));  //A precise formula by Ruben !
      if (TMath::Abs(fP4*cP4)>100.) return kFALSE; //Do not track below 10 MeV/c