]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliGenPythia.cxx
Separated TOF libraries (base,rec,sim)
[u/mrichter/AliRoot.git] / PYTHIA6 / AliGenPythia.cxx
index 15a8dd2afcf66e4d94402b8c29e7255154fff6d1..c73145bbc05de3308010f2b7e10fb1f6d245d1eb 100644 (file)
@@ -52,6 +52,7 @@ AliGenPythia::AliGenPythia()
   fParticles = 0;
   fPythia    = 0;
   fHeader = 0;
+  fReadFromFile = 0;
   fDecayer   = new AliDecayerPythia();
   SetEventListRange();
   SetJetPhiRange();
@@ -77,6 +78,7 @@ AliGenPythia::AliGenPythia(Int_t npart)
     fName = "Pythia";
     fTitle= "Particle Generator using PYTHIA";
     fXsection  = 0.;
+    fReadFromFile = 0;
     SetProcess();
     SetStrucFunc();
     SetForceDecay();
@@ -675,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()