Additional protection
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2004 11:02:30 +0000 (11:02 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 26 Feb 2004 11:02:30 +0000 (11:02 +0000)
HIJING/hijing1_36/parton.F

index ebe1761..021ee95 100644 (file)
@@ -78,6 +78,9 @@ C********************************************************
 C      FUD=X*(U+D)
 C      FS=X*2(UBAR+DBAR+SBAR)  AND UBAR=DBAR=SBAR
 C*******************************************************
+C PH    Make sure X1 belongs to [0,1]
+       IF (X1.LT.0.D0) X1=0.D0
+       IF (X1.GT.1.D0) X1=1.D0
        FUD1=CNUD*X1**AT1*(1.D0-X1)**AT2*(1.D0+GMUD*X1)
        FS1=CAS*X1**AS*(1.D0-X1)**BS*(1.D0+APHS*X1
      &      +BTAS*X1**2+GMS*X1**3)
@@ -90,6 +93,9 @@ C*******************************************************
        F(1,7)=CAG*X1**AG*(1.D0-X1)**BG*(1.D0+APHG*X1
      &         +BTAG*X1**2+GMG*X1**3)
 C
+C PH    Make sure X2 belongs to [0,1]
+       IF (X2.LT.0.D0) X2=0.D0
+       IF (X2.GT.1.D0) X2=1.D0
        FUD2=CNUD*X2**AT1*(1.D0-X2)**AT2*(1.D0+GMUD*X2)
        FS2=CAS*X2**AS*(1.D0-X2)**BS*(1.D0+APHS*X2
      &      +BTAS*X2**2+GMS*X2**3)