Release Notes

Unreleased

  • New features:
    • EllipticalTube (G4EllipticalTube, GDML eltube) and Ellipsoid (G4Ellipsoid, GDML ellipsoid, with z cuts), with the algorithms of Geant4 11 (scaling to a cylinder or a sphere), also in the flat model (GPU). The human phantom of the Geant4 examples is read without unsupported shapes.
    • Tessellated shape (as G4TessellatedSolid): a closed surface of planar triangular facets, convex or not, oriented outwards when it is built, also in the flat model (GPU). inside uses the generalized winding number, the distances the crossings of the facets along the ray, and the safeties the exact distance to the facets.
    • ExtrudedSolid (G4ExtrudedSolid, GDML xtru), GenericTrap (G4GenericTrap, GDML arb8) and Tet (G4Tet, GDML tet), whose constructors build Tessellated shapes: exact for the extruded solids, the tetrahedra and the generic trapezoids with planar faces; the twisted faces are approximated by slices, with the exact volume. Para (G4Para, GDML para) builds a Trap. GDML tessellated is read as a Tessellated shape. Of the GDML files of Geant4, VecGeom and Geant4.jl, all the xtru, arb8, para, tessellated and tet solids are read (except a degenerate arb8 with no volume, which is rejected).
    • GDML: the numeric attributes can be expressions, evaluated as in Geant4 with the <constant>, <variable>, <quantity> and <expression> of <define>, the units, pi, the arithmetic operators and the math functions (e.g. deltaphi="2*(HALFPI+0.2*pi)").
  • Fixes:
    • GDML: a boolean solid with an operand that is not supported (e.g. a union with an eltube) made read_gdml fail; it is now reduced to its valid operand, with a warning. BooleanUnion and BooleanSubtraction with a NoShape operand return the other operand.
    • GDML: the attributes that are missing are 0, as in Geant4 (e.g. a <position> with only x, or a <tube> without rmin or startphi), and the default deltaphi of a <torus> is 2π in any angle unit.
    • GDML: files with the root element of the Geant4 extensions (<gdml_simple_extension>) are read, <loop> is ignored with a warning, and the references to undefined solids, volumes, positions and rotations give a clear error.

