File indexing completed on 2024-04-06 12:13:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 SUBROUTINE ARTSET
0016
0017 PARAMETER (AMU= 0.9383,nxymax=10001)
0018 double precision dpcoal,drcoal,ecritl
0019 INTEGER ZTA, ZPR
0020 common /gg/ dx,dy,dz,dpx,dpy,dpz
0021
0022
0023
0024
0025 common /zz/ zta,zpr
0026
0027 COMMON /RUN/ NUM
0028
0029 common/input1/ MASSPR,MASSTA,ISEED,IAVOID,DT
0030
0031 COMMON /INPUT2/ ILAB, MANYB, NTMAX, ICOLL, INSYS, IPOT, MODE,
0032 & IMOMEN, NFREQ, ICFLOW, ICRHO, ICOU, KPOTEN, KMUL
0033
0034 COMMON /INPUT3/ PLAB, ELAB, ZEROPT, B0, BI, BM, DENCUT, CYCBOX
0035
0036 common /imulst/ iperts
0037
0038 common /coal/dpcoal,drcoal,ecritl
0039 common/anim/nevent,isoft,isflag,izpc
0040 common /para7/ ioscar,nsmbbbar,nsmmeson
0041 common/embed/iembed,nsembd,pxqembd,pyqembd,xembd,yembd,
0042 1 psembd,tmaxembd,phidecomp
0043 common/xyembed/nxyjet,xyjet(nxymax,2)
0044 SAVE
0045
0046
0047
0048
0049
0050 ecritl=1.d0
0051
0052
0053
0054
0055
0056
0057 MASSTA=1
0058 ZTA=1
0059
0060
0061 MASSPR=1
0062 ZPR=1
0063
0064
0065 PLAB=14.6
0066 IPLAB=2
0067
0068 if(iplab.eq.2)then
0069 elab=sqrt(plab**2+amu**2)-amu
0070 else
0071 elab=plab
0072 endif
0073 elab=elab*1000.
0074
0075 ZEROPT=0.
0076
0077
0078
0079 ISEED=700721
0080
0081
0082 iperts=0
0083
0084
0085
0086 MANYB=1
0087 B0=1
0088 BI=0
0089 BM=0
0090
0091
0092
0093
0094
0095
0096
0097
0098 ICOLL=-1
0099
0100
0101
0102 NUM=1
0103
0104
0105 INSYS=1
0106
0107
0108 IPOT=3
0109
0110
0111 MODE=0
0112 IF(ICOLL.EQ.-1)IPOT=0
0113
0114
0115 DX=2.73
0116 DY=2.73
0117 DZ=2.73
0118
0119
0120 DPX=0.6
0121 DPY=0.6
0122 DPZ=0.6
0123
0124
0125 IAVOID=1
0126
0127
0128 IMOMEN=1
0129
0130 if(icoll.eq.-1)imomen=3
0131
0132 NFREQ=10
0133
0134
0135 ICFLOW=0
0136
0137
0138 ICRHO=0
0139
0140
0141 ICOU=0
0142
0143
0144
0145
0146 KPOTEN=0
0147 KMUL=1
0148
0149
0150
0151
0152
0153 DENCUT=15
0154
0155
0156
0157
0158 CYCBOX=0
0159
0160
0161
0162
0163 if(ioscar.eq.2.or.ioscar.eq.3) then
0164
0165
0166 endif
0167 if(ioscar.eq.3) then
0168
0169
0170
0171
0172
0173
0174
0175 if(isoft.eq.4.or.isoft.eq.5) then
0176
0177
0178 endif
0179 endif
0180
0181
0182
0183
0184 if(iembed.eq.3.or.iembed.eq.4) then
0185
0186
0187
0188
0189 if(nevent.gt.nxyjet) then
0190 if(nxyjet.gt.nxymax) then
0191
0192
0193 stop
0194 elseif(nxyjet.le.0) then
0195
0196 stop
0197 endif
0198 do ixy=1,nxyjet
0199
0200 enddo
0201 endif
0202 endif
0203
0204 RETURN
0205 END
0206
0207
0208
0209
0210
0211 SUBROUTINE ARINI
0212
0213
0214
0215 COMMON /ARPRNT/ ARPAR1(100), IAPAR2(50), ARINT1(100), IAINT2(50)
0216
0217 SAVE
0218
0219
0220
0221
0222 IFLG = IAPAR2(1)
0223 GOTO (200, 200, 300) IFLG
0224
0225
0226 PRINT *, 'IAPAR2(1) must be 1, 2, or 3'
0227 STOP
0228
0229
0230
0231 200 RETURN
0232
0233
0234
0235 300 CALL ARINI1
0236
0237
0238 CALL ARTORD
0239 RETURN
0240
0241 END
0242
0243
0244
0245
0246
0247
0248
0249 SUBROUTINE ARINI1
0250
0251
0252
0253 PARAMETER (MAXSTR=150001)
0254 double precision smearp,smearh
0255
0256 COMMON /ARPRNT/ ARPAR1(100), IAPAR2(50), ARINT1(100), IAINT2(50)
0257
0258 COMMON /ARPRC/ ITYPAR(MAXSTR),
0259 & GXAR(MAXSTR), GYAR(MAXSTR), GZAR(MAXSTR), FTAR(MAXSTR),
0260 & PXAR(MAXSTR), PYAR(MAXSTR), PZAR(MAXSTR), PEAR(MAXSTR),
0261 & XMAR(MAXSTR)
0262
0263 COMMON /smearz/smearp,smearh
0264
0265 common/input1/ MASSPR,MASSTA,ISEED,IAVOID,DT
0266
0267 common/anim/nevent,isoft,isflag,izpc
0268
0269 common /nzpc/nattzp
0270
0271 COMMON/HPARNT/HIPR1(100),IHPR2(50),HINT1(100),IHNT2(50)
0272
0273 COMMON/RNDF77/NSEED
0274
0275 common /para8/ idpert,npertd,idxsec
0276 SAVE
0277
0278
0279
0280
0281 if(idpert.eq.1.or.idpert.eq.2) then
0282
0283 endif
0284
0285 TAU0 = ARPAR1(1)
0286 NP = IAINT2(1)
0287
0288
0289 if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) then
0290 if(NP.le.nattzp) return
0291 do 1001 I = nattzp+1, NP
0292
0293
0294
0295
0296
0297
0298
0299
0300
0301
0302
0303
0304
0305
0306
0307 if((XMAR(I)**2+PXAR(I)**2+PYAR(I)**2).gt.0.) then
0308 RAP=asinh(PZAR(I)/sqrt(XMAR(I)**2+PXAR(I)**2+PYAR(I)**2))
0309 else
0310 PRINT *, ' IN ARINI1 mt=0'
0311 RAP = 1000000.0*sign(1.,PZAR(I))
0312 endif
0313
0314 VX = PXAR(I) / PEAR(I)
0315 VY = PYAR(I) / PEAR(I)
0316 FTAR(I) = TAU0 * COSH(RAP)
0317 GXAR(I) = GXAR(I) + VX * FTAR(I)
0318 GYAR(I) = GYAR(I) + VY * FTAR(I)
0319 GZAR(I) = TAU0 * SINH(RAP)
0320
0321 if(PXAR(I).eq.0.and.PYAR(I).eq.0
0322 2 .and.(ITYPAR(I).eq.2112.or.ITYPAR(I).eq.2212)) then
0323
0324
0325 if((PEAR(I)/HINT1(6).gt.0.99.and.PEAR(I)/HINT1(6).lt.1.01)
0326 1 .or.(PEAR(I)/HINT1(7).gt.0.99.and.PEAR(I)/HINT1(7).lt.1.01)) then
0327
0328 TAUI=1.E-20
0329 FTAR(I)=TAUI*COSH(RAP)
0330 GZAR(I)=TAUI*SINH(RAP)
0331 endif
0332 endif
0333 1001 continue
0334
0335
0336 else
0337 DO 1002 I = 1, NP
0338
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352 if((XMAR(I)**2+PXAR(I)**2+PYAR(I)**2).gt.0.) then
0353 RAP=asinh(PZAR(I)/sqrt(XMAR(I)**2+PXAR(I)**2+PYAR(I)**2))
0354 else
0355 PRINT *, ' IN ARINI1 mt=0'
0356 RAP = 1000000.0*sign(1.,PZAR(I))
0357 endif
0358
0359 VX = PXAR(I) / PEAR(I)
0360 VY = PYAR(I) / PEAR(I)
0361
0362 TAUI = FTAR(I) + TAU0
0363 FTAR(I) = TAUI * COSH(RAP)
0364 GXAR(I) = GXAR(I) + VX * TAU0 * COSH(RAP)
0365 GYAR(I) = GYAR(I) + VY * TAU0 * COSH(RAP)
0366
0367 GZAR(I) = TAUI * SINH(RAP)
0368
0369
0370 zsmear=sngl(smearh)*(2.*RANART(NSEED)-1.)
0371 GZAR(I)=GZAR(I)+zsmear
0372
0373
0374 if(PXAR(I).eq.0.and.PYAR(I).eq.0
0375 2 .and.(ITYPAR(I).eq.2112.or.ITYPAR(I).eq.2212)) then
0376
0377
0378 if((PEAR(I)/HINT1(6).gt.0.99.and.PEAR(I)/HINT1(6).lt.1.01)
0379 1 .or.(PEAR(I)/HINT1(7).gt.0.99.and.PEAR(I)/HINT1(7).lt.1.01)) then
0380
0381
0382
0383 TAUI=1.E-20
0384 FTAR(I)=TAUI*COSH(RAP)
0385 GZAR(I)=TAUI*SINH(RAP)+zsmear
0386 endif
0387 endif
0388 1002 CONTINUE
0389
0390 endif
0391
0392
0393 call addhad
0394
0395 RETURN
0396 END
0397
0398
0399
0400
0401
0402
0403 SUBROUTINE ARTORD
0404
0405
0406
0407 PARAMETER (MAXSTR=150001,MAXR=1)
0408 COMMON /ARPRNT/ ARPAR1(100), IAPAR2(50), ARINT1(100), IAINT2(50)
0409
0410 COMMON /ARPRC/ ITYPAR(MAXSTR),
0411 & GXAR(MAXSTR), GYAR(MAXSTR), GZAR(MAXSTR), FTAR(MAXSTR),
0412 & PXAR(MAXSTR), PYAR(MAXSTR), PZAR(MAXSTR), PEAR(MAXSTR),
0413 & XMAR(MAXSTR)
0414
0415
0416 COMMON /dpert/dpertt(MAXSTR,MAXR),dpertp(MAXSTR),dplast(MAXSTR),
0417 1 dpdcy(MAXSTR),dpdpi(MAXSTR,MAXR),dpt(MAXSTR, MAXR),
0418 2 dpp1(MAXSTR,MAXR),dppion(MAXSTR,MAXR)
0419 DIMENSION dptemp(MAXSTR)
0420
0421 DIMENSION ITYP0(MAXSTR),
0422 & GX0(MAXSTR), GY0(MAXSTR), GZ0(MAXSTR), FT0(MAXSTR),
0423 & PX0(MAXSTR), PY0(MAXSTR), PZ0(MAXSTR), EE0(MAXSTR),
0424 & XM0(MAXSTR)
0425 DIMENSION INDX(MAXSTR)
0426 EXTERNAL ARINDX
0427 SAVE
0428
0429 NPAR = 0
0430 NP = IAINT2(1)
0431 DO 1001 I = 1, NP
0432 ITYP0(I) = ITYPAR(I)
0433 GX0(I) = GXAR(I)
0434 GY0(I) = GYAR(I)
0435 GZ0(I) = GZAR(I)
0436 FT0(I) = FTAR(I)
0437 PX0(I) = PXAR(I)
0438 PY0(I) = PYAR(I)
0439 PZ0(I) = PZAR(I)
0440 EE0(I) = PEAR(I)
0441 XM0(I) = XMAR(I)
0442
0443 dptemp(I) = dpertp(I)
0444 1001 CONTINUE
0445 CALL ARINDX(MAXSTR, NP, FT0, INDX)
0446 DO 1002 I = 1, NP
0447
0448
0449
0450
0451
0452
0453
0454
0455 NPAR = NPAR + 1
0456
0457
0458
0459
0460
0461
0462
0463
0464
0465
0466 ITYPAR(NPAR) = ITYP0(INDX(I))
0467 GXAR(NPAR) = GX0(INDX(I))
0468 GYAR(NPAR) = GY0(INDX(I))
0469 GZAR(NPAR) = GZ0(INDX(I))
0470 FTAR(NPAR) = FT0(INDX(I))
0471 PXAR(NPAR) = PX0(INDX(I))
0472 PYAR(NPAR) = PY0(INDX(I))
0473 PZAR(NPAR) = PZ0(INDX(I))
0474 PEAR(NPAR) = EE0(INDX(I))
0475 XMAR(NPAR) = XM0(INDX(I))
0476
0477 dpertp(NPAR)=dptemp(INDX(I))
0478
0479
0480 1002 CONTINUE
0481 IAINT2(1) = NPAR
0482
0483 RETURN
0484 END
0485
0486
0487
0488
0489
0490
0491 SUBROUTINE ARINI2(K)
0492
0493 PARAMETER (MAXSTR=150001,MAXR=1)
0494 COMMON /ARPRNT/ ARPAR1(100), IAPAR2(50), ARINT1(100), IAINT2(50)
0495
0496 COMMON /ARPRC/ ITYPAR(MAXSTR),
0497 & GXAR(MAXSTR), GYAR(MAXSTR), GZAR(MAXSTR), FTAR(MAXSTR),
0498 & PXAR(MAXSTR), PYAR(MAXSTR), PZAR(MAXSTR), PEAR(MAXSTR),
0499 & XMAR(MAXSTR)
0500
0501 COMMON /ARERC1/MULTI1(MAXR)
0502
0503 COMMON /ARPRC1/ITYP1(MAXSTR, MAXR),
0504 & GX1(MAXSTR, MAXR), GY1(MAXSTR, MAXR), GZ1(MAXSTR, MAXR),
0505 & FT1(MAXSTR, MAXR),
0506 & PX1(MAXSTR, MAXR), PY1(MAXSTR, MAXR), PZ1(MAXSTR, MAXR),
0507 & EE1(MAXSTR, MAXR), XM1(MAXSTR, MAXR)
0508
0509 COMMON/tdecay/tfdcy(MAXSTR),tfdpi(MAXSTR,MAXR),tft(MAXSTR)
0510
0511 common/input1/ MASSPR,MASSTA,ISEED,IAVOID,DT
0512
0513 COMMON /INPUT2/ ILAB, MANYB, NTMAX, ICOLL, INSYS, IPOT, MODE,
0514 & IMOMEN, NFREQ, ICFLOW, ICRHO, ICOU, KPOTEN, KMUL
0515
0516 COMMON/RNDF77/NSEED
0517 COMMON /dpert/dpertt(MAXSTR,MAXR),dpertp(MAXSTR),dplast(MAXSTR),
0518 1 dpdcy(MAXSTR),dpdpi(MAXSTR,MAXR),dpt(MAXSTR, MAXR),
0519 2 dpp1(MAXSTR,MAXR),dppion(MAXSTR,MAXR)
0520
0521 SAVE
0522
0523 MULTI1(K) = IAINT2(1)
0524 DO 1001 I = 1, MULTI1(K)
0525 ITYP1(I, K) = ITYPAR(I)
0526 GX1(I, K) = GXAR(I)
0527 GY1(I, K) = GYAR(I)
0528 GZ1(I, K) = GZAR(I)
0529 FT1(I, K) = FTAR(I)
0530 PX1(I, K) = PXAR(I)
0531 PY1(I, K) = PYAR(I)
0532 PZ1(I, K) = PZAR(I)
0533 EE1(I, K) = PEAR(I)
0534 XM1(I, K) = XMAR(I)
0535
0536
0537
0538 dpp1(I,K)=dpertp(I)
0539 1001 CONTINUE
0540
0541
0542
0543 do 1002 ip=1,MAXSTR
0544 tfdcy(ip)=NTMAX*DT
0545 tft(ip)=NTMAX*DT
0546 1002 continue
0547
0548 do 1004 irun=1,MAXR
0549 do 1003 ip=1,MAXSTR
0550 tfdpi(ip,irun)=NTMAX*DT
0551 1003 continue
0552 1004 continue
0553
0554 RETURN
0555 END
0556
0557
0558
0559
0560
0561 FUNCTION IARFLV(IPDG)
0562
0563 common/input1/ MASSPR,MASSTA,ISEED,IAVOID,DT
0564
0565 COMMON/RNDF77/NSEED
0566
0567 SAVE
0568
0569
0570 IF (IPDG .EQ. -1114) THEN
0571 IARFLV = -6
0572 RETURN
0573 END IF
0574
0575
0576 IF (IPDG .EQ. -2114) THEN
0577 IARFLV = -7
0578 RETURN
0579 END IF
0580
0581
0582 IF (IPDG .EQ. -2214) THEN
0583 IARFLV = -8
0584 RETURN
0585 END IF
0586
0587
0588 IF (IPDG .EQ. -2224) THEN
0589 IARFLV = -9
0590 RETURN
0591 END IF
0592
0593
0594
0595 IF (IPDG .EQ. -2212) THEN
0596 IARFLV = -1
0597 RETURN
0598 END IF
0599
0600
0601 IF (IPDG .EQ. -2112) THEN
0602 IARFLV = -2
0603 RETURN
0604 END IF
0605
0606
0607
0608 IF (IPDG .EQ. 221) THEN
0609 IARFLV = 0
0610 RETURN
0611 END IF
0612
0613
0614 IF (IPDG .EQ. 2212) THEN
0615 IARFLV = 1
0616 RETURN
0617 END IF
0618
0619
0620 IF (IPDG .EQ. 2112) THEN
0621 IARFLV = 2
0622 RETURN
0623 END IF
0624
0625
0626 IF (IPDG .EQ. -211) THEN
0627 IARFLV = 3
0628 RETURN
0629 END IF
0630
0631
0632 IF (IPDG .EQ. 111) THEN
0633 IARFLV = 4
0634 RETURN
0635 END IF
0636
0637
0638 IF (IPDG .EQ. 211) THEN
0639 IARFLV = 5
0640 RETURN
0641 END IF
0642
0643
0644 IF (IPDG .EQ. 1114) THEN
0645 IARFLV = 6
0646 RETURN
0647 END IF
0648
0649
0650 IF (IPDG .EQ. 2114) THEN
0651 IARFLV = 7
0652 RETURN
0653 END IF
0654
0655
0656 IF (IPDG .EQ. 2214) THEN
0657 IARFLV = 8
0658 RETURN
0659 END IF
0660
0661
0662 IF (IPDG .EQ. 2224) THEN
0663 IARFLV = 9
0664 RETURN
0665 END IF
0666
0667
0668 IF (IPDG .EQ. 3122) THEN
0669 IARFLV = 14
0670 RETURN
0671 END IF
0672
0673
0674 IF (IPDG .EQ. -3122) THEN
0675 IARFLV = -14
0676 RETURN
0677 END IF
0678
0679
0680 IF (IPDG .EQ. 3112) THEN
0681 IARFLV = 15
0682 RETURN
0683 END IF
0684
0685
0686 IF (IPDG .EQ. -3112) THEN
0687 IARFLV = -15
0688 RETURN
0689 END IF
0690
0691
0692 IF (IPDG .EQ. 3212) THEN
0693 IARFLV = 16
0694 RETURN
0695 END IF
0696
0697
0698 IF (IPDG .EQ. -3212) THEN
0699 IARFLV = -16
0700 RETURN
0701 END IF
0702
0703
0704 IF (IPDG .EQ. 3222) THEN
0705 IARFLV = 17
0706 RETURN
0707 END IF
0708
0709
0710 IF (IPDG .EQ. -3222) THEN
0711 IARFLV = -17
0712 RETURN
0713 END IF
0714
0715
0716 IF (IPDG .EQ. -321) THEN
0717 IARFLV = 21
0718 RETURN
0719 END IF
0720
0721
0722 IF (IPDG .EQ. 321) THEN
0723 IARFLV = 23
0724 RETURN
0725 END IF
0726
0727
0728 IF (IPDG .EQ. 311) THEN
0729 IARFLV = 23
0730 RETURN
0731 END IF
0732
0733
0734 IF (IPDG .EQ. -311) THEN
0735 IARFLV = 21
0736 RETURN
0737 END IF
0738
0739
0740 IF (IPDG .EQ. 310 .OR. IPDG .EQ. 130) THEN
0741 R = RANART(NSEED)
0742 IF (R .GT. 0.5) THEN
0743 IARFLV = 23
0744 ELSE
0745 IARFLV = 21
0746 END IF
0747 RETURN
0748 END IF
0749
0750
0751 IF (IPDG .EQ. -213) THEN
0752 IARFLV = 25
0753 RETURN
0754 END IF
0755
0756
0757 IF (IPDG .EQ. 113) THEN
0758 IARFLV = 26
0759 RETURN
0760 END IF
0761
0762
0763 IF (IPDG .EQ. 213) THEN
0764 IARFLV = 27
0765 RETURN
0766 END IF
0767
0768
0769 IF (IPDG .EQ. 223) THEN
0770 IARFLV = 28
0771 RETURN
0772 END IF
0773
0774
0775 IF (IPDG .EQ. 333) THEN
0776 IARFLV = 29
0777 RETURN
0778 END IF
0779
0780
0781 IF (IPDG .EQ. 323) THEN
0782 IARFLV = 30
0783 RETURN
0784 END IF
0785
0786 IF (IPDG .EQ. -323) THEN
0787 IARFLV = -30
0788 RETURN
0789 END IF
0790
0791 IF (IPDG .EQ. 313) THEN
0792 IARFLV = 30
0793 RETURN
0794 END IF
0795
0796 IF (IPDG .EQ. -313) THEN
0797 IARFLV = -30
0798 RETURN
0799 END IF
0800
0801
0802 IF (IPDG .EQ. 331) THEN
0803 IARFLV = 31
0804 RETURN
0805 END IF
0806
0807
0808
0809
0810
0811
0812
0813
0814 IF (IPDG .EQ. 3312) THEN
0815 IARFLV = 40
0816 RETURN
0817 END IF
0818
0819
0820 IF (IPDG .EQ. -3312) THEN
0821 IARFLV = -40
0822 RETURN
0823 END IF
0824
0825
0826 IF (IPDG .EQ. 3322) THEN
0827 IARFLV = 41
0828 RETURN
0829 END IF
0830
0831
0832 IF (IPDG .EQ. -3322) THEN
0833 IARFLV = -41
0834 RETURN
0835 END IF
0836
0837
0838 IF (IPDG .EQ. 3334) THEN
0839 IARFLV = 45
0840 RETURN
0841 END IF
0842
0843
0844 IF (IPDG .EQ. -3334) THEN
0845 IARFLV = -45
0846 RETURN
0847 END IF
0848
0849
0850 IF (IPDG .EQ. 6666) THEN
0851 IARFLV = 44
0852 RETURN
0853 END IF
0854
0855
0856
0857 IF (IPDG .EQ. 42 .or. IPDG .EQ. -42) THEN
0858 IARFLV = IPDG
0859 RETURN
0860 END IF
0861
0862
0863 IARFLV = IPDG + 10000
0864
0865 RETURN
0866 END
0867
0868
0869
0870
0871
0872 FUNCTION INVFLV(IART)
0873
0874 common/input1/ MASSPR,MASSTA,ISEED,IAVOID,DT
0875
0876 COMMON/RNDF77/NSEED
0877
0878 SAVE
0879
0880
0881 IF (IART .EQ. -6) THEN
0882 INVFLV = -1114
0883 RETURN
0884 END IF
0885
0886
0887 IF (IART .EQ. -7) THEN
0888 INVFLV = -2114
0889 RETURN
0890 END IF
0891
0892
0893 IF (IART .EQ. -8) THEN
0894 INVFLV = -2214
0895 RETURN
0896 END IF
0897
0898
0899 IF (IART .EQ. -9) THEN
0900 INVFLV = -2224
0901 RETURN
0902 END IF
0903
0904
0905
0906 IF (IART .EQ. -1) THEN
0907 INVFLV = -2212
0908 RETURN
0909 END IF
0910
0911
0912 IF (IART .EQ. -2) THEN
0913 INVFLV = -2112
0914 RETURN
0915 END IF
0916
0917
0918
0919 IF (IART .EQ. 0) THEN
0920 INVFLV = 221
0921 RETURN
0922 END IF
0923
0924
0925 IF (IART .EQ. 1) THEN
0926 INVFLV = 2212
0927 RETURN
0928 END IF
0929
0930
0931 IF (IART .EQ. 2) THEN
0932 INVFLV = 2112
0933 RETURN
0934 END IF
0935
0936
0937 IF (IART .EQ. 3) THEN
0938 INVFLV = -211
0939 RETURN
0940 END IF
0941
0942
0943 IF (IART .EQ. 4) THEN
0944 INVFLV = 111
0945 RETURN
0946 END IF
0947
0948
0949 IF (IART .EQ. 5) THEN
0950 INVFLV = 211
0951 RETURN
0952 END IF
0953
0954
0955 IF (IART .EQ. 6) THEN
0956 INVFLV = 1114
0957 RETURN
0958 END IF
0959
0960
0961 IF (IART .EQ. 7) THEN
0962 INVFLV = 2114
0963 RETURN
0964 END IF
0965
0966
0967 IF (IART .EQ. 8) THEN
0968 INVFLV = 2214
0969 RETURN
0970 END IF
0971
0972
0973 IF (IART .EQ. 9) THEN
0974 INVFLV = 2224
0975 RETURN
0976 END IF
0977
0978
0979
0980
0981
0982
0983
0984
0985 IF (IART .EQ. 14) THEN
0986 INVFLV = 3122
0987 RETURN
0988 END IF
0989
0990 IF (IART .EQ. -14) THEN
0991 INVFLV = -3122
0992 RETURN
0993 END IF
0994
0995
0996
0997
0998
0999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010 IF (IART .EQ. 15) THEN
1011 INVFLV = 3112
1012 RETURN
1013 END IF
1014
1015
1016 IF (IART .EQ. -15) THEN
1017 INVFLV = -3112
1018 RETURN
1019 END IF
1020
1021
1022 IF (IART .EQ. 16) THEN
1023 INVFLV = 3212
1024 RETURN
1025 END IF
1026
1027
1028 IF (IART .EQ. -16) THEN
1029 INVFLV = -3212
1030 RETURN
1031 END IF
1032
1033
1034 IF (IART .EQ. 17) THEN
1035 INVFLV = 3222
1036 RETURN
1037 END IF
1038
1039
1040 IF (IART .EQ. -17) THEN
1041 INVFLV = -3222
1042 RETURN
1043 END IF
1044
1045
1046
1047 IF (IART .EQ. 21) THEN
1048
1049
1050 INVFLV = -321
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060 RETURN
1061 END IF
1062
1063
1064 IF (IART .EQ. 23) THEN
1065
1066
1067 INVFLV = 321
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077 RETURN
1078 END IF
1079
1080
1081 IF (IART .EQ. 22) THEN
1082 INVFLV = 130
1083 RETURN
1084 ENDIF
1085
1086 IF (IART .EQ. 24) THEN
1087 INVFLV = 310
1088 RETURN
1089 ENDIF
1090
1091
1092 IF (IART .EQ. 25) THEN
1093 INVFLV = -213
1094 RETURN
1095 END IF
1096
1097
1098 IF (IART .EQ. 26) THEN
1099 INVFLV = 113
1100 RETURN
1101 END IF
1102
1103
1104 IF (IART .EQ. 27) THEN
1105 INVFLV = 213
1106 RETURN
1107 END IF
1108
1109
1110 IF (IART .EQ. 28) THEN
1111 INVFLV = 223
1112 RETURN
1113 END IF
1114
1115
1116 IF (IART .EQ. 29) THEN
1117 INVFLV = 333
1118 RETURN
1119 END IF
1120
1121
1122 IF (IART .EQ. 30) THEN
1123 INVFLV = 323
1124 IF (RANART(NSEED).GT.0.5) INVFLV = 313
1125 RETURN
1126 END IF
1127
1128
1129 IF (IART .EQ. -30) THEN
1130 INVFLV = -323
1131 IF (RANART(NSEED).GT.0.5) INVFLV = -313
1132 RETURN
1133 END IF
1134
1135
1136 IF (IART .EQ. 31) THEN
1137 INVFLV = 331
1138 RETURN
1139 END IF
1140
1141
1142 IF (IART .EQ. 32) THEN
1143 INVFLV = 777
1144 RETURN
1145 END IF
1146
1147
1148 IF (IART .EQ. 40) THEN
1149 INVFLV = 3312
1150 RETURN
1151 END IF
1152
1153
1154 IF (IART .EQ. -40) THEN
1155 INVFLV = -3312
1156 RETURN
1157 END IF
1158
1159
1160 IF (IART .EQ. 41) THEN
1161 INVFLV = 3322
1162 RETURN
1163 END IF
1164
1165
1166 IF (IART .EQ. -41) THEN
1167 INVFLV = -3322
1168 RETURN
1169 END IF
1170
1171
1172 IF (IART .EQ. 45) THEN
1173 INVFLV = 3334
1174 RETURN
1175 END IF
1176
1177
1178 IF (IART .EQ. -45) THEN
1179 INVFLV = -3334
1180 RETURN
1181 END IF
1182
1183
1184 IF (IART .EQ. 44) THEN
1185 INVFLV = 6666
1186 RETURN
1187 END IF
1188
1189
1190
1191 IF (IART .EQ. 42) THEN
1192 INVFLV = 42
1193 RETURN
1194 ELSEIF (IART .EQ. -42) THEN
1195 INVFLV = -42
1196 RETURN
1197 END IF
1198
1199
1200 INVFLV = IART - 10000
1201
1202 RETURN
1203 END
1204
1205
1206
1207 BLOCK DATA ARDATA
1208
1209 COMMON /ARPRNT/ ARPAR1(100), IAPAR2(50), ARINT1(100), IAINT2(50)
1210
1211 SAVE
1212 DATA ARPAR1/1.19, 99 * 0.0/
1213 DATA IAPAR2/3, 49 * 0/
1214 DATA ARINT1/100 * 0.0/
1215 DATA IAINT2/50 * 0/
1216
1217 END
1218
1219
1220
1221
1222
1223
1224
1225
1226 subroutine arindx(n, m, arrin, indx)
1227
1228
1229
1230
1231
1232
1233 dimension arrin(n), indx(n)
1234 SAVE
1235 do 1001 j = 1, m
1236 indx(j) = j
1237 1001 continue
1238 l = m / 2 + 1
1239 ir = m
1240 10 continue
1241 if (l .gt. 1) then
1242 l = l - 1
1243 indxt = indx(l)
1244 q = arrin(indxt)
1245 else
1246 indxt = indx(ir)
1247 q = arrin(indxt)
1248 indx(ir) = indx(1)
1249 ir = ir - 1
1250 if (ir .eq. 1) then
1251 indx(1) = indxt
1252 return
1253 end if
1254 end if
1255 i = l
1256 j = l + l
1257 20 if (j .le. ir) then
1258 if (j .lt. ir) then
1259 if (arrin(indx(j)) .lt. arrin(indx(j + 1))) j = j + 1
1260 end if
1261 if (q .lt. arrin(indx(j))) then
1262 indx(i) = indx(j)
1263 i = j
1264 j = j + j
1265 else
1266 j = ir + 1
1267 end if
1268 goto 20
1269 end if
1270 indx(i) = indxt
1271 goto 10
1272
1273 end
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283 subroutine newka(icase,irun,iseed,dt,nt,ictrl,i1,i2,
1284 & srt,pcx,pcy,pcz,iblock)
1285 PARAMETER (MAXSTR=150001,MAXR=1)
1286 PARAMETER (AKA=0.498)
1287 COMMON /AA/ R(3,MAXSTR)
1288
1289 COMMON /BB/ P(3,MAXSTR)
1290
1291 COMMON /CC/ E(MAXSTR)
1292
1293 COMMON /EE/ ID(MAXSTR),LB(MAXSTR)
1294
1295 COMMON /BG/BETAX,BETAY,BETAZ,GAMMA
1296
1297 COMMON /NN/NNN
1298
1299 COMMON /RUN/NUM
1300
1301 COMMON /PA/RPION(3,MAXSTR,MAXR)
1302
1303 COMMON /PB/PPION(3,MAXSTR,MAXR)
1304
1305 COMMON /PC/EPION(MAXSTR,MAXR)
1306
1307 COMMON /PD/LPION(MAXSTR,MAXR)
1308
1309 COMMON/RNDF77/NSEED
1310
1311 SAVE
1312
1313 logical lb1bn, lb2bn,lb1mn,lb2mn
1314
1315
1316 logical lb1bn1, lb2bn1, lb1bn0, lb2bn0
1317
1318 logical lb1mn0, lb2mn0, lb1mn1, lb2mn1
1319 logical lb1mn2, lb2mn2
1320 icase=-1
1321
1322
1323
1324
1325
1326 nchrg=-100
1327
1328 ictrl = 1
1329 lb1=lb(i1)
1330 lb2=lb(i2)
1331 em1=e(i1)
1332 em2=e(i2)
1333 lb1bn=lb1.eq.1.or.lb1.eq.2.or.(lb1.gt.5.and.lb1.le.13)
1334 lb2bn=lb2.eq.1.or.lb2.eq.2.or.(lb2.gt.5.and.lb2.le.13)
1335 lb1bn0=lb1.eq.2.or.lb1.eq.7.or.lb1.eq.10.or.lb1.eq.12
1336 lb2bn0=lb2.eq.2.or.lb2.eq.7.or.lb2.eq.10.or.lb2.eq.12
1337 lb1bn1=lb1.eq.1.or.lb1.eq.8.or.lb1.eq.11.or.lb1.eq.13
1338 lb2bn1=lb2.eq.1.or.lb2.eq.8.or.lb2.eq.11.or.lb2.eq.13
1339 lb1mn=em1.lt.0.2.or.lb1.eq.0.or.(lb1.ge.25.and.lb1.le.29)
1340 lb2mn=em2.lt.0.2.or.lb2.eq.0.or.(lb2.ge.25.and.lb2.le.29)
1341 lb1mn0=lb1.eq.0.or.lb1.eq.4.or.lb1.eq.26.or.
1342 & lb1.eq.28.or.lb1.eq.29
1343 lb2mn0=lb2.eq.0.or.lb2.eq.4.or.lb2.eq.26.or.
1344 & lb2.eq.28.or.lb2.eq.29
1345 lb1mn1= lb1.eq.5.or.lb1.eq.27
1346 lb2mn1= lb2.eq.5.or.lb2.eq.27
1347 lb1mn2=lb1.eq.3.or.lb1.eq.25
1348 lb2mn2=lb2.eq.3.or.lb2.eq.25
1349
1350
1351 if(lb1bn.and.lb2bn) then
1352
1353 icase=1
1354
1355 sig=40.
1356 if(lb1.eq.9.and.lb2.eq.9) then
1357 nchrg=4
1358 endif
1359 if((lb1bn1.and.lb2.eq.9)
1360 & .or.(lb2bn1.and.lb1.eq.9))then
1361 nchrg=3
1362 endif
1363 if((lb1bn0.and.lb2.eq.9)
1364 & .or.(lb2bn0.and.lb1.eq.9)
1365 & .or.(lb1bn1.and.lb2bn1)) then
1366 nchrg=2
1367 endif
1368 if((lb1bn1.and.lb2bn0).or.(lb1.eq.6.and.lb2.eq.9)
1369 & .or.(lb2bn1.and.lb1bn0)
1370 & .or.(lb2.eq.6.and.lb1.eq.9))then
1371 nchrg=1
1372 endif
1373 if((lb1bn0.and.lb2bn0).or.(lb1bn1.and.lb2.eq.6)
1374 & .or.(lb2bn1.and.lb1.eq.6)) then
1375 nchrg=0
1376 endif
1377 if((lb1bn0.and.lb2.eq.6)
1378 & .or.(lb2bn0.and.lb1.eq.6))then
1379 nchrg=-1
1380 endif
1381 if(lb1.eq.6.and.lb2.eq.6) then
1382 nchrg=-2
1383 endif
1384
1385 if(nchrg.ge.-1.and.nchrg.le.2) then
1386
1387 brsig = x2kaon(srt)
1388 else
1389 brsig=0.0
1390
1391
1392
1393
1394
1395
1396 endif
1397
1398
1399 BRSIG = 2.0 * BRSIG
1400
1401
1402 endif
1403
1404
1405 if((lb1bn.and.lb2mn).OR.(lb2bn.and.lb1mn)) then
1406
1407 icase=2
1408 sig=20.
1409 sigma0 = piNsg0(srt)
1410 brsig=0.0
1411 if((lb1bn1.and.lb2mn0)
1412 & .or.(lb2bn1.and.lb1mn0).
1413 & or.(lb1bn0.and.lb2mn1).or.(lb2bn0.and.lb1mn1).
1414 & or.(lb1.eq.9.and.lb2mn2).or.(lb2.eq.9.and.lb1mn2))then
1415 nchrg=1
1416
1417
1418
1419 if(lb1bn1.or.lb2bn1) brsig=0.5*sigma0
1420 if(lb1bn0.or.lb2bn0) brsig=2.0*sigma0
1421
1422
1423 endif
1424 if( (lb1bn0.and.lb2mn0 )
1425 & .or.(lb2bn0.and.lb1mn0)
1426 & .or.(lb1bn1.and.lb2mn2).or.(lb2bn1.and.lb1mn2)
1427 & .or.(lb1.eq.6.and.lb2mn1).or.(lb2.eq.6.and.lb1mn1)) then
1428 nchrg=0
1429 if(lb1bn1.or.lb2bn1) then
1430
1431
1432 brsig=3.0*sigma0
1433
1434
1435
1436 ratiok = 2./3.
1437
1438
1439
1440 endif
1441 if(lb1bn0.or.lb2bn0) then
1442 brsig=2.5*sigma0
1443
1444
1445 ratiok = 0.2
1446
1447 endif
1448
1449
1450
1451
1452
1453 endif
1454 if( (lb1bn0.and.lb2mn2)
1455 & .or.(lb2bn0.and.lb1mn2)
1456 & .or.(lb1.eq.6.and.lb2mn0).or.(lb2.eq.6.and.lb1mn0)) then
1457 nchrg=-1
1458 if(lb1bn0.or.lb2bn0) brsig=sigma0
1459
1460 endif
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470 if((lb1.eq.6.and.lb2mn2)
1471 & .or.(lb2.eq.6.and.lb1mn2))then
1472 nchrg=-2
1473 endif
1474
1475
1476 if((lb1bn1.and.lb2mn1)
1477 & .or.(lb2bn1.and.lb1mn1)
1478 & .or.(lb1.eq.9.and.lb2mn0).or.(lb2.eq.9.and.lb1mn0)) then
1479 nchrg=2
1480 endif
1481
1482
1483
1484 IF (NCHRG .GE. -2 .AND. NCHRG .LE. 2) THEN
1485 BRSIG = 3.0 * SIGMA0
1486 END IF
1487
1488
1489 endif
1490
1491
1492
1493 if( (lb1bn.and.(lb2.eq.21.or.lb2.eq.-30)).OR.
1494 & (lb2bn.and.(lb1.eq.21.or.lb1.eq.-30)) )then
1495
1496 bmass=0.938
1497 if(srt.le.(bmass+aka)) then
1498
1499
1500
1501 pkaon=0.
1502 else
1503 pkaon=sqrt(((srt**2-(aka**2+bmass**2))/2./bmass)**2-aka**2)
1504 endif
1505 sig=0.
1506 if(lb1.eq.1.or.lb2.eq.1.or.lb1.eq.8.or.lb2.eq.8.or.
1507 & lb1.eq.11.or.lb2.eq.11.or.lb1.eq.13.or.lb2.eq.13) then
1508
1509 nchrg=0
1510 sigela=akPel(pkaon)
1511 sigsgm=3.*akPsgm(pkaon)
1512 sig=sigela+sigsgm+akPlam(pkaon)
1513 endif
1514 if(lb1.eq.2.or.lb2.eq.2.or.lb1.eq.7.or.lb2.eq.7.or.
1515 & lb1.eq.10.or.lb2.eq.10.or.lb1.eq.12.or.lb2.eq.12) then
1516
1517 nchrg=-1
1518 sigela=akNel(pkaon)
1519 sigsgm=2.*akNsgm(pkaon)
1520 sig=sigela+sigsgm+akNlam(pkaon)
1521 endif
1522 if(lb1.eq.6.or.lb2.eq.6) then
1523
1524 nchrg=-2
1525 sigela=akNel(pkaon)
1526 sigsgm=akNsgm(pkaon)
1527 sig=sigela+sigsgm
1528 endif
1529 if(lb1.eq.9.or.lb2.eq.9) then
1530
1531 nchrg=1
1532 sigela=akPel(pkaon)
1533 sigsgm=2.*akPsgm(pkaon)
1534 sig=sigela+sigsgm+akPlam(pkaon)
1535 endif
1536
1537
1538 sigela = 0.5 * (AKPEL(PKAON) + AKNEL(PKAON))
1539 SIGSGM = 1.5 * AKPSGM(PKAON) + AKNSGM(PKAON)
1540 SIG = sigela + SIGSGM + AKPLAM(PKAON)
1541
1542
1543 if(sig.gt.1.e-7) then
1544
1545 icase=3
1546 brel=sigela/sig
1547 brsgm=sigsgm/sig
1548
1549 brsig = sig
1550 endif
1551 endif
1552
1553
1554
1555
1556 if(((lb1.ge.14.and.lb1.le.17).and.(lb2.ge.3.and.lb2.le.5)).OR.
1557 & ((lb2.ge.14.and.lb2.le.17).and.(lb1.ge.3.and.lb1.le.5)))then
1558
1559 nchrg=-100
1560 if((lb1.eq.15.and.(lb2.eq.3.or.lb2.eq.25)).OR.
1561 & (lb2.eq.15.and.(lb1.eq.3.or.lb1.eq.25))) then
1562 nchrg=-2
1563
1564 bmass=1.232
1565 endif
1566 if((lb1.eq.15.and.lb2mn0).or.(lb2.eq.15.and.lb1mn0).OR.
1567 & ((lb1.eq.14.or.lb1.eq.16).and.(lb2.eq.3.or.lb2.eq.25)).OR.
1568 & ((lb2.eq.14.or.lb2.eq.16).and.(lb1.eq.3.or.lb1.eq.25)))then
1569 nchrg=-1
1570
1571 bmass=0.938
1572 endif
1573 if((lb1.eq.15.and.(lb2.eq.5.or.lb2.eq.27)).OR.
1574 & (lb2.eq.15.and.(lb1.eq.5.or.lb1.eq.27)).or.
1575 & (lb1.eq.17.and.(lb2.eq.3.or.lb2.eq.25)).OR.
1576 & (lb2.eq.17.and.(lb1.eq.3.or.lb1.eq.25)).or.
1577 & ((lb1.eq.14.or.lb1.eq.16).and.lb2mn0).OR.
1578 & ((lb2.eq.14.or.lb2.eq.16).and.lb1mn0)) then
1579 nchrg=0
1580
1581 bmass=0.938
1582 endif
1583 if((lb1.eq.17.and.lb2mn0).or.(lb2.eq.17.and.lb1mn0).OR.
1584 & ((lb1.eq.14.or.lb1.eq.16).and.(lb2.eq.5.or.lb2.eq.27)).OR.
1585 & ((lb2.eq.14.or.lb2.eq.16).and.(lb1.eq.5.or.lb1.eq.27)))then
1586 nchrg=1
1587
1588 bmass=1.232
1589 endif
1590 sig = 0.
1591 if(nchrg.ne.-100.and.srt.gt.(aka+bmass)) then
1592
1593 icase=4
1594
1595 pkaon=sqrt(((srt**2-(aka**2+0.938**2))/2./0.938)**2-aka**2)
1596
1597 if(lb1.eq.14.or.lb2.eq.14) then
1598 if(nchrg.ge.0) sigma0=akPlam(pkaon)
1599 if(nchrg.lt.0) sigma0=akNlam(pkaon)
1600
1601 else
1602
1603 if(nchrg.ge.0) sigma0=akPsgm(pkaon)
1604
1605 if(nchrg.lt.0) sigma0=akNsgm(pkaon)
1606
1607
1608 SIGMA0 = 1.5 * AKPSGM(PKAON) + AKNSGM(PKAON)
1609
1610
1611 endif
1612 sig=(srt**2-(aka+bmass)**2)*(srt**2-(aka-bmass)**2)/
1613 & (srt**2-(em1+em2)**2)/(srt**2-(em1-em2)**2)*sigma0
1614
1615
1616
1617 if(nchrg.eq.-2.or.nchrg.eq.2) sig=2.*sig
1618
1619
1620
1621
1622
1623
1624
1625 IF (LB1 .EQ. 14 .OR. LB2 .EQ. 14) THEN
1626 SIG = 4.0 / 3.0 * SIG
1627 ELSE IF (NCHRG .EQ. -2 .OR. NCHRG .EQ. 2) THEN
1628 SIG = 8.0 / 9.0 * SIG
1629 ELSE
1630 SIG = 4.0 / 9.0 * SIG
1631 END IF
1632
1633 brsig = sig
1634 if(sig.lt.1.e-7) sig = 1.e-7
1635 endif
1636
1637
1638
1639 icase=4
1640 brsig = sig
1641
1642 sigela = 10.
1643 sig = sig + sigela
1644 brel = sigela/sig
1645
1646
1647 endif
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660 if(icase.eq.-1) then
1661 ictrl = -1
1662 return
1663 endif
1664 px1cm=pcx
1665 py1cm=pcy
1666 pz1cm=pcz
1667 ds=sqrt(sig/31.4)
1668 dsr=ds+0.1
1669 ec=(em1+em2+0.02)**2
1670
1671
1672
1673 call distce(i1,i2,dsr,ds,dt,ec,srt,ic,px1cm,py1cm,pz1cm)
1674 if(ic.eq.-1) then
1675
1676 ictrl = -1
1677
1678
1679 return
1680 endif
1681
1682
1683
1684 ik=0
1685 ik0=0
1686 ik1=0
1687 ik2=0
1688 ik3=0
1689 il=0
1690 im=0
1691 im3=0
1692 im4=0
1693 in=0
1694 inpion=0
1695 ipipi=0
1696 sgsum=0.
1697 sgsum1=0.
1698 sgsum3=0.
1699 if(icase.eq.1) then
1700 ik=ik+1
1701 if(srt.gt.2.8639) then
1702 ik0=ik0+1
1703 if(em1.lt.1.0.and.em2.lt.1.0) then
1704 ik1=ik1+1
1705 sgsum1=sgsum1+brsig
1706
1707 endif
1708 if(em1.gt.1.0.and.em2.gt.1.0) then
1709 ik3=ik3+1
1710 sgsum3=sgsum3+brsig
1711
1712 endif
1713 if(em1.gt.1.0.and.em2.lt.1.0) ik2=ik2+1
1714 if(em1.lt.1.0.and.em2.gt.1.0) ik2=ik2+1
1715 sgsum=sgsum+brsig
1716
1717 endif
1718 endif
1719 if(icase.eq.2) inpion=inpion+1
1720 if(icase.eq.5) ipipi=ipipi+1
1721
1722
1723 if(RANART(NSEED).gt.(brsig/sig)) then
1724
1725 ictrl = -1
1726 return
1727 endif
1728 il=il+1
1729
1730 if(icase.eq.1) then
1731 in=in+1
1732
1733 call nnkaon(irun,iseed,
1734 & ictrl,i1,i2,iblock,srt,pcx,pcy,pcz,nchrg)
1735 endif
1736 if(icase.eq.2) then
1737 im=im+1
1738
1739
1740 call npik(irun,iseed,dt,nt,ictrl,i1,i2,srt,
1741 & pcx,pcy,pcz,nchrg,ratiok,iblock)
1742 endif
1743
1744 if(icase.eq.3) then
1745 im3=im3+1
1746
1747
1748
1749 call kaonN(brel,brsgm,irun,iseed,dt,nt,ictrl,
1750 & i1,i2,iblock,srt,pcx,pcy,pcz,nchrg)
1751
1752 endif
1753
1754
1755 if(icase.eq.4) then
1756 im4=im4+1
1757
1758
1759
1760
1761 if(RANART(NSEED).lt.brel) then
1762 ielstc = 1
1763 else
1764 ielstc = 0
1765 endif
1766
1767
1768 call Pihypn(ielstc,irun,iseed,dt,nt,ictrl,i1,i2,srt,
1769 & pcx,pcy,pcz,nchrg,iblock)
1770
1771
1772 endif
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783 return
1784 end
1785
1786
1787
1788
1789 real function X2kaon(srt)
1790 SAVE
1791
1792
1793
1794
1795
1796
1797 smin = 2.8639
1798 x2kaon=0.0000001
1799 if(srt.lt.smin)return
1800 sigma1 = 2.8
1801 sigma2 = 7.7
1802 sigma3 = 3.9
1803 x = srt**2/smin**2 + 0.0000001
1804 f1 = (1.+1./sqrt(x))*alog(x) - 4.*(1.-1./sqrt(x))
1805 f2 = 1. - (1./sqrt(x))*(1.+alog(sqrt(x)))
1806 f3 = ((x-1.)/x**2)**3.5
1807 x2kaon = (1.-1./x)**3*(sigma1*f1 + sigma2*f2) + sigma3*f3
1808 return
1809 END
1810
1811 real function piNsg0(srt)
1812 SAVE
1813
1814
1815 srt0 = 0.938 + 2.*0.498
1816 if(srt.lt.srt0) then
1817 piNsg0 = 0.0
1818 return
1819 endif
1820 ratio = srt0**2/srt**2
1821 piNsg0=1.121*(1.-ratio)**1.86*ratio**2
1822 return
1823 end
1824
1825 real function akNel(pkaon)
1826 SAVE
1827
1828
1829
1830 if(pkaon.lt.0.5.or. pkaon.ge.4.0) sigma1=0.
1831 if(pkaon.ge.0.5.and.pkaon.lt.1.0) sigma1=20.*pkaon**2.74
1832 if(pkaon.ge.1.0.and.pkaon.lt.4.0) sigma1=20.*pkaon**(-1.8)
1833 akNel=sigma1
1834 return
1835 end
1836
1837 real function akPel(pkaon)
1838 SAVE
1839
1840
1841
1842 if(pkaon.lt.0.25.or. pkaon.ge.4.0) sigma2=0.
1843 if(pkaon.ge.0.25.and.pkaon.lt.4.0) sigma2=13.*pkaon**(-0.9)
1844 akPel=sigma2
1845 return
1846 end
1847
1848 real function akNsgm(pkaon)
1849 SAVE
1850
1851
1852 if(pkaon.lt.0.5.or. pkaon.ge.6.0) sigma2=0.
1853 if(pkaon.ge.0.5.and.pkaon.lt.1.0) sigma2=1.2*pkaon**(-1.3)
1854 if(pkaon.ge.1.0.and.pkaon.lt.6.0) sigma2=1.2*pkaon**(-2.3)
1855 akNsgm=sigma2
1856 return
1857 end
1858
1859 real function akPsgm(pkaon)
1860 SAVE
1861
1862
1863 if(pkaon.lt.0.2.or. pkaon.ge.1.5) sigma1=0.
1864 if(pkaon.ge.0.2.and.pkaon.lt.1.5) sigma1=0.6*pkaon**(-1.8)
1865 akPsgm=sigma1
1866 return
1867 end
1868
1869 real function akPlam(pkaon)
1870 SAVE
1871
1872
1873 p=pkaon
1874 if(pkaon.lt.0.2.or. pkaon.ge.10.0) sigma=0.
1875 if(pkaon.ge.0.2.and.pkaon.lt.0.9) sigma=50.*p**2-67.*p+24.
1876 if(pkaon.ge.0.9.and.pkaon.lt.10.0) sigma=3.0*pkaon**(-2.6)
1877 akPlam=sigma
1878 return
1879 end
1880
1881 real function akNlam(pkaon)
1882 SAVE
1883
1884 akNlam=akPlam(pkaon)
1885 return
1886 end
1887
1888
1889 real function akNPsg(pkaon)
1890 SAVE
1891
1892
1893 if(pkaon.le.0.345)then
1894 sigma1=0.624*pkaon**(-1.83)
1895 else
1896 sigma1=0.7*pkaon**(-2.09)
1897 endif
1898 akNPsg=sigma1
1899 return
1900 end
1901
1902
1903
1904
1905
1906
1907 subroutine nnkaon(irun,iseed,ictrl,i1,i2,iblock,
1908 & srt,pcx,pcy,pcz,nchrg)
1909
1910
1911 PARAMETER (MAXSTR=150001,MAXR=1)
1912 PARAMETER (AKA=0.498)
1913 COMMON /AA/ R(3,MAXSTR)
1914
1915 COMMON /BB/ P(3,MAXSTR)
1916
1917 COMMON /CC/ E(MAXSTR)
1918
1919 COMMON /EE/ ID(MAXSTR),LB(MAXSTR)
1920
1921 COMMON /BG/BETAX,BETAY,BETAZ,GAMMA
1922
1923 COMMON /NN/NNN
1924
1925 COMMON /RUN/NUM
1926
1927 COMMON /PA/RPION(3,MAXSTR,MAXR)
1928
1929 COMMON /PB/PPION(3,MAXSTR,MAXR)
1930
1931 COMMON /PC/EPION(MAXSTR,MAXR)
1932
1933 COMMON /PD/LPION(MAXSTR,MAXR)
1934
1935 dimension px(4),py(4),pz(4)
1936 COMMON /dpert/dpertt(MAXSTR,MAXR),dpertp(MAXSTR),dplast(MAXSTR),
1937 1 dpdcy(MAXSTR),dpdpi(MAXSTR,MAXR),dpt(MAXSTR, MAXR),
1938 2 dpp1(MAXSTR,MAXR),dppion(MAXSTR,MAXR)
1939 SAVE
1940
1941
1942 dm3=0.938
1943 dm4=0.938
1944
1945 n=0
1946
1947
1948
1949
1950 if(nchrg.le.-1.or.nchrg.ge.3) dm3=1.232
1951 if(nchrg.eq.-2.or.nchrg.eq.4) dm4=1.232
1952
1953 iblock = 0
1954 call fstate(iseed,srt,dm3,dm4,px,py,pz,iflag)
1955 if(iflag.lt.0) then
1956
1957
1958 ictrl = -1
1959 n=n+1
1960 return
1961 endif
1962 iblock = 12
1963
1964
1965
1966
1967
1968
1969
1970
1971 pxrota=px(1)
1972 pyrota=py(1)
1973 pzrota=pz(1)
1974
1975 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
1976 px(1)=pxrota
1977 py(1)=pyrota
1978 pz(1)=pzrota
1979
1980 pxrota=px(2)
1981 pyrota=py(2)
1982 pzrota=pz(2)
1983
1984 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
1985 px(2)=pxrota
1986 py(2)=pyrota
1987 pz(2)=pzrota
1988
1989 pxrota=px(3)
1990 pyrota=py(3)
1991 pzrota=pz(3)
1992
1993 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
1994 px(3)=pxrota
1995 py(3)=pyrota
1996 pz(3)=pzrota
1997
1998 pxrota=px(4)
1999 pyrota=py(4)
2000 pzrota=pz(4)
2001
2002 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
2003 px(4)=pxrota
2004 py(4)=pyrota
2005 pz(4)=pzrota
2006
2007 nnn=nnn+2
2008
2009 lpion(nnn,irun)=23
2010 if(nchrg.eq.-1.or.nchrg.eq.-2) then
2011
2012
2013
2014
2015
2016
2017 endif
2018
2019 epion(nnn,irun)=aka
2020
2021 lpion(nnn-1,irun)=21
2022
2023 epion(nnn-1,irun)=aka
2024
2025
2026 e1cm = sqrt(dm3**2 + px(1)**2 + py(1)**2 + pz(1)**2)
2027 p1beta = px(1)*betax + py(1)*betay + pz(1)*betaz
2028 transf = gamma * ( gamma*p1beta / (gamma+1) + e1cm)
2029 pt1i1 = betax*transf + px(1)
2030 pt2i1 = betay*transf + py(1)
2031 pt3i1 = betaz*transf + pz(1)
2032 eti1 = dm3
2033
2034 lb1 = 2
2035 if(nchrg.ge.-2.and.nchrg.le.1) lb1=2
2036
2037
2038 if (nchrg .eq. -2 .or. nchrg .eq. -1) then
2039 lb1 = 6
2040 end if
2041
2042
2043
2044
2045
2046 if(nchrg.eq.1.or.nchrg.eq.2) lb1=1
2047 if(nchrg.eq.3.or.nchrg.eq.4) lb1=9
2048
2049
2050
2051 e2cm = sqrt(dm4**2 + px(2)**2 + py(2)**2 + pz(2)**2)
2052 p2beta = px(2)*betax + py(2)*betay + pz(2)*betaz
2053 transf = gamma * ( gamma*p2beta / (gamma+1) + e2cm)
2054 pt1i2 = betax*transf + px(2)
2055 pt2i2 = betay*transf + py(2)
2056 pt3i2 = betaz*transf + pz(2)
2057 eti2 = dm4
2058
2059 lb2 = 2
2060
2061
2062
2063
2064
2065
2066 if(nchrg.ge.-1.or.nchrg.le.1) lb2=2
2067 if(nchrg.eq. 2.or.nchrg.eq.3) lb2=1
2068 if(nchrg.eq. 4) lb2=9
2069 if(nchrg.eq.-2) lb2=6
2070
2071
2072
2073 p(1,i1)=pt1i1
2074 p(2,i1)=pt2i1
2075 p(3,i1)=pt3i1
2076 e(i1)=eti1
2077 lb(i1)=lb1
2078 p(1,i2)=pt1i2
2079 p(2,i2)=pt2i2
2080 p(3,i2)=pt3i2
2081 e(i2)=eti2
2082 lb(i2)=lb2
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093 epcmk = sqrt(epion(nnn-1,irun)**2 + px(3)**2+py(3)**2+pz(3)**2)
2094 betak = px(3)*betax + py(3)*betay + pz(3)*betaz
2095 transf= gamma*(gamma*betak/(gamma+1.) + epcmk)
2096 ppion(1,nnn-1,irun)=betax*transf + px(3)
2097 ppion(2,nnn-1,irun)=betay*transf + py(3)
2098 ppion(3,nnn-1,irun)=betaz*transf + pz(3)
2099 rpion(1,nnn-1,irun)=r(1,i1)
2100 rpion(2,nnn-1,irun)=r(2,i1)
2101 rpion(3,nnn-1,irun)=r(3,i1)
2102
2103 dppion(nnn-1,irun)=dpertp(i1)*dpertp(i2)
2104
2105 epcmak = sqrt(epion(nnn,irun)**2 + px(4)**2 +py(4)**2+pz(4)**2)
2106 betaak = px(4)*betax + py(4)*betay + pz(4)*betaz
2107 transf= gamma*(gamma*betaak/(gamma+1.) + epcmak)
2108 ppion(1,nnn,irun)=betax*transf + px(4)
2109 ppion(2,nnn,irun)=betay*transf + py(4)
2110 ppion(3,nnn,irun)=betaz*transf + pz(4)
2111 rpion(1,nnn,irun)=r(1,i2)
2112 rpion(2,nnn,irun)=r(2,i2)
2113 rpion(3,nnn,irun)=r(3,i2)
2114
2115 dppion(nnn,irun)=dpertp(i1)*dpertp(i2)
2116 return
2117 end
2118
2119 subroutine lorntz(ilo,b,pi,pj)
2120
2121 dimension pi(4),pj(4),b(3)
2122 SAVE
2123
2124 bb=b(1)*b(1)+b(2)*b(2)+b(3)*b(3)
2125 deno3=sqrt(1.-bb)
2126 if(deno3.eq.0.)deno3=1.e-10
2127 gam=1./deno3
2128 ga=gam*gam/(gam+1.)
2129 if(ilo.eq.1) goto 100
2130
2131 pib=pi(1)*b(1)+pi(2)*b(2)+pi(3)*b(3)
2132 pjb=pj(1)*b(1)+pj(2)*b(2)+pj(3)*b(3)
2133
2134
2135 do 1001 i=1,3
2136 pi(i)=pi(i)+b(i)*(ga*pib-gam*pi(4))
2137 pj(i)=pj(i)+b(i)*(ga*pjb-gam*pj(4))
2138
2139
2140 1001 continue
2141 pi(4)=gam*(pi(4)-pib)
2142 pj(4)=gam*(pj(4)-pjb)
2143 return
2144 100 continue
2145
2146 pib=pi(1)*b(1)+pi(2)*b(2)+pi(3)*b(3)
2147 pjb=pj(1)*b(1)+pj(2)*b(2)+pj(3)*b(3)
2148 do 1002 i=1,3
2149 pi(i)=pi(i)+b(i)*(ga*pib+gam*pi(4))
2150 pj(i)=pj(i)+b(i)*(ga*pjb+gam*pj(4))
2151 1002 continue
2152 pi(4)=gam*(pi(4)+pib)
2153 pj(4)=gam*(pj(4)+pjb)
2154 return
2155 end
2156
2157 subroutine fstate(iseed,srt,dm3,dm4,px,py,pz,iflag)
2158
2159 dimension px(4), py(4), pz(4), pe(4)
2160 COMMON/RNDF77/NSEED
2161
2162 SAVE
2163
2164 iflag=-1
2165
2166
2167 pio=3.1415926
2168 aka=0.498
2169
2170
2171
2172
2173
2174
2175
2176
2177 icount=0
2178 ekmax=(srt-dm3-dm4)/2.
2179 if(ekmax.le.aka) return
2180 pkmax=sqrt(ekmax**2-aka**2)
2181
2182 if(dm3.le.0.0.or.dm4.le.0.0) then
2183 write(1,*)'error: minus mass!!!'
2184 return
2185 endif
2186
2187
2188
2189
2190
2191 50 continue
2192 icount=icount+1
2193 if(icount.gt.10) return
2194 ptkmi2=-1./4.145*alog(RANART(NSEED))
2195 ptkm=sqrt(ptkmi2)
2196 3 v1=RANART(NSEED)
2197 v2=RANART(NSEED)
2198 rsq=v1**2+v2**2
2199 if(rsq.ge.1.0.or.rsq.le.0.) goto 3
2200 fac=sqrt(-2.*alog(rsq)/rsq)
2201 guass=v1*fac
2202 if(guass.ge.5.) goto 3
2203 xstar=guass/5.
2204 pzkm=pkmax*xstar
2205 ekm=sqrt(aka**2+pzkm**2+ptkm**2)
2206 if(RANART(NSEED).gt.aka/ekm) goto 50
2207 bbb=RANART(NSEED)
2208 px(3)=ptkm*cos(2.*pio*bbb)
2209 py(3)=ptkm*sin(2.*pio*bbb)
2210 if(RANART(NSEED).gt.0.5) pzkm=-1.*pzkm
2211 pz(3)=pzkm
2212 pe(3)=ekm
2213 150 ptkpl2=-1./3.68*alog(RANART(NSEED))
2214 ptkp=sqrt(ptkpl2)
2215 13 v1=RANART(NSEED)
2216 v2=RANART(NSEED)
2217 rsq=v1**2+v2**2
2218 if(rsq.ge.1.0.or.rsq.le.0.) goto 13
2219 fac=sqrt(-2.*alog(rsq)/rsq)
2220 guass=v1*fac
2221 if(guass.ge.3.25) goto 13
2222 xstar=guass/3.25
2223 pzkp=pkmax*xstar
2224 ekp=sqrt(aka**2+pzkp**2+ptkp**2)
2225 if(RANART(NSEED).gt.aka/ekp) goto 150
2226 bbb=RANART(NSEED)
2227 px(4)=ptkp*cos(2.*pio*bbb)
2228 py(4)=ptkp*sin(2.*pio*bbb)
2229 if(RANART(NSEED).gt.0.5) pzkp=-1.*pzkp
2230 pz(4)=pzkp
2231 pe(4)=ekp
2232
2233 resten=srt-pe(3)-pe(4)
2234 restpz=-pz(3)-pz(4)
2235
2236 if(resten.le.abs(restpz)) goto 50
2237 restms=sqrt(resten**2-restpz**2)
2238
2239 if(restms.lt.(dm3+dm4)) goto 50
2240 ptp2=-1./2.76*alog(RANART(NSEED))
2241 ptp=sqrt(ptp2)
2242 bbb=RANART(NSEED)
2243 px(2)=ptp*cos(2.*pio*bbb)
2244 py(2)=ptp*sin(2.*pio*bbb)
2245 px(1)=-1.*(px(4)+px(3)+px(2))
2246 py(1)=-1.*(py(4)+py(3)+py(2))
2247
2248 rmt3=sqrt(dm3**2+px(1)**2+py(1)**2)
2249
2250 rmt4=sqrt(dm4**2+px(2)**2+py(2)**2)
2251 if(restms.lt.(rmt3+rmt4)) goto 50
2252
2253 pzcms=sqrt((restms**2-(rmt3+rmt4)**2)*
2254 & (restms**2-(rmt3-rmt4)**2))/2./restms
2255 if(RANART(NSEED).gt.0.5) then
2256 pz(1)=pzcms
2257 pz(2)=-pzcms
2258 else
2259 pz(1)=-pzcms
2260 pz(2)=pzcms
2261 endif
2262 beta=restpz/resten
2263 gama=1./sqrt(1.-beta**2)
2264 pz(1)=pz(1)*gama + beta*gama*sqrt(rmt3**2+pz(1)**2)
2265 pz(2)=pz(2)*gama + beta*gama*sqrt(rmt4**2+pz(2)**2)
2266 pe(1)=sqrt(rmt3**2+pz(1)**2)
2267 pe(2)=sqrt(rmt4**2+pz(2)**2)
2268
2269 iflag=1
2270 return
2271 end
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281 subroutine npik(irun,iseed,dt,nt,ictrl,i1,i2,srt,
2282 & pcx,pcy,pcz,nchrg,ratiok,iblock)
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294 PARAMETER (MAXSTR=150001,MAXR=1,PI=3.1415926)
2295 PARAMETER (AKA=0.498)
2296 COMMON /AA/ R(3,MAXSTR)
2297
2298 COMMON /BB/ P(3,MAXSTR)
2299
2300 COMMON /CC/ E(MAXSTR)
2301
2302 COMMON /EE/ ID(MAXSTR),LB(MAXSTR)
2303
2304 COMMON /BG/BETAX,BETAY,BETAZ,GAMMA
2305
2306 COMMON /NN/NNN
2307
2308 COMMON /RUN/NUM
2309
2310 COMMON /PA/RPION(3,MAXSTR,MAXR)
2311
2312 COMMON /PB/PPION(3,MAXSTR,MAXR)
2313
2314 COMMON /PC/EPION(MAXSTR,MAXR)
2315
2316 COMMON /PD/LPION(MAXSTR,MAXR)
2317
2318 dimension bb(3),p1(4),p2(4),p3(4)
2319
2320 COMMON/RNDF77/NSEED
2321
2322 COMMON /dpert/dpertt(MAXSTR,MAXR),dpertp(MAXSTR),dplast(MAXSTR),
2323 1 dpdcy(MAXSTR),dpdpi(MAXSTR,MAXR),dpt(MAXSTR, MAXR),
2324 2 dpp1(MAXSTR,MAXR),dppion(MAXSTR,MAXR)
2325 SAVE
2326 px1cm=pcx
2327 py1cm=pcy
2328 pz1cm=pcz
2329 ictrl = 1
2330 lb1=lb(i1)
2331 lb2=lb(i2)
2332 k1=i1
2333 k2=i2
2334
2335 if(lb2.eq.1.or.lb2.eq.2.or.(lb2.ge.6.and.lb2.le.13)) then
2336 k1=i2
2337 k2=i1
2338 endif
2339
2340
2341
2342
2343 LB(k1) = 1 + int(2*RANART(NSEED))
2344 LB(k2) = 23
2345
2346
2347 pkmax=sqrt((srt**2-(aka+0.938+aka)**2)
2348 & *(srt**2-(aka+0.938-aka)**2))/2./srt
2349 pk = RANART(NSEED)*pkmax
2350
2351 css=1.-2.*RANART(NSEED)
2352 sss=sqrt(1.-css**2)
2353 fai=2*3.1415926*RANART(NSEED)
2354 p3(1)=pk*sss*cos(fai)
2355 p3(2)=pk*sss*sin(fai)
2356 p3(3)=pk*css
2357 eip = srt - sqrt(aka**2 + pk**2)
2358 rmnp=sqrt(eip**2-pk**2)
2359 do 1001 i= 1, 3
2360 bb(i) = -1.*p3(i)/eip
2361 1001 continue
2362
2363 pznp=sqrt((rmnp**2-(aka+0.938)**2)
2364 c *(rmnp**2-(0.938-aka)**2))/2./rmnp
2365
2366 css=1.-2.*RANART(NSEED)
2367 sss=sqrt(1.-css**2)
2368 fai=2*3.1415926*RANART(NSEED)
2369 p1(1)=pznp*sss*cos(fai)
2370 p1(2)=pznp*sss*sin(fai)
2371 p1(3)=pznp*css
2372 p1(4)=sqrt(0.938**2+pznp**2)
2373 p2(4)=sqrt(aka**2+pznp**2)
2374 do 1002 i=1,3
2375 p2(i)=-1.*p1(i)
2376 1002 continue
2377
2378
2379
2380
2381 ilo=1
2382
2383
2384 call lorntz(ilo,bb,p1,p2)
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402 pxrota=p1(1)
2403 pyrota=p1(2)
2404 pzrota=p1(3)
2405
2406 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
2407 p1(1)=pxrota
2408 p1(2)=pyrota
2409 p1(3)=pzrota
2410
2411 pxrota=p2(1)
2412 pyrota=p2(2)
2413 pzrota=p2(3)
2414
2415 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
2416 p2(1)=pxrota
2417 p2(2)=pyrota
2418 p2(3)=pzrota
2419
2420 pxrota=p3(1)
2421 pyrota=p3(2)
2422 pzrota=p3(3)
2423
2424 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
2425 p3(1)=pxrota
2426 p3(2)=pyrota
2427 p3(3)=pzrota
2428
2429 nnn=nnn+1
2430
2431 lpion(nnn,irun)=21
2432
2433 epion(nnn,irun)=aka
2434
2435
2436 e1cm = sqrt(0.938**2 + p1(1)**2 + p1(2)**2 + p1(3)**2)
2437 p1beta = p1(1)*betax + p1(2)*betay + p1(3)*betaz
2438 transf = gamma * ( gamma*p1beta / (gamma+1) + e1cm)
2439 pt1i1 = betax*transf + p1(1)
2440 pt2i1 = betay*transf + p1(2)
2441 pt3i1 = betaz*transf + p1(3)
2442 eti1 = 0.938
2443 lb1 = lb(k1)
2444
2445
2446 e2cm = sqrt(aka**2 + p3(1)**2 + p3(2)**2 + p3(3)**2)
2447 p2beta = p3(1)*betax + p3(2)*betay + p3(3)*betaz
2448 transf = gamma * ( gamma*p2beta / (gamma+1) + e2cm)
2449 pt1i2 = betax*transf + p3(1)
2450 pt2i2 = betay*transf + p3(2)
2451 pt3i2 = betaz*transf + p3(3)
2452 eti2 = aka
2453 lb2 = lb(k2)
2454
2455
2456
2457 p(1,k1)=pt1i1
2458 p(2,k1)=pt2i1
2459 p(3,k1)=pt3i1
2460 e(k1)=eti1
2461 lb(k1)=lb1
2462 p(1,k2)=pt1i2
2463 p(2,k2)=pt2i2
2464 p(3,k2)=pt3i2
2465 e(k2)=eti2
2466 lb(k2)=lb2
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476 iblock = 101
2477
2478
2479
2480 epcmk = sqrt(epion(nnn,irun)**2 + p2(1)**2+p2(2)**2+p2(3)**2)
2481 betak = p2(1)*betax + p2(2)*betay + p2(3)*betaz
2482 transf= gamma*(gamma*betak/(gamma+1.) + epcmk)
2483 ppion(1,nnn,irun)=betax*transf + p2(1)
2484 ppion(2,nnn,irun)=betay*transf + p2(2)
2485 ppion(3,nnn,irun)=betaz*transf + p2(3)
2486
2487 dppion(nnn,irun)=dpertp(i1)*dpertp(i2)
2488
2489
2490
2491
2492
2493
2494 k=i2
2495 if(lb(i1).eq.1.or.lb(i1).eq.2) k=i1
2496 rpion(1,nnn,irun)=r(1,k)
2497 rpion(2,nnn,irun)=r(2,k)
2498 rpion(3,nnn,irun)=r(3,k)
2499 return
2500 end
2501
2502
2503
2504
2505
2506
2507
2508 subroutine pihypn(ielstc,irun,iseed,dt,nt,ictrl,i1,i2,
2509 & srt,pcx,pcy,pcz,nchrg,iblock)
2510
2511
2512
2513
2514
2515
2516 PARAMETER (MAXSTR=150001,MAXR=1,PI=3.1415926)
2517 PARAMETER (AKA=0.498)
2518 COMMON /AA/ R(3,MAXSTR)
2519
2520 COMMON /BB/ P(3,MAXSTR)
2521
2522 COMMON /CC/ E(MAXSTR)
2523
2524 COMMON /EE/ ID(MAXSTR),LB(MAXSTR)
2525
2526 COMMON /BG/BETAX,BETAY,BETAZ,GAMMA
2527
2528 COMMON /NN/NNN
2529
2530 COMMON /RUN/NUM
2531
2532 COMMON /PA/RPION(3,MAXSTR,MAXR)
2533
2534 COMMON /PB/PPION(3,MAXSTR,MAXR)
2535
2536 COMMON /PC/EPION(MAXSTR,MAXR)
2537
2538 COMMON /PD/LPION(MAXSTR,MAXR)
2539
2540 dimension p1(4),p2(4)
2541 COMMON/RNDF77/NSEED
2542
2543 SAVE
2544 px1cm=pcx
2545 py1cm=pcy
2546 pz1cm=pcz
2547 ictrl = 1
2548
2549 if(ielstc .eq. 1) then
2550
2551 k1=i1
2552 k2=i2
2553 dm3=e(k1)
2554 dm4=e(k2)
2555 iblock = 10
2556 else
2557 iblock = 12
2558
2559
2560 k1=i1
2561 k2=i2
2562
2563 if(lb(i1).lt.14.or.lb(i1).gt.17) then
2564 k1=i2
2565 k2=i1
2566 endif
2567
2568 LB(K1) = 1 + int(2*RANART(NSEED))
2569 if(nchrg.eq.-2) lb(k1)=6
2570
2571
2572
2573 IF (NCHRG .EQ. 2) LB(K1) = 9
2574
2575
2576
2577 lb(k2)=21
2578 dm3=0.938
2579 if(nchrg.eq.-2.or.nchrg.eq.1) dm3=1.232
2580 dm4=aka
2581
2582 endif
2583
2584
2585
2586
2587 pkmax=sqrt((srt**2-(dm3+dm4)**2)*(srt**2-(dm3-dm4)**2))
2588 & /2./srt
2589 pk=pkmax
2590
2591 css=1.-2.*RANART(NSEED)
2592 sss=sqrt(1.-css**2)
2593 fai=2*3.1415926*RANART(NSEED)
2594 p1(1)=pk*sss*cos(fai)
2595 p1(2)=pk*sss*sin(fai)
2596 p1(3)=pk*css
2597 do 1001 i=1,3
2598 p2(i)=-1.*p1(i)
2599 1001 continue
2600
2601
2602
2603
2604
2605
2606 pxrota=p1(1)
2607 pyrota=p1(2)
2608 pzrota=p1(3)
2609
2610 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
2611 p1(1)=pxrota
2612 p1(2)=pyrota
2613 p1(3)=pzrota
2614
2615 pxrota=p2(1)
2616 pyrota=p2(2)
2617 pzrota=p2(3)
2618
2619 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
2620 p2(1)=pxrota
2621 p2(2)=pyrota
2622 p2(3)=pzrota
2623
2624
2625
2626
2627 e1cm = sqrt(dm3**2 + p1(1)**2 + p1(2)**2 + p1(3)**2)
2628 p1beta = p1(1)*betax + p1(2)*betay + p1(3)*betaz
2629 transf = gamma * ( gamma*p1beta / (gamma+1) + e1cm)
2630 pt1i1 = betax*transf + p1(1)
2631 pt2i1 = betay*transf + p1(2)
2632 pt3i1 = betaz*transf + p1(3)
2633 eti1 = dm3
2634 lb1 = lb(k1)
2635
2636
2637 e2cm = sqrt(dm4**2 + p2(1)**2 + p2(2)**2 + p2(3)**2)
2638 p2beta = p2(1)*betax + p2(2)*betay + p2(3)*betaz
2639 transf = gamma * ( gamma*p2beta / (gamma+1) + e2cm)
2640 pt1i2 = betax*transf + p2(1)
2641 pt2i2 = betay*transf + p2(2)
2642 pt3i2 = betaz*transf + p2(3)
2643
2644
2645
2646
2647 eti2 = dm4
2648 lb2 = lb(k2)
2649
2650
2651
2652
2653
2654 p(1,k1)=pt1i1
2655 p(2,k1)=pt2i1
2656 p(3,k1)=pt3i1
2657 e(k1)=eti1
2658 lb(k1)=lb1
2659 p(1,k2)=pt1i2
2660 p(2,k2)=pt2i2
2661 p(3,k2)=pt3i2
2662 e(k2)=eti2
2663 lb(k2)=lb2
2664
2665
2666
2667 return
2668 end
2669
2670
2671
2672
2673
2674
2675
2676 subroutine kaonN(brel,brsgm,irun,iseed,dt,nt,
2677 & ictrl,i1,i2,iblock,srt,pcx,pcy,pcz,nchrg)
2678
2679
2680
2681
2682 PARAMETER (MAXSTR=150001,MAXR=1,PI=3.1415926)
2683 PARAMETER (AKA=0.498,ALA=1.1157,ASA=1.1974)
2684 COMMON /AA/ R(3,MAXSTR)
2685
2686 COMMON /BB/ P(3,MAXSTR)
2687
2688 COMMON /CC/ E(MAXSTR)
2689
2690 COMMON /EE/ ID(MAXSTR),LB(MAXSTR)
2691
2692 COMMON /BG/BETAX,BETAY,BETAZ,GAMMA
2693
2694 COMMON /NN/NNN
2695
2696 COMMON /RUN/NUM
2697
2698 COMMON /PA/RPION(3,MAXSTR,MAXR)
2699
2700 COMMON /PB/PPION(3,MAXSTR,MAXR)
2701
2702 COMMON /PC/EPION(MAXSTR,MAXR)
2703
2704 COMMON /PD/LPION(MAXSTR,MAXR)
2705
2706 dimension p1(4),p2(4)
2707 COMMON/RNDF77/NSEED
2708
2709 SAVE
2710 px1cm=pcx
2711 py1cm=pcy
2712 pz1cm=pcz
2713 ictrl = 1
2714
2715 k1=i1
2716 k2=i2
2717
2718 if(e(i1).lt.0.5.and.e(i1).gt.0.01) then
2719 k1=i2
2720 k2=i1
2721 endif
2722
2723
2724 eee=e(k2)
2725
2726 rrr=RANART(NSEED)
2727 if(rrr.lt.brel) then
2728
2729 lb1=lb(k1)
2730 lb2=lb(k2)
2731 em1=e(k1)
2732 em2=e(k2)
2733 iblock = 10
2734 else
2735 iblock = 12
2736 if(rrr.lt.(brel+brsgm)) then
2737
2738
2739 em1=asa
2740 em2=0.138
2741
2742
2743 LB1 = 15 + int(3*RANART(NSEED))
2744 LB2 = 3 + int(3*RANART(NSEED))
2745 else
2746
2747 em1=ala
2748 em2=0.138
2749
2750 lb1=14
2751
2752 LB2 = 3 + int(3*RANART(NSEED))
2753
2754
2755
2756
2757
2758 endif
2759 endif
2760 lb(k1)=lb1
2761 lb(k2)=lb2
2762
2763
2764
2765
2766
2767
2768 pkmax=sqrt((srt**2-(em1+em2)**2)*(srt**2-(em1-em2)**2))
2769 & /2./srt
2770 pk=pkmax
2771
2772 css=1.-2.*RANART(NSEED)
2773 sss=sqrt(1.-css**2)
2774 fai=2*3.1415926*RANART(NSEED)
2775 p1(1)=pk*sss*cos(fai)
2776 p1(2)=pk*sss*sin(fai)
2777 p1(3)=pk*css
2778 do 1001 i=1,3
2779 p2(i)=-1.*p1(i)
2780 1001 continue
2781
2782
2783
2784
2785
2786
2787
2788 pxrota=p1(1)
2789 pyrota=p1(2)
2790 pzrota=p1(3)
2791
2792 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
2793 p1(1)=pxrota
2794 p1(2)=pyrota
2795 p1(3)=pzrota
2796
2797 pxrota=p2(1)
2798 pyrota=p2(2)
2799 pzrota=p2(3)
2800
2801 call rotate(pcx,pcy,pcz,pxrota,pyrota,pzrota)
2802 p2(1)=pxrota
2803 p2(2)=pyrota
2804 p2(3)=pzrota
2805
2806
2807
2808
2809 e1cm = sqrt(em1**2 + p1(1)**2 + p1(2)**2 + p1(3)**2)
2810 p1beta = p1(1)*betax + p1(2)*betay + p1(3)*betaz
2811 transf = gamma * ( gamma*p1beta / (gamma+1) + e1cm)
2812 pt1i1 = betax*transf + p1(1)
2813 pt2i1 = betay*transf + p1(2)
2814 pt3i1 = betaz*transf + p1(3)
2815 eti1 = em1
2816
2817
2818 e2cm = sqrt(em2**2 + p2(1)**2 + p2(2)**2 + p2(3)**2)
2819 p2beta = p2(1)*betax + p2(2)*betay + p2(3)*betaz
2820 transf = gamma * ( gamma*p2beta / (gamma+1) + e2cm)
2821 pt1i2 = betax*transf + p2(1)
2822 pt2i2 = betay*transf + p2(2)
2823 pt3i2 = betaz*transf + p2(3)
2824 eti2 = em2
2825
2826
2827
2828
2829
2830 p(1,k1)=pt1i1
2831 p(2,k1)=pt2i1
2832 p(3,k1)=pt3i1
2833 e(k1)=eti1
2834 p(1,k2)=pt1i2
2835 p(2,k2)=pt2i2
2836 p(3,k2)=pt3i2
2837 e(k2)=eti2
2838
2839
2840
2841 return
2842 end
2843
2844
2845
2846
2847
2848
2849
2850
2851 SUBROUTINE ARTAN1
2852 PARAMETER (MAXSTR=150001, MAXR=1)
2853
2854
2855
2856 PARAMETER (YMT1 = -1.0, YMT2 = 1.0)
2857
2858
2859
2860
2861 PARAMETER (BMT = 0.05, BY = 0.4)
2862 COMMON /RUN/ NUM
2863
2864 COMMON /ARERC1/MULTI1(MAXR)
2865
2866 COMMON /ARPRC1/ITYP1(MAXSTR, MAXR),
2867 & GX1(MAXSTR, MAXR), GY1(MAXSTR, MAXR), GZ1(MAXSTR, MAXR),
2868 & FT1(MAXSTR, MAXR),
2869 & PX1(MAXSTR, MAXR), PY1(MAXSTR, MAXR), PZ1(MAXSTR, MAXR),
2870 & EE1(MAXSTR, MAXR), XM1(MAXSTR, MAXR)
2871
2872
2873
2874 COMMON /ARANA1/
2875 & dy1ntb(50), dy1ntp(50), DY1HM(50),
2876 & DY1KP(50), DY1KM(50), DY1K0S(50),
2877 & DY1LA(50), DY1LB(50), DY1PHI(50),
2878 & dm1pip(50), dm1pim(50), DMT1PR(50),
2879 & DMT1PB(50), DMT1KP(50), dm1km(50),
2880 & dm1k0s(50), DMT1LA(50), DMT1LB(50),
2881 & dy1msn(50), DY1PIP(50), DY1PIM(50),
2882 & DY1PI0(50), DY1PR(50), DY1PB(50)
2883 & ,DY1NEG(50), DY1CH(50), DE1NEG(50), DE1CH(50)
2884
2885 SAVE
2886
2887
2888 DO 1002 J = 1, NUM
2889 DO 1001 I = 1, MULTI1(J)
2890 ITYP = ITYP1(I, J)
2891 PX = PX1(I, J)
2892 PY = PY1(I, J)
2893 PZ = PZ1(I, J)
2894 EE = EE1(I, J)
2895 XM = XM1(I, J)
2896
2897 if(xm.lt.0.01) goto 200
2898 ptot = sqrt(PX ** 2 + PY ** 2 + pz ** 2)
2899
2900
2901 if((PX**2+PY**2).gt.0.) then
2902 eta=asinh(PZ/sqrt(PX**2+PY**2))
2903 else
2904 eta = 1000000.0*sign(1.,PZ)
2905
2906
2907
2908 if(abs(pz).le.1e-3) eta=0.
2909 endif
2910
2911 XMT = SQRT(PX ** 2 + PY ** 2 + XM ** 2)
2912 DXMT = XMT - XM
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932 if(XMT.gt.0.) then
2933 Y=asinh(PZ/XMT)
2934 else
2935 PRINT *, ' IN ARTAN1 mt=0'
2936 Y = 1000000.0*sign(1.,PZ)
2937 endif
2938
2939
2940 IF (ABS(Y) .GE. 10.0) GOTO 100
2941
2942
2943
2944 IF (ABS(eta) .GE. 10.0) GOTO 100
2945 IY = 1 + int((Y+10.) / BY)
2946 Ieta = 1 + int((eta+10.) / BY)
2947
2948 IF (ITYP .LT. -1000) THEN
2949 dy1ntb(IY) = dy1ntb(IY) - 1.0
2950 END IF
2951 IF (ITYP .GT. 1000) THEN
2952 dy1ntb(IY) = dy1ntb(IY) + 1.0
2953 END IF
2954 IF (ITYP .EQ. -2212) THEN
2955 dy1ntp(IY) = dy1ntp(IY) - 1.0
2956 END IF
2957 IF (ITYP .EQ. 2212) THEN
2958 dy1ntp(IY) = dy1ntp(IY) + 1.0
2959 END IF
2960
2961
2962 IF (ITYP .EQ. -2112) THEN
2963 DY1HM(IY) = DY1HM(IY) + 1.0
2964 END IF
2965
2966 IF (LUCHGE(ITYP).ne.0) THEN
2967 DY1CH(IY) = DY1CH(IY) + 1.0
2968 DE1CH(Ieta) = DE1CH(Ieta) + 1.0
2969 IF (LUCHGE(ITYP).lt.0) THEN
2970 DY1NEG(IY) = DY1NEG(IY) + 1.0
2971 DE1NEG(Ieta) = DE1NEG(Ieta) + 1.0
2972 endif
2973 END IF
2974
2975
2976 IF ((ITYP .GE. 100 .AND. ITYP .LT. 1000) .OR.
2977 & (ITYP .GT. -1000 .AND. ITYP .LE. -100)) THEN
2978 dy1msn(IY) = dy1msn(IY) + 1.0
2979 END IF
2980 IF (ITYP .EQ. 211) THEN
2981 DY1PIP(IY) = DY1PIP(IY) + 1.0
2982 END IF
2983 IF (ITYP .EQ. -211) THEN
2984 DY1PIM(IY) = DY1PIM(IY) + 1.0
2985 END IF
2986 IF (ITYP .EQ. 111) THEN
2987 DY1PI0(IY) = DY1PI0(IY) + 1.0
2988 END IF
2989 IF (ITYP .EQ. 2212) THEN
2990 DY1PR(IY) = DY1PR(IY) + 1.0
2991 END IF
2992 IF (ITYP .EQ. -2212) THEN
2993 DY1PB(IY) = DY1PB(IY) + 1.0
2994 END IF
2995
2996 IF (ITYP .EQ. 321) THEN
2997 DY1KP(IY) = DY1KP(IY) + 1.0
2998 END IF
2999 IF (ITYP .EQ. -321) THEN
3000 DY1KM(IY) = DY1KM(IY) + 1.0
3001 END IF
3002
3003
3004 IF (ITYP .EQ. 130) THEN
3005 DY1K0S(IY) = DY1K0S(IY) + 1.0
3006 END IF
3007 IF (ITYP .EQ. 3122) THEN
3008 DY1LA(IY) = DY1LA(IY) + 1.0
3009 END IF
3010 IF (ITYP .EQ. -3122) THEN
3011 DY1LB(IY) = DY1LB(IY) + 1.0
3012 END IF
3013 IF (ITYP .EQ. 333) THEN
3014 DY1PHI(IY) = DY1PHI(IY) + 1.0
3015 END IF
3016
3017
3018 100 IF (Y .LT. YMT1 .OR. Y .GT. YMT2) GOTO 200
3019 IF (DXMT .GE. 50.0 * BMT .OR. DXMT .EQ. 0) GOTO 200
3020 IMT = 1 + int(DXMT / BMT)
3021 IF (ITYP .EQ. 211) THEN
3022 dm1pip(IMT) = dm1pip(IMT) + 1.0 / XMT
3023 END IF
3024 IF (ITYP .EQ. -211) THEN
3025 dm1pim(IMT) = dm1pim(IMT) +
3026 & 1.0 / XMT
3027 END IF
3028 IF (ITYP .EQ. 2212) THEN
3029 DMT1PR(IMT) = DMT1PR(IMT) + 1.0 / XMT
3030 END IF
3031 IF (ITYP .EQ. -2212) THEN
3032 DMT1PB(IMT) = DMT1PB(IMT) + 1.0 / XMT
3033 END IF
3034 IF (ITYP .EQ. 321) THEN
3035 DMT1KP(IMT) = DMT1KP(IMT) + 1.0 / XMT
3036 END IF
3037 IF (ITYP .EQ. -321) THEN
3038 dm1km(IMT) = dm1km(IMT) + 1.0 / XMT
3039 END IF
3040
3041
3042 IF (ITYP .EQ. 130) THEN
3043 dm1k0s(IMT) = dm1k0s(IMT) + 1.0 / XMT
3044 END IF
3045 IF (ITYP .EQ. 3122) THEN
3046 DMT1LA(IMT) = DMT1LA(IMT) + 1.0 / XMT
3047 END IF
3048 IF (ITYP .EQ. -3122) THEN
3049 DMT1LB(IMT) = DMT1LB(IMT) + 1.0 / XMT
3050 END IF
3051
3052 200 CONTINUE
3053 1001 CONTINUE
3054 1002 CONTINUE
3055
3056 RETURN
3057 END
3058
3059
3060
3061
3062
3063 SUBROUTINE ARTAN2
3064
3065 PARAMETER (MAXSTR=150001, MAXR=1)
3066
3067
3068
3069 PARAMETER (YMT1 = -1.0, YMT2 = 1.0)
3070
3071
3072
3073 PARAMETER (BMT = 0.05, BY = 0.4)
3074 COMMON /RUN/ NUM
3075
3076 COMMON /ARERC1/MULTI1(MAXR)
3077
3078 COMMON /ARPRC1/ITYP1(MAXSTR, MAXR),
3079 & GX1(MAXSTR, MAXR), GY1(MAXSTR, MAXR), GZ1(MAXSTR, MAXR),
3080 & FT1(MAXSTR, MAXR),
3081 & PX1(MAXSTR, MAXR), PY1(MAXSTR, MAXR), PZ1(MAXSTR, MAXR),
3082 & EE1(MAXSTR, MAXR), XM1(MAXSTR, MAXR)
3083
3084
3085
3086 COMMON /ARANA2/
3087 & dy2ntb(50), dy2ntp(50), DY2HM(50),
3088 & DY2KP(50), DY2KM(50), DY2K0S(50),
3089 & DY2LA(50), DY2LB(50), DY2PHI(50),
3090 & dm2pip(50), dm2pim(50), DMT2PR(50),
3091 & DMT2PB(50), DMT2KP(50), dm2km(50),
3092 & dm2k0s(50), DMT2LA(50), DMT2LB(50),
3093 & dy2msn(50), DY2PIP(50), DY2PIM(50),
3094 & DY2PI0(50), DY2PR(50), DY2PB(50)
3095 & ,DY2NEG(50), DY2CH(50), DE2NEG(50), DE2CH(50)
3096
3097
3098 SAVE
3099
3100 DO 1002 J = 1, NUM
3101 DO 1001 I = 1, MULTI1(J)
3102 ITYP = ITYP1(I, J)
3103 PX = PX1(I, J)
3104 PY = PY1(I, J)
3105 PZ = PZ1(I, J)
3106 EE = EE1(I, J)
3107 XM = XM1(I, J)
3108 XMT = SQRT(PX ** 2 + PY ** 2 + XM ** 2)
3109
3110 if(xm.lt.0.01) goto 200
3111 DXMT = XMT - XM
3112 ptot = sqrt(PX ** 2 + PY ** 2 + pz ** 2)
3113
3114
3115 if((PX**2+PY**2).gt.0.) then
3116 eta=asinh(PZ/sqrt(PX**2+PY**2))
3117 else
3118 eta = 1000000.0*sign(1.,PZ)
3119
3120 if(abs(pz).le.1e-3) eta=0.
3121 endif
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140 if(XMT.gt.0.) then
3141 Y=asinh(PZ/XMT)
3142 else
3143 PRINT *, ' IN ARTAN2 mt=0'
3144 Y = 1000000.0*sign(1.,PZ)
3145 endif
3146
3147
3148 IF (ABS(Y) .GE. 10.0) GOTO 100
3149
3150
3151 IF (ABS(eta) .GE. 10.0) GOTO 100
3152 IY = 1 + int((Y+10.) / BY)
3153 Ieta = 1 + int((eta+10.) / BY)
3154
3155 IF (ITYP .LT. -1000) THEN
3156 dy2ntb(IY) = dy2ntb(IY) - 1.0
3157 END IF
3158 IF (ITYP .GT. 1000) THEN
3159 dy2ntb(IY) = dy2ntb(IY) + 1.0
3160 END IF
3161 IF (ITYP .EQ. -2212) THEN
3162 dy2ntp(IY) = dy2ntp(IY) - 1.0
3163 END IF
3164 IF (ITYP .EQ. 2212) THEN
3165 dy2ntp(IY) = dy2ntp(IY) + 1.0
3166 END IF
3167 IF (ITYP .EQ. -2112) THEN
3168 DY2HM(IY) = DY2HM(IY) + 1.0
3169 END IF
3170
3171 IF (LUCHGE(ITYP).ne.0) THEN
3172 DY2CH(IY) = DY2CH(IY) + 1.0
3173 DE2CH(Ieta) = DE2CH(Ieta) + 1.0
3174 IF (LUCHGE(ITYP).lt.0) THEN
3175 DY2NEG(IY) = DY2NEG(IY) + 1.0
3176 DE2NEG(Ieta) = DE2NEG(Ieta) + 1.0
3177 endif
3178 END IF
3179
3180
3181 IF ((ITYP .GE. 100 .AND. ITYP .LT. 1000) .OR.
3182 & (ITYP .GT. -1000 .AND. ITYP .LE. -100)) THEN
3183 dy2msn(IY) = dy2msn(IY) + 1.0
3184 END IF
3185 IF (ITYP .EQ. 211) THEN
3186 DY2PIP(IY) = DY2PIP(IY) + 1.0
3187 END IF
3188 IF (ITYP .EQ. -211) THEN
3189 DY2PIM(IY) = DY2PIM(IY) + 1.0
3190 END IF
3191 IF (ITYP .EQ. 111) THEN
3192 DY2PI0(IY) = DY2PI0(IY) + 1.0
3193 END IF
3194 IF (ITYP .EQ. 2212) THEN
3195 DY2PR(IY) = DY2PR(IY) + 1.0
3196 END IF
3197 IF (ITYP .EQ. -2212) THEN
3198 DY2PB(IY) = DY2PB(IY) + 1.0
3199 END IF
3200
3201 IF (ITYP .EQ. 321) THEN
3202 DY2KP(IY) = DY2KP(IY) + 1.0
3203 END IF
3204 IF (ITYP .EQ. -321) THEN
3205 DY2KM(IY) = DY2KM(IY) + 1.0
3206 END IF
3207
3208
3209 IF (ITYP .EQ. 130) THEN
3210 DY2K0S(IY) = DY2K0S(IY) + 1.0
3211 END IF
3212 IF (ITYP .EQ. 3122) THEN
3213 DY2LA(IY) = DY2LA(IY) + 1.0
3214 END IF
3215 IF (ITYP .EQ. -3122) THEN
3216 DY2LB(IY) = DY2LB(IY) + 1.0
3217 END IF
3218 IF (ITYP .EQ. 333) THEN
3219 DY2PHI(IY) = DY2PHI(IY) + 1.0
3220 END IF
3221
3222
3223 100 IF (Y .LT. YMT1 .OR. Y .GT. YMT2) GOTO 200
3224 IF (DXMT .GE. 50.0 * BMT .OR. DXMT .EQ. 0) GOTO 200
3225 IMT = 1 + int(DXMT / BMT)
3226 IF (ITYP .EQ. 211) THEN
3227 dm2pip(IMT) = dm2pip(IMT) + 1.0 / XMT
3228 END IF
3229 IF (ITYP .EQ. -211) THEN
3230 dm2pim(IMT) = dm2pim(IMT) +
3231 & 1.0 / XMT
3232 END IF
3233 IF (ITYP .EQ. 2212) THEN
3234 DMT2PR(IMT) = DMT2PR(IMT) + 1.0 / XMT
3235 END IF
3236 IF (ITYP .EQ. -2212) THEN
3237 DMT2PB(IMT) = DMT2PB(IMT) + 1.0 / XMT
3238 END IF
3239 IF (ITYP .EQ. 321) THEN
3240 DMT2KP(IMT) = DMT2KP(IMT) + 1.0 / XMT
3241 END IF
3242 IF (ITYP .EQ. -321) THEN
3243 dm2km(IMT) = dm2km(IMT) + 1.0 / XMT
3244 END IF
3245
3246
3247 IF (ITYP .EQ. 130) THEN
3248 dm2k0s(IMT) = dm2k0s(IMT) + 1.0 / XMT
3249 END IF
3250 IF (ITYP .EQ. 3122) THEN
3251 DMT2LA(IMT) = DMT2LA(IMT) + 1.0 / XMT
3252 END IF
3253 IF (ITYP .EQ. -3122) THEN
3254 DMT2LB(IMT) = DMT2LB(IMT) + 1.0 / XMT
3255 END IF
3256
3257 200 CONTINUE
3258 1001 CONTINUE
3259 1002 CONTINUE
3260
3261 RETURN
3262 END
3263
3264
3265
3266
3267
3268 SUBROUTINE ARTOUT(NEVNT)
3269
3270 PARAMETER (MAXSTR=150001, MAXR=1)
3271
3272
3273
3274 PARAMETER (YMT1 = -1.0, YMT2 = 1.0)
3275
3276
3277
3278 PARAMETER (BMT = 0.05, BY = 0.4)
3279 COMMON /RUN/ NUM
3280
3281 COMMON /ARPRC1/ITYP1(MAXSTR, MAXR),
3282 & GX1(MAXSTR, MAXR), GY1(MAXSTR, MAXR), GZ1(MAXSTR, MAXR),
3283 & FT1(MAXSTR, MAXR),
3284 & PX1(MAXSTR, MAXR), PY1(MAXSTR, MAXR), PZ1(MAXSTR, MAXR),
3285 & EE1(MAXSTR, MAXR), XM1(MAXSTR, MAXR)
3286
3287
3288
3289 COMMON /ARANA1/
3290 & dy1ntb(50), dy1ntp(50), DY1HM(50),
3291 & DY1KP(50), DY1KM(50), DY1K0S(50),
3292 & DY1LA(50), DY1LB(50), DY1PHI(50),
3293 & dm1pip(50), dm1pim(50), DMT1PR(50),
3294 & DMT1PB(50), DMT1KP(50), dm1km(50),
3295 & dm1k0s(50), DMT1LA(50), DMT1LB(50),
3296 & dy1msn(50), DY1PIP(50), DY1PIM(50),
3297 & DY1PI0(50), DY1PR(50), DY1PB(50)
3298 & ,DY1NEG(50), DY1CH(50), DE1NEG(50), DE1CH(50)
3299
3300
3301
3302
3303 COMMON /ARANA2/
3304 & dy2ntb(50), dy2ntp(50), DY2HM(50),
3305 & DY2KP(50), DY2KM(50), DY2K0S(50),
3306 & DY2LA(50), DY2LB(50), DY2PHI(50),
3307 & dm2pip(50), dm2pim(50), DMT2PR(50),
3308 & DMT2PB(50), DMT2KP(50), dm2km(50),
3309 & dm2k0s(50), DMT2LA(50), DMT2LB(50),
3310 & dy2msn(50), DY2PIP(50), DY2PIM(50),
3311 & DY2PI0(50), DY2PR(50), DY2PB(50)
3312 & ,DY2NEG(50), DY2CH(50), DE2NEG(50), DE2CH(50)
3313
3314 SAVE
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351 SCALE1 = 1. / REAL(NEVNT * NUM) / BY
3352 SCALE2 = 1. / REAL(NEVNT * NUM) / BMT / (YMT2 - YMT1)
3353
3354 DO 1001 I = 1, 50
3355 ymid=-10.+BY * (I - 0.5)
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376 IF (dm1pip(I) .NE. 0.0) THEN
3377
3378 END IF
3379 IF (dm1pim(I) .NE. 0.0) THEN
3380
3381
3382 END IF
3383 IF (DMT1PR(I) .NE. 0.0) THEN
3384
3385 END IF
3386 IF (DMT1PB(I) .NE. 0.0) THEN
3387
3388 END IF
3389 IF (DMT1KP(I) .NE. 0.0) THEN
3390
3391 END IF
3392 IF (dm1km(I) .NE. 0.0) THEN
3393
3394
3395 END IF
3396 IF (dm1k0s(I) .NE. 0.0) THEN
3397
3398 END IF
3399 IF (DMT1LA(I) .NE. 0.0) THEN
3400
3401 END IF
3402 IF (DMT1LB(I) .NE. 0.0) THEN
3403
3404 END IF
3405 1001 CONTINUE
3406
3407 DO 1002 I = 30, 48
3408
3409 1002 CONTINUE
3410 DO 1003 I = 50, 58
3411
3412 1003 CONTINUE
3413
3414 DO 1004 I = 1, 50
3415 ymid=-10.+BY * (I - 0.5)
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436 IF (dm2pip(I) .NE. 0.0) THEN
3437
3438 END IF
3439 IF (dm2pim(I) .NE. 0.0) THEN
3440
3441
3442 END IF
3443 IF (DMT2PR(I) .NE. 0.0) THEN
3444
3445 END IF
3446 IF (DMT2PB(I) .NE. 0.0) THEN
3447
3448 END IF
3449 IF (DMT2KP(I) .NE. 0.0) THEN
3450
3451 END IF
3452 IF (dm2km(I) .NE. 0.0) THEN
3453
3454
3455 END IF
3456 IF (dm2k0s(I) .NE. 0.0) THEN
3457
3458 END IF
3459 IF (DMT2LA(I) .NE. 0.0) THEN
3460
3461 END IF
3462 IF (DMT2LB(I) .NE. 0.0) THEN
3463
3464 END IF
3465 1004 CONTINUE
3466
3467
3468 RETURN
3469 END
3470
3471
3472
3473
3474 SUBROUTINE HJANA1
3475
3476 PARAMETER (YMAX = 1.0, YMIN = -1.0)
3477 PARAMETER (DMT = 0.05, DY = 0.2)
3478 PARAMETER (DR = 0.2)
3479 PARAMETER (MAXPTN=400001,MAXSTR=150001)
3480 DIMENSION dyp1(50), DMYP1(200), DEYP1(50)
3481 DIMENSION dyg1(50), DMYG1(200), DEYG1(50)
3482 DIMENSION SNYP1(50), SMYP1(200), SEYP1(50)
3483 DIMENSION SNYG1(50), SMYG1(200), SEYG1(50)
3484 DIMENSION dnrpj1(50), dnrtg1(50), dnrin1(50),
3485 & dnrtt1(50)
3486 DIMENSION dyg1c(50), dmyg1c(50), deyg1c(50)
3487 DIMENSION snrpj1(50), snrtg1(50), snrin1(50),
3488 & snrtt1(50)
3489 DIMENSION snyg1c(50), smyg1c(50), seyg1c(50)
3490 DOUBLE PRECISION GX0, GY0, GZ0, FT0, PX0, PY0, PZ0, E0, XMASS0
3491
3492 COMMON /PARA1/ MUL
3493
3494 COMMON/HPARNT/HIPR1(100),IHPR2(50),HINT1(100),IHNT2(50)
3495
3496 COMMON/hjcrdn/YP(3,300),YT(3,300)
3497
3498 COMMON/HJJET1/NPJ(300),KFPJ(300,500),PJPX(300,500),
3499 & PJPY(300,500),PJPZ(300,500),PJPE(300,500),
3500 & PJPM(300,500),NTJ(300),KFTJ(300,500),
3501 & PJTX(300,500),PJTY(300,500),PJTZ(300,500),
3502 & PJTE(300,500),PJTM(300,500)
3503
3504 COMMON/HJJET2/NSG,NJSG(MAXSTR),IASG(MAXSTR,3),K1SG(MAXSTR,100),
3505 & K2SG(MAXSTR,100),PXSG(MAXSTR,100),PYSG(MAXSTR,100),
3506 & PZSG(MAXSTR,100),PESG(MAXSTR,100),PMSG(MAXSTR,100)
3507
3508 COMMON /prec1/GX0(MAXPTN),GY0(MAXPTN),GZ0(MAXPTN),FT0(MAXPTN),
3509 & PX0(MAXPTN), PY0(MAXPTN), PZ0(MAXPTN), E0(MAXPTN),
3510 & XMASS0(MAXPTN), ITYP0(MAXPTN)
3511
3512 COMMON /AREVT/ IAEVT, IARUN, MISS
3513
3514 COMMON /AROUT/ IOUT
3515
3516 SAVE
3517 DATA IW/0/
3518
3519 IF (isevt .EQ. IAEVT .AND. isrun .EQ. IARUN) THEN
3520 DO 1001 I = 1, 200
3521 DMYP1(I) = SMYP1(I)
3522 DMYG1(I) = SMYG1(I)
3523 1001 CONTINUE
3524
3525 DO 1002 I = 1, 50
3526 dyp1(I) = SNYP1(I)
3527 DEYP1(I) = SEYP1(I)
3528 dyg1(I) = SNYG1(I)
3529 DEYG1(I) = SEYG1(I)
3530 dnrpj1(I) = snrpj1(I)
3531 dnrtg1(I) = snrtg1(I)
3532 dnrin1(I) = snrin1(I)
3533 dnrtt1(I) = snrtt1(I)
3534 dyg1c(I) = snyg1c(I)
3535 dmyg1c(I) = smyg1c(I)
3536 deyg1c(I) = seyg1c(I)
3537 1002 CONTINUE
3538 nsubp = nsubpS
3539 nsubg = nsubgS
3540 NISG = NISGS
3541 ELSE
3542 DO 1003 I = 1, 200
3543 SMYP1(I) = DMYP1(I)
3544 SMYG1(I) = DMYG1(I)
3545 1003 CONTINUE
3546
3547 DO 1004 I = 1, 50
3548 SNYP1(I) = dyp1(I)
3549 SEYP1(I) = DEYP1(I)
3550 SNYG1(I) = dyg1(I)
3551 SEYG1(I) = DEYG1(I)
3552 snrpj1(I) = dnrpj1(I)
3553 snrtg1(I) = dnrtg1(I)
3554 snrin1(I) = dnrin1(I)
3555 snrtt1(I) = dnrtt1(I)
3556 snyg1c(I) = dyg1c(I)
3557 smyg1c(I) = dmyg1c(I)
3558 seyg1c(I) = deyg1c(I)
3559 1004 CONTINUE
3560 nsubpS = nsubp
3561 nsubgS = nsubg
3562 NISGS = NISG
3563 isevt = IAEVT
3564 isrun = IARUN
3565 IW = IW + 1
3566 END IF
3567
3568 DO 1006 I = 1, IHNT2(1)
3569 DO 1005 J = 1, NPJ(I)
3570 ITYP = KFPJ(I, J)
3571 PX = PJPX(I, J)
3572 PY = PJPY(I, J)
3573 PZ = PJPZ(I, J)
3574 PE = PJPE(I, J)
3575 PM = PJPM(I, J)
3576 XMT = SQRT(PX ** 2 + PY ** 2 + PM ** 2)
3577 DXMT = XMT - PM
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587 if(XMT.gt.0.) then
3588 RAP=asinh(PZ/XMT)
3589 else
3590 RAP = 1000000.0*sign(1.,PZ)
3591 endif
3592
3593 IY = 1 + int(ABS(RAP) / DY)
3594
3595
3596 IF (IY.lt.1 .or.IY .GT. 50) GOTO 100
3597 dyp1(IY) = dyp1(IY) + 1.0
3598 DEYP1(IY) = DEYP1(IY) + XMT
3599 IF (ITYP .EQ. 21) THEN
3600 dyg1(IY) = dyg1(IY) + 1.0
3601 DEYG1(IY) = DEYG1(IY) + XMT
3602 END IF
3603 100 CONTINUE
3604 IMT = 1 + int(DXMT / DMT)
3605 IF (RAP .GT. YMAX .OR. RAP .LE. YMIN) GOTO 200
3606 IF (IMT .GT. 200) GOTO 200
3607 DMYP1(IMT) = DMYP1(IMT) + 1.0 / XMT
3608 IF (ITYP .EQ. 21) THEN
3609 DMYG1(IMT) = DMYG1(IMT) + 1.0 / XMT
3610 END IF
3611 200 CONTINUE
3612 1005 CONTINUE
3613 1006 CONTINUE
3614
3615 DO 1008 I = 1, IHNT2(3)
3616 DO 1007 J = 1, NTJ(I)
3617 ITYP = KFTJ(I, J)
3618 PX = PJTX(I, J)
3619 PY = PJTY(I, J)
3620 PZ = PJTZ(I, J)
3621 PE = PJTE(I, J)
3622 PM = PJTM(I, J)
3623 XMT = SQRT(PX ** 2 + PY ** 2 + PM ** 2)
3624 DXMT = XMT - PM
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634 if(XMT.gt.0.) then
3635 RAP=asinh(PZ/XMT)
3636 else
3637 PRINT *, ' IN HJANA1 mt=0'
3638 RAP = 1000000.0*sign(1.,PZ)
3639 endif
3640
3641 IY = 1 + int(ABS(RAP) / DY)
3642
3643
3644 IF (IY.lt.1 .or.IY .GT. 50) GOTO 300
3645 dyp1(IY) = dyp1(IY) + 1.0
3646 DEYP1(IY) = DEYP1(IY) + XMT
3647 IF (ITYP .EQ. 21) THEN
3648 dyg1(IY) = dyg1(IY) + 1.0
3649 DEYG1(IY) = DEYG1(IY) + XMT
3650 END IF
3651 300 CONTINUE
3652 IF (RAP .GT. YMAX .OR. RAP .LE. YMIN) GOTO 400
3653 IMT = 1 + int(DXMT / DMT)
3654 IF (IMT .GT. 200) GOTO 400
3655 DMYP1(IMT) = DMYP1(IMT) + 1.0 / XMT
3656 IF (ITYP .EQ. 21) THEN
3657 DMYG1(IMT) = DMYG1(IMT) + 1.0 / XMT
3658 END IF
3659 400 CONTINUE
3660 1007 CONTINUE
3661 1008 CONTINUE
3662
3663 DO 1010 I = 1, NSG
3664 DO 1009 J = 1, NJSG(I)
3665 ITYP = K2SG(I, J)
3666 PX = PXSG(I, J)
3667 PY = PYSG(I, J)
3668 PZ = PZSG(I, J)
3669 PE = PESG(I, J)
3670 PM = PMSG(I, J)
3671 XMT = SQRT(PX ** 2 + PY ** 2 + PM ** 2)
3672 DXMT = XMT - PM
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682 if(XMT.gt.0.) then
3683 RAP=asinh(PZ/XMT)
3684 else
3685 PRINT *, ' IN HJANA1 mt=0'
3686 RAP = 1000000.0*sign(1.,PZ)
3687 endif
3688
3689 IY = 1 + int(ABS(RAP) / DY)
3690
3691
3692 IF (IY.lt.1 .or.IY .GT. 50) GOTO 500
3693 dyp1(IY) = dyp1(IY) + 1.0
3694 DEYP1(IY) = DEYP1(IY) + XMT
3695 IF (ITYP .EQ. 21) THEN
3696 dyg1(IY) = dyg1(IY) + 1.0
3697 DEYG1(IY) = DEYG1(IY) + XMT
3698 END IF
3699 500 CONTINUE
3700 IF (RAP .GT. YMAX .OR. RAP .LE. YMIN) GOTO 600
3701 IMT = 1 + int(DXMT / DMT)
3702 IF (IMT .GT. 200) GOTO 600
3703 DMYP1(IMT) = DMYP1(IMT) + 1.0 / XMT
3704 IF (ITYP .EQ. 21) THEN
3705 DMYG1(IMT) = DMYG1(IMT) + 1.0 / XMT
3706 END IF
3707 600 CONTINUE
3708 1009 CONTINUE
3709 1010 CONTINUE
3710
3711 DO 1011 I = 1, IHNT2(1)
3712 YR = SQRT(YP(1, I) ** 2 + YP(2, I) ** 2)
3713 IR = 1 + int(YR / DR)
3714
3715
3716 IF (IR .GT. 50 .or. IR .LT. 1) GOTO 601
3717 dnrpj1(IR) = dnrpj1(IR) + 1.0
3718 dnrtt1(IR) = dnrtt1(IR) + 1.0
3719 601 CONTINUE
3720 1011 CONTINUE
3721
3722 DO 1012 I = 1, IHNT2(3)
3723 YR = SQRT(YT(1, I) ** 2 + YT(2, I) ** 2)
3724 IR = 1 + int(YR / DR)
3725 IF (IR .GT. 50 .or. IR .LT. 1) GOTO 602
3726 dnrtg1(IR) = dnrtg1(IR) + 1.0
3727 dnrtt1(IR) = dnrtt1(IR) + 1.0
3728 602 CONTINUE
3729 1012 CONTINUE
3730
3731 DO 1013 I = 1, NSG
3732 Y1 = 0.5 * (YP(1, IASG(I, 1)) + YT(1, IASG(I, 2)))
3733 Y2 = 0.5 * (YP(2, IASG(I, 1)) + YT(2, IASG(I, 2)))
3734 YR = SQRT(Y1 ** 2 + Y2 ** 2)
3735 IR = 1 + int(YR / DR)
3736 IF (IR .GT. 50 .or. IR .LT. 1) GOTO 603
3737 dnrin1(IR) = dnrin1(IR) + 1.0
3738 dnrtt1(IR) = dnrtt1(IR) + 1.0
3739 603 CONTINUE
3740 1013 CONTINUE
3741
3742 DO 1014 I = 1, MUL
3743 ITYP = ITYP0(I)
3744 PX = sngl(PX0(I))
3745 PY = sngl(PY0(I))
3746 PZ = sngl(PZ0(I))
3747 PE = sngl(E0(I))
3748 PM = sngl(XMASS0(I))
3749 XMT = SQRT(PX ** 2 + PY ** 2 + PM ** 2)
3750 DXMT = XMT - PM
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760 if(XMT.gt.0.) then
3761 RAP=asinh(PZ/XMT)
3762 else
3763 PRINT *, ' IN HJANA1 mt=0'
3764 RAP = 1000000.0*sign(1.,PZ)
3765 endif
3766
3767 IY = 1 + int(ABS(RAP) / DY)
3768
3769
3770 IF (IY.lt.1 .or.IY .GT. 50) GOTO 700
3771 dyg1c(IY) = dyg1c(IY) + 1.0
3772 deyg1c(IY) = deyg1c(IY) + XMT
3773 700 CONTINUE
3774 IF (RAP .GT. YMAX .OR. RAP .LE. YMIN) GOTO 800
3775 IMT = 1 + int(DXMT / DMT)
3776 IF (IMT .GT. 50) GOTO 800
3777 dmyg1c(IMT) = dmyg1c(IMT) + 1.0 / XMT
3778 800 CONTINUE
3779 1014 CONTINUE
3780
3781 DO 1016 I = 1, IHNT2(1)
3782 DO 1015 J = 1, NPJ(I)
3783 nsubp = nsubp + 1
3784 IF (KFPJ(I, J) .EQ. 21) nsubg = nsubg + 1
3785 1015 CONTINUE
3786 1016 CONTINUE
3787
3788 DO 1018 I = 1, IHNT2(3)
3789 DO 1017 J = 1, NTJ(I)
3790 nsubp = nsubp + 1
3791 IF (KFTJ(I, J) .EQ. 21) nsubg = nsubg + 1
3792 1017 CONTINUE
3793 1018 CONTINUE
3794
3795 DO 1020 I = 1, NSG
3796 DO 1019 J = 1, NJSG(I)
3797 nsubp = nsubp + 1
3798 IF (K2SG(I, J) .EQ. 21) nsubg = nsubg + 1
3799 1019 CONTINUE
3800 1020 CONTINUE
3801 NISG = NISG + NSG
3802 IF (IOUT .EQ. 1) THEN
3803
3804
3805
3806
3807
3808
3809
3810 PRINT *, ' in HJANA1 '
3811 PRINT *, ' total number of partons = ', nsubp / IW
3812 PRINT *, ' total number of gluons = ', nsubg / IW
3813
3814
3815 PRINT *, ' number of independent strings = ', NISG / IW
3816
3817 END IF
3818
3819 RETURN
3820 END
3821
3822
3823
3824
3825
3826
3827 SUBROUTINE HJAN1A
3828 PARAMETER (MAXPTN=400001)
3829 PARAMETER (DGX = 0.2, DGY = 0.2, DT = 0.2)
3830 DIMENSION dgxg1a(50), dgyg1a(50), dtg1a(50)
3831 DIMENSION sgxg1a(50), sgyg1a(50), stg1a(50)
3832 DOUBLE PRECISION GX5, GY5, GZ5, FT5, PX5, PY5, PZ5, E5, XMASS5
3833 COMMON /PARA1/ MUL
3834
3835 COMMON /prec2/GX5(MAXPTN),GY5(MAXPTN),GZ5(MAXPTN),FT5(MAXPTN),
3836 & PX5(MAXPTN), PY5(MAXPTN), PZ5(MAXPTN), E5(MAXPTN),
3837 & XMASS5(MAXPTN), ITYP5(MAXPTN)
3838
3839 COMMON /AREVT/ IAEVT, IARUN, MISS
3840
3841 COMMON /AROUT/ IOUT
3842
3843 SAVE
3844 DATA IW/0/
3845
3846 IF (isevt .EQ. IAEVT .AND. isrun .EQ. IARUN) THEN
3847 DO 1001 I = 1, 50
3848 dgxg1a(I) = sgxg1a(I)
3849 dgyg1a(I) = sgyg1a(I)
3850 dtg1a(I) = stg1a(I)
3851 1001 CONTINUE
3852 ELSE
3853 DO 1002 I = 1, 50
3854 sgxg1a(I) = dgxg1a(I)
3855 sgyg1a(I) = dgyg1a(I)
3856 stg1a(I) = dtg1a(I)
3857 1002 CONTINUE
3858 isevt = IAEVT
3859 isrun = IARUN
3860 IW = IW + 1
3861 END IF
3862
3863 DO 1003 I = 1, MUL
3864 IGX = 1 + int(sngl(ABS(GX5(I))) / DGX)
3865
3866
3867 IF (IGX .GT. 50 .or. IGX .LT. 1) GOTO 100
3868 dgxg1a(IGX) = dgxg1a(IGX) + 1.0
3869 100 CONTINUE
3870 IGY = 1 + int(sngl(ABS(GY5(I))) / DGY)
3871 IF (IGY .GT. 50 .or. IGY .LT. 1) GOTO 200
3872 dgyg1a(IGY) = dgyg1a(IGY) + 1.0
3873 200 CONTINUE
3874 IT = 1 + int(sngl(SQRT(FT5(I) ** 2 - GZ5(I) ** 2)) / DT)
3875 IF (IT .GT. 50 .or. IT .LT. 1) GOTO 300
3876 dtg1a(IT) = dtg1a(IT) + 1.0
3877 300 CONTINUE
3878 1003 CONTINUE
3879 CALL HJAN1B
3880
3881 RETURN
3882 END
3883
3884
3885
3886
3887
3888 SUBROUTINE HJAN1B
3889 PARAMETER (MAXPTN=400001,MAXSTR=150001)
3890 PARAMETER (DR = 0.2, DT = 0.2)
3891 DIMENSION DNRG1B(50), dtg1b(50)
3892 DIMENSION SNRG1B(50), stg1b(50)
3893 DOUBLE PRECISION GX5, GY5, GZ5, FT5, PX5, PY5, PZ5, E5, XMASS5
3894 COMMON /PARA1/ MUL
3895
3896 COMMON /prec2/GX5(MAXPTN),GY5(MAXPTN),GZ5(MAXPTN),FT5(MAXPTN),
3897 & PX5(MAXPTN), PY5(MAXPTN), PZ5(MAXPTN), E5(MAXPTN),
3898 & XMASS5(MAXPTN), ITYP5(MAXPTN)
3899
3900 COMMON /ilist8/ LSTRG1(MAXPTN), LPART1(MAXPTN)
3901
3902 COMMON /SREC1/ NSP, NST, NSI
3903
3904 COMMON/hjcrdn/YP(3,300),YT(3,300)
3905
3906 COMMON/HJJET2/NSG,NJSG(MAXSTR),IASG(MAXSTR,3),K1SG(MAXSTR,100),
3907 & K2SG(MAXSTR,100),PXSG(MAXSTR,100),PYSG(MAXSTR,100),
3908 & PZSG(MAXSTR,100),PESG(MAXSTR,100),PMSG(MAXSTR,100)
3909
3910 COMMON /AREVT/ IAEVT, IARUN, MISS
3911
3912 COMMON /AROUT/ IOUT
3913
3914 SAVE
3915 DATA IW/0/
3916
3917 IF (isevt .EQ. IAEVT .AND. isrun .EQ. IARUN) THEN
3918 DO 1001 I = 1, 50
3919 DNRG1B(I) = SNRG1B(I)
3920 dtg1b(I) = stg1b(I)
3921 1001 CONTINUE
3922 ELSE
3923 DO 1002 I = 1, 50
3924 SNRG1B(I) = DNRG1B(I)
3925 stg1b(I) = dtg1b(I)
3926 1002 CONTINUE
3927 isevt = IAEVT
3928 isrun = IARUN
3929 IW = IW + 1
3930 END IF
3931
3932 DO 1003 I = 1, MUL
3933 J = LSTRG1(I)
3934
3935 IF (J .LE. NSP) THEN
3936 K = J
3937 GX0 = YP(1, J)
3938 GY0 = YP(2, J)
3939 ELSE IF (J .LE. NSP + NST) THEN
3940 K = J - NSP
3941 GX0 = YT(1, K)
3942 GY0 = YT(2, K)
3943 ELSE
3944 K = J - NSP - NST
3945 GX0 = 0.5 * (YP(1, IASG(K, 1)) + YT(1, IASG(K, 2)))
3946 GY0 = 0.5 * (YP(2, IASG(K, 1)) + YT(2, IASG(K, 2)))
3947 END IF
3948 R0 = SQRT((sngl(GX5(I)) - GX0)**2 + (sngl(GY5(I)) - GY0)**2)
3949 IR = 1 + int(R0 / DR)
3950 IF (IR .GT. 50 .or. IR .LT. 1) GOTO 100
3951 DNRG1B(IR) = DNRG1B(IR) + 1.0
3952 100 CONTINUE
3953 TAU7 = SQRT(sngl(FT5(I) ** 2 - GZ5(I) ** 2))
3954 IT = 1 + int(TAU7 / DT)
3955 IF (IT .GT. 50 .or. IT .LT. 1) GOTO 200
3956 dtg1b(IT) = dtg1b(IT) + 1.0
3957 200 CONTINUE
3958 1003 CONTINUE
3959
3960 RETURN
3961 END
3962
3963
3964
3965
3966 SUBROUTINE HJANA2
3967
3968 PARAMETER (YMAX = 1.0, YMIN = -1.0)
3969 PARAMETER (DMT = 0.05, DY = 0.2)
3970 PARAMETER (DR = 0.2, DT = 0.2)
3971 PARAMETER (MAXPTN=400001)
3972 PARAMETER (MAXSTR=150001)
3973 DOUBLE PRECISION PXSGS,PYSGS,PZSGS,PESGS,PMSGS,
3974 1 GXSGS,GYSGS,GZSGS,FTSGS
3975 DIMENSION dyp2(50), DMYP2(200), DEYP2(50)
3976 DIMENSION dyg2(50), DMYG2(200), DEYG2(50)
3977 DIMENSION SNYP2(50), SMYP2(200), SEYP2(50)
3978 DIMENSION SNYG2(50), SMYG2(200), SEYG2(50)
3979 DIMENSION dnrpj2(50), dnrtg2(50), dnrin2(50),
3980 & dnrtt2(50)
3981 DIMENSION dtpj2(50), dttg2(50), dtin2(50),
3982 & dttot2(50)
3983 DIMENSION dyg2c(50), dmyg2c(50), deyg2c(50)
3984 DIMENSION snrpj2(50), snrtg2(50), snrin2(50),
3985 & snrtt2(50)
3986 DIMENSION stpj2(50), sttg2(50), stin2(50),
3987 & sttot2(50)
3988 DIMENSION snyg2c(50), smyg2c(50), seyg2c(50)
3989 DOUBLE PRECISION ATAUI, ZT1, ZT2, ZT3
3990 DOUBLE PRECISION GX5, GY5, GZ5, FT5, PX5, PY5, PZ5, E5, XMASS5
3991 COMMON /PARA1/ MUL
3992
3993 COMMON/HPARNT/HIPR1(100),IHPR2(50),HINT1(100),IHNT2(50)
3994
3995 COMMON /SREC2/ATAUI(MAXSTR),ZT1(MAXSTR),ZT2(MAXSTR),ZT3(MAXSTR)
3996
3997 COMMON/HJJET1/NPJ(300),KFPJ(300,500),PJPX(300,500),
3998 & PJPY(300,500),PJPZ(300,500),PJPE(300,500),
3999 & PJPM(300,500),NTJ(300),KFTJ(300,500),
4000 & PJTX(300,500),PJTY(300,500),PJTZ(300,500),
4001 & PJTE(300,500),PJTM(300,500)
4002
4003 COMMON/HJJET2/NSG,NJSG(MAXSTR),IASG(MAXSTR,3),K1SG(MAXSTR,100),
4004 & K2SG(MAXSTR,100),PXSG(MAXSTR,100),PYSG(MAXSTR,100),
4005 & PZSG(MAXSTR,100),PESG(MAXSTR,100),PMSG(MAXSTR,100)
4006
4007 COMMON /prec2/GX5(MAXPTN),GY5(MAXPTN),GZ5(MAXPTN),FT5(MAXPTN),
4008 & PX5(MAXPTN), PY5(MAXPTN), PZ5(MAXPTN), E5(MAXPTN),
4009 & XMASS5(MAXPTN), ITYP5(MAXPTN)
4010
4011 COMMON /AREVT/ IAEVT, IARUN, MISS
4012
4013 COMMON /AROUT/ IOUT
4014
4015 common/anim/nevent,isoft,isflag,izpc
4016
4017 COMMON/SOFT/PXSGS(MAXSTR,3),PYSGS(MAXSTR,3),PZSGS(MAXSTR,3),
4018 & PESGS(MAXSTR,3),PMSGS(MAXSTR,3),GXSGS(MAXSTR,3),
4019 & GYSGS(MAXSTR,3),GZSGS(MAXSTR,3),FTSGS(MAXSTR,3),
4020 & K1SGS(MAXSTR,3),K2SGS(MAXSTR,3),NJSGS(MAXSTR)
4021
4022 SAVE
4023 DATA IW/0/
4024
4025 IF (isevt .EQ. IAEVT .AND. isrun .EQ. IARUN) THEN
4026 DO 1001 I = 1, 200
4027 DMYP2(I) = SMYP2(I)
4028 DMYG2(I) = SMYG2(I)
4029 1001 CONTINUE
4030
4031 DO 1002 I = 1, 50
4032 dyp2(I) = SNYP2(I)
4033 DEYP2(I) = SEYP2(I)
4034 dyg2(I) = SNYG2(I)
4035 DEYG2(I) = SEYG2(I)
4036 dnrpj2(I) = snrpj2(I)
4037 dnrtg2(I) = snrtg2(I)
4038 dnrin2(I) = snrin2(I)
4039 dnrtt2(I) = snrtt2(I)
4040 dtpj2(I) = stpj2(I)
4041 dttg2(I) = sttg2(I)
4042 dtin2(I) = stin2(I)
4043 dttot2(I) = sttot2(I)
4044 dyg2c(I) = snyg2c(I)
4045 dmyg2c(I) = smyg2c(I)
4046 deyg2c(I) = seyg2c(I)
4047 1002 CONTINUE
4048 nsubp = nsubpS
4049 nsubg = nsubgS
4050 NISG = NISGS
4051 ELSE
4052 DO 1003 I = 1, 200
4053 SMYP2(I) = DMYP2(I)
4054 SMYG2(I) = DMYG2(I)
4055 1003 CONTINUE
4056
4057 DO 1004 I = 1, 50
4058 SNYP2(I) = dyp2(I)
4059 SEYP2(I) = DEYP2(I)
4060 SNYG2(I) = dyg2(I)
4061 SEYG2(I) = DEYG2(I)
4062 snrpj2(I) = dnrpj2(I)
4063 snrtg2(I) = dnrtg2(I)
4064 snrin2(I) = dnrin2(I)
4065 snrtt2(I) = dnrtt2(I)
4066 stpj2(I) = dtpj2(I)
4067 sttg2(I) = dttg2(I)
4068 stin2(I) = dtin2(I)
4069 sttot2(I) = dttot2(I)
4070 snyg2c(I) = dyg2c(I)
4071 smyg2c(I) = dmyg2c(I)
4072 seyg2c(I) = deyg2c(I)
4073 1004 CONTINUE
4074 nsubpS = nsubp
4075 nsubgS = nsubg
4076 NISGS = NISG
4077 isevt = IAEVT
4078 isrun = IARUN
4079 IW = IW + 1
4080 END IF
4081
4082
4083 if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) goto 510
4084
4085
4086 DO 1006 I = 1, IHNT2(1)
4087 DO 1005 J = 1, NPJ(I)
4088 ITYP = KFPJ(I, J)
4089 PX = PJPX(I, J)
4090 PY = PJPY(I, J)
4091 PZ = PJPZ(I, J)
4092 PE = PJPE(I, J)
4093 PM = PJPM(I, J)
4094 XMT = SQRT(PX ** 2 + PY ** 2 + PM ** 2)
4095 DXMT = XMT - PM
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108 if(XMT.gt.0.) then
4109 RAP=asinh(PZ/XMT)
4110 else
4111 PRINT *, ' IN HJANA2 mt=0'
4112 RAP = 1000000.0*sign(1.,PZ)
4113 endif
4114
4115 IY = 1 + int(ABS(RAP) / DY)
4116
4117
4118 IF (IY.lt.1 .or.IY .GT. 50) GOTO 100
4119 dyp2(IY) = dyp2(IY) + 1.0
4120 DEYP2(IY) = DEYP2(IY) + XMT
4121 IF (ITYP .EQ. 21) THEN
4122 dyg2(IY) = dyg2(IY) + 1.0
4123 DEYG2(IY) = DEYG2(IY) + XMT
4124 END IF
4125 100 CONTINUE
4126 IF (RAP .GT. YMAX .OR. RAP .LE. YMIN) GOTO 200
4127 IMT = 1 + int(DXMT / DMT)
4128 IF (IMT .GT. 200) GOTO 200
4129 DMYP2(IMT) = DMYP2(IMT) + 1.0 / XMT
4130 IF (ITYP .EQ. 21) THEN
4131 DMYG2(IMT) = DMYG2(IMT) + 1.0 / XMT
4132 END IF
4133 200 CONTINUE
4134 1005 CONTINUE
4135 1006 CONTINUE
4136
4137 DO 1008 I = 1, IHNT2(3)
4138 DO 1007 J = 1, NTJ(I)
4139 ITYP = KFTJ(I, J)
4140 PX = PJTX(I, J)
4141 PY = PJTY(I, J)
4142 PZ = PJTZ(I, J)
4143 PE = PJTE(I, J)
4144 PM = PJTM(I, J)
4145 XMT = SQRT(PX ** 2 + PY ** 2 + PM ** 2)
4146 DXMT = XMT - PM
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159 if(XMT.gt.0.) then
4160 RAP=asinh(PZ/XMT)
4161 else
4162 PRINT *, ' IN HJANA2 mt=0'
4163 RAP = 1000000.0*sign(1.,PZ)
4164 endif
4165
4166 IY = 1 + int(ABS(RAP) / DY)
4167
4168
4169 IF (IY.lt.1 .or.IY .GT. 50) GOTO 300
4170 dyp2(IY) = dyp2(IY) + 1.0
4171 DEYP2(IY) = DEYP2(IY) + XMT
4172 IF (ITYP .EQ. 21) THEN
4173 dyg2(IY) = dyg2(IY) + 1.0
4174 DEYG2(IY) = DEYG2(IY) + XMT
4175 END IF
4176 300 CONTINUE
4177 IF (RAP .GT. YMAX .OR. RAP .LE. YMIN) GOTO 400
4178 IMT = 1 + int(DXMT / DMT)
4179 IF (IMT .GT. 200) GOTO 400
4180 DMYP2(IMT) = DMYP2(IMT) + 1.0 / XMT
4181 IF (ITYP .EQ. 21) THEN
4182 DMYG2(IMT) = DMYG2(IMT) + 1.0 / XMT
4183 END IF
4184 400 CONTINUE
4185 1007 CONTINUE
4186 1008 CONTINUE
4187
4188
4189 510 continue
4190
4191 DO 1010 I = 1, NSG
4192
4193
4194 NJ=NJSG(I)
4195 if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) NJ=NJSGS(I)
4196 DO 1009 J = 1, NJ
4197
4198
4199 ITYP = K2SG(I, J)
4200 PX = PXSG(I, J)
4201 PY = PYSG(I, J)
4202 PZ = PZSG(I, J)
4203 PE = PESG(I, J)
4204 PM = PMSG(I, J)
4205
4206 if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) then
4207 ITYP = K2SGS(I, J)
4208 PX = sngl(PXSGS(I, J))
4209 PY = sngl(PYSGS(I, J))
4210 PZ = sngl(PZSGS(I, J))
4211 PE = sngl(PESGS(I, J))
4212 PM = sngl(PMSGS(I, J))
4213 endif
4214
4215
4216
4217 XMT = SQRT(PX ** 2 + PY ** 2 + PM ** 2)
4218 DXMT = XMT - PM
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230 if(XMT.gt.0.) then
4231 RAP=asinh(PZ/XMT)
4232 else
4233 PRINT *, ' IN HJANA2 mt=0'
4234 RAP = 1000000.0*sign(1.,PZ)
4235 endif
4236
4237 IY = 1 + int(ABS(RAP) / DY)
4238
4239
4240 IF (IY.lt.1 .or.IY .GT. 50) GOTO 500
4241 dyp2(IY) = dyp2(IY) + 1.0
4242 DEYP2(IY) = DEYP2(IY) + XMT
4243 IF (ITYP .EQ. 21) THEN
4244 dyg2(IY) = dyg2(IY) + 1.0
4245 DEYG2(IY) = DEYG2(IY) + XMT
4246 END IF
4247 500 CONTINUE
4248 IF (RAP .GT. YMAX .OR. RAP .LE. YMIN) GOTO 600
4249 IMT = 1 + int(DXMT / DMT)
4250 IF (IMT .GT. 200) GOTO 600
4251 DMYP2(IMT) = DMYP2(IMT) + 1.0 / XMT
4252 IF (ITYP .EQ. 21) THEN
4253 DMYG2(IMT) = DMYG2(IMT) + 1.0 / XMT
4254 END IF
4255 600 CONTINUE
4256 1009 CONTINUE
4257 1010 CONTINUE
4258
4259
4260 if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) goto 520
4261
4262 DO 1011 I = 1, IHNT2(1)
4263 J = I
4264 YR = SQRT(sngl(ZT1(J) ** 2 + ZT2(J) ** 2))
4265 IR = 1 + int(YR / DR)
4266 IF (IR .GT. 50 .or. IR .LT. 1) GOTO 601
4267 dnrpj2(IR) = dnrpj2(IR) + 1.0
4268 dnrtt2(IR) = dnrtt2(IR) + 1.0
4269 601 CONTINUE
4270 IT = 1 + int(sngl(ATAUI(J)) / DT)
4271 IF (IT .GT. 50 .or. IT .LT. 1) GOTO 602
4272 dtpj2(IT) = dtpj2(IT) + 1.0
4273 dttot2(IT) = dttot2(IT) + 1.0
4274 602 CONTINUE
4275 1011 CONTINUE
4276
4277 DO 1012 I = 1, IHNT2(3)
4278 J = I + IHNT2(1)
4279 YR = SQRT(sngl(ZT1(J) ** 2 + ZT2(J) ** 2))
4280 IR = 1 + int(YR / DR)
4281 IF (IR .GT. 50 .or. IR .LT. 1) GOTO 603
4282 dnrtg2(IR) = dnrtg2(IR) + 1.0
4283 dnrtt2(IR) = dnrtt2(IR) + 1.0
4284 603 CONTINUE
4285 IT = 1 + int(sngl(ATAUI(J)) / DT)
4286 IF (IT .GT. 50 .or. IT .LT. 1) GOTO 604
4287 dttg2(IT) = dttg2(IT) + 1.0
4288 dttot2(IT) = dttot2(IT) + 1.0
4289 604 CONTINUE
4290 1012 CONTINUE
4291
4292
4293 520 continue
4294
4295 DO 1013 I = 1, NSG
4296 J = I + IHNT2(1) + IHNT2(3)
4297
4298 if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) J = I
4299
4300 YR = SQRT(sngl(ZT1(J) ** 2 + ZT2(J) ** 2))
4301 IR = 1 + int(YR / DR)
4302 IF (IR .GT. 50 .or. IR .LT. 1) GOTO 605
4303 dnrin2(IR) = dnrin2(IR) + 1.0
4304 dnrtt2(IR) = dnrtt2(IR) + 1.0
4305 605 CONTINUE
4306 IT = 1 + int(sngl(ATAUI(J)) / DT)
4307 IF (IT .GT. 50 .or. IT .LT. 1) GOTO 606
4308 dtin2(IT) = dtin2(IT) + 1.0
4309 dttot2(IT) = dttot2(IT) + 1.0
4310 606 CONTINUE
4311 1013 CONTINUE
4312
4313 DO 1014 I = 1, MUL
4314 ITYP = ITYP5(I)
4315 PX = sngl(PX5(I))
4316 PY = sngl(PY5(I))
4317 PZ = sngl(PZ5(I))
4318 PE = sngl(E5(I))
4319 PM = sngl(XMASS5(I))
4320
4321 XMT = SQRT(PX ** 2 + PY ** 2 + PM ** 2)
4322 DXMT = XMT - PM
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334 if(XMT.gt.0.) then
4335 RAP=asinh(PZ/XMT)
4336 else
4337 PRINT *, ' IN HJANA2 mt=0'
4338 RAP = 1000000.0*sign(1.,PZ)
4339 endif
4340
4341 IY = 1 + int(ABS(RAP) / DY)
4342
4343
4344 IF (IY.lt.1 .or.IY .GT. 50) GOTO 700
4345 dyg2c(IY) = dyg2c(IY) + 1.0
4346 deyg2c(IY) = deyg2c(IY) + XMT
4347 700 CONTINUE
4348 IF (RAP .GT. YMAX .OR. RAP .LE. YMIN) GOTO 800
4349 IMT = 1 + int(DXMT / DMT)
4350 IF (IMT .GT. 50) GOTO 800
4351 dmyg2c(IMT) = dmyg2c(IMT) + 1.0 / XMT
4352 800 CONTINUE
4353 1014 CONTINUE
4354
4355
4356 if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) goto 530
4357
4358
4359 DO 1016 I = 1, IHNT2(1)
4360 DO 1015 J = 1, NPJ(I)
4361 nsubp = nsubp + 1
4362 IF (KFPJ(I, J) .EQ. 21) nsubg = nsubg + 1
4363 1015 CONTINUE
4364 1016 CONTINUE
4365
4366 DO 1018 I = 1, IHNT2(3)
4367 DO 1017 J = 1, NTJ(I)
4368 nsubp = nsubp + 1
4369 IF (KFTJ(I, J) .EQ. 21) nsubg = nsubg + 1
4370 1017 CONTINUE
4371 1018 CONTINUE
4372
4373
4374 530 continue
4375
4376 DO 1020 I = 1, NSG
4377
4378
4379 NJ=NJSG(I)
4380 if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) NJ=NJSGS(I)
4381 DO 1019 J = 1, NJ
4382
4383
4384 nsubp = nsubp + 1
4385
4386
4387
4388 if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) then
4389 IF(K2SGS(I, J) .EQ. 21) nsubg = nsubg + 1
4390 else
4391 IF (K2SG(I, J) .EQ. 21) nsubg = nsubg + 1
4392 endif
4393
4394 1019 CONTINUE
4395 1020 CONTINUE
4396
4397 NISG = NISG + NSG
4398
4399 IF (IOUT .EQ. 1) THEN
4400
4401
4402
4403
4404
4405
4406
4407
4408 PRINT *, ' in HJANA2 '
4409 PRINT *, ' total number of partons = ', nsubp / IW
4410 PRINT *, ' total number of gluons = ', nsubg / IW
4411
4412
4413 PRINT *, ' number of independent strings = ', NISG / IW
4414 END IF
4415
4416 CALL HJAN2A
4417 CALL HJAN2B
4418
4419 RETURN
4420 END
4421
4422
4423
4424
4425 SUBROUTINE HJAN2A
4426
4427 PARAMETER (DGX = 0.2, DGY = 0.2, DT = 0.2)
4428 PARAMETER (MAXPTN=400001,MAXSTR=150001)
4429 DIMENSION dgxp2a(50), dgyp2a(50), dtp2a(50)
4430 DIMENSION dgxg2a(50), dgyg2a(50), dtg2a(50)
4431 DIMENSION sgxp2a(50), sgyp2a(50), stp2a(50)
4432 DIMENSION sgxg2a(50), sgyg2a(50), stg2a(50)
4433 DOUBLE PRECISION GX5, GY5, GZ5, FT5, PX5, PY5, PZ5, E5, XMASS5
4434 COMMON /PARA1/ MUL
4435
4436 COMMON /prec2/GX5(MAXPTN),GY5(MAXPTN),GZ5(MAXPTN),FT5(MAXPTN),
4437 & PX5(MAXPTN), PY5(MAXPTN), PZ5(MAXPTN), E5(MAXPTN),
4438 & XMASS5(MAXPTN), ITYP5(MAXPTN)
4439
4440 COMMON/HPARNT/HIPR1(100),IHPR2(50),HINT1(100),IHNT2(50)
4441
4442 COMMON/hjcrdn/YP(3,300),YT(3,300)
4443
4444 COMMON/HJJET1/NPJ(300),KFPJ(300,500),PJPX(300,500),
4445 & PJPY(300,500),PJPZ(300,500),PJPE(300,500),
4446 & PJPM(300,500),NTJ(300),KFTJ(300,500),
4447 & PJTX(300,500),PJTY(300,500),PJTZ(300,500),
4448 & PJTE(300,500),PJTM(300,500)
4449
4450 COMMON/HJJET2/NSG,NJSG(MAXSTR),IASG(MAXSTR,3),K1SG(MAXSTR,100),
4451 & K2SG(MAXSTR,100),PXSG(MAXSTR,100),PYSG(MAXSTR,100),
4452 & PZSG(MAXSTR,100),PESG(MAXSTR,100),PMSG(MAXSTR,100)
4453
4454 COMMON /AREVT/ IAEVT, IARUN, MISS
4455
4456 COMMON /AROUT/ IOUT
4457
4458 SAVE
4459 DATA IW/0/
4460
4461 IF (isevt .EQ. IAEVT .AND. isrun .EQ. IARUN) THEN
4462 DO 1001 I = 1, 50
4463 dgxp2a(I) = sgxp2a(I)
4464 dgyp2a(I) = sgyp2a(I)
4465 dtp2a(I) = stp2a(I)
4466 dgxg2a(I) = sgxg2a(I)
4467 dgyg2a(I) = sgyg2a(I)
4468 dtg2a(I) = stg2a(I)
4469 1001 CONTINUE
4470 ELSE
4471 DO 1002 I = 1, 50
4472 sgxp2a(I) = dgxp2a(I)
4473 sgyp2a(I) = dgyp2a(I)
4474 stp2a(I) = dtp2a(I)
4475 sgxg2a(I) = dgxg2a(I)
4476 sgyg2a(I) = dgyg2a(I)
4477 stg2a(I) = dtg2a(I)
4478 1002 CONTINUE
4479 isevt = IAEVT
4480 isrun = IARUN
4481 IW = IW + 1
4482 END IF
4483
4484 DO 1004 I = 1, IHNT2(1)
4485 DO 1003 J = 1, NPJ(I)
4486 IF (KFPJ(I, J) .NE. 21) THEN
4487 IGX = 1 + int(ABS(YP(1, I)) / DGX)
4488 IF (IGX .GT. 50 .or. IGX .LT. 1) GOTO 100
4489 dgxp2a(IGX) = dgxp2a(IGX) + 1.0
4490 100 CONTINUE
4491 IGY = 1 + int(ABS(YP(2, I)) / DGY)
4492 IF (IGY .GT. 50 .or. IGY .LT. 1) GOTO 200
4493 dgyp2a(IGY) = dgyp2a(IGY) + 1.0
4494 200 CONTINUE
4495 IT = 1
4496 dtp2a(IT) = dtp2a(IT) + 1.0
4497 END IF
4498 1003 CONTINUE
4499 1004 CONTINUE
4500
4501 DO 1006 I = 1, IHNT2(3)
4502 DO 1005 J = 1, NTJ(I)
4503 IF (KFTJ(I, J) .NE. 21) THEN
4504 IGX = 1 + int(ABS(YT(1, I)) / DGX)
4505 IF (IGX .GT. 50 .or. IGX .LT. 1) GOTO 300
4506 dgxp2a(IGX) = dgxp2a(IGX) + 1.0
4507 300 CONTINUE
4508 IGY = 1 + int(ABS(YT(2, I)) / DGY)
4509 IF (IGY .GT. 50 .or. IGY .LT. 1) GOTO 400
4510 dgyp2a(IGY) = dgyp2a(IGY) + 1.0
4511 400 CONTINUE
4512 IT = 1
4513 dtp2a(IT) = dtp2a(IT) + 1.0
4514 END IF
4515 1005 CONTINUE
4516 1006 CONTINUE
4517
4518 DO 1008 I = 1, NSG
4519 DO 1007 J = 1, NJSG(I)
4520 IF (K2SG(I, J) .NE. 21) THEN
4521 IGX = 1 + int(ABS(0.5 *
4522 & (YP(1, IASG(I, 1)) + YT(1, IASG(I, 2)))) / DGX)
4523 IF (IGX .GT. 50 .or. IGX .LT. 1) GOTO 500
4524 dgxp2a(IGX) = dgxp2a(IGX) + 1.0
4525 500 CONTINUE
4526 IGY = 1 + int(ABS(0.5 *
4527 & (YP(2, IASG(I, 1)) + YT(2, IASG(I, 2)))) / DGY)
4528 IF (IGY .GT. 50 .or. IGY .LT. 1) GOTO 600
4529 dgyp2a(IGY) = dgyp2a(IGY) + 1.0
4530 600 CONTINUE
4531 IT = 1
4532 dtp2a(IT) = dtp2a(IT) + 1.0
4533 END IF
4534 1007 CONTINUE
4535 1008 CONTINUE
4536
4537 DO 1009 I = 1, MUL
4538 IGX = 1 + int(ABS(sngl(GX5(I))) / DGX)
4539 IF (IGX .GT. 50 .or. IGX .LT. 1) GOTO 700
4540 dgxg2a(IGX) = dgxg2a(IGX) + 1.0
4541 dgxp2a(IGX) = dgxp2a(IGX) + 1.0
4542 700 CONTINUE
4543 IGY = 1 + int(ABS(sngl(GY5(I))) / DGY)
4544 IF (IGY .GT. 50 .or. IGY .LT. 1) GOTO 800
4545 dgyg2a(IGY) = dgyg2a(IGY) + 1.0
4546 dgyp2a(IGY) = dgyp2a(IGY) + 1.0
4547 800 CONTINUE
4548 IT = 1 + int(SQRT(sngl(FT5(I) ** 2 - GZ5(I) ** 2)) / DT)
4549 IF (IT .GT. 50 .or. IT .LT. 1) GOTO 900
4550 dtg2a(IT) = dtg2a(IT) + 1.0
4551 dtp2a(IT) = dtp2a(IT) + 1.0
4552 900 CONTINUE
4553 1009 CONTINUE
4554
4555 RETURN
4556 END
4557
4558
4559
4560
4561
4562 SUBROUTINE HJAN2B
4563
4564 PARAMETER (MAXPTN=400001)
4565 PARAMETER (MAXSTR=150001)
4566 PARAMETER (DR = 0.2, DT = 0.2)
4567 DIMENSION DNRG2B(50), dtg2b(-24:25)
4568 DIMENSION SNRG2B(50), stg2b(-24:25)
4569 DOUBLE PRECISION GX5, GY5, GZ5, FT5, PX5, PY5, PZ5, E5, XMASS5
4570 DOUBLE PRECISION ATAUI, ZT1, ZT2, ZT3
4571 COMMON /PARA1/ MUL
4572
4573 COMMON /prec2/GX5(MAXPTN),GY5(MAXPTN),GZ5(MAXPTN),FT5(MAXPTN),
4574 & PX5(MAXPTN), PY5(MAXPTN), PZ5(MAXPTN), E5(MAXPTN),
4575 & XMASS5(MAXPTN), ITYP5(MAXPTN)
4576
4577 COMMON /ilist8/ LSTRG1(MAXPTN), LPART1(MAXPTN)
4578
4579 COMMON /SREC1/ NSP, NST, NSI
4580
4581 COMMON /SREC2/ATAUI(MAXSTR),ZT1(MAXSTR),ZT2(MAXSTR),ZT3(MAXSTR)
4582
4583 COMMON/hjcrdn/YP(3,300),YT(3,300)
4584
4585 COMMON/HJJET2/NSG,NJSG(MAXSTR),IASG(MAXSTR,3),K1SG(MAXSTR,100),
4586 & K2SG(MAXSTR,100),PXSG(MAXSTR,100),PYSG(MAXSTR,100),
4587 & PZSG(MAXSTR,100),PESG(MAXSTR,100),PMSG(MAXSTR,100)
4588
4589 COMMON /AREVT/ IAEVT, IARUN, MISS
4590
4591 COMMON /AROUT/ IOUT
4592
4593 SAVE
4594 DATA IW/0/
4595
4596 IF (isevt .EQ. IAEVT .AND. isrun .EQ. IARUN) THEN
4597 DO 1001 I = 1, 50
4598 DNRG2B(I) = SNRG2B(I)
4599 dtg2b(I - 25) = stg2b(I - 25)
4600 1001 CONTINUE
4601 ELSE
4602 DO 1002 I = 1, 50
4603 SNRG2B(I) = DNRG2B(I)
4604 stg2b(I - 25) = dtg2b(I - 25)
4605 1002 CONTINUE
4606 isevt = IAEVT
4607 isrun = IARUN
4608 IW = IW + 1
4609 END IF
4610
4611 DO 1003 I = 1, MUL
4612 J = LSTRG1(I)
4613 GX0 = sngl(ZT1(J))
4614 GY0 = sngl(ZT2(J))
4615 R0 = SQRT((sngl(GX5(I)) - GX0)**2 + (sngl(GY5(I)) - GY0)**2)
4616 IR = 1 + int(R0 / DR)
4617 IF (IR .GT. 50 .or. IR .LT. 1) GOTO 100
4618 DNRG2B(IR) = DNRG2B(IR) + 1.0
4619 100 CONTINUE
4620 TAU7 = SQRT(sngl(FT5(I) ** 2 - GZ5(I) ** 2))
4621 DTAU=TAU7 - sngl(ATAUI(J))
4622 IT = 1 + int(DTAU / DT)
4623
4624
4625 IF (IT .GT. 25 .OR. IT .LT. -24) GOTO 200
4626
4627 dtg2b(IT) = dtg2b(IT) + 1.0
4628 200 CONTINUE
4629 1003 CONTINUE
4630
4631 RETURN
4632 END
4633
4634
4635
4636
4637 SUBROUTINE HJANA3
4638
4639 PARAMETER (MAXSTR=150001, MAXR=1)
4640
4641 PARAMETER (YMIN = -1.0, YMAX = 1.0)
4642
4643
4644 PARAMETER (DMT = 0.05, DY = 0.2)
4645 DOUBLE PRECISION v2i,eti,xmulti,v2mi,s2mi,xmmult,
4646 1 v2bi,s2bi,xbmult
4647 DIMENSION dndyh3(50), DMYH3(50), DEYH3(50)
4648 COMMON /RUN/ NUM
4649
4650 COMMON /ARERC1/MULTI1(MAXR)
4651
4652 COMMON /ARPRC1/ITYP1(MAXSTR, MAXR),
4653 & GX1(MAXSTR, MAXR), GY1(MAXSTR, MAXR), GZ1(MAXSTR, MAXR),
4654 & FT1(MAXSTR, MAXR),
4655 & PX1(MAXSTR, MAXR), PY1(MAXSTR, MAXR), PZ1(MAXSTR, MAXR),
4656 & EE1(MAXSTR, MAXR), XM1(MAXSTR, MAXR)
4657
4658 COMMON /AROUT/ IOUT
4659
4660 COMMON/iflow/v2i,eti,xmulti,v2mi,s2mi,xmmult,v2bi,s2bi,xbmult
4661
4662 SAVE
4663 DATA IW/0/
4664
4665 IW = IW + 1
4666 DO 1002 J = 1, NUM
4667 DO 1001 I = 1, MULTI1(J)
4668 ITYP = ITYP1(I, J)
4669 IF (ITYP .GT. -100 .AND. ITYP .LT. 100) GOTO 200
4670 PX = PX1(I, J)
4671 PY = PY1(I, J)
4672 PZ = PZ1(I, J)
4673 EE = EE1(I, J)
4674 XM = XM1(I, J)
4675 XMT = SQRT(PX ** 2 + PY ** 2 + XM ** 2)
4676 DXMT = XMT - XM
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687 if(XMT.gt.0.) then
4688 Y=asinh(PZ/XMT)
4689 else
4690 PRINT *, ' IN HJANA3 mt=0'
4691 Y = 1000000.0*sign(1.,PZ)
4692 endif
4693
4694
4695
4696
4697
4698 IY = 1 + int(Y/DY)
4699
4700
4701 IF (IY.lt.1 .or.IY .GT. 50) GOTO 100
4702 dndyh3(IY) = dndyh3(IY) + 1.0
4703 DEYH3(IY) = DEYH3(IY) + XMT
4704 100 CONTINUE
4705
4706 IF (Y. LT. YMIN .OR. Y .GE. YMAX) GOTO 200
4707 IMT = 1 + int(DXMT / DMT)
4708 IF (IMT .GT. 50) GOTO 200
4709 DMYH3(IMT) = DMYH3(IMT) + 1.0 / XMT
4710 200 CONTINUE
4711 1001 CONTINUE
4712 1002 CONTINUE
4713
4714 RETURN
4715 END
4716
4717
4718
4719
4720 SUBROUTINE HJANA4
4721 PARAMETER (MAXSTR=150001, MAXR=1)
4722
4723
4724
4725 PARAMETER (YMIN = -1.0, YMAX = 1.0)
4726
4727
4728 PARAMETER (DMT = 0.05, DY = 0.2)
4729
4730 DIMENSION dndyh4(50), DMYH4(50), DEYH4(50)
4731 COMMON /RUN/ NUM
4732
4733 COMMON /ARERC1/MULTI1(MAXR)
4734
4735 COMMON /ARPRC1/ITYP1(MAXSTR, MAXR),
4736 & GX1(MAXSTR, MAXR), GY1(MAXSTR, MAXR), GZ1(MAXSTR, MAXR),
4737 & FT1(MAXSTR, MAXR),
4738 & PX1(MAXSTR, MAXR), PY1(MAXSTR, MAXR), PZ1(MAXSTR, MAXR),
4739 & EE1(MAXSTR, MAXR), XM1(MAXSTR, MAXR)
4740
4741 COMMON /AROUT/ IOUT
4742
4743 COMMON /fflow/ v2f,etf,xmultf,v2fpi,xmulpi
4744
4745 SAVE
4746 DATA IW/0/
4747
4748 IW = IW + 1
4749 DO 1002 J = 1, NUM
4750 DO 1001 I = 1, MULTI1(J)
4751 ITYP = ITYP1(I, J)
4752 IF (ITYP .GT. -100 .AND. ITYP .LT. 100) GOTO 200
4753 PX = PX1(I, J)
4754 PY = PY1(I, J)
4755 PZ = PZ1(I, J)
4756 EE = EE1(I, J)
4757 XM = XM1(I, J)
4758 XMT = SQRT(PX ** 2 + PY ** 2 + XM ** 2)
4759 DXMT = XMT - XM
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770 if(XMT.gt.0.) then
4771 Y=asinh(PZ/XMT)
4772 else
4773 PRINT *, ' IN HJANA4 mt=0'
4774 Y = 1000000.0*sign(1.,PZ)
4775 endif
4776
4777
4778
4779
4780
4781 IY = 1 + int(Y/DY)
4782
4783
4784 IF (IY.lt.1 .or.IY .GT. 50) GOTO 100
4785 dndyh4(IY) = dndyh4(IY) + 1.0
4786 DEYH4(IY) = DEYH4(IY) + XMT
4787 100 CONTINUE
4788
4789 IF (Y. LT. YMIN .OR. Y .GE. YMAX) GOTO 200
4790 IMT = 1 + int(DXMT / DMT)
4791 IF (IMT .GT. 50) GOTO 200
4792 DMYH4(IMT) = DMYH4(IMT) + 1.0 / XMT
4793 200 CONTINUE
4794 1001 CONTINUE
4795 1002 CONTINUE
4796
4797 RETURN
4798 END
4799
4800
4801
4802
4803
4804 SUBROUTINE zpstrg
4805
4806 IMPLICIT DOUBLE PRECISION (A-H, O-Z)
4807 PARAMETER (MAXPTN=400001)
4808 PARAMETER (MAXSTR=150001)
4809
4810 REAL YP, YT, PXSG, PYSG, PZSG, PESG, PMSG, HIPR1, HINT1, BB
4811
4812 COMMON /PARA1/ MUL
4813
4814 COMMON /prec2/GX5(MAXPTN),GY5(MAXPTN),GZ5(MAXPTN),FT5(MAXPTN),
4815 & PX5(MAXPTN), PY5(MAXPTN), PZ5(MAXPTN), E5(MAXPTN),
4816 & XMASS5(MAXPTN), ITYP5(MAXPTN)
4817
4818 COMMON /ilist8/ LSTRG1(MAXPTN), LPART1(MAXPTN)
4819
4820 COMMON /SREC1/ NSP, NST, NSI
4821
4822 COMMON /SREC2/ATAUI(MAXSTR),ZT1(MAXSTR),ZT2(MAXSTR),ZT3(MAXSTR)
4823
4824 COMMON/hjcrdn/YP(3,300),YT(3,300)
4825
4826 COMMON/HJJET2/NSG,NJSG(MAXSTR),IASG(MAXSTR,3),K1SG(MAXSTR,100),
4827 & K2SG(MAXSTR,100),PXSG(MAXSTR,100),PYSG(MAXSTR,100),
4828 & PZSG(MAXSTR,100),PESG(MAXSTR,100),PMSG(MAXSTR,100)
4829
4830
4831 COMMON/HPARNT/HIPR1(100),IHPR2(50),HINT1(100),IHNT2(50)
4832
4833
4834 common/anim/nevent,isoft,isflag,izpc
4835
4836 common/strg/np(maxstr)
4837
4838
4839 common /frzprc/
4840 & gxfrz(MAXPTN), gyfrz(MAXPTN), gzfrz(MAXPTN), ftfrz(MAXPTN),
4841 & pxfrz(MAXPTN), pyfrz(MAXPTN), pzfrz(MAXPTN), efrz(MAXPTN),
4842 & xmfrz(MAXPTN),
4843 & tfrz(302), ifrz(MAXPTN), idfrz(MAXPTN), itlast
4844
4845 SAVE
4846
4847
4848
4849 if(isoft.eq.5) then
4850 do 1001 I = 1, MUL
4851 ITYP5(i)=idfrz(i)
4852 GX5(i)=gxfrz(i)
4853 GY5(i)=gyfrz(i)
4854 GZ5(i)=gzfrz(i)
4855 FT5(i)=ftfrz(i)
4856 PX5(i)=pxfrz(i)
4857 PY5(i)=pyfrz(i)
4858 PZ5(i)=pzfrz(i)
4859 E5(i)=efrz(i)
4860 XMASS5(i)=xmfrz(i)
4861 1001 continue
4862 endif
4863
4864
4865 DO 1002 I = 1, MAXSTR
4866 ATAUI(I) = 0d0
4867 ZT1(I) = 0d0
4868 ZT2(I) = 0d0
4869
4870 ZT3(I) = 0d0
4871 NP(I) = 0
4872 1002 CONTINUE
4873 DO 1003 I = 1, MUL
4874 ISTRG = LSTRG1(I)
4875 TAU7 = SQRT(FT5(I) ** 2 - GZ5(I) ** 2)
4876 ATAUI(ISTRG) = ATAUI(ISTRG) + TAU7
4877 ZT1(ISTRG) = ZT1(ISTRG) + GX5(I)
4878 ZT2(ISTRG) = ZT2(ISTRG) + GY5(I)
4879 ZT3(ISTRG) = ZT3(ISTRG) + GZ5(I)
4880 NP(ISTRG) = NP(ISTRG) + 1
4881 1003 CONTINUE
4882
4883 NSTR = NSP + NST + NSI
4884
4885
4886 if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) then
4887 DO 1004 I = 1, NSTR
4888 IF (NP(I) .NE. 0) THEN
4889 ATAUI(I) = ATAUI(I) / NP(I)
4890 ZT1(I) = ZT1(I) / NP(I)
4891 ZT2(I) = ZT2(I) / NP(I)
4892 ZT3(I) = ZT3(I) / NP(I)
4893 ENDIF
4894 1004 CONTINUE
4895 return
4896 endif
4897
4898
4899 DO 1005 I = 1, NSTR
4900 IF (NP(I) .NE. 0) THEN
4901 ATAUI(I) = ATAUI(I) / NP(I)
4902 ZT1(I) = ZT1(I) / NP(I)
4903 ZT2(I) = ZT2(I) / NP(I)
4904 ZT3(I) = ZT3(I) / NP(I)
4905 ELSE
4906 IF (I .LE. NSP) THEN
4907 J = I
4908 ZT1(I) = dble(YP(1, J))
4909 ZT2(I) = dble(YP(2, J))
4910 ZT3(I) = 0d0
4911 ELSE IF (I .GT. NSP .AND. I .LE. NSP + NST) THEN
4912 J = I - NSP
4913 ZT1(I) = dble(YT(1, J))
4914 ZT2(I) = dble(YT(2, J))
4915 ZT3(I) = 0d0
4916 ELSE
4917 J = I - NSP - NST
4918 ZT1(I) = 0.5d0*
4919 1 dble((YP(1, IASG(J, 1)) + YT(1, IASG(J, 2))))
4920 ZT2(I) = 0.5d0 *
4921 1 dble((YP(2, IASG(J, 1)) + YT(2, IASG(J, 2))))
4922 ZT3(I) = 0d0
4923 END IF
4924 END IF
4925 1005 CONTINUE
4926
4927
4928 BB = HINT1(19)
4929 DO 1006 I = 1, NSTR
4930 IF (NP(I).NE.0) THEN
4931 SHIFT=0d0
4932 ELSE
4933 SHIFT=0.5d0*dble(BB)
4934 END IF
4935 IF (I .LE. NSP) THEN
4936 ZT1(I) = ZT1(I) + SHIFT
4937 ELSE IF (I .GT. NSP .AND. I .LE. NSP + NST) THEN
4938 ZT1(I) = ZT1(I) - SHIFT
4939 END IF
4940 1006 CONTINUE
4941
4942
4943 RETURN
4944 END
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960 subroutine addhad
4961 PARAMETER (MAXSTR=150001,MAXR=1,xmd=1.8756)
4962 double precision smearp,smearh
4963 COMMON /ARPRNT/ ARPAR1(100), IAPAR2(50), ARINT1(100), IAINT2(50)
4964 COMMON /ARPRC/ ITYPAR(MAXSTR),
4965 & GXAR(MAXSTR), GYAR(MAXSTR), GZAR(MAXSTR), FTAR(MAXSTR),
4966 & PXAR(MAXSTR), PYAR(MAXSTR), PZAR(MAXSTR), PEAR(MAXSTR),
4967 & XMAR(MAXSTR)
4968 COMMON /dpert/dpertt(MAXSTR,MAXR),dpertp(MAXSTR),dplast(MAXSTR),
4969 1 dpdcy(MAXSTR),dpdpi(MAXSTR,MAXR),dpt(MAXSTR, MAXR),
4970 2 dpp1(MAXSTR,MAXR),dppion(MAXSTR,MAXR)
4971 COMMON /smearz/smearp,smearh
4972 COMMON/RNDF77/NSEED
4973 common /para8/ idpert,npertd,idxsec
4974 SAVE
4975
4976
4977
4978 np0=IAINT2(1)
4979 DO i=1,np0
4980 dpertp(I)=1.
4981 ENDDO
4982
4983 nadd=0
4984 tau0=ARPAR1(1)
4985 DO 100 i=np0+1,np0+nadd
4986 ITYPAR(I)=42
4987
4988
4989 dpertp(I)=1./float(nadd)
4990 GXAR(I)=5.*(1.-2.*RANART(NSEED))
4991 GYAR(I)=5.*(1.-2.*RANART(NSEED))
4992 GZAR(I)=2.*(1.-2.*RANART(NSEED))
4993 FTAR(I)=0.
4994 PXAR(I)=1.
4995 PYAR(I)=0.
4996 PZAR(I)=1.
4997 XMAR(I)=xmd
4998
4999 PEAR(I)=sqrt(PXAR(I)**2+PYAR(I)**2+PZAR(I)**2+XMAR(I)**2)
5000
5001
5002 RAP=asinh(PZAR(I)/sqrt(XMAR(I)**2+PXAR(I)**2+PYAR(I)**2))
5003
5004 VX=PXAR(I)/PEAR(I)
5005 VY=PYAR(I)/PEAR(I)
5006
5007 TAUI=FTAR(I)+TAU0
5008 FTAR(I)=TAUI*COSH(RAP)
5009 GXAR(I)=GXAR(I)+VX*TAU0*COSH(RAP)
5010 GYAR(I)=GYAR(I)+VY*TAU0*COSH(RAP)
5011
5012 GZAR(I)=TAUI*SINH(RAP)+GZAR(I)
5013
5014 zsmear=sngl(smearh)*(2.*RANART(NSEED)-1.)
5015 GZAR(I)=GZAR(I)+zsmear
5016 100 CONTINUE
5017 IAINT2(1)=IAINT2(1)+nadd
5018
5019 if(nadd.ge.1.and.idpert.ne.1.and.idpert.ne.2) then
5020 write(16,*) 'IDPERT must be 1 or 2 to add initial hadrons,
5021 1 set NPERTD to 0 if you do not need perturbative deuterons'
5022 stop
5023 endif
5024 if(IAINT2(1).gt.MAXSTR) then
5025 write(16,*) 'Too many initial hadrons, array size is exceeded!'
5026 stop
5027 endif
5028
5029 return
5030 end
5031
5032
5033 FUNCTION asinh(x)
5034 SAVE
5035 if(x.gt.0) then
5036 ASINH=alog(x+sqrt(x**2+1.))
5037 else
5038
5039 ASINH=-alog(-x+sqrt(x**2+1.))
5040 endif
5041 return
5042 end