]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/pythia6214.f
Changes needed on HP
[u/mrichter/AliRoot.git] / PYTHIA6 / pythia6214.f
index e8e6c35bd734c88878deddd1a0b92988ed84d414..6f78fec60c00d4154c5845300e74acf82e22f16c 100644 (file)
@@ -3979,32 +3979,37 @@ C...Find mass and evaluate width.
         MINT(51)=0
  
 C...Evaluate suppression factors due to non-simulated channels.
-        IF(KCHG(KC,3).EQ.0) THEN
-          WIDS(KC,1)=((WDTE(0,1)+WDTE(0,2))**2+
-     &    2D0*(WDTE(0,1)+WDTE(0,2))*(WDTE(0,4)+WDTE(0,5))+
-     &    2D0*WDTE(0,4)*WDTE(0,5))/WDTP(0)**2
-          WIDS(KC,2)=(WDTE(0,1)+WDTE(0,2)+WDTE(0,4))/WDTP(0)
-          WIDS(KC,3)=0D0
-          WIDS(KC,4)=0D0
-          WIDS(KC,5)=0D0
-        ELSE
-          IF(MWID(KC).EQ.3) MINT(63)=1
-          CALL PYWIDT(-KF,PMR**2,WDTPM,WDTEM)
-          MINT(51)=0
-          WIDS(KC,1)=((WDTE(0,1)+WDTE(0,2))*(WDTEM(0,1)+WDTEM(0,3))+
-     &    (WDTE(0,1)+WDTE(0,2))*(WDTEM(0,4)+WDTEM(0,5))+
-     &    (WDTE(0,4)+WDTE(0,5))*(WDTEM(0,1)+WDTEM(0,3))+
-     &    WDTE(0,4)*WDTEM(0,5)+WDTE(0,5)*WDTEM(0,4))/WDTP(0)**2
-          WIDS(KC,2)=(WDTE(0,1)+WDTE(0,2)+WDTE(0,4))/WDTP(0)
-          WIDS(KC,3)=(WDTEM(0,1)+WDTEM(0,3)+WDTEM(0,4))/WDTP(0)
-          WIDS(KC,4)=((WDTE(0,1)+WDTE(0,2))**2+
-     &    2D0*(WDTE(0,1)+WDTE(0,2))*(WDTE(0,4)+WDTE(0,5))+
-     &    2D0*WDTE(0,4)*WDTE(0,5))/WDTP(0)**2
-          WIDS(KC,5)=((WDTEM(0,1)+WDTEM(0,3))**2+
-     &    2D0*(WDTEM(0,1)+WDTEM(0,3))*(WDTEM(0,4)+WDTEM(0,5))+
-     &    2D0*WDTEM(0,4)*WDTEM(0,5))/WDTP(0)**2
+C...AM
+C...Protection against division by 0 since rho_21_tc is causing problem here
+        IF (WDTP(0) .GT. 0.) THEN
+           
+           IF(KCHG(KC,3).EQ.0) THEN
+              WIDS(KC,1)=((WDTE(0,1)+WDTE(0,2))**2+
+     &             2D0*(WDTE(0,1)+WDTE(0,2))*(WDTE(0,4)+WDTE(0,5))+
+     &             2D0*WDTE(0,4)*WDTE(0,5))/WDTP(0)**2
+              WIDS(KC,2)=(WDTE(0,1)+WDTE(0,2)+WDTE(0,4))/WDTP(0)
+              WIDS(KC,3)=0D0
+              WIDS(KC,4)=0D0
+              WIDS(KC,5)=0D0
+           ELSE
+              IF(MWID(KC).EQ.3) MINT(63)=1
+              CALL PYWIDT(-KF,PMR**2,WDTPM,WDTEM)
+              MINT(51)=0
+              WIDS(KC,1)=((WDTE(0,1)+WDTE(0,2))*(WDTEM(0,1)+WDTEM(0,3))+
+     &             (WDTE(0,1)+WDTE(0,2))*(WDTEM(0,4)+WDTEM(0,5))+
+     &             (WDTE(0,4)+WDTE(0,5))*(WDTEM(0,1)+WDTEM(0,3))+
+     &             WDTE(0,4)*WDTEM(0,5)+WDTE(0,5)*WDTEM(0,4))/WDTP(0)**2
+              WIDS(KC,2)=(WDTE(0,1)+WDTE(0,2)+WDTE(0,4))/WDTP(0)
+              WIDS(KC,3)=(WDTEM(0,1)+WDTEM(0,3)+WDTEM(0,4))/WDTP(0)
+              WIDS(KC,4)=((WDTE(0,1)+WDTE(0,2))**2+
+     &             2D0*(WDTE(0,1)+WDTE(0,2))*(WDTE(0,4)+WDTE(0,5))+
+     &             2D0*WDTE(0,4)*WDTE(0,5))/WDTP(0)**2
+              WIDS(KC,5)=((WDTEM(0,1)+WDTEM(0,3))**2+
+     &             2D0*(WDTEM(0,1)+WDTEM(0,3))*(WDTEM(0,4)+WDTEM(0,5))+
+     &             2D0*WDTEM(0,4)*WDTEM(0,5))/WDTP(0)**2
+           ENDIF
+           
         ENDIF
 C...Set resonance widths and branching ratios;
 C...also on/off switch for decays.
         IF(MWID(KC).EQ.1.OR.MWID(KC).EQ.3) THEN
@@ -59654,14 +59659,14 @@ C      IDATI(5)=IMIN
 C      IDATI(6)=ISEC
  
 C...Example 4: GNU LINUX libU77, SunOS.
-      CALL IDATE(IDTEMP)
-      IDATI(1)=IDTEMP(3)
-      IDATI(2)=IDTEMP(2)
-      IDATI(3)=IDTEMP(1)
-      CALL ITIME(IDTEMP)
-      IDATI(4)=IDTEMP(1)
-      IDATI(5)=IDTEMP(2)
-      IDATI(6)=IDTEMP(3)
+c      CALL IDATE(IDTEMP)
+c      IDATI(1)=IDTEMP(3)
+c      IDATI(2)=IDTEMP(2)
+c      IDATI(3)=IDTEMP(1)
+c      CALL ITIME(IDTEMP)
+c      IDATI(4)=IDTEMP(1)
+c      IDATI(5)=IDTEMP(2)
+c      IDATI(6)=IDTEMP(3)
  
 C...Common code to ensure right century.
       IDATI(1)=2000+MOD(IDATI(1),100)