Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:21:14

0001  
0002  
0003 C*********************************************************************
0004  
0005 C...PYPTDI
0006 C...Generates transverse momentum according to a Gaussian.
0007  
0008       SUBROUTINE PYPTDI(KFL,PX,PY)
0009  
0010 C...Double precision and integer declarations.
0011       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
0012       IMPLICIT INTEGER(I-N)
0013       INTEGER PYK,PYCHGE,PYCOMP
0014 C...Commonblocks.
0015       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
0016       SAVE /PYDAT1/
0017  
0018 C...Generate p_T and azimuthal angle, gives p_x and p_y.
0019       KFLA=IABS(KFL)
0020       PT=PARJ(21)*SQRT(-LOG(MAX(1D-10,PYR(0))))
0021       IF(PARJ(23).GT.PYR(0)) PT=PARJ(24)*PT
0022       IF(MSTJ(91).EQ.1) PT=PARJ(22)*PT
0023       IF(KFLA.EQ.0.AND.MSTJ(13).LE.0) PT=0D0
0024       PHI=PARU(2)*PYR(0)
0025       PX=PT*COS(PHI)
0026       PY=PT*SIN(PHI)
0027  
0028       RETURN
0029       END