Skip to main content

Module geometry

Module geometry 

Source
Expand description

GAPS detector geometry, read from the GDML file (resources/geometry/geometry.vXX.YY.gdml in crane)

The parser supports the subset of GDML which is used by the GAPS geometry:

  • define : position, rotation
  • materials : material (only the density is kept)
  • solids : tessellated, box, tube, intersection, subtraction, union
  • structure : volume, physvol
  • setup : world

Anything else in define, solids or structure is an error, so that a geometry which is not understood does not silently produce wrong results.

Since the GDML file is large (~500 MB) the parsed geometry can be written to and read from a binary cache (see Geometry::load).

Re-exports§

pub use gdml::parse_gdml_file;
pub use gdml::parse_gdml_str;
pub use bvh::Aabb;
pub use raycast::Intervals;
pub use raycast::SolidRaycaster;
pub use column_density::Crossing;
pub use column_density::Raycaster;
pub use column_density::TrackPath;
pub use model::*;

Modules§

bvh
Axis aligned bounding boxes and a bounding volume hierarchy (BVH) over them, to find the primitives (triangles, placements) a line passes close to.
column_density
Column density along a straight track through the geometry, by ray casting the placed volumes.
gdml
Streaming parser for the subset of GDML used by the GAPS geometry.
model
The data model of the parsed geometry. All lengths are in mm, all angles in rad and densities in g/cm3.
raycast
Ray casting through the solids of the geometry: for a line origin + t*dir in the local frame of a solid, find the ranges of t for which the line is inside the solid.