-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathluciae3.0.f
12134 lines (11601 loc) · 350 KB
/
luciae3.0.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
C** **
C** LUCIAE version 3.0 **
C**
C** FINISHED IN March 1998 **
C** **
C** AUTHORS: SA BEN-HAO AND TAI AN
C** **
C** **
C** **
C** Notice: **
C** LUCIAE version 3.0 subroutine packages must
C** be compiled together with Fritiof 7.02R **
C** ARIADNE 4.02R, JETSET 7.4R, and PYTHIA 5.5. Be sure you have the **
C** proper versions of these LUND programs. **
C** **
C******************************** FRINGEB *******************************
C**************************************************************************
c This program, LUCIAE 3.0 contains Firecracker Model and rescattering
C Model which handle collective effects in heavy-ion collisions-----
C multi-gluon emission and rescattering of final particles in nuclear
Cenvironment.
C******************************** FRINGEB *******************************
C******************************** FRINGEB *******************************
SUBROUTINE FRINGEB
C........................This routine administrates one complete event
PARAMETER (KSZJ=40000,KSZ1=30,KSZ2=300,KSZ4=150)
COMMON/FRINTN0/PLI0(2,4),AOP(KSZ1),IOP(KSZ1),NFR(KSZ1)
COMMON/FCRSOUT/MCL(10),RCL(20),INEL(400),NST(2,KSZ4),ACL(2,KSZ4)
COMMON/FRINTN1/PPS(2,KSZ2,5),PPH(2,KSZ2,5),PPSY(2,KSZ2,5),PPA(2,5)
COMMON/FRINTN3/IDN(2,KSZ2),FMN(2,KSZ2),NUC(2,3000)
COMMON/FRPARA1/KFR(KSZ1),VFR(KSZ1)
COMMON/FRCONT2/ICT(10),ICTT(10)
COMMON/LUJETS/N,K(KSZJ,5),P(KSZJ,5),V(KSZJ,5)
COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
COMMON/FRCLUS1/NCL(2,KSZ4),CLM(2,KSZ4),NSL(2,KSZ4)
COMMON/FRCLUS2/ICL(2,KSZ4),JCL(2,KSZ4),NC(2)
common/ctllist/nctl,noinel(400),nctl0
COMMON/TMP/NMEM,MSTU24
COMMON/LCARSI/IARSIG
COMMON/ROPE/itime,akapa(5),parj1,parj2,parj3,parj21
common/sa12/psa(5),ptai(5),clorenp,clorent
COMMON/LUDAT3/MDCY(500,3),MDME(2000,2),BRAT(2000),KFDP(2000,5)
SAVE /FRINTN0/,/FRINTN1/,/FRINTN3/,/FRPARA1/,/FRCLUS1/,/LCARSI/
> ,/FRCONT2/,/LUJETS/,/ctllist/,/FRCLUS2/,/sa12/,/ROPE/
SAVE MDCYT1,MDCYT2, MDCYT3,MDCYT4,MDCYT5,MDCYT6,MDCYT7,MDCYT8,
> MDCYT9,MDCYT10, MDCYT11,MDCYT12,MDCYT13,MDCYT14,MDCYT15,
> MDCYT16,
> MDCYT17,MDCYT18, MDCYT19,MDCYT20,MDCYT21,MDCYT22, MDCYT23,
> nkapa,avkapa1,avkapa2,avkapa3,avkapa4
dimension KSP(2,5),PSP(2,5)
C*************************************************************************
c..A rope consists of strings
c..A cluster consists of nucleons that could later on stretch to be strings
c..or set back to be nucleons if excitation are too small.
C..2 in array means projectile (1) and target (2)
c..NC(2) number of clusters in projectile and target(MCL(1)MCL(2))
c***********************************************************************
DO L=1,10
MCL(L)=0
ENDDO
NCTL0=0
itime=0
do L=1,5
akapa(L)=0.
psa(L)=0
enddo
NFR(1) = NFR(1) + 1
IF(NFR(1).EQ.1)THEN
C when KFR(25)=1 PARJ(1),PARJ(2) etc. take tuned values for pp at 200 GeV/c
c Now these values are stored in PARJ1,PARJ2. They will send back to
c PARJ(1),PARJ(2) etc. after this event is finished.
PARJ21=PARJ(21)
PARJ1=PARJ(1)
PARJ2=PARJ(2)
PARJ3=PARJ(3)
avkapa1=0
avkapa2=0
avkapa3=0
avkapa4=0
do L=1,5
ptai(L)=0
enddo
nkapa=0
IOP(21)=0
DO 55 L=1,400
noinel(L)=0
55 CONTINUE
MDCYT1=MDCY(LUCOMP(111),1)
MDCYT2=MDCY(LUCOMP(310),1)
MDCYT3=MDCY(LUCOMP(3122),1)
MDCYT4=MDCY(LUCOMP(-3122),1)
MDCYT5=MDCY(LUCOMP(3212),1)
MDCYT6=MDCY(LUCOMP(-3212),1)
MDCYT7=MDCY(LUCOMP(3112),1)
MDCYT8=MDCY(LUCOMP(-3112),1)
MDCYT9=MDCY(LUCOMP(3222),1)
MDCYT10=MDCY(LUCOMP(-3222),1)
MDCYT11=MDCY(LUCOMP(3312),1)
MDCYT12=MDCY(LUCOMP(-3312),1)
MDCYT13=MDCY(LUCOMP(3322),1)
MDCYT14=MDCY(LUCOMP(-3322),1)
MDCYT15=MDCY(LUCOMP(3334),1)
MDCYT16=MDCY(LUCOMP(-3334),1)
MDCYT17=MDCY(LUCOMP(1114),1)
MDCYT18=MDCY(LUCOMP(2114),1)
MDCYT19=MDCY(LUCOMP(2214),1)
MDCYT20=MDCY(LUCOMP(2224),1)
MDCYT21=MDCY(LUCOMP(213),1)
MDCYT22=MDCY(LUCOMP(-213),1)
MDCYT23=MDCY(LUCOMP(113),1)
ENDIF
MDCY(LUCOMP(111),1) = 0
MDCY(LUCOMP(310),1) = 0
MDCY(LUCOMP(3122),1) = 0
MDCY(LUCOMP(-3122),1) = 0
MDCY(LUCOMP(3212),1) = 0
MDCY(LUCOMP(-3212),1) = 0
MDCY(LUCOMP(3112),1) = 0
MDCY(LUCOMP(-3112),1) = 0
MDCY(LUCOMP(3222),1) = 0
MDCY(LUCOMP(-3222),1) = 0
MDCY(LUCOMP(3312),1) = 0
MDCY(LUCOMP(-3312),1) = 0
MDCY(LUCOMP(3322),1) = 0
MDCY(LUCOMP(-3322),1) = 0
MDCY(LUCOMP(3334),1) = 0
MDCY(LUCOMP(-3334),1) = 0
c MDCY(LUCOMP(1114),1)=0
c MDCY(LUCOMP(2114),1)=0
c MDCY(LUCOMP(2214),1)=0
c MDCY(LUCOMP(2224),1)=0
c MDCY(LUCOMP(213),1)=0
c MDCY(LUCOMP(-213),1)=0
c MDCY(LUCOMP(113),1)=0
c do not allow lambda,lambdaba,K_S0 etc. to decay before rescattering,
c but Delta and rho are decayed because of their short life-times.
2 IOP(16)=0
IOP(19)=0
IARSIG=0
c-All binary collisions will be proceeded with four-momentum stored
c- in COMMON/FRINTN1/ and RPS information in COMMON/FRINTN2
CALL FRCOLLS
C-calculating incoming energy and charge for checking four-momentum conservation
c-in the end
IF(KFR(23).EQ.1)CALL FRARCHE(0)
NMEM=0
MSTU24=0
IF(KFR(15).EQ.0.OR.IOP(2).LT.2)THEN
N=0
GOTO 400
ELSE
ENDIF
C..when KFR(15)=0 or there is only one collision,then no firecracker effect
CALL FRCLUEX(0)
C..store information of wounded nucleons.Later on event record is divided
c..into one without RPS(soft part) and another with RPS (hard part)
c..nucleons without hard PRS gluons go through radiation
CALL FRCLUST
CALL FRCRGLU
C-sort out nucleons with hard collision
CALL FRSORSH
c..nucleons with hard PRS gluons go through radiation
IOP(24)=0
400 CALL FRINGEH
IF(IOP(24).EQ.1)GOTO 2
C..store useful information in IOP()
IF(IOP(2).GE.2)THEN
IF(KFR(15).EQ.1)THEN
MCL(1)=NC(1)
MCL(2)=NC(2)
DO 56 L=1,2
DO 56 L1=1,MCL(L)
NST(L,L1)=NSL(L,L1)
ACL(L,L1)=CLM(L,L1)
56 CONTINUE
C..restore original information about wounded nucleons
CALL FRCLUEX(1)
ELSE
MCL(1)=0
MCL(2)=0
DO 58 L=1,2
NST(L,1)=0
ACL(L,1)=0.
58 CONTINUE
ENDIF
ELSE
MCL(1)=1
MCL(2)=1
DO 59 L=1,2
NST(L,1)=1
ACL(L,1)=1.
59 CONTINUE
ENDIF
MCL(3)=IOP(19)
C....TO ADD ONTO LUJETS THE COLOUR NEUTRAL PARTICLES THAT MAY
C....HAVE BEEN PRODUCED FROM PARTON-PARTON PROCESSES:
CALL FRFILHW
IF(IARSIG.EQ.1)then
c WRITE(MSTU(11),*)'Warning:An error might be found in Ariande'
c CALL LULIST(2)
GOTO 2
endif
IF(N.GE.KSZJ-2) CALL FRMGOUT(0,1,
> 'LUJETS array size KSZJ must be expanded',float(N),float(KSZJ),
> 0.,0.,0.)
DO 670 L=1,N
IF(K(L,2).EQ.21)P(L,5)=0.
c WRITE(MSTU(11),*)'Warning:A error due to precision is found, the event
c & was thrown away'
IF(ABS(P(L,1)).GT.10000.OR.ABS(P(L,2)).GT.10000.OR.
& P(L,4).LT.0.0)GOTO 2
670 CONTINUE
IF(KFR(1).EQ.1) THEN
MSTJ21=MSTJ(21)
MSTJ(21)=0
CALL LUEXEC
if(KFR(25).eq.1)then
PARJ(21)=PARJ21
PARJ(1)=PARJ1
PARJ(2)=PARJ2
PARJ(3)=PARJ3
endif
IF(MSTU(24).EQ.4) MSTU24=1
IF(KFR(19).EQ.0.OR.KFR(21).EQ.1) CALL LUEDIT(1)
MSTJ(21)=MSTJ21
CALL LUEXEC
IF(KFR(19).EQ.0.OR.KFR(21).EQ.1) CALL LUEDIT(1)
IF(KFR(13).GE.4) THEN
CALL FREDITD()
ENDIF
ENDIF
C... Regenerate event in case of 'infinite-loop error' in Jetset:
IF(MSTU24.GT.0)then
mstu(23)=0
GOTO 2
endif
Ccheck particle list before rescattering
DO 660 L=1,N
IF(ABS(P(L,1)).GT.10000.OR.ABS(P(L,2)).GT.10000.OR.
& P(L,4).LT.0.0)THEN
c WRITE(MSTU(11),*)'Warning:A error due to precision is found, the event
c & was thrown away','EVENT=',NFR(1)
GOTO 2
ENDIF
660 CONTINUE
c itime is the number of strings in the current event
akapa(1)=akapa(1)/max(1,itime)
akapa(2)=akapa(2)/max(1,itime)
akapa(3)=akapa(3)/max(1,itime)
akapa(4)=akapa(4)/max(1,itime)
akapa(5)=akapa(5)/max(1,itime)
IF(itime.ne.0)nkapa=nkapa+1
avkapa1=avkapa1+akapa(4)
avkapa2=avkapa2+akapa(2)
avkapa3=avkapa3+akapa(5)
avkapa4=avkapa4+akapa(3)
C....Record the number of N-N collisions:
IOP(2) = IOP(2)-ICT(3)-ICT(8)-ICT(10)
NFR(3) = NFR(3) + IOP(2)
NFR(4) = NFR(4) + IOP(13)
IF(IOP(13).GE.1) NFR(5) = NFR(5)+1
C-----RECORDING OF IMPACT PARAMETER AND COUNTING OF SPECTATOR PROTONS
IOP(11)=IOP(4)
IOP(12)=IOP(6)
DO 200 L=1, 2
DO 200 J=1,IOP(8+L)
IF(IDN(L,J).EQ.2212) IOP(10+L)=IOP(10+L)-1
200 CONTINUE
IF(IDN(1,1).NE.2212.AND.IDN(1,1).NE.2112) IOP(11)=0
C.....Add the nuclei spectators onto the event record:
DO 300 L=1,2
IF(IOP(3+2*(L-1))-IOP(8+L).GE.1) THEN
N = N+1
P(N,1)=PPA(L,1)
P(N,2)=PPA(L,2)
P(N,3)=0.5*(PPA(L,4)-PPA(L,3))
P(N,4)=0.5*(PPA(L,4)+PPA(L,3))
P(N,5)=PPA(L,5)
K(N,1) = 1
K(N,2) = (10000+IOP(10+L))*(-1)**(L-1)
ENDIF
300 CONTINUE
C....Dump out the event for inspection when error occurs in FRMGOUT:
IF(IOP(16).GE.1) CALL LULIST(2)
IF(KFR(14).EQ.1) CALL FRCHKEP(1)
C proceed rescattering of final particles
IF(KFR(21).EQ.1.AND.KFR(1).EQ.1)CALL FRRESEXE
IF(NFR(1).EQ.1)CALL FRVALUE(0)
MDCY(LUCOMP(111),1)=MDCYT1
MDCY(LUCOMP(310),1) =MDCYT2
MDCY(LUCOMP(3122),1)=MDCYT3
MDCY(LUCOMP(-3122),1) =MDCYT4
MDCY(LUCOMP(3212),1)=MDCYT5
MDCY(LUCOMP(-3212),1) =MDCYT6
MDCY(LUCOMP(3112),1)=MDCYT7
MDCY(LUCOMP(-3112),1) =MDCYT8
MDCY(LUCOMP(3222),1)=MDCYT9
MDCY(LUCOMP(-3222),1) =MDCYT10
MDCY(LUCOMP(3312),1) =MDCYT11
MDCY(LUCOMP(-3312),1) =MDCYT12
MDCY(LUCOMP(3322),1) =MDCYT13
MDCY(LUCOMP(-3322),1) =MDCYT14
MDCY(LUCOMP(3334),1) =MDCYT15
MDCY(LUCOMP(-3334),1) =MDCYT16
MDCY(LUCOMP(1114),1)=MDCYT17
MDCY(LUCOMP(2114),1)=MDCYT18
MDCY(LUCOMP(2214),1)=MDCYT19
MDCY(LUCOMP(2224),1)=MDCYT20
MDCY(LUCOMP(213),1)=MDCYT21
MDCY(LUCOMP(-213),1)=MDCYT22
MDCY(LUCOMP(113),1)=MDCYT23
c output some physics quantities which may be interesting
RCL(1)=avkapa1/max(1,nkapa)
RCL(2)=avkapa2/max(1,nkapa)
RCL(3)=avkapa3/max(1,nkapa)
RCL(4)=avkapa4/max(1,nkapa)
MCL(4)=NCTL0
RCL(5)=ptai(1)
RCL(6)=ptai(2)
RCL(7)=ptai(3)
RCL(8)=ptai(4)
DO 552 L=1,400
INEL(L)=noinel(L)
552 CONTINUE
cstore spectators
LSP=0
DO 570 L=N-1,N
IF(ABS(K(L,2)).GE.10000)THEN
LSP=LSP+1
DO 550 L1=1,5
KSP(LSP,L1)=K(L,L1)
PSP(LSP,L1)=P(L,L1)
550 CONTINUE
ENDIF
570 CONTINUE
N=N-LSP
IF(KFR(1).EQ.1) THEN
CALL LUEXEC
IF(MSTU(24).EQ.4)THEN
WRITE(MSTU(11),*)'infinite loop occur at event=',NFR(1)
call lulist(1)
endif
c CALL LUEDIT(1)
ENDIF
C put spectators back
LSP0=0
DO 560 L=N+1,N+LSP
LSP0=LSP0+1
DO 560 L1=1,5
K(L,L1)=KSP(LSP0,L1)
P(L,L1)=PSP(LSP0,L1)
560 CONTINUE
N=N+LSP0
c--check four-momentum and charge conservation
IF(KFR(23).EQ.1)CALL FRARCHE(1)
Clast check
DO 640 L=1,N
IF(ABS(P(L,1)).GT.10000.OR.ABS(P(L,2)).GT.10000.OR.
& P(L,4).LT.0.0)THEN
c WRITE(MSTU(11),*)'Warning:A error due to precision is found, the event
c & was thrown away'
GOTO 2
ENDIF
640 CONTINUE
RETURN
END
C******************************** END FRINGEB ***************************
subroutine strtension(IP,np)
PARAMETER (KSZJ=40000,KSZ1=30)
COMMON/ROPE/itime,akapa(5),parj1,parj2,parj3,parj21
COMMON/FRPARA1/KFR(KSZ1),VFR(KSZ1)
COMMON/LUJETS/N,K(KSZJ,5),P(KSZJ,5),V(KSZJ,5)
COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
SAVE /ROPE/
VFR26=1.15
c calculate the effective string tension of each string and then
c calculate the new PARJ(1),PARJ(2) etc. in the current event.
C VFR26=1.15 the effective string tension calculated by FRITIOF
c for the pp at 200 GeV/c
c when this subroutine is called in JETSET the string has been boosted
c to its own CMS frame. The whole string takes up item n+1 to n+np
c in the particle list.
toteng=0.0
toten=0.0
totglukt=0.0
pmax=0.
do i=n+1,n+np
toten=toten+p(i,4)
pp=sqrt(p(i,1)**2+p(i,2)**2)
if(k(i,2).eq.21.and.pp.gt.VFR(25))
& toteng=toteng+log(pp/VFR(25))
if(k(i,2).eq.21.and.pp.gt.pmax)pmax=pp
enddo
if(pmax.gt.VFR(25))totglukt=totglukt+log(pmax/VFR(25))
ss=log(toten/VFR(25))+toteng
VFR24=(1.-(totglukt/ss))**(-VFR(24))
akapa(1)=akapa(1)+VFR24
PARJ(21)=PARJ21*((VFR24/VFR26)**(0.5))
PARJ(1)=PARJ1**(VFR26/VFR24)
PARJ(2)=PARJ2**(VFR26/VFR24)
PARJ(3)=PARJ3**(VFR26/VFR24)
akapa(2)=akapa(2)+parj(2)
akapa(3)=akapa(3)+parj(21)
akapa(4)=akapa(4)+parj(1)
akapa(5)=akapa(5)+parj(3)
itime=itime+1
return
end
C*********************** SUBROUTINE FRARIAD ***********************
SUBROUTINE FRARROP
C..Fritiof interface to Ariadne_4.02r. LUJETS entries from IOP(17) to N
C..are copied to Ariadne event record ARJETX, and after emission is done
C..partons are copied back onto LUJETS.
PARAMETER (KSZJ=40000,KSZ1=30,KSZ2=300)
COMMON/FRINTN0/PLI0(2,4),AOP(KSZ1),IOP(KSZ1),NFR(KSZ1)
COMMON/LUJETS/N,K(KSZJ,5),P(KSZJ,5),V(KSZJ,5)
COMMON/ARJETX/NO,KO(1000,5),PO(1000,5),VO(1000,5)
SAVE /FRINTN0/,/LUJETS/,/ARJETX/
DO 100 I=IOP(17),N
NO=NO+1
DO 100 LO=1,5
KO(NO,LO) = K(I,LO)
100 PO(NO,LO) = P(I,LO)
RETURN
END
C*********************** END FRARIAD *****************************
SUBROUTINE FRCLUST
PARAMETER (KSZJ=40000,KSZ1=30, KSZ2=300,KSZ4=150,PI=3.1415926)
COMMON/FRPARA1/KFR(KSZ1),VFR(KSZ1)
COMMON/FRINTN1/PPS(2,KSZ2,5),PPH(2,KSZ2,5),PPSY(2,KSZ2,5),PPA(2,5)
COMMON/FRCLUS1/NCL(2,KSZ4),CLM(2,KSZ4),NSL(2,KSZ4)
COMMON/FRCLUS2/ICL(2,KSZ4),JCL(2,KSZ4),NC(2)
COMMON/FRINTN0/PLI0(2,4),AOP(KSZ1),IOP(KSZ1),NFR(KSZ1)
COMMON/FRTEMP1/NOICF(2,KSZ2,100)
COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
DOUBLE PRECISION PTS(2,KSZ2,5),P1,P2,PH1,PH2,
& Y1,Y2,PTST(2,5),PTSY(2,KSZ2,5)
INTEGER NN(2,KSZ2),NNX(2,KSZ2),WN(2),NOIC(2,KSZ2,100),
& NOICT(100),NOICTA(KSZ2,100)
DIMENSION PTCUT(2)
SAVE /FRINTN0/,/FRINTN1/,/FRPARA1/,/FRCLUS1/,/FRCLUS2/,/FRTEMP1/
C*******************************************************************************
c..NN(2,KSZ2) number of nucleons in KSZ2_th entry
c..NOIC(2,KSZ2,J) original entry number of j_th nucleon in KSZ2_th entry
C********************************************************************************
c.. calculating average value of Pt and take VFR(17)*sqrt(<Pt>^2) to be size of cluster
c::in A-A,in p-A,only one cluster is formed.Soft energy is used to pick up cluster
c.. collisions when KFR(18)=1.Otherwise size of cluster = VFR(18)
DO 31 L=1,2
DO 31 L2=1,IOP(8+L)
NN(L,L2)=1
NOIC(L,L2,NN(L,L2))=L2
DO 31 L3=1,5
PTS(L,L2,L3)=PPS(L,L2,L3)
31 CONTINUE
DO 29 L=1,2
APT=0
IF(IOP(3).EQ.1)THEN
PTCUT(L)=1.E+10
ELSE
IF(IOP(8+L).GT.0)THEN
IF(KFR(18).EQ.1)THEN
DO 30 L2=1,IOP(8+L)
APT=SQRT(PTS(L,L2,1)**2+PTS(L,L2,2)**2)+APT
30 CONTINUE
PTCUT(L)=VFR(17)*APT/IOP(8+L)
ELSE
PTCUT(L)=VFR(18)
ENDIF
ELSE
PTCUT(L)=0
ENDIF
ENDIF
NC(L)=0
WN(L)=IOP(8+L)
29 CONTINUE
DO 33 L=1,2
IF(IOP(8+L).EQ.1)THEN
NC(L)=IOP(8+L)
NCL(L,1)=IOP(8+L)
NOICF(L,1,1)=IOP(8+L)
GOTO 33
ELSEIF(IOP(8+L).EQ.0)THEN
NC(L)=IOP(8+L)
NCL(L,1)=IOP(8+L)
C..matrix index >0
NOICF(L,1,1)=1
GOTO 33
ELSE
ENDIF
c..cluster nucleons in which 'distance' between nucleons is smaller than ptcut
32 PTMIN=1.E+10
DO 34 L2=1,IOP(8+L)-1
PT1=DSQRT(PTS(L,L2,2)**2+PTS(L,L2,1)**2)
PH1=0.5*(PTS(L,L2,4)-PTS(L,L2,3))
P1=DSQRT(PT1**2+PH1**2)
DO 35 L3=L2+1,IOP(8+L)
PT2=DSQRT(PTS(L,L3,2)**2+PTS(L,L3,1)**2)
PH2=0.5*(PTS(L,L3,4)-PTS(L,L3,3))
P2=DSQRT(PT2**2+PH2**2)
Y1=0.5*DLOG(DMAX1(1.D-10,(P1+PH1))/DMAX1(1.D-10,(P1-PH1)))
Y2=0.5*DLOG(DMAX1(1.D-10,(P2+PH2))/DMAX1(1.D-10,(P2-PH2)))
FI1=ULANGL(REAL(PTS(L,L2,1)),REAL(PTS(L,L2,2)))
IF(FI1.LT.0.)FI1=2*PI+FI1
FI2=ULANGL(REAL(PTS(L,L3,1)),REAL(PTS(L,L3,2)))
IF(FI2.LT.0.)FI2=2*PI+FI2
FI12=ABS(FI1-FI2)
RD=SQRT(REAL((Y1-Y2))**2+(MIN(FI12,2*PI-FI12))**2)
PT=MIN(PT1,PT2)*RD
IF(PT.LT.PTMIN)THEN
PTMIN=PT
KT1=L2
KT2=L3
ENDIF
35 CONTINUE
34 CONTINUE
IF(PTMIN.GT.PTCUT(L))THEN
DO 387 JI=1,IOP(8+L)
NC(L)=NC(L)+1
IF(NC(L).GT.150) THEN
WRITE(MSTU(11),*)'number of clusters > 150,stop runing'
STOP
ENDIF
NCL(L,NC(L))=NN(L,JI)
IF(NCL(L,NC(L)).GT.100) THEN
WRITE(MSTU(11),*)'number of nucleons in a cluster >
& 100,stop runing'
STOP
ENDIF
DO 72 I1=1,NN(L,JI)
72 NOICF(L,NC(L),I1)=NOIC(L,JI,I1)
387 CONTINUE
GOTO 33
ELSE
c..update event record for next grouping,here one entry could
C..be a pseduparticle consisting of many nucleons.The newest
C..pseduparticle is always put into the first entry
DO 36 L4=1,4
PTST(L,L4)=PTS(L,KT1,L4)+PTS(L,KT2,L4)
36 CONTINUE
I2=1
NNT=NN(L,KT1)+NN(L,KT2)
DO 42 I1=1,NN(L,KT1)
42 NOICT(I1)=NOIC(L,KT1,I1)
DO 43 I1=1,NN(L,KT2)
43 NOICT(I1+NN(L,KT1))=NOIC(L,KT2,I1)
ENDIF
DO 37 I1=1,IOP(8+L)
IF(I1.EQ.KT1.OR.I1.EQ.KT2)GOTO 37
I2=I2+1
NNX(L,I2)=NN(L,I1)
DO 73 I3=1,NN(L,I1)
73 NOICTA(I2,I3)=NOIC(L,I1,I3)
DO 38 L4=1,4
PTSY(L,I2,L4)=PTS(L,I1,L4)
38 CONTINUE
37 CONTINUE
DO 57 L4=1,4
PTS(L,1,L4)=PTST(L,L4)
57 CONTINUE
NN(L,1)=NNT
DO 75 I3=1,NN(L,1)
75 NOIC(L,1,I3)=NOICT(I3)
IOP(8+L)=IOP(8+L)-1
DO 60 I1=2,IOP(8+L)
DO 59 L4=1,4
PTS(L,I1,L4)=PTSY(L,I1,L4)
59 CONTINUE
NN(L,I1)=NNX(L,I1)
DO 77 I3=1,NN(L,I1)
77 NOIC(L,I1,I3)=NOICTA(I1,I3)
60 CONTINUE
IF(IOP(8+L).GT.1)THEN
GOTO 32
ELSEIF(IOP(8+L).EQ.1)THEN
NC(L)=NC(L)+1
NCL(L,NC(L))=NN(L,1)
DO 78 I1=1,NN(L,1)
78 NOICF(L,NC(L),I1)=NOIC(L,1,I1)
ELSE
ENDIF
33 CONTINUE
IOP(9)=WN(1)
IOP(10)=WN(2)
c..nucleons are ordered group by group in event record
CALL FRARORD
RETURN
END
C ************************************************************
SUBROUTINE FRARORD
PARAMETER (KSZJ=40000,KSZ1=30, KSZ2=300,KSZ4=150)
COMMON/FRINTN1/PPS(2,KSZ2,5),PPH(2,KSZ2,5),PPSY(2,KSZ2,5),PPA(2,5)
COMMON/FRCLUS1/NCL(2,KSZ4),CLM(2,KSZ4),NSL(2,KSZ4)
COMMON/FRCLUS2/ICL(2,KSZ4),JCL(2,KSZ4),NC(2)
COMMON/FRINTN0/PLI0(2,4),AOP(KSZ1),IOP(KSZ1),NFR(KSZ1)
COMMON/FRTEMP1/NOICF(2,KSZ2,100)
COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
COMMON/FRINTN3/IDN(2,KSZ2),FMN(2,KSZ2),NUC(2,3000)
COMMON/FRINTN4/KFEND(2,KSZ2,2)
SAVE /FRINTN0/,/FRINTN1/,/FRCLUS1/,/FRCLUS2/,/FRINTN4/,/FRINTN3/,
& /FRTEMP1/
DIMENSION JC(2),PTSY(2,KSZ2,5),PTSX(2,KSZ2,5),PTS(2,KSZ2,5)
DIMENSION IDNT(2,KSZ2),FMNT(2,KSZ2),KFENDT(2,KSZ2,2)
c..purpose: event record is reproduced with nucleons in the same group
c..being placed together
c..ICL(2,KSZ4)entry number of the first nucleon in KSZ4_th group
c..JCL(2,KSZ4)entry number of the last nucleon in KSZ4_th group
c..ICL(2,KSZ4) and JCL(2,KSZ4) correspond to PPS(2,KSZ2,5),PPH(2,KSZ2,5) etc
c..which index KSZ2 starts from 1 for both target and projectile
JC(1)=0
JC(2)=0
DO 301 L=1,2
ICL(L,1)=1
JCL(L,1)=NCL(L,1)
IF(NC(L).EQ.0)GOTO 301
DO 300 I1=1,NC(L)
IF(I1.GT.1)THEN
ICL(L,I1)=JCL(L,I1-1)+1
JCL(L,I1)=ICL(L,I1)+NCL(L,I1)-1
ENDIF
DO 300 I2=1,NCL(L,I1)
JC(L)=JC(L)+1
IF(NOICF(L,I1,I2).EQ.0)then
WRITE(MSTU(11),*)'an error may have taken place
& in subroutine FRARORD ,some information is outputed'
DO 10 J1=1,2
WRITE(MSTU(11),*)'NC(L)=',NC(J1),IOP(8+J1)
DO 10 J2=1,NC(J1)
WRITE(MSTU(11),*)'NCL(J1,J2)=',NCL(J1,J2)
DO 10 J3=1,NCL(J1,J2)
WRITE(MSTU(11),*)'NOICF(J1,J2,J3)=',NOICF(J1,J2,J3)
10 CONTINUE
ENDIF
DO 310 I3=1,5
PTSX(L,JC(L),I3)=PPS(L,NOICF(L,I1,I2),I3)
PTSY(L,JC(L),I3)=PPH(L,NOICF(L,I1,I2),I3)
PTS(L,JC(L),I3)=PPSY(L,NOICF(L,I1,I2),I3)
310 CONTINUE
IDNT(L,JC(L))=IDN(L,NOICF(L,I1,I2))
FMNT(L,JC(L))=FMN(L,NOICF(L,I1,I2))
DO 234 J1=1,2
KFENDT(L,JC(L),J1)=KFEND(L,NOICF(L,I1,I2),J1)
234 CONTINUE
300 CONTINUE
301 CONTINUE
DO 330 L=1,2
DO 330 I1=1,IOP(8+L)
DO 340 I3=1,5
PPS(L,I1,I3)=PTSX(L,I1,I3)
PPH(L,I1,I3)=PTSY(L,I1,I3)
PPSY(L,I1,I3)=PTS(L,I1,I3)
340 CONTINUE
IDN(L,I1)=IDNT(L,I1)
FMN(L,I1)=FMNT(L,I1)
DO 231 J1=1,2
231 KFEND(L,I1,J1)=KFENDT(L,I1,J1)
330 CONTINUE
CALL FRARORDT
RETURN
END
C***********************************************************************
C************************************************************************************
SUBROUTINE FRARCHE(IG)
PARAMETER (KSZJ=40000,KSZ1=30)
COMMON/FRINTN0/PLI0(2,4),AOP(KSZ1),IOP(KSZ1),NFR(KSZ1)
COMMON/LUJETS/N,K(KSZJ,5),P(KSZJ,5),V(KSZJ,5)
common/sa12/psa(5),ptai(5),clorenp,clorent
SAVE /sa12/
COMMON/FRPARA1/KFR(KSZ1),VFR(KSZ1)
COMMON/LUDAT2/KCHG(500,3),PMAS(500,4),PARF(2000),VCKM(4,4)
COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
DIMENSION PS(2,6)
SAVE /LUJETS/,/FRINTN0/,/LUDAT2/
SAVE PS
C--check four-momentum and charge conservation
IF(IG.EQ.0)THEN
C-...Sum up total momentum, energy and charge for collision system at
c beginning
DO 50 I=1,2
DO 50 J=1,6
50 PS(I,J)=0.
DO 60 I=1,2
PS(1,1)=PS(1,1)+PLI0(I,1)*IOP(2*I+1)
PS(1,2)=PS(1,2)+PLI0(I,2)*IOP(2*I+1)
PS(1,3)=PS(1,3)+0.5*(PLI0(I,4)-PLI0(I,3))*IOP(2*I+1)
PS(1,4)=PS(1,4)+0.5*(PLI0(I,4)+PLI0(I,3))*IOP(2*I+1)
PS(1,6)=PS(1,6)+IOP(4+2*(I-1))
60 CONTINUE
ELSE
NCO=0
C...Check that momentum, energy and charge were conserved.
DO 58 I=1,N
IF(K(I,1).LE.0.OR.K(I,1).GT.10) GOTO 58
KC=LUCOMP(K(I,2))
IF(KC.EQ.0)GOTO 57
KQ=KCHG(KC,2)*ISIGN(1,K(I,2))
C..check if there is coloured particles on decayed strings
IF(KQ.NE.0)NCO=NCO+1
57 DO 56 J=1,4
56 PS(2,J)=PS(2,J)+P(I,J)
IF(ABS(K(I,2)).GE.10000)GOTO 58
PS(2,6)=PS(2,6)+PLU(I,6)
58 CONTINUE
C..add charges of spectators
c..accuracy parameter used in Jetset for checking four-momentum conservation
c is increased by a factor of 5
PS(2,6)=PS(2,6)+IOP(11)+IOP(12)+psa(5)
PDEV=(ABS(PS(2,1)-PS(1,1))+ABS(PS(2,2)-PS(1,2))+ABS(PS(2,3)-
&PS(1,3))+ABS(PS(2,4)-PS(1,4)))/(1.+ABS(PS(2,4))+ABS(PS(1,4)))
IF(PDEV.GT.5.0*PARU(11))THEN
IOP(21)=IOP(21)+1
IF(IOP(21).EQ.MSTU(22)+1)THEN
WRITE(MSTU(11),650) MSTU(22)
ELSEIF(IOP(21).LE.MSTU(22))THEN
CALL LULIST(1)
WRITE(MSTU(11),*)'EVENT=',NFR(1)
WRITE(MSTU(11),*)'four-momentum was not conserved'
WRITE(MSTU(11),*)'initial four-momentum',ps(1,1),ps(1,2),
& ps(1,3),ps(1,4)
WRITE(MSTU(11),*)'final four-momentum',ps(2,1),ps(2,2),
& ps(2,3),ps(2,4)
WRITE(MSTU(11),*)'annihilation four-momentum=',psa(1),
& psa(2),psa(3),psa(4),psa(5)
ELSE
ENDIF
ENDIF
IF(NCO.NE.0.AND.KFR(1).EQ.1)THEN
WRITE(MSTU(11),*)'EVENT=',NFR(1),'NCP=',NCO
WRITE(MSTU(11),*)'colour particles found on decayed
& strings error is serious,list last event and stop runing'
CALL LULIST(1)
STOP
ENDIF
IF(ABS(PS(2,6)-PS(1,6)).GT.0.1)THEN
IOP(21)=IOP(21)+1
IF(IOP(21).EQ.MSTU(22)+1)THEN
WRITE(MSTU(11),650) MSTU(22)
ELSEIF(IOP(21).LE.MSTU(22))THEN
CALL LULIST(1)
WRITE(MSTU(11),*)'EVENT=',NFR(1)
WRITE(MSTU(11),*)'charge was not conserved'
WRITE(MSTU(11),*)'initial net charge',PS(1,6)
WRITE(MSTU(11),*)'final net charge',PS(2,6)
WRITE(MSTU(11),*)'annihilation charge=',psa(1),
& psa(2),psa(3),psa(4),psa(5)
ELSE
ENDIF
ENDIF
650 FORMAT(/,2X,'charge or four-momentum conservation
& was violated',I3,'times,no warning any more hereafter',/)
ENDIF
RETURN
END
C***********************************************************************
SUBROUTINE FRSORSH
PARAMETER (KSZ1=30, KSZ2=300)
COMMON/FRINTN1/PPS(2,KSZ2,5),PPH(2,KSZ2,5),PPSY(2,KSZ2,5),PPA(2,5)
COMMON/FRINTN2/NHP(2),IHQP(2,KSZ2),KHP(2,KSZ2,100,5),
> PHP(2,KSZ2,100,5)
COMMON/FRINTN4/KFEND(2,KSZ2,2)
COMMON/FRINTN3/IDN(2,KSZ2),FMN(2,KSZ2),NUC(2,3000)
COMMON/FRINTN0/PLI0(2,4),AOP(KSZ1),IOP(KSZ1),NFR(KSZ1)
SAVE /FRINTN1/,/FRINTN2/,/FRINTN3/,/FRINTN4/,/FRINTN0/
DIMENSION NHN(2)
c-purpose:sorting out nucleons with RPS
DO 340 L=1,2
NHN(L)=0
DO 330 I1=1,IOP(8+L)
IF(IHQP(L,I1).GT.0)THEN
NHN(L)=NHN(L)+1
DO 310 I3=1,5
PPS(L,NHN(L),I3)=PPS(L,I1,I3)
PPH(L,NHN(L),I3)=PPH(L,I1,I3)
PPSY(L,NHN(L),I3)=PPSY(L,I1,I3)
310 CONTINUE
IHQP(L,NHN(L))=IHQP(L,I1)
IDN(L,NHN(L))=IDN(L,I1)
FMN(L,NHN(L))=FMN(L,I1)
DO 235 J1=1,2
235 KFEND(L,NHN(L),J1)=KFEND(L,I1,J1)
DO 350 I4=1,IHQP(L,I1)
DO 350 I3=1,5
KHP(L,NHN(L),I4,I3)=KHP(L,I1,I4,I3)
PHP(L,NHN(L),I4,I3)=PHP(L,I1,I4,I3)
350 CONTINUE
ENDIF
330 CONTINUE
IOP(8+L)=NHN(L)
340 CONTINUE
RETURN
END
C******************************************************************
SUBROUTINE FRCOLLS
C........................This routine administrates collission of hadrons
PARAMETER (KSZ1=30,KSZ2=300)
COMMON/FRINTN0/PLI0(2,4),AOP(KSZ1),IOP(KSZ1),NFR(KSZ1)
COMMON/FRINTN3/IDN(2,KSZ2),FMN(2,KSZ2),NUC(2,3000)
COMMON/FRINTN4/KFEND(2,KSZ2,2)
SAVE /FRINTN0/,/FRINTN3/,/FRINTN4/
C.....Randomly order protons and neutrons:
CALL FRHILDN
C.....Create the nuclei and calculate number of collisions
CALL FRANGAN
C.....Fix the end flavors for all the strings
DO 5 L=1,2
DO 5 II=1, IOP(3+2*(L-1))
5 CALL FRBELEO(KFEND(L,II,1),KFEND(L,II,2),IDN(L,II))
C.....Generate the masses and momenta after the collisions
C.....Generate the masses and momenta after the collisions
10 CALL FRRINGO
RETURN
END
C******************************************************************************
SUBROUTINE FRARCLU(IOO)
PARAMETER (KSZJ=40000)
COMMON/LUJETS/N,K(KSZJ,5),P(KSZJ,5),V(KSZJ,5)
COMMON/ARJETX/NO,KO(1000,5),PO(1000,5),VO(1000,5)
COMMON/LUDAT2/KCHG(500,3),PMAS(500,4),PARF(2000),VCKM(4,4)
SAVE /LUJETS/,/ARJETX/
c.purpose interface between Fritiof and Ariande
CALL AREXEC
c..put colour singlet particle onto event record
IOO=0
DO 509 IO=1,N
KC=LUCOMP(K(IO,2))
KQ=KCHG(KC,2)*ISIGN(1,K(IO,2))
IF(KQ.NE.0)GOTO 509
IOO=IOO+1
DO 405 LO=1,5
KO(NO+IOO,LO) = K(IO,LO)
405 PO(NO+IOO,LO) = P(IO,LO)
509 CONTINUE
NO=NO+IOO
N=0
DO 400 IO=1,NO
IF(KO(IO,1).GE.11) GOTO 400
N=N+1
DO 450 LO=1,5
K(N,LO) = KO(IO,LO)
450 P(N,LO) = PO(IO,LO)
400 CONTINUE
RETURN
END
C************************************************************************
SUBROUTINE FRCLUEX(I)
PARAMETER (KSZ2=300,KSZ1=30)
COMMON/FRINTN1/PPS(2,KSZ2,5),PPH(2,KSZ2,5),PPSY(2,KSZ2,5),PPA(2,5)
COMMON/FRINTN2/NHP(2),IHQP(2,KSZ2),KHP(2,KSZ2,100,5),
& PHP(2,KSZ2,100,5)
COMMON/FRINTN3/IDN(2,KSZ2),FMN(2,KSZ2),NUC(2,3000)
COMMON/FRINTN3T/IDNT(2,KSZ2),FMNT(2,KSZ2)
COMMON/FRINTN4/KFEND(2,KSZ2,2)
COMMON/FRINTN4T/KFENDT(2,KSZ2,2)
COMMON/FRINTN0/PLI0(2,4),AOP(KSZ1),IOP(KSZ1),NFR(KSZ1)
COMMON/FRINTN1T/PPST(2,KSZ2,5),PPHT(2,KSZ2,5),PPSYT(2,KSZ2,5)
COMMON/FRINTN2T/IHQPT(2,KSZ2),KHPT(2,KSZ2,40,5),
& PHPT(2,KSZ2,40,5)
DIMENSION IOPT(2)
SAVE /FRINTN1T/,/FRINTN2T/,/FRINTN3T/,/FRINTN4T/,
& /FRINTN1/,/FRINTN3/,/FRINTN2/,/FRINTN4/
SAVE IOPT
C-I=0 store original event record into temperary one
c-I=1 restore original event
IF(I.EQ.0)THEN
DO 100 L1=1,2
IOPT(L1)=IOP(8+L1)
DO 100 L2=1,IOP(8+L1)
IDNT(L1,L2)=IDN(L1,L2)
FMNT(L1,L2)=FMN(L1,L2)
IHQPT(L1,L2)=IHQP(L1,L2)
DO 232 J1=1,2
KFENDT(L1,L2,J1)=KFEND(L1,L2,J1)
232 CONTINUE
DO 100 L4=1,IHQP(L1,L2)
DO 100 L3=1,5
PPST(L1,L2,L3)=PPS(L1,L2,L3)
PPHT(L1,L2,L3)=PPH(L1,L2,L3)
PPSYT(L1,L2,L3)=PPSY(L1,L2,L3)
KHPT(L1,L2,L4,L3)=KHP(L1,L2,L4,L3)
PHPT(L1,L2,L4,L3)=PHP(L1,L2,L4,L3)
100 CONTINUE
ELSE
DO 200 L1=1,2
IOP(8+L1) =IOPT(L1)
DO 200 L2=1,IOP(8+L1)
IHQP(L1,L2)=IHQPT(L1,L2)
IDN(L1,L2)=IDNT(L1,L2)
FMN(L1,L2)=FMNT(L1,L2)
DO 234 J1=1,2
KFEND(L1,L2,J1)=KFENDT(L1,L2,J1)
234 CONTINUE
DO 200 L4=1,IHQPT(L1,L2)
DO 200 L3=1,5
PPS(L1,L2,L3)=PPST(L1,L2,L3)
PPH(L1,L2,L3)=PPHT(L1,L2,L3)
PPSY(L1,L2,L3)=PPSYT(L1,L2,L3)
KHP(L1,L2,L4,L3)=KHPT(L1,L2,L4,L3)
PHP(L1,L2,L4,L3)=PHPT(L1,L2,L4,L3)
200 CONTINUE
ENDIF
RETURN
END
C*************************************************************************************
SUBROUTINE FRINGEH
C........................This routine administrates radiation of nucleons with RPS
PARAMETER (KSZJ=40000,KSZ1=30,KSZ2=300,KSZ4=150)
COMMON/FRINTN0/PLI0(2,4),AOP(KSZ1),IOP(KSZ1),NFR(KSZ1)
COMMON/FRPARA1/KFR(KSZ1),VFR(KSZ1)
COMMON/LUJETS/N,K(KSZJ,5),P(KSZJ,5),V(KSZJ,5)
COMMON/LUDAT1/MSTU(200),PARU(200),MSTJ(200),PARJ(200)
COMMON /TMP/ NMEM,MSTU24
SAVE /FRINTN0/,/FRPARA1/,/LUJETS/
KFRT=KFR(15)
KFR(15)=0
NSTR = 0
IOP(15)=0
DO 390 L=1, 2
DO 390 J=1,IOP(8+L)
CALL FRTORST(L,J)
IF(IOP(24).EQ.1)RETURN
NSTR = NSTR+1
NQG = N-NMEM
IF( (KFR(1).EQ.1.AND.KFR(13).GE.1).AND.
> (NSTR.GT.100.OR.NQG.GT.(KSZJ-N)/10) ) THEN
CALL LUEXEC