An exercise for evaluation of the Julia language for a Geometry modeling package used in HEP (VecGeom). The current functionality:
- Basic shapes:
Box,Tube,Trd,Cone - Materials:
Isotope,Element,Material - Essential functions to navigate on them (
distanceToIn,distanceToOut, ...) - Hierarchical geometry models with
VolumeandPlacedVolumes - Very basic navigator (linear search among all daughters)
- 3D graphics support for displaying the shapes and geometry models using the Makie package
- GDML reader to input geometries
- Benchmark functions for shapes
- A number of examples to demonstrate the available functionality
A number of unit tests is provided under /test for each of the geometrical shapes. To run all of them do:
julia --project=. test/runtests.jl
To run the predefined set of benchmarks for shapes do:
julia --project=. examples/Benchmarks.jl
Note that the times are the total time for all points being consirered. Divide by the number of points to obtain the execution time per function invocation.
The example DrawDetector.jl constructs detector model and draws a 3D image of it. In oder to keep the graphics window alive to be able to interact with it you need to run the example with the julia option -i (interactive).
julia --project=. -i examples/DrawDetector.jl
The example XRay.jl generates X-Ray images starting from a detector model (e.g. world). It defines a function that generates the data using the density of the traversed material from a detector model. You need to run the example with the julia option -i (interactive).
julia --project=. -i examples/XRay.jl