An exercise for evaluation of the Julia language for a Geometry modeling package used in HEP (VecGeom). The current functionality:
Box
, Tube
, Trd
, Cone
, CutTube
, Polycone
, Boolean
Isotope
, Element
, Material
distanceToIn
, distanceToOut
, ...)Volume
and PlacedVolumes
TrivialNavigator
(linear search among all daughters)BVHNavigator
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