Coverity 17915
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 23 Jan 2012 12:02:35 +0000 (12:02 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 23 Jan 2012 12:02:35 +0000 (12:02 +0000)
PYTHIA8/pythia8145/src/ProcessLevel.cxx

index fb3faa2..5d62271 100644 (file)
@@ -389,8 +389,15 @@ void ProcessLevel::accumulate() {
   double sigmaComb  = 0.5 * (sigmaSum * sig2SelSum + sigSelSum * sigma2Sum);
   sigmaComb        *= impactFac / sigmaND;
   if (allHardSame) sigmaComb *= 0.5; 
-  double deltaComb  = sqrtpos(2. / nAccSum + impactErr2) * sigmaComb;
-
+  double deltaComb  = 0.;
+  if (nAccSum == 0) {
+     deltaComb =  1.e10;
+  } else {
+     deltaComb =   sqrtpos(2. / nAccSum + impactErr2) * sigmaComb;
+  }
+  
+      
+  
   // Store info and done.
   infoPtr->setSigma( nTrySum, nSelSum, nAccSum, sigmaComb, deltaComb);