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
particle_gun.py
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file particle_gun.py
1
#!/usr/bin/env python3
2
from
pathlib
import
Path
3
4
import
acts
5
from
acts.examples
import
Sequencer
6
from
acts.examples.simulation
import
addParticleGun, EtaConfig, ParticleConfig
7
8
9
def
runParticleGun
(outputDir, s=None):
10
s = s
or
Sequencer
(events=10, numThreads=-1)
11
s.config.logLevel = acts.logging.INFO
12
outputDir = Path(outputDir)
13
addParticleGun
(
14
s,
15
EtaConfig
(-4.0, 4.0),
16
ParticleConfig
(2),
17
outputDirCsv=outputDir /
"csv"
,
18
outputDirRoot=outputDir,
19
printParticles=
True
,
20
)
21
return
s
22
23
24
if
"__main__"
== __name__:
25
runParticleGun
(Path.cwd()).
run
()
acts
blob
sPHENIX
Examples
Scripts
Python
particle_gun.py
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:40
using
1.8.2 with
sPHENIX GitHub integration