4 from pathlib
import Path
11 ParticleSelectorConfig,
14 from physmon_common
import makeSetup
16 u = acts.UnitConstants
21 with tempfile.TemporaryDirectory()
as temp:
24 rnd = acts.examples.RandomNumbers(seed=42)
29 logLevel=acts.logging.INFO,
31 Path(__file__).parent.parent /
"fpe_masks.yml"
35 for d
in setup.decorators:
36 s.addContextDecorator(d)
39 acts.examples.EventGenerator(
40 level=acts.logging.INFO,
42 acts.examples.EventGenerator.Generator(
43 multiplicity=acts.examples.FixedMultiplicityGenerator(n=1),
44 vertex=acts.examples.GaussianVertexGenerator(
45 mean=acts.Vector4(0, 0, 0, 0),
46 stddev=acts.Vector4(10 * u.um, 10 * u.um, 50 * u.mm, 1 * u.ns),
48 particles=acts.examples.ParametricParticleGenerator(
49 p=(1 * u.GeV, 100 * u.GeV),
52 phi=(0.0 * u.degree, 360.0 * u.degree),
58 acts.PdgParticle.eMuon,
59 acts.PdgParticle.ePionPlus,
60 acts.PdgParticle.eElectron,
63 outputParticles=
"particles_input",
70 setup.trackingGeometry,
73 enableInteractions=
True,
74 preSelectParticles=
None,
76 inputParticles=
"particles_input",
77 outputParticlesInitial=
"particles_initial_fatras",
78 outputParticlesFinal=
"particles_final_fatras",
79 outputSimHits=
"simhits_fatras",
80 outputDirRoot=tp /
"fatras",
86 setup.trackingGeometry,
89 preSelectParticles=
None,
91 killVolume=setup.trackingGeometry.worldVolume,
92 killAfterTime=25 * u.ns,
94 inputParticles=
"particles_input",
95 outputParticlesInitial=
"particles_initial_geant4",
96 outputParticlesFinal=
"particles_final_geant4",
97 outputSimHits=
"simhits_geant4",
98 outputDirRoot=tp /
"geant4",
105 (tp /
"fatras" /
"particles_initial.root",
"particles_initial_fatras.root"),
106 (tp /
"fatras" /
"particles_final.root",
"particles_final_fatras.root"),
107 (tp /
"geant4" /
"particles_initial.root",
"particles_initial_geant4.root"),
108 (tp /
"geant4" /
"particles_final.root",
"particles_final_geant4.root"),
110 assert file.exists(),
"file not found"
111 shutil.copy(file, setup.outdir / name)