Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001  
0002  
0003 C*********************************************************************
0004  
0005 C...PYDCYK
0006 C...Handles flavour production in the decay of unstable particles
0007 C...and small string clusters.
0008  
0009       SUBROUTINE PYDCYK(KFL1,KFL2,KFL3,KF)
0010  
0011 C...Double precision and integer declarations.
0012       IMPLICIT DOUBLE PRECISION(A-H, O-Z)
0013       IMPLICIT INTEGER(I-N)
0014       INTEGER PYK,PYCHGE,PYCOMP
0015 C...Commonblocks.
0016       COMMON/PYDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
0017       COMMON/PYDAT2/KCHG(500,4),PMAS(500,4),PARF(2000),VCKM(4,4)
0018       SAVE /PYDAT1/,/PYDAT2/
0019  
0020  
0021 C.. Call PYKFDI directly if no popcorn option is on
0022       IF(MSTJ(12).LT.2) THEN
0023          CALL PYKFDI(KFL1,KFL2,KFL3,KF)
0024          MSTU(124)=KFL3
0025          RETURN
0026       ENDIF
0027  
0028       KFL3=0
0029       KF=0
0030       IF(KFL1.EQ.0) RETURN
0031       KF1A=IABS(KFL1)
0032       KF2A=IABS(KFL2)
0033  
0034       NSTO=130
0035       NMAX=MIN(MSTU(125),10)
0036  
0037 C.. Identify rank 0 cluster qq
0038       IRANK=1
0039       IF(KF1A.GT.10.AND.KF1A.LT.10000) IRANK=0
0040  
0041       IF(KF2A.GT.0)THEN
0042 C.. Join jets: Fails if store not empty
0043          IF(MSTU(121).GT.0) THEN
0044             MSTU(121)=0
0045             RETURN
0046          ENDIF
0047          CALL PYKFDI(KFL1,KFL2,KFL3,KF)
0048       ELSEIF(KF1A.GT.10.AND.MSTU(121).GT.0)THEN
0049 C.. Pick popcorn meson from store, return same qq, decrease store
0050          KF=MSTU(NSTO+MSTU(121))
0051          KFL3=-KFL1
0052          MSTU(121)=MSTU(121)-1
0053       ELSE
0054 C.. Generate new flavour. Then done if no diquark is generated
0055   100    CALL PYKFDI(KFL1,0,KFL3,KF)
0056          IF(MSTU(121).EQ.-1) GOTO 100
0057          MSTU(124)=KFL3
0058          IF(KF.EQ.0.OR.IABS(KFL3).LE.10) RETURN
0059  
0060 C.. Simple case if no dynamical popcorn suppressions are considered
0061          IF(MSTJ(12).LT.4) THEN
0062             IF(MSTU(121).EQ.0) RETURN
0063             NMES=1
0064             KFPREV=-KFL3
0065             CALL PYKFDI(KFPREV,0,KFL3,KFM)
0066 C.. Due to eta+eta' suppr., a qq->M+qq attempt might end as qq->B+q
0067             IF(IABS(KFL3).LE.10)THEN
0068                KFL3=-KFPREV
0069                RETURN
0070             ENDIF
0071             GOTO 120
0072          ENDIF
0073  
0074 C test output qq against fake Gamma, then return if no popcorn.
0075          GB=2D0
0076          IF(IRANK.NE.0)THEN
0077             CALL PYZDIS(1,2103,5D0,Z)
0078             GB=5D0*(1D0-Z)/Z
0079             IF(1D0-PARF(192)**GB.LT.PYR(0)) THEN
0080                MSTU(121)=0
0081                GOTO 100
0082             ENDIF
0083          ENDIF
0084          IF(MSTU(121).EQ.0) RETURN
0085  
0086 C..Set store size memory. Pick fake dynamical variables of qq.
0087          NMES=MSTU(121)
0088          CALL PYPTDI(1,PX3,PY3)
0089          X=1D0
0090          POPM=0D0
0091          G=GB
0092          POPG=GB
0093  
0094 C.. Pick next popcorn meson, test with fake dynamical variables
0095   110    KFPREV=-KFL3
0096          PX1=-PX3
0097          PY1=-PY3
0098          CALL PYKFDI(KFPREV,0,KFL3,KFM)
0099          IF(MSTU(121).EQ.-1) GOTO 100
0100          CALL PYPTDI(KFL3,PX3,PY3)
0101          PM=PYMASS(KFM)**2+(PX1+PX3)**2+(PY1+PY3)**2
0102          CALL PYZDIS(KFPREV,KFL3,PM,Z)
0103          G=(1D0-Z)*(G+PM/Z)
0104          X=(1D0-Z)*X
0105  
0106          PTST=1D0
0107          GTST=1D0
0108          RTST=PYR(0)
0109          IF(MSTJ(12).GT.4)THEN
0110             POPMN=SQRT((1D0-X)*(G/X-GB))
0111             POPM=POPM+PMAS(PYCOMP(KFM),1)-PMAS(PYCOMP(KFM),3)
0112             PTST=EXP((POPM-POPMN)*PARF(193))
0113             POPM=POPMN
0114          ENDIF
0115          IF(IRANK.NE.0)THEN
0116             POPGN=X*GB
0117             GTST=(1D0-PARF(192)**POPGN)/(1D0-PARF(192)**POPG)
0118             POPG=POPGN
0119          ENDIF
0120          IF(RTST.GT.PTST*GTST)THEN
0121             MSTU(121)=0
0122             IF(RTST.GT.PTST) MSTU(121)=-1
0123             GOTO 100
0124          ENDIF
0125  
0126 C.. Store meson
0127   120    IF(NMES.LE.NMAX) MSTU(NSTO+MSTU(121)+1)=KFM
0128          IF(MSTU(121).GT.0) GOTO 110
0129  
0130 C.. Test accepted system size. If OK set global popcorn size variable.
0131          IF(NMES.GT.NMAX)THEN
0132             KF=0
0133             KFL3=0
0134             RETURN
0135          ENDIF
0136          MSTU(121)=NMES
0137       ENDIF
0138  
0139       RETURN
0140       END