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
hijsrt.f
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file hijsrt.f
1
C
2
C
3
C
4
C********************************************************************
5
C Sort the jets associated with a nucleon in order of their
6
C rapdities
7
C********************************************************************
8
SUBROUTINE
hijsrt
(JPJT,NPT)
9
dimension kf(100),px(100),py(100),pz(100),pe(100),pm(100)
10
dimension
y
(100),
ip
(100,2)
11
common/hijjet1/
npj
(300),
kfpj
(300,500),
pjpx
(300,500),
12
&
pjpy
(300,500),
pjpz
(300,500),
pjpe
(300,500),
13
&
pjpm
(300,500),
ntj
(300),
kftj
(300,500),
14
&
pjtx
(300,500),
pjty
(300,500),
pjtz
(300,500),
15
&
pjte
(300,500),
pjtm
(300,500)
16
SAVE
/hijjet1/
17
IF
(npt.EQ.2) go
to
500
18
jp=jpjt
19
iq=0
20
i=1
21
100 kf(i)=
kfpj
(jp,i)
22
px(i)=
pjpx
(jp,i)
23
py(i)=
pjpy
(jp,i)
24
pz(i)=
pjpz
(jp,i)
25
pe(i)=
pjpe
(jp,i)
26
pm(i)=
pjpm
(jp,i)
27
y
(i-iq)=0.5*alog((abs(pe(i)+pz(i))+1.e-5)
28
& /(abs(pe(i)-pz(i))+1.e-5))
29
ip
(i-iq,1)=i
30
ip
(i-iq,2)=0
31
IF
(kf(i).NE.21)
THEN
32
ip
(i-iq,2)=1
33
iq=iq+1
34
i=i+1
35
kf(i)=
kfpj
(jp,i)
36
px(i)=
pjpx
(jp,i)
37
py(i)=
pjpy
(jp,i)
38
pz(i)=
pjpz
(jp,i)
39
pe(i)=
pjpe
(jp,i)
40
pm(i)=
pjpm
(jp,i)
41
ENDIF
42
i=i+1
43
IF
(i.LE.
npj
(jp)) go
to
100
44
45
DO
200 i=1,
npj
(jp)-iq
46
DO
200 j=i+1,
npj
(jp)-iq
47
IF
(
y
(i).GT.
y
(j)) go
to
200
48
ip1=
ip
(i,1)
49
ip2=
ip
(i,2)
50
ip
(i,1)=
ip
(j,1)
51
ip
(i,2)=
ip
(j,2)
52
ip
(j,1)=ip1
53
ip
(j,2)=ip2
54
200
CONTINUE
55
C ********sort in decending y
56
iqq=0
57
i=1
58
300
kfpj
(jp,i)=kf(
ip
(i-iqq,1))
59
pjpx
(jp,i)=px(
ip
(i-iqq,1))
60
pjpy
(jp,i)=py(
ip
(i-iqq,1))
61
pjpz
(jp,i)=pz(
ip
(i-iqq,1))
62
pjpe
(jp,i)=pe(
ip
(i-iqq,1))
63
pjpm
(jp,i)=pm(
ip
(i-iqq,1))
64
IF
(
ip
(i-iqq,2).EQ.1)
THEN
65
kfpj
(jp,i+1)=kf(
ip
(i-iqq,1)+1)
66
pjpx
(jp,i+1)=px(
ip
(i-iqq,1)+1)
67
pjpy
(jp,i+1)=py(
ip
(i-iqq,1)+1)
68
pjpz
(jp,i+1)=pz(
ip
(i-iqq,1)+1)
69
pjpe
(jp,i+1)=pe(
ip
(i-iqq,1)+1)
70
pjpm
(jp,i+1)=pm(
ip
(i-iqq,1)+1)
71
i=i+1
72
iqq=iqq+1
73
ENDIF
74
i=i+1
75
IF
(i.LE.
npj
(jp)) go
to
300
76
77
RETURN
78
79
500 jt=jpjt
80
iq=0
81
i=1
82
600 kf(i)=
kftj
(jt,i)
83
px(i)=
pjtx
(jt,i)
84
py(i)=
pjty
(jt,i)
85
pz(i)=
pjtz
(jt,i)
86
pe(i)=
pjte
(jt,i)
87
pm(i)=
pjtm
(jt,i)
88
y
(i-iq)=0.5*alog((abs(pe(i)+pz(i))+1.e-5)
89
& /(abs(pe(i)-pz(i))+1.e-5))
90
ip
(i-iq,1)=i
91
ip
(i-iq,2)=0
92
IF
(kf(i).NE.21)
THEN
93
ip
(i-iq,2)=1
94
iq=iq+1
95
i=i+1
96
kf(i)=
kftj
(jt,i)
97
px(i)=
pjtx
(jt,i)
98
py(i)=
pjty
(jt,i)
99
pz(i)=
pjtz
(jt,i)
100
pe(i)=
pjte
(jt,i)
101
pm(i)=
pjtm
(jt,i)
102
ENDIF
103
i=i+1
104
IF
(i.LE.
ntj
(jt)) go
to
600
105
106
DO
700 i=1,
ntj
(jt)-iq
107
DO
700 j=i+1,
ntj
(jt)-iq
108
IF
(
y
(i).LT.
y
(j)) go
to
700
109
ip1=
ip
(i,1)
110
ip2=
ip
(i,2)
111
ip
(i,1)=
ip
(j,1)
112
ip
(i,2)=
ip
(j,2)
113
ip
(j,1)=ip1
114
ip
(j,2)=ip2
115
700
CONTINUE
116
C ********sort in acending y
117
iqq=0
118
i=1
119
800
kftj
(jt,i)=kf(
ip
(i-iqq,1))
120
pjtx
(jt,i)=px(
ip
(i-iqq,1))
121
pjty
(jt,i)=py(
ip
(i-iqq,1))
122
pjtz
(jt,i)=pz(
ip
(i-iqq,1))
123
pjte
(jt,i)=pe(
ip
(i-iqq,1))
124
pjtm
(jt,i)=pm(
ip
(i-iqq,1))
125
IF
(
ip
(i-iqq,2).EQ.1)
THEN
126
kftj
(jt,i+1)=kf(
ip
(i-iqq,1)+1)
127
pjtx
(jt,i+1)=px(
ip
(i-iqq,1)+1)
128
pjty
(jt,i+1)=py(
ip
(i-iqq,1)+1)
129
pjtz
(jt,i+1)=pz(
ip
(i-iqq,1)+1)
130
pjte
(jt,i+1)=pe(
ip
(i-iqq,1)+1)
131
pjtm
(jt,i+1)=pm(
ip
(i-iqq,1)+1)
132
i=i+1
133
iqq=iqq+1
134
ENDIF
135
i=i+1
136
IF
(i.LE.
ntj
(jt)) go
to
800
137
RETURN
138
END
fun4all_coresoftware
blob
master
generators
hijing
src
hijsrt.f
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:39
using
1.8.2 with
EIC GitHub integration