Release Notes
Unreleased
- New features:
EllipticalTube(G4EllipticalTube, GDMLeltube) andEllipsoid(G4Ellipsoid, GDMLellipsoid, 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.Tessellatedshape (as G4TessellatedSolid): a closed surface of planar triangular facets, convex or not, oriented outwards when it is built, also in the flat model (GPU).insideuses 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, GDMLxtru),GenericTrap(G4GenericTrap, GDMLarb8) andTet(G4Tet, GDMLtet), whose constructors buildTessellatedshapes: 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, GDMLpara) builds aTrap. GDMLtessellatedis read as aTessellatedshape. Of the GDML files of Geant4, VecGeom and Geant4.jl, all thextru,arb8,para,tessellatedandtetsolids are read (except a degeneratearb8with 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) maderead_gdmlfail; it is now reduced to its valid operand, with a warning.BooleanUnionandBooleanSubtractionwith aNoShapeoperand return the other operand. - GDML: the attributes that are missing are 0, as in Geant4 (e.g. a
<position>with onlyx, or a<tube>withoutrminorstartphi), and the defaultdeltaphiof 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.
- GDML: a boolean solid with an operand that is not supported (e.g. a union with an
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_fractionsandatoms_per_volume(#27). - NIST data of Geant4 11.3 (generated by
utils/generate_nist_data.py):nist_element(the elements with their natural isotopes) andnist_material(theG4_<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)andquantity=: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).drawof 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=:levelfor 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).
- 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 (
- 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
Trdwith 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
formulatake the symbol of the NIST data (#28). - Meshes of
PolyconeandPolyhedrawith 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 (clipofdraw) 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)takesZbeforeN(as G4Isotope), and the molar mass is the fieldA(wasAmass).ElementandMaterialhave new constructors and fields:compositionis replaced byisotopes/abundancesandelements/massfractions,stateis aSymbol, and theMaterialkeyword argumentsmassandcompositionare 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 bydrawfor smooth shading of curved surfaces and sharp edges (#24).csg_mesh: mesh of the boolean shapes (andMultiUnion) 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 bymeshanddrawfor the boolean shapes andMultiUnion, 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:
drawanddraw!pass the extra keyword arguments to the Makie plotting functions, e.g.draw(shape; color=:blue)ordraw(shape; wireframe=true, linewidth=2)(#26).
- Fixes:
- Boolean shapes:
insideandnormalat 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).
- Boolean shapes:
- Maintenance:
0.1.0 - 19-11-2026
- New features:
- Shapes:
Sphere(with ϕ and θ segments, also GDMLorb) (#9),Polyhedra(#10) andTorus(#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.xrayimages 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).
- Shapes:
- Changes:
snake_caseAPI (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: