Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001  
0002 C*********************************************************************
0003  
0004 C...PYKCUT
0005 C...Dummy routine, which the user can replace in order to make cuts on
0006 C...the kinematics on the parton level before the matrix elements are
0007 C...evaluated and the event is generated. The cross-section estimates
0008 C...will automatically take these cuts into account, so the given
0009 C...values are for the allowed phase space region only. MCUT=0 means
0010 C...that the event has passed the cuts, MCUT=1 that it has failed.
0011  
0012       SUBROUTINE PYKCUT(MCUT)
0013  
0014 C...Double precision and integer declarations.
0015       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
0016       IMPLICIT INTEGER(I-N)
0017       INTEGER PYK,PYCHGE,PYCOMP
0018 C...Commonblocks.
0019       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
0020       COMMON/PYINT1/MINT(400),VINT(400)
0021       COMMON/PYINT2/ISET(500),KFPR(500,2),COEF(500,20),ICOL(40,4,2)
0022       SAVE /PYDAT1/,/PYINT1/,/PYINT2/
0023  
0024 C...Set default value (accepting event) for MCUT.
0025       MCUT=0
0026  
0027 C...Read out subprocess number.
0028       ISUB=MINT(1)
0029       ISTSB=ISET(ISUB)
0030  
0031 C...Read out tau, y*, cos(theta), tau' (where defined, else =0).
0032       TAU=VINT(21)
0033       YST=VINT(22)
0034       CTH=0D0
0035       IF(ISTSB.EQ.2.OR.ISTSB.EQ.4) CTH=VINT(23)
0036       TAUP=0D0
0037       IF(ISTSB.GE.3.AND.ISTSB.LE.5) TAUP=VINT(26)
0038  
0039 C...Calculate x_1, x_2, x_F.
0040       IF(ISTSB.LE.2.OR.ISTSB.GE.5) THEN
0041         X1=SQRT(TAU)*EXP(YST)
0042         X2=SQRT(TAU)*EXP(-YST)
0043       ELSE
0044         X1=SQRT(TAUP)*EXP(YST)
0045         X2=SQRT(TAUP)*EXP(-YST)
0046       ENDIF
0047       XF=X1-X2
0048  
0049 C...Calculate shat, that, uhat, p_T^2.
0050       SHAT=TAU*VINT(2)
0051       SQM3=VINT(63)
0052       SQM4=VINT(64)
0053       RM3=SQM3/SHAT
0054       RM4=SQM4/SHAT
0055       BE34=SQRT(MAX(0D0,(1D0-RM3-RM4)**2-4D0*RM3*RM4))
0056       RPTS=4D0*VINT(71)**2/SHAT
0057       BE34L=SQRT(MAX(0D0,(1D0-RM3-RM4)**2-4D0*RM3*RM4-RPTS))
0058       RM34=2D0*RM3*RM4
0059       RSQM=1D0+RM34
0060       RTHM=(4D0*RM3*RM4+RPTS)/(1D0-RM3-RM4+BE34L)
0061       THAT=-0.5D0*SHAT*MAX(RTHM,1D0-RM3-RM4-BE34*CTH)
0062       UHAT=-0.5D0*SHAT*MAX(RTHM,1D0-RM3-RM4+BE34*CTH)
0063       PT2=MAX(VINT(71)**2,0.25D0*SHAT*BE34**2*(1D0-CTH**2))
0064  
0065 C...Decisions by user to be put here.
0066  
0067 C...Stop program if this routine is ever called.
0068 C...You should not copy these lines to your own routine.
0069       WRITE(MSTU(11),5000)
0070       CALL PYSTOP(6)
0071  
0072 C...Format for error printout.
0073  5000 FORMAT(1X,'Error: you did not link your PYKCUT routine ',
0074      &'correctly.'/1X,'Dummy routine in PYTHIA file called instead.'/
0075      &1X,'Execution stopped!')
0076  
0077       RETURN
0078       END