forked from alisw/ampt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
amptsub.f
executable file
·5093 lines (4729 loc) · 154 KB
/
amptsub.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....................amptsub.f
c.....this file contains 4 sections:
c.....1. ART subroutines;
c.....2. ART functions;
c.....3. ART block data;
c.....4. subprocesses borrowed from other codes.
c.....5. the previous artana.f
c.....6. the previous zpcsub.f
c.....7. subroutine getnp
c.....Note that Parts1-4 are the previous artsub.f
c
c=======================================================================
c.....subroutine to set up ART parameters and analysis files
c.....before looping different events
SUBROUTINE ARTSET
c
PARAMETER (AMU= 0.9383,nxymax=10001)
double precision dpcoal,drcoal,ecritl
INTEGER ZTA, ZPR
common /gg/ dx,dy,dz,dpx,dpy,dpz
clin-10/03/03
c "SAVE " (without argument) is used for most subroutines and functions,
c this is important for the success when using "f77" to compile:
cc SAVE /gg/
common /zz/ zta,zpr
cc SAVE /zz/
COMMON /RUN/ NUM
cc SAVE /RUN/
common/input1/ MASSPR,MASSTA,ISEED,IAVOID,DT
cc SAVE /input1/
COMMON /INPUT2/ ILAB, MANYB, NTMAX, ICOLL, INSYS, IPOT, MODE,
& IMOMEN, NFREQ, ICFLOW, ICRHO, ICOU, KPOTEN, KMUL
cc SAVE /INPUT2/
COMMON /INPUT3/ PLAB, ELAB, ZEROPT, B0, BI, BM, DENCUT, CYCBOX
cc SAVE /INPUT3/
common /imulst/ iperts
cc SAVE /imulst/
common /coal/dpcoal,drcoal,ecritl
common/anim/nevent,isoft,isflag,izpc
common /para7/ ioscar,nsmbbbar,nsmmeson
common/embed/iembed,nsembd,pxqembd,pyqembd,xembd,yembd,
1 psembd,tmaxembd,phidecomp
common/xyembed/nxyjet,xyjet(nxymax,2)
SAVE
clin-10/03/03 ecritl: local energy density below which a parton
c will freeze out (in GeV/fm^3), for improvements on string melting,
c not used in this version of AMPT:
clin-4/2008
c data ecritl/1.d0/
ecritl=1.d0
c
c combine ART initialization into ampt.ini:
c (Note that the following values are relics from the old ART structure)
c.....input parameter file
c OPEN(13, FILE = 'art1.ini', STATUS = 'UNKNOWN')
c READ (13, *) MASSTA, ZTA
MASSTA=1
ZTA=1
c write(12,*) massta, zta, ' massta, zta'
c READ (13, *) MASSPR, ZPR
MASSPR=1
ZPR=1
c write(12,*) masspr, zpr, ' masspr, zpr'
c READ (13, *) PLAB, IPLAB
PLAB=14.6
IPLAB=2
c write(12,*) plab, iplab, ' plab, iplab'
if(iplab.eq.2)then
elab=sqrt(plab**2+amu**2)-amu
else
elab=plab
endif
elab=elab*1000.
c READ (13, *) ZEROPT
ZEROPT=0.
c write(12,*) zeropt, ' zeropt'
clin-10/03/03 ISEED was used as a seed for random number inside ART,
c not used in AMPT:
ISEED=700721
c 0/1: (Normal or Perturbative) multistrange partice production.
c Perturbative option is disabled for now:
iperts=0
c READ (13, *) MANYB, B0, BI, BM
c 2/04/00 MANYB MUST BE SET TO 1 !
c in order to skip impact parameter setting by ART, then B0 has no effect.
MANYB=1
B0=1
BI=0
BM=0
c write(12,*) manyb, b0, bi, bm, ' manyb, b0, bi, bm'
c READ (13, *) ISEED
c write(12,*) iseed, ' iseed'
c READ (13, *) DT
c write(12,*) dt, ' dt'
c READ (13, *) NTMAX
c write(12,*) ntmax, ' ntmax'
c READ (13, *) ICOLL
ICOLL=-1
c write(12,*) icoll, ' icoll'
c READ (13, *) NUM
c 2/11/03 run events without test particles for now:
NUM=1
c write(12,*) num, ' num'
c READ (13, *) INSYS
INSYS=1
c write(12,*) insys, ' insys'
c READ (13, *) IPOT
IPOT=3
c write(12,*) ipot, ' ipot'
c READ (13, *) MODE
MODE=0
IF(ICOLL.EQ.-1)IPOT=0
c write(12,*) mode, ' mode'
c READ (13, *) DX, DY, DZ
DX=2.73
DY=2.73
DZ=2.73
c write(12,*) dx,dy,dz,' dx,dy,dz'
c READ (13, *) DPX, DPY, DPZ
DPX=0.6
DPY=0.6
DPZ=0.6
c write(12,*) dpx,dpy,dpz,' dpx,dpy,dpz'
c READ (13, *) IAVOID
IAVOID=1
c write(12,*) iavoid, ' iavoid'
c READ (13, *) IMOMEN
IMOMEN=1
c write(12,*) imomen, ' imomen'
if(icoll.eq.-1)imomen=3
c READ (13, *) NFREQ
NFREQ=10
c write(12,*) nfreq, ' nfreq'
c READ (13, *) ICFLOW
ICFLOW=0
c write(12,*) ICFLOW, ' ICFLOW'
c READ (13, *) ICRHO
ICRHO=0
c write(12,*) ICRHO, ' ICRHO'
c READ (13, *) ICOU
ICOU=0
c write(12,*)icou, ' icou'
* kaon potential control parameter
* KMUL IS A MULTIPLIER TO THE STANDARD K-N SCATTERING LENGTH
c READ (13, *) KPOTEN, KMUL
KPOTEN=0
KMUL=1
c write(12,*)kpoten,kmul, ' kpoten, kmul'
* mean field control parameter FOR BARYONS
* no mean filed is used for baryons if their
* local density is higher than dencut.
c READ (13, *) DENCUT
DENCUT=15
c write(12,*)dencut, ' dencut'
* test reactions in a box of side-length cycbox
* input cycbox
c READ (13, *) CYCBOX
CYCBOX=0
c write(12,*) cycbox, ' cycbox'
c
clin-5b/2008
c if(ioscar.eq.2) then
if(ioscar.eq.2.or.ioscar.eq.3) then
OPEN (92,FILE='ana/parton-initial-afterPropagation.dat',
1 STATUS = 'UNKNOWN')
endif
if(ioscar.eq.3) then
clin-6/2009 write out full parton collision history:
OPEN (95,FILE='ana/parton-collisionsHistory.dat',
1 STATUS='UNKNOWN')
clin-6/2009 write out initial minijet information:
OPEN (96,FILE='ana/minijet-initial-beforePropagation.dat',
1 STATUS='UNKNOWN')
clin-6/2009 write out parton info after coalescence:
if(isoft.eq.4.or.isoft.eq.5) then
OPEN (85,FILE='ana/parton-after-coalescence.dat',
1 STATUS='UNKNOWN')
endif
endif
clin-6/2009 write out initial transverse positions of initial nucleons:
OPEN (94,FILE='ana/npart-xy.dat',STATUS='UNKNOWN')
c
clin-8/2009 In case that random positions are used to embed high-Pt jets:
if(iembed.eq.3.or.iembed.eq.4) then
OPEN (97,FILE='embed-jet-xy.txt',STATUS = 'UNKNOWN')
read(97,*) nxyjet
c Save positions in array to reuse when embedding more jet pairs
c than the number of entries in the position file:
if(nevent.gt.nxyjet) then
if(nxyjet.gt.nxymax) then
print *, 'Too many lines in embed-jet-xy.txt:
1 increase value of the parameter nxymax'
stop
elseif(nxyjet.le.0) then
print *, 'Check number of entries in embed-jet-xy.txt'
stop
endif
do ixy=1,nxyjet
read(97,*) xyjet(ixy,1),xyjet(ixy,2)
enddo
endif
endif
RETURN
END
c-----------------------------------------------------------------------
c.....subroutine to initialize cascade.
SUBROUTINE ARINI
c.....before invoking ARINI:
c.....IAPAR2(1), IAINT2(1) must be set.
COMMON /ARPRNT/ ARPAR1(100), IAPAR2(50), ARINT1(100), IAINT2(50)
cc SAVE /ARPRNT/
SAVE
ctest off for resonance (phi, K*) studies:
c OPEN (89, FILE = 'ana/decay_rec.dat', STATUS = 'UNKNOWN')
IFLG = IAPAR2(1)
GOTO (200, 200, 300) IFLG
c.....error choice of initialization
PRINT *, 'IAPAR2(1) must be 1, 2, or 3'
STOP
c.....to use default initial conditions generated by the cascade,
c.....or to read in initial conditions.
200 RETURN
c.....to generate formation time and the position at formation time from
c.....read-in initial conditions with an averaged formation proper time.
300 CALL ARINI1
c.....ordering the particle label according to increasing order of
c.....formation time.
CALL ARTORD
RETURN
END
c-----------------------------------------------------------------------
c.....subroutine to generate formation time and position at formation time
c.....from read-in initial conditions with an averaged formation proper
c.....time.
SUBROUTINE ARINI1
c.....before invoking ARINI1:
c.....ARPAR1(1), IAINT2(1) must be set:
PARAMETER (MAXSTR=150001)
double precision smearp,smearh
COMMON /ARPRNT/ ARPAR1(100), IAPAR2(50), ARINT1(100), IAINT2(50)
cc SAVE /ARPRNT/
COMMON /ARPRC/ ITYPAR(MAXSTR),
& GXAR(MAXSTR), GYAR(MAXSTR), GZAR(MAXSTR), FTAR(MAXSTR),
& PXAR(MAXSTR), PYAR(MAXSTR), PZAR(MAXSTR), PEAR(MAXSTR),
& XMAR(MAXSTR)
cc SAVE /ARPRC/
COMMON /smearz/smearp,smearh
cc SAVE /smearz/
common/input1/ MASSPR,MASSTA,ISEED,IAVOID,DT
cc SAVE /input1/
common/anim/nevent,isoft,isflag,izpc
cc SAVE /anim/
common /nzpc/nattzp
cc SAVE /nzpc/
COMMON/HPARNT/HIPR1(100),IHPR2(50),HINT1(100),IHNT2(50)
cc SAVE /HPARNT/
COMMON/RNDF77/NSEED
cc SAVE /RNDF77/
common /para8/ idpert,npertd,idxsec
SAVE
clin-5/2008 for perturbatively-produced hadrons (currently only deuterons):
OPEN (91, FILE = 'ana/deuteron_processes.dat',
1 STATUS = 'UNKNOWN')
if(idpert.eq.1.or.idpert.eq.2) then
OPEN (90, FILE = 'ana/ampt_pert.dat', STATUS = 'UNKNOWN')
endif
c.....generate formation time and position at formation time.
TAU0 = ARPAR1(1)
NP = IAINT2(1)
clin-7/10/01 initial positions already given for hadrons
c formed from partons inside ZPC (from string melting):
if(isoft.eq.3.or.isoft.eq.4.or.isoft.eq.5) then
clin-8/2015 fixed a bug that may skip "dpertp(I)=1." in addhad and
c cause the first few events to be missing in ampt.dat
c (mostly for low-multiplicity events such as PP collisions):
c if(NP.le.nattzp) return
if(NP.gt.nattzp) then
do 1001 I = nattzp+1, NP
clin-9/2012 determine rapidity more generally
c to prevent overflow when Pt~=0 and E=|Pz|:
c IF (ABS(PZAR(I)) .GE. PEAR(I)) THEN
c PRINT *, ' IN ARINI1'
c PRINT *, 'ABS(PZ) .GE. EE for particle ', I
c PRINT *, ' FLAV = ', ITYPAR(I), ' PX = ', PXAR(I),
c & ' PY = ', PYAR(I)
c PRINT *, ' PZ = ', PZAR(I), ' EE = ', PEAR(I)
c PRINT *, ' XM = ', XMAR(I)
c RAP = 1000000.0
c GOTO 50
c END IF
cc RAP=0.5*LOG((PEAR(I)+PZAR(I))/(PEAR(I)-PZAR(I)))
c RAP=0.5*LOG((PEAR(I)+PZAR(I)+1e-5)/(PEAR(I)-PZAR(I)+1e-5))
c 50 CONTINUE
if((XMAR(I)**2+PXAR(I)**2+PYAR(I)**2).gt.0.) then
RAP=asinh(PZAR(I)/sqrt(XMAR(I)**2+PXAR(I)**2+PYAR(I)**2))
else
PRINT *, ' IN ARINI1 mt=0'
RAP = 1000000.0*sign(1.,PZAR(I))
endif
VX = PXAR(I) / PEAR(I)
VY = PYAR(I) / PEAR(I)
FTAR(I) = TAU0 * COSH(RAP)
GXAR(I) = GXAR(I) + VX * FTAR(I)
GYAR(I) = GYAR(I) + VY * FTAR(I)
GZAR(I) = TAU0 * SINH(RAP)
clin-5/2009 No formation time for spectator projectile or target nucleons:
if(PXAR(I).eq.0.and.PYAR(I).eq.0
2 .and.(ITYPAR(I).eq.2112.or.ITYPAR(I).eq.2212)) then
clin-2/2013 for spectator target nucleons in LAB frame:
c 1 .and.(PEAR(I)*2/HINT1(1)).gt.0.99
if((PEAR(I)/HINT1(6).gt.0.99.and.PEAR(I)/HINT1(6).lt.1.01)
1 .or.(PEAR(I)/HINT1(7).gt.0.99.and.PEAR(I)/HINT1(7).lt.1.01)) then
c
TAUI=1.E-20
FTAR(I)=TAUI*COSH(RAP)
GZAR(I)=TAUI*SINH(RAP)
endif
endif
1001 continue
clin-8/2015:
endif
clin-7/10/01-end
clin-3/2009 cleanup of program flow:
else
DO 1002 I = 1, NP
clin-9/2012 determine rapidity more generally:
c IF (ABS(PZAR(I)) .GE. PEAR(I)) THEN
c PRINT *, ' IN ARINI1'
c PRINT *, 'ABS(PZ) .GE. EE for particle ', I
c PRINT *, ' FLAV = ', ITYPAR(I), ' PX = ', PXAR(I),
c & ' PY = ', PYAR(I)
c PRINT *, ' PZ = ', PZAR(I), ' EE = ', PEAR(I)
c PRINT *, ' XM = ', XMAR(I)
c RAP = 1000000.0
c GOTO 100
cc STOP
c END IF
c 100 CONTINUE
c RAP=0.5*LOG((PEAR(I)+PZAR(I)+1e-5)/(PEAR(I)-PZAR(I)+1e-5))
if((XMAR(I)**2+PXAR(I)**2+PYAR(I)**2).gt.0.) then
RAP=asinh(PZAR(I)/sqrt(XMAR(I)**2+PXAR(I)**2+PYAR(I)**2))
else
PRINT *, ' IN ARINI1 mt=0'
RAP = 1000000.0*sign(1.,PZAR(I))
endif
VX = PXAR(I) / PEAR(I)
VY = PYAR(I) / PEAR(I)
c.....give initial formation time shift
TAUI = FTAR(I) + TAU0
FTAR(I) = TAUI * COSH(RAP)
GXAR(I) = GXAR(I) + VX * TAU0 * COSH(RAP)
GYAR(I) = GYAR(I) + VY * TAU0 * COSH(RAP)
c 4/25/03: hadron z-position upon formation determined the same way as x,y:
GZAR(I) = TAUI * SINH(RAP)
c the old prescription:
c GZAR(I) = GZAR(I) + TAU0 * SINH(RAP)
zsmear=sngl(smearh)*(2.*RANART(NSEED)-1.)
GZAR(I)=GZAR(I)+zsmear
cbz1/28/99end
c 10/05/01 no formation time for spectator projectile or target nucleons:
if(PXAR(I).eq.0.and.PYAR(I).eq.0
2 .and.(ITYPAR(I).eq.2112.or.ITYPAR(I).eq.2212)) then
clin-2/2013 for spectator target nucleons in LAB frame:
c 1 .and.(PEAR(I)*2/HINT1(1)).gt.0.99
if((PEAR(I)/HINT1(6).gt.0.99.and.PEAR(I)/HINT1(6).lt.1.01)
1 .or.(PEAR(I)/HINT1(7).gt.0.99.and.PEAR(I)/HINT1(7).lt.1.01)) then
c
clin-5/2008:
c TAUI=0.00001
TAUI=1.E-20
FTAR(I)=TAUI*COSH(RAP)
GZAR(I)=TAUI*SINH(RAP)+zsmear
endif
endif
1002 CONTINUE
clin-3/2009 cleanup of program flow:
endif
clin-3/2009 Add initial hadrons before the hadron cascade starts:
call addhad
RETURN
END
c-----------------------------------------------------------------------
c.....subroutine to order particle labels according to increasing
c.....formation time
SUBROUTINE ARTORD
c.....before invoking ARTORD:
c.....IAINT2(1) must be set:
PARAMETER (MAXSTR=150001,MAXR=1)
COMMON /ARPRNT/ ARPAR1(100), IAPAR2(50), ARINT1(100), IAINT2(50)
cc SAVE /ARPRNT/
COMMON /ARPRC/ ITYPAR(MAXSTR),
& GXAR(MAXSTR), GYAR(MAXSTR), GZAR(MAXSTR), FTAR(MAXSTR),
& PXAR(MAXSTR), PYAR(MAXSTR), PZAR(MAXSTR), PEAR(MAXSTR),
& XMAR(MAXSTR)
cc SAVE /ARPRC/
clin-3/2009 Take care of particle weights when user inserts initial hadrons:
COMMON /dpert/dpertt(MAXSTR,MAXR),dpertp(MAXSTR),dplast(MAXSTR),
1 dpdcy(MAXSTR),dpdpi(MAXSTR,MAXR),dpt(MAXSTR, MAXR),
2 dpp1(MAXSTR,MAXR),dppion(MAXSTR,MAXR)
DIMENSION dptemp(MAXSTR)
c
DIMENSION ITYP0(MAXSTR),
& GX0(MAXSTR), GY0(MAXSTR), GZ0(MAXSTR), FT0(MAXSTR),
& PX0(MAXSTR), PY0(MAXSTR), PZ0(MAXSTR), EE0(MAXSTR),
& XM0(MAXSTR)
DIMENSION INDX(MAXSTR)
EXTERNAL ARINDX
SAVE
c
NPAR = 0
NP = IAINT2(1)
DO 1001 I = 1, NP
ITYP0(I) = ITYPAR(I)
GX0(I) = GXAR(I)
GY0(I) = GYAR(I)
GZ0(I) = GZAR(I)
FT0(I) = FTAR(I)
PX0(I) = PXAR(I)
PY0(I) = PYAR(I)
PZ0(I) = PZAR(I)
EE0(I) = PEAR(I)
XM0(I) = XMAR(I)
clin-3/2009:
dptemp(I) = dpertp(I)
1001 CONTINUE
CALL ARINDX(MAXSTR, NP, FT0, INDX)
DO 1002 I = 1, NP
cbz12/3/98
c IF (ITYP0(INDX(I)) .EQ. 211) THEN
c IF (ITYP0(INDX(I)) .EQ. 211 .OR. ITYP0(INDX(I)) .EQ. 321) THEN
c IF (ITYP0(INDX(I)) .EQ. 211 .OR. ITYP0(INDX(I)) .EQ. 2212 .OR.
c & ITYP0(INDX(I)) .EQ. 2112 .OR. ITYP0(INDX(I)) .EQ. -211 .OR.
c & ITYP0(INDX(I)) .EQ. 111) THEN
c IF (ITYP0(INDX(I)) .EQ. 211 .OR. ITYP0(INDX(I)) .EQ. 2212 .OR.
c & ITYP0(INDX(I)) .EQ. 2112) THEN
NPAR = NPAR + 1
c ITYPAR(I) = ITYP0(INDX(I))
c GXAR(I) = GX0(INDX(I))
c GYAR(I) = GY0(INDX(I))
c GZAR(I) = GZ0(INDX(I))
c FTAR(I) = FT0(INDX(I))
c PXAR(I) = PX0(INDX(I))
c PYAR(I) = PY0(INDX(I))
c PZAR(I) = PZ0(INDX(I))
c PEAR(I) = EE0(INDX(I))
c XMAR(I) = XM0(INDX(I))
ITYPAR(NPAR) = ITYP0(INDX(I))
GXAR(NPAR) = GX0(INDX(I))
GYAR(NPAR) = GY0(INDX(I))
GZAR(NPAR) = GZ0(INDX(I))
FTAR(NPAR) = FT0(INDX(I))
PXAR(NPAR) = PX0(INDX(I))
PYAR(NPAR) = PY0(INDX(I))
PZAR(NPAR) = PZ0(INDX(I))
PEAR(NPAR) = EE0(INDX(I))
XMAR(NPAR) = XM0(INDX(I))
clin-3/2009:
dpertp(NPAR)=dptemp(INDX(I))
c END IF
cbz12/3/98end
1002 CONTINUE
IAINT2(1) = NPAR
c
RETURN
END
c-----------------------------------------------------------------------
c.....subroutine to copy individually generated particle record into
c.....particle record for many test particle runs.
SUBROUTINE ARINI2(K)
PARAMETER (MAXSTR=150001,MAXR=1)
COMMON /ARPRNT/ ARPAR1(100), IAPAR2(50), ARINT1(100), IAINT2(50)
cc SAVE /ARPRNT/
COMMON /ARPRC/ ITYPAR(MAXSTR),
& GXAR(MAXSTR), GYAR(MAXSTR), GZAR(MAXSTR), FTAR(MAXSTR),
& PXAR(MAXSTR), PYAR(MAXSTR), PZAR(MAXSTR), PEAR(MAXSTR),
& XMAR(MAXSTR)
cc SAVE /ARPRC/
COMMON /ARERC1/MULTI1(MAXR)
cc SAVE /ARERC1/
COMMON /ARPRC1/ITYP1(MAXSTR, MAXR),
& GX1(MAXSTR, MAXR), GY1(MAXSTR, MAXR), GZ1(MAXSTR, MAXR),
& FT1(MAXSTR, MAXR),
& PX1(MAXSTR, MAXR), PY1(MAXSTR, MAXR), PZ1(MAXSTR, MAXR),
& EE1(MAXSTR, MAXR), XM1(MAXSTR, MAXR)
cc SAVE /ARPRC1/
COMMON/tdecay/tfdcy(MAXSTR),tfdpi(MAXSTR,MAXR),tft(MAXSTR)
cc SAVE /tdecay/
common/input1/ MASSPR,MASSTA,ISEED,IAVOID,DT
cc SAVE /input1/
COMMON /INPUT2/ ILAB, MANYB, NTMAX, ICOLL, INSYS, IPOT, MODE,
& IMOMEN, NFREQ, ICFLOW, ICRHO, ICOU, KPOTEN, KMUL
cc SAVE /INPUT2/
COMMON/RNDF77/NSEED
COMMON /dpert/dpertt(MAXSTR,MAXR),dpertp(MAXSTR),dplast(MAXSTR),
1 dpdcy(MAXSTR),dpdpi(MAXSTR,MAXR),dpt(MAXSTR, MAXR),
2 dpp1(MAXSTR,MAXR),dppion(MAXSTR,MAXR)
cc SAVE /RNDF77/
SAVE
MULTI1(K) = IAINT2(1)
DO 1001 I = 1, MULTI1(K)
ITYP1(I, K) = ITYPAR(I)
GX1(I, K) = GXAR(I)
GY1(I, K) = GYAR(I)
GZ1(I, K) = GZAR(I)
FT1(I, K) = FTAR(I)
PX1(I, K) = PXAR(I)
PY1(I, K) = PYAR(I)
PZ1(I, K) = PZAR(I)
EE1(I, K) = PEAR(I)
XM1(I, K) = XMAR(I)
clin-3/2009 hadron weights are initialized in addhad():
clin-5/2008 all hadrons not perturbatively-produced have the weight of 1:
c dpp1(I,K)=1.
dpp1(I,K)=dpertp(I)
1001 CONTINUE
c initialize final time of each particle to ntmax*dt except for
c decay daughters, which have values given by tfdcy() and >(ntmax*dt):
do 1002 ip=1,MAXSTR
tfdcy(ip)=NTMAX*DT
tft(ip)=NTMAX*DT
1002 continue
c
do 1004 irun=1,MAXR
do 1003 ip=1,MAXSTR
tfdpi(ip,irun)=NTMAX*DT
1003 continue
1004 continue
RETURN
END
c=======================================================================
c.....function to convert PDG flavor code into ART flavor code.
FUNCTION IARFLV(IPDG)
common/input1/ MASSPR,MASSTA,ISEED,IAVOID,DT
cc SAVE /input1/
COMMON/RNDF77/NSEED
cc SAVE /RNDF77/
SAVE
c.....anti-Delta-
IF (IPDG .EQ. -1114) THEN
IARFLV = -6
RETURN
END IF
c.....anti-Delta0
IF (IPDG .EQ. -2114) THEN
IARFLV = -7
RETURN
END IF
c.....anti-Delta+
IF (IPDG .EQ. -2214) THEN
IARFLV = -8
RETURN
END IF
c.....anti-Delta++
IF (IPDG .EQ. -2224) THEN
IARFLV = -9
RETURN
END IF
cbzdbg2/23/99
c.....anti-proton
IF (IPDG .EQ. -2212) THEN
IARFLV = -1
RETURN
END IF
c.....anti-neutron
IF (IPDG .EQ. -2112) THEN
IARFLV = -2
RETURN
END IF
cbzdbg2/23/99end
c.....eta
IF (IPDG .EQ. 221) THEN
IARFLV = 0
RETURN
END IF
c.....proton
IF (IPDG .EQ. 2212) THEN
IARFLV = 1
RETURN
END IF
c.....neutron
IF (IPDG .EQ. 2112) THEN
IARFLV = 2
RETURN
END IF
c.....pi-
IF (IPDG .EQ. -211) THEN
IARFLV = 3
RETURN
END IF
c.....pi0
IF (IPDG .EQ. 111) THEN
IARFLV = 4
RETURN
END IF
c.....pi+
IF (IPDG .EQ. 211) THEN
IARFLV = 5
RETURN
END IF
c.....Delta-
IF (IPDG .EQ. 1114) THEN
IARFLV = 6
RETURN
END IF
c.....Delta0
IF (IPDG .EQ. 2114) THEN
IARFLV = 7
RETURN
END IF
c.....Delta+
IF (IPDG .EQ. 2214) THEN
IARFLV = 8
RETURN
END IF
c.....Delta++
IF (IPDG .EQ. 2224) THEN
IARFLV = 9
RETURN
END IF
c.....Lambda
IF (IPDG .EQ. 3122) THEN
IARFLV = 14
RETURN
END IF
c.....Lambda-bar
IF (IPDG .EQ. -3122) THEN
IARFLV = -14
RETURN
END IF
c.....Sigma-
IF (IPDG .EQ. 3112) THEN
IARFLV = 15
RETURN
END IF
c.....Sigma-bar
IF (IPDG .EQ. -3112) THEN
IARFLV = -15
RETURN
END IF
c.....Sigma0
IF (IPDG .EQ. 3212) THEN
IARFLV = 16
RETURN
END IF
c.....Sigma0-bar
IF (IPDG .EQ. -3212) THEN
IARFLV = -16
RETURN
END IF
c.....Sigma+
IF (IPDG .EQ. 3222) THEN
IARFLV = 17
RETURN
END IF
c.....Sigma+ -bar
IF (IPDG .EQ. -3222) THEN
IARFLV = -17
RETURN
END IF
c.....K-
IF (IPDG .EQ. -321) THEN
IARFLV = 21
RETURN
END IF
c.....K+
IF (IPDG .EQ. 321) THEN
IARFLV = 23
RETURN
END IF
c.....temporary entry for K0
IF (IPDG .EQ. 311) THEN
IARFLV = 23
RETURN
END IF
c.....temporary entry for K0bar
IF (IPDG .EQ. -311) THEN
IARFLV = 21
RETURN
END IF
c.....temporary entry for K0S and K0L
IF (IPDG .EQ. 310 .OR. IPDG .EQ. 130) THEN
R = RANART(NSEED)
IF (R .GT. 0.5) THEN
IARFLV = 23
ELSE
IARFLV = 21
END IF
RETURN
END IF
c.....rho-
IF (IPDG .EQ. -213) THEN
IARFLV = 25
RETURN
END IF
c.....rho0
IF (IPDG .EQ. 113) THEN
IARFLV = 26
RETURN
END IF
c.....rho+
IF (IPDG .EQ. 213) THEN
IARFLV = 27
RETURN
END IF
c.....omega
IF (IPDG .EQ. 223) THEN
IARFLV = 28
RETURN
END IF
c.....phi
IF (IPDG .EQ. 333) THEN
IARFLV = 29
RETURN
END IF
c.....K*+
IF (IPDG .EQ. 323) THEN
IARFLV = 30
RETURN
END IF
c.....K*-
IF (IPDG .EQ. -323) THEN
IARFLV = -30
RETURN
END IF
c.....temporary entry for K*0
IF (IPDG .EQ. 313) THEN
IARFLV = 30
RETURN
END IF
c.....temporary entry for K*0bar
IF (IPDG .EQ. -313) THEN
IARFLV = -30
RETURN
END IF
c...... eta-prime
IF (IPDG .EQ. 331) THEN
IARFLV = 31
RETURN
END IF
c...... a1
c IF (IPDG .EQ. 777) THEN
c IARFLV = 32
c RETURN
c END IF
c... cascade-
IF (IPDG .EQ. 3312) THEN
IARFLV = 40
RETURN
END IF
c... cascade+ (bar)
IF (IPDG .EQ. -3312) THEN
IARFLV = -40
RETURN
END IF
c... cascade0
IF (IPDG .EQ. 3322) THEN
IARFLV = 41
RETURN
END IF
c... cascade0 -bar
IF (IPDG .EQ. -3322) THEN
IARFLV = -41
RETURN
END IF
c... Omega-
IF (IPDG .EQ. 3334) THEN
IARFLV = 45
RETURN
END IF
c... Omega+ (bar)
IF (IPDG .EQ. -3334) THEN
IARFLV = -45
RETURN
END IF
c... Di-Omega
IF (IPDG .EQ. 6666) THEN
IARFLV = 44
RETURN
END IF
c sp06/05/01 end
clin-3/2009 keep the same ID numbers in case there are initial deuterons:
IF (IPDG .EQ. 42 .or. IPDG .EQ. -42) THEN
IARFLV = IPDG
RETURN
END IF
c.....other
IARFLV = IPDG + 10000
RETURN
END
c-----------------------------------------------------------------------
c.....function to convert ART flavor code into PDG flavor code.
FUNCTION INVFLV(IART)
common/input1/ MASSPR,MASSTA,ISEED,IAVOID,DT
cc SAVE /input1/
COMMON/RNDF77/NSEED
cc SAVE /RNDF77/
SAVE
c.....anti-Delta-
IF (IART .EQ. -6) THEN
INVFLV = -1114
RETURN
END IF
c.....anti-Delta0
IF (IART .EQ. -7) THEN
INVFLV = -2114
RETURN
END IF
c.....anti-Delta+
IF (IART .EQ. -8) THEN
INVFLV = -2214
RETURN
END IF
c.....anti-Delta++
IF (IART .EQ. -9) THEN
INVFLV = -2224
RETURN
END IF
cbzdbg2/23/99
c.....anti-proton
IF (IART .EQ. -1) THEN
INVFLV = -2212
RETURN
END IF
c.....anti-neutron
IF (IART .EQ. -2) THEN
INVFLV = -2112
RETURN
END IF
cbzdbg2/23/99end
c.....eta
IF (IART .EQ. 0) THEN
INVFLV = 221
RETURN
END IF
c.....proton
IF (IART .EQ. 1) THEN
INVFLV = 2212
RETURN
END IF
c.....neutron
IF (IART .EQ. 2) THEN
INVFLV = 2112
RETURN
END IF
c.....pi-
IF (IART .EQ. 3) THEN
INVFLV = -211
RETURN
END IF
c.....pi0
IF (IART .EQ. 4) THEN
INVFLV = 111
RETURN
END IF
c.....pi+
IF (IART .EQ. 5) THEN
INVFLV = 211
RETURN
END IF
c.....Delta-
IF (IART .EQ. 6) THEN
INVFLV = 1114
RETURN
END IF
c.....Delta0
IF (IART .EQ. 7) THEN
INVFLV = 2114
RETURN
END IF
c.....Delta+
IF (IART .EQ. 8) THEN
INVFLV = 2214
RETURN
END IF
c.....Delta++
IF (IART .EQ. 9) THEN
INVFLV = 2224
RETURN
END IF
cc.....N*(1440), N*(1535) temporary entry
c IF (IART .GE. 10 .AND. IART .LE.13) THEN
c INVFLV = 0
c RETURN
c END IF
c.....Lambda
IF (IART .EQ. 14) THEN
INVFLV = 3122
RETURN
END IF
c.....Lambda-bar
IF (IART .EQ. -14) THEN
INVFLV = -3122
RETURN
END IF