EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
example_2.f
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file example_2.f
1
C****************************************************************************
2
C Program # 1 from Comp. Phys. Commun. 83 (1994) 307
3
C by M. Gyulassy and X-.N. Wang
4
C Modified by V.Uzhinsky, CERN, Oct. 2003
5
C***************************************************************************
6
7
CHARACTER
frame*8,proj*8,targ*8
8
9
dimension dndpt(50), dndy(50)
10
11
common/hiparnt/
hipr1
(100),
ihpr2
(50),
hint1
(100),
ihnt2
(50)
12
SAVE
/hiparnt/
13
14
C....information of produced particles:
15
16
common/himain1/
natt
,
eatt
,
jatt
,
nt
,
np
,
n0
,
n01
,
n10
,
n11
17
SAVE
/himain1/
18
19
common/himain2/
katt
(130000,4),
patt
(130000,4)
20
SAVE
/himain2/
21
C
22
C....information of produced partons:
23
24
common/hijjet1/
npj
(300),
kfpj
(300,500),
pjpx
(300,500),
pjpy
(300,500)
25
& ,
pjpz
(300,500),
pjpe
(300,500),
pjpm
(300,500)
26
& ,
ntj
(300),
kftj
(300,500),
pjtx
(300,500),
pjty
(300,500)
27
& ,
pjtz
(300,500),
pjte
(300,500),
pjtm
(300,500)
28
SAVE
/hijjet1/
29
30
common/hijjet2/
nsg
,
njsg
(900),
iasg
(900,3),
k1sg
(900,100)
31
& ,
k2sg
(900,100),
pxsg
(900,100),
pysg
(900,100),
pzsg
(900,100)
32
& ,
pesg
(900,100),
pmsg
(900,100)
33
SAVE
/hijjet2/
34
C
35
common/histrng/
nfp
(300,15),
pp
(300,15),
nft
(300,15),
pt
(300,15)
36
SAVE
/histrng/
37
38
common/ranseed/
nseed
39
SAVE
/ranseed/
40
41
nseed
=0
42
43
do
k
=1,50
44
dndpt(
k
)=0.
45
dndy(
k
) =0.
46
enddo
47
48
frame=
'CMS'
49
50
write
(6,*)
'===================================================='
51
write
(6,*)
' Calculation of transverse momentum and rapidity '
52
write
(6,*)
' distributions of charged particles in '
53
write
(6,*)
'hh-, hA- and AA-collisions at fixed impact parameter'
54
write
(6,*)
' Calculation will be performed in CM System '
55
write
(6,*)
'===================================================='
56
57
write
(6,*)
58
write
(6,*)
'Enter the energy per NN-collision (GeV)'
59
read
(5,*)
efrm
60
61
write
(6,*)
62
write
(6,*)
'Enter a type of the "projectile" particle'
63
write
(6,*)
64
write
(6,*)
' P proton, PBAR anti-proton,'
65
write
(6,*)
' N neutron, NBAR anti-neutron,'
66
write
(6,*)
' PI+ - positive pion, PI- negative pion,'
67
write
(6,*)
' K+ positive kaon, K- negative kaon'
68
write
(6,*)
69
write
(6,*)
' A - nucleus --------------------------'
70
71
read
(5,1) proj
72
1
format
(a8)
73
74
if
(proj.ne.
'A'
)
then
75
iap
=1
76
if
(proj.eq.
'P'
)
izp
= 1
77
if
(proj.eq.
'PBAR'
)
izp
=-1
78
if
(proj.eq.
'N'
)
izp
= 0
79
if
(proj.eq.
'NBAR'
)
izp
= 0
80
if
(proj.eq.
'PI+'
)
izp
= 1
81
if
(proj.eq.
'PI-'
)
izp
=-1
82
if
(proj.eq.
'K+'
)
izp
= 1
83
if
(proj.eq.
'K-'
)
izp
=-1
84
else
85
write
(6,*)
86
write
(6,*)
'Enter mass number and charge of the proj. nucleus'
87
read
(5,*)
iap
,
izp
88
endif
89
90
write
(6,*)
91
write
(6,*)
'Enter a type of the "target" particle (same notations)'
92
read
(5,1) targ
93
94
if
(targ.ne.
'A'
)
then
95
iat
=1
96
if
(targ.eq.
'P'
)
izt
= 1
97
if
(targ.eq.
'PBAR'
)
izt
=-1
98
if
(targ.eq.
'N'
)
izt
= 0
99
if
(targ.eq.
'NBAR'
)
izt
= 0
100
if
(targ.eq.
'PI+'
)
izt
= 1
101
if
(targ.eq.
'PI-'
)
izt
=-1
102
if
(targ.eq.
'K+'
)
izt
= 1
103
if
(targ.eq.
'K-'
)
izt
=-1
104
else
105
write
(6,*)
106
write
(6,*)
'Enter mass number and charge of the target nucleus'
107
read
(5,*)
iat
,
izt
108
endif
109
110
write
(6,*)
111
write
(6,*)
'Enter number of events'
112
113
read
(5,*) n_event
114
115
CALL
hijset
(
efrm
,frame,proj,targ,
iap
,
izp
,
iat
,
izt
)
116
117
write
(6,*)
' Simulation of interactions with'
118
write
(6,*)
119
write
(6,*)
' Proj = '
,proj,
' and Targ = '
,targ
120
write
(6,*)
' IAP ='
,
iap
,
' IAT ='
,
iat
121
write
(6,*)
' IZP ='
,
izp
,
' IZT ='
,
izt
122
write
(6,*)
123
write
(6,*)
' Reference frame - '
,frame
124
write
(6,*)
' ENERGY '
,
efrm
,
' (GeV)'
125
write
(6,*)
' Number of generated events -'
,n_event
126
write
(6,*)
127
128
if
(proj.eq.
'A'
.or.targ.eq.
'A'
)
then
129
write
(6,*)
'Enter Min. and Max. values of impact parameter (fm)'
130
read
(5,*) bmin, bmax
131
else
132
bmin=0.0
133
bmax=0.0
134
endif
135
136
DO
2000 j=1,n_event
137
138
write
(6,*)
' Event # '
,j,
' ------------------------------'
139
140
CALL
hijing
(frame,bmin,bmax)
141
C
142
C....calculate rapidity and transverse momentum distributions of
143
C....produced charged particles:
144
145
DO
1000 i=1,
natt
146
147
C....exclude beam nucleons as produced particles:
148
149
if
(
katt
(i,2).EQ.0 .OR.
katt
(i,2).EQ.10) go
to
1000
150
151
C....select charged particles only:
152
153
IF
(
luchge
(
katt
(i,1)) .EQ. 0) go
to
1000
154
155
ptr
=sqrt(
patt
(i,1)**2+
patt
(i,2)**2)
156
IF
(
ptr
.GE. 10.0) go
to
100
157
158
ipt=1+
ptr
/0.2
159
dndpt(ipt)=dndpt(ipt)+1.0/float(n_event)/0.2/2.0/
ptr
160
161
100
y
=0.5*
log
((
patt
(i,4)+
patt
(i,3))/(
patt
(i,4)-
patt
(i,3)))
162
IF
(abs(
y
) .GE. 10.0) go
to
1000
163
164
iy=1+abs(
y
)/0.2
165
dndy(iy)=dndy(iy)+1.0/float(n_event)/0.2/2.0
166
1000
CONTINUE
167
2000
CONTINUE
168
169
C....print out the rapidity and transverse momentum distributions:
170
171
do
k
=1,50
172
WRITE
(6,2)0.2*(
k
-1),dndpt(
k
),dndy(
k
)
173
2
format
(1
x
,f5.1,2(2
x
,e11.4))
174
enddo
175
176
stop
177
END
178
179
FUNCTION
ran
(NSEED)
180
ran
=
rlu
(
nseed
)
181
RETURN
182
END
fun4all_coresoftware
blob
master
generators
hijing
examples
example_2.f
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:39
using
1.8.2 with
EIC GitHub integration