3 from pathlib
import Path
14 u = acts.UnitConstants
16 from common
import getOpenDataDetectorDirectory
21 hepmc_dir = os.path.join(outputDir,
"hepmc3")
22 if not os.path.exists(hepmc_dir):
26 events=int(os.environ.get(
"NEVENTS", 100)), numThreads=1
29 rnd = acts.examples.RandomNumbers(seed=42)
30 evGen = acts.examples.EventGenerator(
31 level=acts.logging.INFO,
33 acts.examples.EventGenerator.Generator(
34 multiplicity=acts.examples.FixedMultiplicityGenerator(n=2),
35 vertex=acts.examples.GaussianVertexGenerator(
36 stddev=acts.Vector4(0, 0, 0, 0), mean=acts.Vector4(0, 0, 0, 0)
38 particles=acts.examples.ParametricParticleGenerator(
39 p=(1 * u.GeV, 10 * u.GeV),
41 phi=(0, 90 * u.degree),
47 outputParticles=
"particles_input",
53 erAlgCfg = acts.examples.geant4.hepmc3.EventRecording.Config(
54 inputParticles=evGen.config.outputParticles,
55 outputHepMcTracks=
"geant-event",
58 detectorConstructionFactory=detectorConstructionFactory,
61 erAlg = acts.examples.geant4.hepmc3.EventRecording(
62 config=erAlgCfg, level=acts.logging.INFO
68 acts.examples.hepmc3.HepMC3AsciiWriter(
69 level=acts.logging.INFO,
72 inputEvents=erAlg.config.outputHepMcTracks,
79 if "__main__" == __name__:
84 detectorConstructionFactory = (
85 acts.examples.geant4.dd4hep.DDG4DetectorConstructionFactory(detector)
89 detectorConstructionFactory=detectorConstructionFactory,
90 outputDir=os.getcwd(),