]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Protection in function PAWT added.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Dec 2009 14:40:18 +0000 (14:40 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Dec 2009 14:40:18 +0000 (14:40 +0000)
HIJING/hipyset1_35/ludecy_hijing.F

index c17835d4a1d8ae3059c6fe27bc7275c712e7f157..800dac8cf84afcb435da7b17d34d4f761c02f7e6 100644 (file)
@@ -1,7 +1,16 @@
 * $Id$
     
 C*********************************************************************  
-    
+
+      FUNCTION PAWT(A,B,C)
+      IF(((A**2-(B+C)**2)*(A**2-(B-C)**2)).GT.0) THEN
+         PAWT = SQRT((A**2-(B+C)**2)*(A**2-(B-C)**2))/(2.*A)
+      ELSE
+         PAWT = 0
+      ENDIF
+      RETURN
+      END
+
       SUBROUTINE LUDECY_HIJING(IP) 
     
 C...Purpose: to handle the decay of unstable particles. 
@@ -15,7 +24,7 @@ C...Purpose: to handle the decay of unstable particles.
     
 C...Functions: momentum in two-particle decays, four-product and    
 C...matrix element times phase space in weak decays.    
-      PAWT(A,B,C)=SQRT((A**2-(B+C)**2)*(A**2-(B-C)**2))/(2.*A)  
+
       FOUR(I,J)=P(I,4)*P(J,4)-P(I,1)*P(J,1)-P(I,2)*P(J,2)-P(I,3)*P(J,3) 
       HMEPS(HA)=((1.-HRQ-HA)**2+3.*HA*(1.+HRQ-HA))* 
      &SQRT((1.-HRQ-HA)**2-4.*HRQ*HA)