Model

This specifies the problem geometry and material properties. See Geometry for details on the definition of volumes and surfaces.

struct Model

Set up geometry/material model.

The geometry filename should almost always be a GDML path. As a temporary measure we also support loading from a .org.json file if the StandaloneInput::physics_import is a ROOT file with serialized physics data.

Materials, regions, and surfaces may be loaded from the geometry: this is usually done by GeantGeoParams::make_model_input .

Public Members

std::variant<std::string, G4VPhysicalVolume const*> geometry

Path to GDML file, Geant4 world, or loaded geometry.

Volumes

These input classes describe the volume hierarchy.

struct Volumes

Define a graph of geometry elements.

Public Functions

inline explicit operator bool() const

True if at least one node is defined.

Public Members

std::vector<Volume> volumes

Nodes in the graph (logical volumes)

std::vector<VolumeInstance> volume_instances

Properties of edges in the graph (physical volumes)

struct Volume

Define a node and reference child edges in the geometry graph.

A given volume instance ID can appear only once across all volumes.

Todo:

Instead of this, which allows us to “easily” translate between geant4 IDs and instance IDs, we should just have a vector of volume instances here.

Todo:

Add region definitions.

Public Functions

inline explicit operator bool() const

True if it has a label.

Public Members

Label label

Name for the edge.

GeoMatId material

Filled material ID.

std::vector<VolumeInstanceId> children

Child edges.

struct VolumeInstance

Define an edge in the geometry graph.

The volume is the node below this edge, the volume being instantiated.

Public Functions

inline explicit operator bool() const

True if it has a label and ID.

Public Members

Label label

Name for the edge.

VolumeId volume

Logical volume referenced by this instance.

Surfaces

Surfaces are defined by the relationship between volumes.

struct Surfaces

List all surfaces in a problem.

Public Functions

inline explicit operator bool() const

True if at least one surface is defined.

struct Surface

Define a single surface, the boundary around or between volumes.

An “interface” surface is an (exiting, entering) pair of volume instances. A “boundary” surface is the entire surface of a volume.