0.2.0 - 30-11-2026

  • New features:
    • Materials as in Geant4 (G4Isotope, G4Element, G4Material): elements by Z and molar mass (with the natural isotopes) or by isotopes, materials of a single element, compounds by number of atoms (atoms=[H => 2, O => 1]) and mixtures of elements and materials by mass fractions (fractions=[...]), with state, temperature and pressure. The derived quantities are computed as in Geant4: radiation_length (Tsai), nuclear_interaction_length, electron_density, mean_excitation_energy, mass_fractions and atoms_per_volume (#27).
    • NIST data of Geant4 11.3 (generated by utils/generate_nist_data.py): nist_element (the elements with their natural isotopes) and nist_material (the G4_<symbol> materials of the elements and a selection of compounds and HEP materials, e.g. G4_WATER, G4_AIR, G4_PbWO4, G4_Galactic) (#27).
    • Geom4hep.Units: units of mass, amount, density, energy, temperature and pressure (with densities in g/cm³), and the physical constants of CLHEP used for the materials (#27).
    • GDML: the materials are read completely, with units: elements by Z or by isotopes, materials of a single element, <composite>, <fraction> of elements and materials, <T>, <P>, <MEE> and the references to <quantity>, and the NIST elements and materials referenced but not defined in the file (#27).
    • xray(...; quantity=:radlen) and quantity=:nuclen: images of the material budget in radiation or nuclear interaction lengths. The flat model (FlatMaterial) carries the radiation and interaction lengths and the electron density (#27).
    • draw of volumes: the volumes are colored by the dominant element of their material (as in Geant4.jl), and the volumes of gases and vacuum are not drawn (colorby=:level for the grey levels by depth). The meshes of all the volumes are merged into a single mesh with colors at the vertices, and each volume is meshed once: large geometries are drawn with a single Makie plot, with the triangles sorted by depth in CairoMakie (#28).
    • draw(volume; clip=:xy) (or :x, :y, :z, :xz, :yz, :xyz) cuts away the region with positive coordinates along these axes to see the inside of the geometry (as in Geant4.jl) (#28).
    • GDML Rendering example: the CMS and LHCb detectors rendered with GLMakie (colors by material, clipping), as the GDML rendering examples of Geant4.jl. The LHCb GDML file is downloaded from the repository of Geant4.jl (#28).
  • Fixes:
    • Sphere: θ₀ + Δθ beyond π is up to π, as in G4Sphere (the GDML file of LHCb has spheres with θ₀ + Δθ = π + 7e-8) (#28).
    • Meshes of the frusta with steep faces (e.g. a Trd with a square base much larger than its top): the base was oriented inwards, and the boolean shapes with them were wrong. The triangles are now oriented by the normal of the shape at their centroid (#28).
    • The elements read from GDML without a formula take the symbol of the NIST data (#28).
    • Meshes of Polycone and Polyhedra with changes of radius between sections: the mesh was the union of the closed meshes of the sections, with overlapping caps, and the boolean operations on it (clip of draw) gave spurious faces. The mesh is now the surface of revolution of the profile of the shape, closed also for ϕ sectors. The points are computed in double precision, and oriented outwards by construction (the orientation with the normals of the shape failed for thin walls, e.g. the bellows of the LHCb beam pipe, and for sectors in single precision, and the booleans with them were wrong) (#28).
  • Breaking changes:
    • Isotope{T}(name, Z, N, A) takes Z before N (as G4Isotope), and the molar mass is the field A (was Amass).
    • Element and Material have new constructors and fields: composition is replaced by isotopes/abundances and elements/massfractions, state is a Symbol, and the Material keyword arguments mass and composition are removed (Material{T}(name; density=...) still makes a material with only a density) (#27).

0.1.1 - 25-11-2026

  • New features:
    • shape_to_mesh: mesh of a shape with normals at the vertices, used by draw for smooth shading of curved surfaces and sharp edges (#24).
    • csg_mesh: mesh of the boolean shapes (and MultiUnion) computed with boolean operations on the meshes of their operands (BSP trees, as csg.js and ROOT). The result is a closed mesh, with the coplanar fragments merged. Used by mesh and draw for the boolean shapes and MultiUnion, which were drawn before as the overlay of their operands (#25).
    • RoundCube example: the cube with rounded edges and corners of the Geant4.jl UserLib example, built from boolean shapes, with the translation of the Geant4 transformations (#21). The Shapes and RoundCube examples draw the boolean shapes (#25).
  • Changes:
    • draw and draw! pass the extra keyword arguments to the Makie plotting functions, e.g. draw(shape; color=:blue) or draw(shape; wireframe=true, linewidth=2) (#26).
  • Fixes:
    • Boolean shapes: inside and normal at the points on the surface of both operands (seams of unions, edges where the cut of a subtraction meets the surface), and the quick bounding box checks for the points on the surface of an operand (#21).
  • Maintenance:
    • [compat] entries for the docs environment (CompatHelper: #18, #19, #20, #23).

0.1.0 - 19-11-2026

  • New features:
    • Shapes: Sphere (with ϕ and θ segments, also GDML orb) (#9), Polyhedra (#10) and Torus (#12), and the mesh of all the shapes for drawing.
    • Flat geometry model (close_geometry) and navigator (locate, compute_step) shared by CPUs and GPUs (KernelAbstractions), with boolean shapes as flat CSG programs and BVHs for the daughters of volumes. xray images on CPUs and GPUs (#8).
    • Single precision (Float32) support, needed by Apple GPUs (#7, #8).
    • Shape benchmarks with the methodology of VecGeom (benchmark_shape, vecgeom_suite) and comparison with VecGeom (#14).
    • Documentation with Documenter and Literate examples (#15).
  • Changes:
    • snake_case API (distance_to_in, read_gdml, world_volume, ...) and own point and vector types (Point3, Vector3) (#7).
    • Drawing functions moved to a Makie package extension (#7).
    • Repository moved to the JuliaHEP organization (#16), and prepared for registration in the General registry: license, TagBot and CompatHelper (#17).
  • Fixes:
    • Many fixes of the shape functions at surfaces and for grazing rays (#7, #8, #9).
    • Navigator: the X-ray kernel of the full CMS geometry compiles again on Metal (#11).
    • Trap with a face that has an edge of zero length (CMS TEC module frames) (#13).