Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
plu.f
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file plu.f
1
2
C*********************************************************************
3
4
FUNCTION
plu
(I,J)
5
6
C...Purpose: to provide various real-valued event related data.
7
common/lujets/
n
,
k
(9000,5),
p
(9000,5),
v
(9000,5)
8
SAVE
/lujets/
9
common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10
SAVE
/ludat1/
11
common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
12
SAVE
/ludat2/
13
dimension psum(4)
14
15
C...Set default value. For I = 0 sum of momenta or charges,
16
C...or invariant mass of system.
17
plu
=0.
18
IF
(
i
.LT.0.OR.
i
.GT.mstu(4).OR.
j
.LE.0)
THEN
19
ELSEIF
(
i
.EQ.0.AND.
j
.LE.4)
THEN
20
DO
100
i1
=1,
n
21
100
IF
(
k
(
i1
,1).GT.0.AND.
k
(
i1
,1).LE.10)
plu
=
plu
+
p
(
i1
,
j
)
22
ELSEIF
(
i
.EQ.0.AND.
j
.EQ.5)
THEN
23
DO
110 j1=1,4
24
psum(j1)=0.
25
DO
110
i1
=1,
n
26
110
IF
(
k
(
i1
,1).GT.0.AND.
k
(
i1
,1).LE.10) psum(j1)=psum(j1)+
p
(
i1
,j1)
27
plu
=sqrt(
max
(0.,psum(4)**2-psum(1)**2-psum(2)**2-psum(3)**2))
28
ELSEIF
(
i
.EQ.0.AND.
j
.EQ.6)
THEN
29
DO
120
i1
=1,
n
30
120
IF
(
k
(
i1
,1).GT.0.AND.
k
(
i1
,1).LE.10)
plu
=
plu
+
luchge
(
k
(
i1
,2))/3.
31
ELSEIF
(
i
.EQ.0)
THEN
32
33
C...Direct readout of P matrix.
34
ELSEIF
(
j
.LE.5)
THEN
35
plu
=
p
(
i
,
j
)
36
37
C...Charge, total momentum, transverse momentum, transverse mass.
38
ELSEIF
(
j
.LE.12)
THEN
39
IF
(
j
.EQ.6)
plu
=
luchge
(
k
(
i
,2))/3.
40
IF
(
j
.EQ.7.OR.
j
.EQ.8)
plu
=
p
(
i
,1)**2+
p
(
i
,2)**2+
p
(
i
,3)**2
41
IF
(
j
.EQ.9.OR.
j
.EQ.10)
plu
=
p
(
i
,1)**2+
p
(
i
,2)**2
42
IF
(
j
.EQ.11.OR.
j
.EQ.12)
plu
=
p
(
i
,5)**2+
p
(
i
,1)**2+
p
(
i
,2)**2
43
IF
(
j
.EQ.8.OR.
j
.EQ.10.OR.
j
.EQ.12)
plu
=sqrt(
plu
)
44
45
C...Theta and phi angle in radians or degrees.
46
ELSEIF
(
j
.LE.16)
THEN
47
IF
(
j
.LE.14)
plu
=
ulangl
(
p
(
i
,3),sqrt(
p
(
i
,1)**2+
p
(
i
,2)**2))
48
IF
(
j
.GE.15)
plu
=
ulangl
(
p
(
i
,1),
p
(
i
,2))
49
IF
(
j
.EQ.14.OR.
j
.EQ.16)
plu
=
plu
*180./paru(1)
50
51
C...True rapidity, rapidity with pion mass, pseudorapidity.
52
ELSEIF
(
j
.LE.19)
THEN
53
pmr=0.
54
IF
(
j
.EQ.17) pmr=
p
(
i
,5)
55
IF
(
j
.EQ.18) pmr=
ulmass
(211)
56
pr=
max
(1
e
-20,pmr**2+
p
(
i
,1)**2+
p
(
i
,2)**2)
57
plu
=
sign
(
log
(min((sqrt(pr+
p
(
i
,3)**2)+abs(
p
(
i
,3)))/sqrt(pr),
58
& 1e20)),
p
(
i
,3))
59
60
C...Energy and momentum fractions (only to be used in CM frame).
61
ELSEIF
(
j
.LE.25)
THEN
62
IF
(
j
.EQ.20)
plu
=2.*sqrt(
p
(
i
,1)**2+
p
(
i
,2)**2+
p
(
i
,3)**2)/paru(21)
63
IF
(
j
.EQ.21)
plu
=2.*
p
(
i
,3)/paru(21)
64
IF
(
j
.EQ.22)
plu
=2.*sqrt(
p
(
i
,1)**2+
p
(
i
,2)**2)/paru(21)
65
IF
(
j
.EQ.23)
plu
=2.*
p
(
i
,4)/paru(21)
66
IF
(
j
.EQ.24)
plu
=(
p
(
i
,4)+
p
(
i
,3))/paru(21)
67
IF
(
j
.EQ.25)
plu
=(
p
(
i
,4)-
p
(
i
,3))/paru(21)
68
ENDIF
69
70
RETURN
71
END
coresoftware
blob
master
generators
hijing
src
plu.f
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:59
using
1.8.2 with
sPHENIX GitHub integration