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
PHPythia6.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHPythia6.h
1
#ifndef __PHPYTHIA6_H__
2
#define __PHPYTHIA6_H__
3
4
#include <
fun4all/SubsysReco.h
>
5
#include <
phhepmc/PHHepMCGenHelper.h
>
6
7
#include <string>
8
#include <vector>
9
10
class
PHCompositeNode
;
11
class
PHHepMCGenEvent
;
12
class
PHPy6GenTrigger
;
13
14
namespace
HepMC {
15
class
GenEvent;
16
};
17
18
class
PHPythia6
:
public
SubsysReco
{
19
20
public
:
21
22
PHPythia6
(
const
std::string
&
name
=
"PHPythia6"
);
23
virtual
~PHPythia6
();
24
25
int
Init
(
PHCompositeNode
*topNode);
26
27
int
process_event
(
PHCompositeNode
*topNode);
28
29
int
ResetEvent
(
PHCompositeNode
*topNode);
30
31
int
End
(
PHCompositeNode
*topNode);
32
33
void
set_config_file
(
const
std::string
cfg_file ) {
_configFile
= cfg_file; }
34
35
void
print_config
()
const
;
36
37
void
beam_vertex_parameters
(
double
beamX,
38
double
beamY,
39
double
beamZ,
40
double
beamXsigma,
41
double
beamYsigma,
42
double
beamZsigma) {
43
44
set_vertex_distribution_mean
(beamX, beamY, beamZ, 0);
45
set_vertex_distribution_width
(beamXsigma, beamYsigma, beamZsigma, 0);
46
}
47
48
void
save_ascii
(
std::string
fname
=
"pythia_hepmc.dat"
)
49
{
50
_save_ascii
=
true
;
51
_filename_ascii
=
fname
;
52
}
53
55
void
register_trigger
(
PHPy6GenTrigger
*theTrigger);
56
void
set_trigger_OR
() {
_triggersOR
=
true
; }
// default true
57
void
set_trigger_AND
() {
_triggersAND
=
true
; }
58
60
void
set_vertex_distribution_function
(
PHHepMCGenHelper::VTXFUNC
x
,
PHHepMCGenHelper::VTXFUNC
y
,
PHHepMCGenHelper::VTXFUNC
z
,
PHHepMCGenHelper::VTXFUNC
t
)
61
{
62
hepmc_helper
.
set_vertex_distribution_function
(x, y, z, t);
63
}
64
66
void
set_vertex_distribution_mean
(
const
double
x
,
const
double
y
,
const
double
z
,
const
double
t
)
67
{
68
hepmc_helper
.
set_vertex_distribution_mean
(x, y, z, t);
69
}
70
72
void
set_vertex_distribution_width
(
const
double
x
,
const
double
y
,
const
double
z
,
const
double
t
)
73
{
74
hepmc_helper
.
set_vertex_distribution_width
(x, y, z, t);
75
}
76
//
78
void
set_reuse_vertex
(
int
src_embedding_id)
79
{
80
hepmc_helper
.
set_reuse_vertex
(src_embedding_id);
81
}
82
87
int
get_embedding_id
()
const
{
return
hepmc_helper
.
get_embedding_id
(); }
88
//
93
void
set_embedding_id
(
int
id
) {
hepmc_helper
.
set_embedding_id
(
id
); }
94
private
:
95
96
int
ReadConfig
(
const
std::string
cfg_file =
""
);
97
int
CreateNodeTree
(
PHCompositeNode
*topNode);
98
103
void
IntegerTest
(
double
number );
104
105
int
_eventcount
;
106
int
_geneventcount
;
107
108
// Pythia6 configuration file
109
std::string
_configFile
;
110
114
bool
_save_ascii
;
115
119
std::string
_filename_ascii
;
120
121
// event selection
122
std::vector<PHPy6GenTrigger*>
_registeredTriggers
;
123
bool
_triggersOR
;
124
bool
_triggersAND
;
125
129
void
initPythia
();
131
PHHepMCGenHelper
hepmc_helper
;
132
133
};
134
135
#endif
/* __PHPYTHIA6_H__ */
136
analysis
blob
master
EICTrigger
PHPythia6.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:49
using
1.8.2 with
sPHENIX GitHub integration