gphysics
Loading...
Searching...
No Matches
gphysics module : Geant4 physics list selection and construction

Module responsible for selecting and instantiating a Geant4 physics list from user options. More...

Files

file  gphysics_example.cc
 Minimal example showing how to define gphysics options and instantiate GPhysics.

Data Structures

class  GPhysics
 Builds and exposes a Geant4 modular physics list based on runtime options. More...

Functions

GOptions gphysics::defineOptions ()
 Defines the user-facing options for the gphysics module.

Variables

constexpr char gphysics::DEFAULTPHYSICSLIST [] = "FTFP_BERT"
 Default value for the phys_list option.
constexpr int gphysics::ERR_PHYSLISTERROR = 401
 Error code used when the requested physics list cannot be loaded.

Detailed Description

This module provides a small integration layer between GEMC options (via GOptions) and Geant4 physics list factories. It enables users to select a reference physics list and to extend it with additional physics constructors using the same syntax supported by the Geant4 extensible factory.

Function Documentation

◆ defineOptions()

GOptions gphysics::defineOptions ( )

The returned GOptions instance defines:

  • phys_list : selects the reference physics list string (with optional extensions).
  • showPhysics : prints available physics lists and constructors and exits.

The help text includes the Geant4 version tag and a curated list of common reference lists and constructors available in the linked Geant4 build.

Returns
A fully constructed GOptions object containing gphysics option definitions.

Definition at line 15 of file gphysics_options.cc.

Variable Documentation

◆ DEFAULTPHYSICSLIST

char gphysics::DEFAULTPHYSICSLIST[] = "FTFP_BERT"
inlineconstexpr

This string is used by gphysics::defineOptions() when the user does not explicitly specify a reference physics list.

Definition at line 13 of file gphysicsConventions.h.

◆ ERR_PHYSLISTERROR

int gphysics::ERR_PHYSLISTERROR = 401
inlineconstexpr

This code is reported by GPhysics when the Geant4 factory fails to produce a physics list from the user-provided phys_list string.

Definition at line 23 of file gphysicsConventions.h.