Imported data

Celeritas reads physics data from Geant4 (or from a ROOT file exported from data previously loaded into Geant4). Different versions of Geant4 (and Geant4 data) can be used seamlessly with any version of Celeritas, allowing differences to be isolated without respect to machine or model implementation. The following classes enumerate the core data loaded at runtime.

struct ImportData

Store imported physics data from external sources.

All the data imported to Celeritas is stored in this single entity. This struct can be used in memory or recorded in a ROOT TBranch as a single TTree entry, which will be read by RootImporter to load the data into Celeritas. Currently, the TTree and TBranch names are hardcoded as geant4_data and ImportData in RootImporter .

Each entity’s id is defined by its vector position. An ImportElement with id = 3 is stored at elements[3] . The same is true for geometry/physics/materials (all of which have an independent index!) and volumes.

Seltzer-Berger, Livermore PE, and atomic relaxation data are loaded based on atomic numbers, and thus are stored in maps. To retrieve specific data use find(atomic_number) .

The unit system of the data is stored in the “units” string. If empty (backward compatibility) or “cgs” the embedded contents are in CGS. If “clhep” the units are CLHEP (the native Geant4 unit system). The convert_to_native function will convert a data structure in place and update the units label. Refer to base/Units.hh for further information on unit systems.

Type aliases

using ZInt = int
using GeoMatIndex = unsigned int
using ImportSBMap = std::map<ZInt, ImportPhysics2DVector>
using ImportLivermorePEMap = std::map<ZInt, ImportLivermorePE>
using ImportAtomicRelaxationMap = std::map<ZInt, ImportAtomicRelaxation>
using ImportNeutronElasticMap = std::map<ZInt, ImportPhysicsVector>

Material data

std::vector<ImportIsotope> isotopes
std::vector<ImportElement> elements
std::vector<ImportGeoMaterial> geo_materials
std::vector<ImportPhysMaterial> phys_materials

Spatial region data

std::vector<ImportRegion> regions
std::vector<ImportVolume> volumes

Physics data

std::vector<ImportParticle> particles
std::vector<ImportProcess> processes
std::vector<ImportMscModel> msc_models
ImportSBMap sb_data
ImportLivermorePEMap livermore_pe_data
ImportNeutronElasticMap neutron_elastic_data
ImportAtomicRelaxationMap atomic_relaxation_data
ImportMuPairProductionTable mu_pair_production_data

Physics configuration options

ImportEmParameters em_params
ImportTransParameters trans_params

Optical data

ImportOpticalParameters optical_params
std::vector<ImportOpticalModel> optical_models
std::vector<ImportOpticalMaterial> optical_materials

Public Members

std::string units

Unit system of the stored data: “cgs”, “clhep”, or “si”.

Material and geometry properties

struct ImportIsotope

Store nuclide data.

For nuclear mass, see G4NucleiProperties::GetNuclearMass(int A, int Z).

Todo:

Rename ImportNuclide

struct ImportElement

Store element data.

IsotopeIndex maps the isotope in the ImportData::isotopes vector.

struct ImportMatElemComponent

Fractional elemental composition of a given material.

struct ImportGeoMaterial

Material data as specified by a geometry model.

These are the “real life properties” unaffected by changes to the user’s physics selection.

struct ImportProductionCut

Particle production cutoff values: range and approximate energy.

struct ImportPhysMaterial

Distinct materials as modified by physics.

User-selected regions can alter physics properties so that the same “geometry material” can correspond to multiple “physics materials”. These include the behavior of the material as an optical region.

  • geo_material_id is a geometry material corresponding to the index in the ImportData.geo_materials

  • optical_material_id is an optional optical material corresponding to the index in the ImportData.optical_materials

Geant4 requires an optical material to correspond to a single geo material, but we may relax this restriction in the future.

struct ImportRegion

Store region description and attributes.

struct ImportVolume

Store logical volume properties.

Note

The “phys material ID” is the index of the MaterialCutsCouple, and the “geo material ID” is the index of the Material (physical properties).

Note

The index of this volume in the volumes vector is the “instance ID” which is not necessarily reproducible.

struct ImportTransParameters

Parameters related to transportation.

The looping thresholds are particle-dependent and stored in a map where the keys are the PDG number.

struct ImportLoopingThreshold

Particle-dependent parameters for killing looping tracks.

enum class celeritas::ImportMaterialState

Enum for storing G4State enumerators.

Values:

enumerator other
enumerator solid
enumerator liquid
enumerator gas
enumerator size_

Physics properties

struct ImportParticle

Store particle data.

struct ImportProcess

Store physics process data.

Todo:

remove secondary_pdg , rename particle_pdg to just pdg, also in ImportMscModel

Note

ImportPhysicsTable is process and type (lambda, dedx, and so on) dependent, with each table type including physics vectors for all materials. Therefore, the physics vector of a given material is retrieved by finding the appropriate table_type in the tables vector and selecting the material: table.physics_vectors.at(material_id) .

struct ImportModel

Imported data for one model of a process.

This is always for a particular particle type since we import Processes as being for a particular particle.

The materials vector must always be assigned since we want the lower cutoff energy for each model.

struct ImportMscModel

Store imported data for multiple scattering.

struct ImportModelMaterial

Imported data for one material in a particular model.

Microscopic cross-section data are stored in the element-selector physics vector is in length^2. They will not be present for all model types, as some models only do on-the-fly calculation (e.g., photoelectric effect) or don’t depend on elemental interactions (e.g., compton scattering). The needs_micro_xs function indicates which models should store the cross section data.

The energy grid’s boundaries determine the model’s energy bounds and will always be set.

struct ImportPhysicsTable

Imported physics table.

Each table stores physics vectors for all materials.

struct ImportPhysicsVector

Store imported physics vector data [see Geant4’s G4PhysicsVector.hh].

Each vector’s x axis is structured according to the vector_type. X is usually energy, but (as in the case of “inverse range”) can be distance or any other arbitrary value.

enum class celeritas::ImportUnits

Quantity of measure enumeration for imported data.

These enumeration values are used to scale values between the Celeritas native unit system and the CLHEP/Geant4 values. Note that MeV quantities are set to unity for this special case (i.e. they retain their energy scaling and need to be wrapped with the MevEnergy quantity when used in Celeritas).

Todo:

Rename to ImportUnit

Values:

enumerator unitless

No dimension.

enumerator mev

Energy [MeV].

enumerator mev_per_len

Energy loss [MeV/len].

enumerator len

Range [len].

enumerator len_inv

Macroscopic xs [1/len].

enumerator len_mev_inv

Scaled (1/E) macroscopic xs [1/len-MeV].

enumerator mev_sq_per_len

Scaled [E^2] macroscopic xs [MeV^2/len].

enumerator len_sq

Microscopic cross section [len^2].

enumerator mev_len_sq

[MeV-len^2]

enumerator time

Time [time].

enumerator inv_len_cb

Number density [1/len^3].

enumerator len_time_sq_per_mass

Inverse pressure [len-time^2/mass].

enumerator inv_mev

Inverse energy [1/MeV].

enumerator size_
enumerator none

Deprecated.

enumerator mev_per_cm

Deprecated.

enumerator cm

Deprecated.

enumerator cm_inv

Deprecated.

enumerator cm_mev_inv

Deprecated.

enumerator mev_2_per_cm

Deprecated.

enumerator cm_2

Deprecated.