Protect against calculating exponents of large numbers
authorakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Feb 2008 14:18:42 +0000 (14:18 +0000)
committerakisiel <akisiel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Feb 2008 14:18:42 +0000 (14:18 +0000)
TTherminator/Therminator/Integrator.cxx

index cdd7c30..da5e84d 100644 (file)
@@ -54,11 +54,13 @@ Integrator::Integrator(int aNpart)
 
 double Integrator::CalcBE(double aX)
 {
+  if (aX>200.0) return 0.0;
   return 1.0/(TMath::Exp(aX)-1);
 }
 
 double Integrator::CalcFD(double aX)
 {
+  if (aX>200.0) return 0.0;
   return 1.0/(TMath::Exp(aX)+1);
 }