]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Protection against division by 0.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Nov 2004 14:25:43 +0000 (14:25 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 2 Nov 2004 14:25:43 +0000 (14:25 +0000)
PYTHIA6/AliGenPythia.cxx

index 93cdb30fa2ae31e0883dedad3d03ac9c129f0738..c73145bbc05de3308010f2b7e10fb1f6d245d1eb 100644 (file)
@@ -677,13 +677,15 @@ void AliGenPythia::FinishRun()
 {
 // Print x-section summary
     fPythia->Pystat(1);
-    fQ  /= fNev;
-    fX1 /= fNev;
-    fX2 /= fNev;    
+
+    if (fNev > 0.) {
+       fQ  /= fNev;
+       fX1 /= fNev;
+       fX2 /= fNev;    
+    }
+    
     printf("\nTotal number of Pyevnt() calls %d\n", fTrialsRun);
     printf("\nMean Q, x1, x2: %f %f %f\n", fQ, fX1, fX2);
-    
-
 }
 
 void AliGenPythia::AdjustWeights()