forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathfatras.py
More file actions
executable file
·39 lines (31 loc) · 1008 Bytes
/
fatras.py
File metadata and controls
executable file
·39 lines (31 loc) · 1008 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 addParticleGun, addFatras, EtaConfig
u = acts.UnitConstants
def runFatras(trackingGeometry, field, outputDir, s: acts.examples.Sequencer = None):
s = s or acts.examples.Sequencer(events=100, numThreads=-1)
s.config.logLevel = acts.logging.INFO
rnd = acts.examples.RandomNumbers()
addParticleGun(
s,
EtaConfig(-2.0, 2.0),
rnd=rnd,
)
outputDir = Path(outputDir)
addFatras(
s,
trackingGeometry,
field,
outputDirCsv=outputDir / "csv",
outputDirRoot=outputDir,
rnd=rnd,
)
return s
if "__main__" == __name__:
gdc = acts.examples.GenericDetector.Config()
gd = acts.examples.GenericDetector(gdc)
trackingGeometry, decorators, _ = gd.trackingGeometry()
field = acts.ConstantBField(acts.Vector3(0, 0, 2 * u.T))
runFatras(trackingGeometry, field, Path.cwd()).run()