2 from pathlib
import Path
3 from typing
import Optional, Union
13 trackingGeometry: acts.TrackingGeometry,
14 field: acts.MagneticFieldProvider,
17 particlesInput: Optional[Path] =
None,
18 outputRoot: bool =
True,
19 outputCsv: bool =
True,
21 doMerge: Optional[bool] =
None,
34 events=100, numThreads=-1, logLevel=acts.logging.INFO
36 rnd = acts.examples.RandomNumbers(seed=42)
38 if particlesInput
is None:
49 evGen = acts.examples.RootParticleReader(
50 level=s.config.logLevel,
51 particleCollection=
"particles_input",
52 filePath=
str(particlesInput),
57 outputDir = Path(outputDir)
69 digiConfigFile=digiConfigFile,
70 outputDirCsv=outputDir /
"csv" if outputCsv
else None,
71 outputDirRoot=outputDir
if outputRoot
else None,
79 if "__main__" == __name__:
80 detector, trackingGeometry, _ = acts.examples.GenericDetector.create()
83 Path(__file__).resolve().parent.parent.parent.parent
84 /
"Examples/Algorithms/Digitization/share/default-smearing-config-generic.json"
86 assert digiConfigFile.exists()
88 field = acts.ConstantBField(acts.Vector3(0, 0, 2 * u.T))