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
pythia8.py
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file pythia8.py
1
#!/usr/bin/env python3
2
from
typing
import
Optional, Union
3
from
pathlib
import
Path
4
from
collections.abc
import
Iterable
5
6
import
acts
7
import
acts.examples
8
from
acts.examples.simulation
import
addPythia8
9
10
u = acts.UnitConstants
11
12
13
def
runPythia8
(
14
outputDir,
15
outputRoot: bool =
True
,
16
outputCsv: bool =
True
,
17
s:
acts.examples.Sequencer
=
None
,
18
):
19
# Preliminaries
20
rnd = acts.examples.RandomNumbers()
21
outputDir = Path(outputDir)
22
23
# Sequencer
24
s = s
or
acts.examples.Sequencer
(
25
events=10, numThreads=-1, logLevel=acts.logging.INFO
26
)
27
28
addPythia8
(
29
s,
30
rnd=rnd,
31
outputDirCsv=outputDir /
"csv"
if
outputCsv
else
None
,
32
outputDirRoot=outputDir
if
outputRoot
else
None
,
33
)
34
35
return
s
36
37
38
if
"__main__"
== __name__:
39
runPythia8
(Path.cwd()).
run
()
acts
blob
sPHENIX
Examples
Scripts
Python
pythia8.py
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:40
using
1.8.2 with
sPHENIX GitHub integration