forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpythia8.py
More file actions
executable file
·39 lines (30 loc) · 787 Bytes
/
pythia8.py
File metadata and controls
executable file
·39 lines (30 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3
from pathlib import Path
import acts
import acts.examples
from acts.examples.simulation import addPythia8
u = acts.UnitConstants
def runPythia8(
outputDir,
outputRoot: bool = True,
outputCsv: bool = True,
s: acts.examples.Sequencer = None,
vtxGen=None,
):
# Preliminaries
rnd = acts.examples.RandomNumbers()
outputDir = Path(outputDir)
# Sequencer
s = s or acts.examples.Sequencer(
events=10, numThreads=-1, logLevel=acts.logging.INFO
)
addPythia8(
s,
rnd=rnd,
outputDirCsv=outputDir / "csv" if outputCsv else None,
outputDirRoot=outputDir if outputRoot else None,
vtxGen=vtxGen,
)
return s
if "__main__" == __name__:
runPythia8(Path.cwd()).run()