Protection against division by 0
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Mar 2010 13:24:59 +0000 (13:24 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Mar 2010 13:24:59 +0000 (13:24 +0000)
PYTHIA6/pythia6.4.21/pythia-6.4.21.f

index 5a0f360..5b5e77c 100644 (file)
@@ -15031,8 +15031,12 @@ C...Evolve q -> q gamma separately, pick it if larger pT.
 C...  Evolve massive quark creation separately.
         MCRQQ=0
         IF (MQMASS.NE.0) THEN
-          PT2CR=(RMQ2+VINT(18))*(RML**(TPM/(TPL*PYR(0)**(-TML/WN)-TPM)))
-     &         -VINT(18)
+           if (WN .eq. 0.) THEN
+              ARG = -1.
+           ELSE
+              ARG = TPM/(TPL*PYR(0)**(-TML/WN)-TPM)
+           ENDIF
+          PT2CR=(RMQ2+VINT(18))*(RML**ARG)-VINT(18)
 C...  Ensure mininimum PT2CR and force creation near threshold.
           IF (PT2CR.LT.TMIN*RMQ2) THEN
             NTHRES=NTHRES+1