Small mod to run with boundary checking
authoralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 Jun 2005 17:35:58 +0000 (17:35 +0000)
committeralibrary <alibrary@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 Jun 2005 17:35:58 +0000 (17:35 +0000)
PYTHIA6/pythia6214.f

index 6f78fec..02a2088 100644 (file)
@@ -54963,24 +54963,26 @@ C...Identify particle code and whether already defined  (for MUPDA=3).
   150         CONTINUE
             ENDIF
 C...Remove duplicate old decay data.
-            IF(KCREP.NE.0.AND.MDCY(KCREP,3).GT.0) THEN
-              IDCREP=MDCY(KCREP,2)
-              NDCREP=MDCY(KCREP,3)
-              DO 160 I=1,KCC
-                IF(MDCY(I,2).GT.IDCREP) MDCY(I,2)=MDCY(I,2)-NDCREP
-  160         CONTINUE
-              DO 180 I=IDCREP,NDC-NDCREP
-                MDME(I,1)=MDME(I+NDCREP,1)
-                MDME(I,2)=MDME(I+NDCREP,2)
-                BRAT(I)=BRAT(I+NDCREP)
-                DO 170 J=1,5
-                  KFDP(I,J)=KFDP(I+NDCREP,J)
-  170           CONTINUE
-  180         CONTINUE
-              NDC=NDC-NDCREP
-              KC=KCREP
-            ELSEIF(KCREP.NE.0) THEN
-              KC=KCREP
+            IF(KCREP.NE.0) THEN
+               IF(MDCY(KCREP,3).GT.0) THEN
+                  IDCREP=MDCY(KCREP,2)
+                  NDCREP=MDCY(KCREP,3)
+                  DO 160 I=1,KCC
+                     IF(MDCY(I,2).GT.IDCREP) MDCY(I,2)=MDCY(I,2)-NDCREP
+ 160              CONTINUE
+                  DO 180 I=IDCREP,NDC-NDCREP
+                     MDME(I,1)=MDME(I+NDCREP,1)
+                     MDME(I,2)=MDME(I+NDCREP,2)
+                     BRAT(I)=BRAT(I+NDCREP)
+                     DO 170 J=1,5
+                        KFDP(I,J)=KFDP(I+NDCREP,J)
+ 170                 CONTINUE
+ 180              CONTINUE
+                  NDC=NDC-NDCREP
+                  KC=KCREP
+               ELSE
+                  KC=KCREP
+               ENDIF
             ELSE
               KCC=KCC+1
               KC=KCC