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
HijJet4.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file HijJet4.h
1
2
#ifndef HijJet4_h
3
#define HijJet4_h
4
5
extern
"C"
{
void
*
hijjet4_address_
(
void
); }
6
13
class
HijJet4
{
14
public
:
15
HijJet4
();
16
~HijJet4
();
17
18
int
&
ndr
(
void
);
19
int
&
iadr
(
int
i
,
int
j
);
20
int
&
kfdr
(
int
i);
21
float
&
pdr
(
int
i,
int
k
);
22
23
void
init
(
void
);
24
25
// return common array lengths
26
inline
int
lenI
()
const
{
return
_lenI
;}
27
inline
int
lenJ
()
const
{
return
_lenJ
;}
28
inline
int
lenK
()
const
{
return
_lenK
;}
29
30
private
:
31
32
// Lengths of array in HiMain2 common
33
static
const
int
_lenI
= 900;
34
static
const
int
_lenJ
= 2;
35
static
const
int
_lenK
= 5;
36
37
struct
HIJJET4
;
38
friend
struct
HIJJET4
;
39
40
struct
HIJJET4
41
{
42
int
ndr
;
43
int
iadr [
_lenJ
][
_lenI
];
44
int
kfdr [
_lenI
];
45
float
pdr [
_lenK
][
_lenI
];
46
};
47
48
int
_dummy
;
49
float
_realdummy
;
50
51
static
HIJJET4
*
_hijjet4
;
52
};
53
54
// set pointer to zero at start
55
HijJet4::HIJJET4
*
HijJet4::_hijjet4
=0;
56
57
inline
void
58
HijJet4::init
(
void
)
59
{
if
(!
_hijjet4
)
_hijjet4
=
static_cast<
HIJJET4
*
>
(
hijjet4_address_
()); }
60
61
// Constructor
62
inline
63
HijJet4::HijJet4
()
64
:
_dummy
(-999),
65
_realdummy (-999.)
66
{}
67
68
// Destructor
69
inline
70
HijJet4::~HijJet4
()
71
{}
72
73
inline
int
&
74
HijJet4::ndr
(
void
)
75
{
76
init
();
// check COMMON is initialized
77
return
_hijjet4
->
ndr
;
78
}
79
80
inline
int
&
81
HijJet4::iadr
(
int
i
,
int
j
)
82
{
83
init
();
// check COMMON is initialized
84
if
( i < 1 || i >
lenI
() ||
85
j < 1 || j >
lenJ
() )
return
_dummy
;
86
87
return
_hijjet4
->
iadr
[j-1][i-1];
88
}
89
90
inline
int
&
91
HijJet4::kfdr
(
int
i
)
92
{
93
init
();
// check COMMON is initialized
94
if
(i < 1 || i >
lenI
())
return
_dummy
;
95
return
_hijjet4
->
kfdr
[i-1];
96
}
97
98
inline
float
&
99
HijJet4::pdr
(
int
i
,
int
k
)
100
{
101
init
();
// check COMMON is initialized
102
if
( i < 1 || i >
lenI
() ||
103
k < 1 || k >
lenK
() )
return
_realdummy
;
104
105
return
_hijjet4
->
pdr
[k-1][i-1];
106
}
107
108
#endif
coresoftware
blob
master
generators
sHijing
HijJet4.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:04
using
1.8.2 with
sPHENIX GitHub integration