Library API#
The bulk of Celeritas’ code is in several code libraries meant (with varying degrees of polish) to be used by external users and application developers. Currently, the most stable and user-ready component of Celeritas is its Acceleritas code library for offloading to Geant4.
The Celeritas codebase lives under the src/
directory and is partitioned
into several libraries of increasing complexity: corecel
for GPU/CPU
abstractions, orange
for a platform-portable geometry implementation,
celeritas
for the GPU implementation of physics and MC particle tracking,
and accel
for the Geant4 integration library.
Additional top-level files provide access to version and configuration attributes.
Note
When building Celeritas, regardless of the configured dependencies, all of the documented API code in corecel
, orange
,
and celeritas
(except possibly headers ending in .json.hh
,
.device.hh
, etc.) will compile and can link to downstream code. However,
some classes will throw celeritas::RuntimeError
if they lack the required
functionality.
If Geant4 is disabled, the accel
library will not be built or installed,
because every component of that library requires Geant4.
- Core package
- Configuration
- Fundamentals
celeritas
celeritas::DebugErrorType
celeritas::RuntimeErrorType
celeritas::unreachable()
celeritas::DebugError
celeritas::DebugErrorDetails
celeritas::RichContextException
celeritas::RuntimeError
celeritas::RuntimeError::RuntimeError()
celeritas::RuntimeError::details()
celeritas::RuntimeError::from_validate()
celeritas::RuntimeError::from_device_call()
celeritas::RuntimeError::from_mpi_call()
celeritas::RuntimeError::from_geant_exception()
celeritas::RuntimeError::from_root_error()
celeritas::RuntimeError::details_
celeritas::RuntimeErrorDetails
celeritas::HostVal
celeritas::HostCRef
celeritas::HostRef
celeritas::DeviceCRef
celeritas::DeviceRef
celeritas::NativeCRef
celeritas::NativeRef
celeritas::CRefPtr
celeritas::RefPtr
celeritas::size_type
celeritas::real_type
celeritas::ull_int
celeritas::MemSpace
celeritas::Ownership
celeritas::to_cstring()
OpaqueId
- System
celeritas::Device
celeritas::Device::MapStrInt
celeritas::Device::Device()
celeritas::Device::Device()
celeritas::Device::device_id()
celeritas::Device::operator bool()
celeritas::Device::name()
celeritas::Device::total_global_mem()
celeritas::Device::max_threads_per_block()
celeritas::Device::max_blocks_per_grid()
celeritas::Device::max_threads_per_cu()
celeritas::Device::threads_per_warp()
celeritas::Device::can_map_host_memory()
celeritas::Device::eu_per_cu()
celeritas::Device::extra()
celeritas::Device::num_streams()
celeritas::Device::create_streams()
celeritas::Device::stream()
celeritas::Device::num_devices()
celeritas::Device::debug()
celeritas::Device::UPStreamStorage
celeritas::Device::id_
celeritas::Device::name_
celeritas::Device::total_global_mem_
celeritas::Device::max_threads_per_block_
celeritas::Device::max_blocks_per_grid_
celeritas::Device::max_threads_per_cu_
celeritas::Device::threads_per_warp_
celeritas::Device::can_map_host_memory_
celeritas::Device::eu_per_cu_
celeritas::Device::extra_
celeritas::Device::streams_
celeritas::Device::StreamStorageDeleter
celeritas::detail
- Containers
Array
Array::value_type
Array::size_type
Array::pointer
Array::const_pointer
Array::reference
Array::const_reference
Array::iterator
Array::const_iterator
Array::operator[]()
Array::operator[]()
Array::front()
Array::front()
Array::back()
Array::back()
Array::data()
Array::data()
Array::begin()
Array::end()
Array::begin()
Array::end()
Array::cbegin()
Array::cend()
Array::empty()
Array::size()
Array::fill()
Array::data_
Span
- Math, numerics, and algorithms
celeritas::sincos()
celeritas::sincos()
celeritas::sincospi()
celeritas::sincospi()
celeritas::forward()
celeritas::move()
celeritas::trivial_swap()
celeritas::exchange()
celeritas::all_of()
celeritas::any_of()
celeritas::clamp()
celeritas::clamp_to_nonneg()
celeritas::lower_bound()
celeritas::lower_bound()
celeritas::lower_bound_linear()
celeritas::lower_bound_linear()
celeritas::upper_bound()
celeritas::upper_bound()
celeritas::partition()
celeritas::sort()
celeritas::sort()
celeritas::max()
celeritas::min()
celeritas::min_element()
celeritas::min_element()
celeritas::ipow()
celeritas::fastpow()
celeritas::rsqrt()
celeritas::rsqrt()
celeritas::ceil_div()
celeritas::negate()
celeritas::diffsq()
celeritas::m_pi
celeritas::Less
celeritas::Less
celeritas::axpy()
celeritas::dot_product()
celeritas::cross_product()
celeritas::norm()
celeritas::make_unit_vector()
celeritas::distance()
celeritas::from_spherical()
celeritas::rotate()
celeritas::is_soft_unit_vector()
celeritas::atomic_add()
celeritas::atomic_min()
celeritas::atomic_max()
numeric_limits
celeritas::zero_quantity()
celeritas::max_quantity()
celeritas::neg_max_quantity()
celeritas::swap()
celeritas::native_value_from()
celeritas::native_value_to()
celeritas::value_as()
celeritas::accessor_unit_label()
celeritas::Quantity
celeritas::detail::is_quantity_v
celeritas::detail::IsQuantity
celeritas::detail::IsQuantity
celeritas::detail::IsQuantity
celeritas::sqrt_tol()
celeritas::SoftEqual()
celeritas::SoftEqual()
celeritas::EqualOr()
celeritas::soft_equal()
celeritas::soft_near()
celeritas::soft_zero()
celeritas::soft_mod()
celeritas::EqualOr
celeritas::SoftEqual
celeritas::SoftEqual::value_type
celeritas::SoftEqual::SoftEqual()
celeritas::SoftEqual::SoftEqual()
celeritas::SoftEqual::SoftEqual()
celeritas::SoftEqual::operator()()
celeritas::SoftEqual::rel()
celeritas::SoftEqual::abs()
celeritas::SoftEqual::SETraits
celeritas::SoftEqual::rel_
celeritas::SoftEqual::abs_
celeritas::SoftZero
- I/O
- ORANGE
OrangeParams
OrangeParams::OrangeParams()
OrangeParams::OrangeParams()
OrangeParams::OrangeParams()
OrangeParams::supports_safety()
OrangeParams::bbox()
OrangeParams::max_depth()
OrangeParams::num_volumes()
OrangeParams::id_to_label()
OrangeParams::find_volume()
OrangeParams::find_volume()
OrangeParams::find_volume()
OrangeParams::find_volumes()
OrangeParams::id_to_label()
OrangeParams::find_surface()
OrangeParams::num_surfaces()
OrangeParams::id_to_label()
OrangeParams::find_universe()
OrangeParams::num_universes()
OrangeParams::host_ref()
OrangeParams::device_ref()
OrangeTrackView
OrangeTrackView::OrangeTrackView()
OrangeTrackView::operator=()
OrangeTrackView::operator=()
OrangeTrackView::pos()
OrangeTrackView::dir()
OrangeTrackView::volume_id()
OrangeTrackView::surface_id()
OrangeTrackView::next_surface_id()
OrangeTrackView::is_outside()
OrangeTrackView::is_on_boundary()
OrangeTrackView::find_next_step()
OrangeTrackView::find_next_step()
OrangeTrackView::find_safety()
OrangeTrackView::find_safety()
OrangeTrackView::move_to_boundary()
OrangeTrackView::move_internal()
OrangeTrackView::move_internal()
OrangeTrackView::cross_boundary()
OrangeTrackView::set_dir()
OrangeTrackView::DetailedInitializer
- Celeritas
- Fundamentals
units
constants
celeritas
celeritas::units
celeritas::units::centimeter
celeritas::units::gram
celeritas::units::second
celeritas::units::gauss
celeritas::units::kelvin
celeritas::units::meter
celeritas::units::kilogram
celeritas::units::tesla
celeritas::units::newton
celeritas::units::joule
celeritas::units::coulomb
celeritas::units::ampere
celeritas::units::volt
celeritas::units::farad
celeritas::units::millimeter
celeritas::units::nanosecond
celeritas::units::femtometer
celeritas::units::barn
celeritas::units::ElementaryCharge
celeritas::units::MevEnergy
celeritas::units::LogMevEnergy
celeritas::units::MevMass
celeritas::units::MevMomentum
celeritas::units::MevMomentumSq
celeritas::units::LightSpeed
celeritas::units::AmuMass
celeritas::units::CmLength
celeritas::units::InvCmXs
celeritas::units::InvCcDensity
celeritas::units::MolCcDensity
celeritas::units::FieldTesla
celeritas::constants
celeritas::constants::c_light
celeritas::constants::h_planck
celeritas::constants::e_electron
celeritas::constants::k_boltzmann
celeritas::constants::na_avogadro
celeritas::constants::kcd_luminous
celeritas::constants::hbar_planck
celeritas::constants::a0_bohr
celeritas::constants::alpha_fine_structure
celeritas::constants::atomic_mass
celeritas::constants::electron_mass
celeritas::constants::eps_electric
celeritas::constants::mu_magnetic
celeritas::constants::r_electron
celeritas::constants::rinf_rydberg
celeritas::constants::eh_hartree
celeritas::constants::lambdabar_electron
celeritas::constants::stable_decay_constant
- Problem definition
MaterialParams
MaterialParams::num_materials()
MaterialParams::id_to_label()
MaterialParams::find_material()
MaterialParams::find_materials()
MaterialParams::num_elements()
MaterialParams::id_to_label()
MaterialParams::find_element()
MaterialParams::find_elements()
MaterialParams::num_isotopes()
MaterialParams::id_to_label()
MaterialParams::find_isotope()
MaterialParams::find_isotopes()
MaterialParams::MaterialParams()
MaterialParams::size()
MaterialParams::get()
MaterialParams::get()
MaterialParams::get()
MaterialParams::max_isotope_components()
MaterialParams::max_element_components()
MaterialParams::is_missing_isotopes()
MaterialParams::host_ref()
MaterialParams::device_ref()
MaterialParams::from_import()
MaterialParams::ElementInput
MaterialParams::Input
MaterialParams::IsotopeInput
MaterialParams::MaterialInput
ParticleParams
ParticleParams::Input
ParticleParams::ParticleParams()
ParticleParams::size()
ParticleParams::id_to_label()
ParticleParams::id_to_pdg()
ParticleParams::find()
ParticleParams::find()
ParticleParams::get()
ParticleParams::host_ref()
ParticleParams::device_ref()
ParticleParams::from_import()
ParticleParams::ParticleInput
PhysicsParams
PhysicsParams::PhysicsParams()
PhysicsParams::num_models()
PhysicsParams::num_processes()
PhysicsParams::num_particles()
PhysicsParams::max_particle_processes()
PhysicsParams::model()
PhysicsParams::process()
PhysicsParams::process_id()
PhysicsParams::model_actions()
PhysicsParams::processes()
PhysicsParams::host_ref()
PhysicsParams::device_ref()
PhysicsParams::Input
- Transport interface
- Geant4 physics interfaces
GeantImporter
GeantSetup
- Geant4 physics options
GeantPhysicsOptions
GeantPhysicsOptions::coulomb_scattering
GeantPhysicsOptions::compton_scattering
GeantPhysicsOptions::photoelectric
GeantPhysicsOptions::rayleigh_scattering
GeantPhysicsOptions::gamma_conversion
GeantPhysicsOptions::gamma_general
GeantPhysicsOptions::ionization
GeantPhysicsOptions::annihilation
GeantPhysicsOptions::brems
GeantPhysicsOptions::msc
GeantPhysicsOptions::relaxation
GeantPhysicsOptions::em_bins_per_decade
GeantPhysicsOptions::eloss_fluctuation
GeantPhysicsOptions::lpm
GeantPhysicsOptions::integral_approach
GeantPhysicsOptions::min_energy
GeantPhysicsOptions::max_energy
GeantPhysicsOptions::linear_loss_limit
GeantPhysicsOptions::lowest_electron_energy
GeantPhysicsOptions::apply_cuts
GeantPhysicsOptions::default_cutoff
GeantPhysicsOptions::msc_range_factor
GeantPhysicsOptions::msc_safety_factor
GeantPhysicsOptions::msc_lambda_limit
GeantPhysicsOptions::verbose
- Geometry interfaces
VecgeomParams
VecgeomParams::VecgeomParams()
VecgeomParams::VecgeomParams()
VecgeomParams::~VecgeomParams()
VecgeomParams::supports_safety()
VecgeomParams::bbox()
VecgeomParams::max_depth()
VecgeomParams::num_volumes()
VecgeomParams::id_to_label()
VecgeomParams::find_volume()
VecgeomParams::find_volume()
VecgeomParams::find_volume()
VecgeomParams::find_volumes()
VecgeomParams::host_ref()
VecgeomParams::device_ref()
VecgeomParams::use_surface_tracking()
VecgeomParams::use_vgdml()
GeantGeoParams
GeantGeoParams::GeantGeoParams()
GeantGeoParams::GeantGeoParams()
GeantGeoParams::~GeantGeoParams()
GeantGeoParams::world()
GeantGeoParams::supports_safety()
GeantGeoParams::bbox()
GeantGeoParams::num_volumes()
GeantGeoParams::id_to_label()
GeantGeoParams::find_volume()
GeantGeoParams::find_volume()
GeantGeoParams::find_volume()
GeantGeoParams::find_volumes()
GeantGeoParams::id_to_lv()
GeantGeoParams::host_ref()
GeantGeoParams::device_ref()
- On-device access
MaterialTrackView
ParticleTrackView
ParticleTrackView::ParticleTrackView()
ParticleTrackView::operator=()
ParticleTrackView::energy()
ParticleTrackView::subtract_energy()
ParticleTrackView::particle_id()
ParticleTrackView::energy()
ParticleTrackView::is_stopped()
ParticleTrackView::particle_view()
ParticleTrackView::mass()
ParticleTrackView::charge()
ParticleTrackView::decay_constant()
ParticleTrackView::is_antiparticle()
ParticleTrackView::is_stable()
ParticleTrackView::beta_sq()
ParticleTrackView::speed()
ParticleTrackView::lorentz_factor()
ParticleTrackView::momentum()
ParticleTrackView::momentum_sq()
PhysicsTrackView
PhysicsTrackView::PhysicsTrackView()
PhysicsTrackView::operator=()
PhysicsTrackView::interaction_mfp()
PhysicsTrackView::reset_interaction_mfp()
PhysicsTrackView::dedx_range()
PhysicsTrackView::msc_range()
PhysicsTrackView::has_interaction_mfp()
PhysicsTrackView::interaction_mfp()
PhysicsTrackView::dedx_range()
PhysicsTrackView::msc_range()
PhysicsTrackView::material_id()
PhysicsTrackView::num_particle_processes()
PhysicsTrackView::process()
PhysicsTrackView::value_grid()
PhysicsTrackView::integral_xs_process()
PhysicsTrackView::calc_xs()
PhysicsTrackView::calc_max_xs()
PhysicsTrackView::make_model_finder()
PhysicsTrackView::value_table()
PhysicsTrackView::make_element_selector()
PhysicsTrackView::has_at_rest()
PhysicsTrackView::action_to_model()
PhysicsTrackView::model_to_action()
PhysicsTrackView::model_id()
PhysicsTrackView::range_to_step()
PhysicsTrackView::scalars()
PhysicsTrackView::num_particles()
PhysicsTrackView::make_calculator()
PhysicsTrackView::hardwired_model()
PhysicsTrackView::eloss_ppid()
- Propagation and magnetic field
- Propagation
- Field data input and options
FieldDriverOptions
FieldDriverOptions::operator bool()
FieldDriverOptions::minimum_step
FieldDriverOptions::delta_chord
FieldDriverOptions::delta_intersection
FieldDriverOptions::epsilon_step
FieldDriverOptions::epsilon_rel_max
FieldDriverOptions::errcon
FieldDriverOptions::pgrow
FieldDriverOptions::pshrink
FieldDriverOptions::safety
FieldDriverOptions::max_stepping_increase
FieldDriverOptions::max_stepping_decrease
FieldDriverOptions::max_nsteps
FieldDriverOptions::initial_step_tol
FieldDriverOptions::dchord_tol
FieldDriverOptions::min_chord_shrink
- Field data
- Random number distributions
- Physics distributions
- Physics implementations
- Physics data
ImportData
ImportData::ZInt
ImportData::ImportSBMap
ImportData::ImportLivermorePEMap
ImportData::ImportAtomicRelaxationMap
ImportData::particles
ImportData::isotopes
ImportData::elements
ImportData::materials
ImportData::processes
ImportData::msc_models
ImportData::volumes
ImportData::em_params
ImportData::trans_params
ImportData::sb_data
ImportData::livermore_pe_data
ImportData::atomic_relaxation_data
- Material and geometry properties
ImportElement
ImportProductionCut
ImportMatElemComponent
ImportMaterial
ImportMaterial::MapIntCutoff
ImportMaterial::VecComponent
ImportMaterial::name
ImportMaterial::state
ImportMaterial::temperature
ImportMaterial::density
ImportMaterial::electron_density
ImportMaterial::number_density
ImportMaterial::radiation_length
ImportMaterial::nuclear_int_length
ImportMaterial::pdg_cutoffs
ImportMaterial::elements
ImportVolume
ImportTransParameters
ImportLoopingThreshold
ImportMaterialState
- Physics properties
ImportParticle
ImportProcess
ImportModel
ImportMscModel
ImportModelMaterial
ImportPhysicsTable
ImportPhysicsVector
ImportProcessType
ImportProcessType::other
ImportProcessType::transportation
ImportProcessType::electromagnetic
ImportProcessType::optical
ImportProcessType::hadronic
ImportProcessType::photolepton_hadron
ImportProcessType::decay
ImportProcessType::general
ImportProcessType::parameterisation
ImportProcessType::user_defined
ImportProcessType::parallel
ImportProcessType::phonon
ImportProcessType::ucn
ImportProcessType::size_
ImportProcessClass
ImportProcessClass::other
ImportProcessClass::ion_ioni
ImportProcessClass::msc
ImportProcessClass::h_ioni
ImportProcessClass::h_brems
ImportProcessClass::h_pair_prod
ImportProcessClass::coulomb_scat
ImportProcessClass::e_ioni
ImportProcessClass::e_brems
ImportProcessClass::photoelectric
ImportProcessClass::compton
ImportProcessClass::conversion
ImportProcessClass::rayleigh
ImportProcessClass::annihilation
ImportProcessClass::mu_ioni
ImportProcessClass::mu_brems
ImportProcessClass::mu_pair_prod
ImportProcessClass::gamma_general
ImportProcessClass::size_
ImportModelClass
ImportModelClass::other
ImportModelClass::bragg_ion
ImportModelClass::bethe_bloch
ImportModelClass::urban_msc
ImportModelClass::icru_73_qo
ImportModelClass::wentzel_vi_uni
ImportModelClass::h_brems
ImportModelClass::h_pair_prod
ImportModelClass::e_coulomb_scattering
ImportModelClass::bragg
ImportModelClass::moller_bhabha
ImportModelClass::e_brems_sb
ImportModelClass::e_brems_lpm
ImportModelClass::e_plus_to_gg
ImportModelClass::livermore_photoelectric
ImportModelClass::klein_nishina
ImportModelClass::bethe_heitler
ImportModelClass::bethe_heitler_lpm
ImportModelClass::livermore_rayleigh
ImportModelClass::mu_bethe_bloch
ImportModelClass::mu_brems
ImportModelClass::mu_pair_prod
ImportModelClass::fluo_photoelectric
ImportModelClass::goudsmit_saunderson
ImportModelClass::size_
ImportTableType
ImportUnits
ImportUnits::none
ImportUnits::mev
ImportUnits::mev_per_len
ImportUnits::mev_per_cm
ImportUnits::len
ImportUnits::cm
ImportUnits::len_inv
ImportUnits::cm_inv
ImportUnits::len_mev_inv
ImportUnits::cm_mev_inv
ImportUnits::mev_sq_per_len
ImportUnits::mev_2_per_cm
ImportUnits::len_sq
ImportUnits::cm_2
ImportUnits::size_
ImportPhysicsVectorType
- EM data
ImportEmParameters
ImportEmParameters::operator bool()
ImportEmParameters::energy_loss_fluct
ImportEmParameters::lpm
ImportEmParameters::integral_approach
ImportEmParameters::linear_loss_limit
ImportEmParameters::lowest_electron_energy
ImportEmParameters::auger
ImportEmParameters::msc_range_factor
ImportEmParameters::msc_safety_factor
ImportEmParameters::msc_lambda_limit
ImportEmParameters::apply_cuts
ImportEmParameters::screening_factor
ImportAtomicTransition
ImportAtomicSubshell
ImportAtomicRelaxation
ImportLivermoreSubshell
ImportLivermorePE
ImportSBTable
- Fundamentals
- Acceleritas
- High-level interface
SimpleOffload
SimpleOffload::SimpleOffload()
SimpleOffload::SimpleOffload()
SimpleOffload::Build()
SimpleOffload::BuildForMaster()
SimpleOffload::BeginOfRunAction()
SimpleOffload::BeginOfEventAction()
SimpleOffload::PreUserTrackingAction()
SimpleOffload::EndOfEventAction()
SimpleOffload::EndOfRunAction()
SimpleOffload::operator bool()
SetupOptionsMessenger
- Celeritas setup
SetupOptions
SetupOptions::geometry_file
SetupOptions::output_file
SetupOptions::physics_output_file
SetupOptions::offload_output_file
SetupOptions::max_num_tracks
SetupOptions::max_num_events
SetupOptions::max_steps
SetupOptions::initializer_capacity
SetupOptions::secondary_stack_factor
SetupOptions::cuda_stack_size
SetupOptions::cuda_heap_size
SetupOptions::sync
SetupOptions::default_stream
SetupOptions::get_num_streams
SetupOptions::no_max_steps()
SDSetupOptions
SDSetupOptions::operator bool()
SDSetupOptions::enabled
SDSetupOptions::ignore_zero_deposition
SDSetupOptions::energy_deposition
SDSetupOptions::locate_touchable
SDSetupOptions::track
SDSetupOptions::pre
SDSetupOptions::post
SDSetupOptions::force_volumes
SDSetupOptions::skip_volumes
SDSetupOptions::StepPoint
UniformAlongStepFactory
RZMapFieldAlongStepFactory
- Detailed interface
SharedParams
SharedParams::SPHitManager
SharedParams::SPOffloadWriter
SharedParams::SPOutputRegistry
SharedParams::SPConstGeantGeoParams
SharedParams::hit_manager()
SharedParams::offload_writer()
SharedParams::num_streams()
SharedParams::output_reg()
SharedParams::geant_geo_params()
SharedParams::SharedParams()
SharedParams::Initialize()
SharedParams::set_output_filename()
SharedParams::CeleritasDisabled()
SharedParams::KillOffloadTracks()
SharedParams::InitializeWorker()
SharedParams::SharedParams()
SharedParams::SharedParams()
SharedParams::Initialize()
SharedParams::Finalize()
SharedParams::Params()
SharedParams::OffloadParticles()
SharedParams::operator bool()
LocalTransporter
- Interface utilities
- Classes usable by Geant4
- High-level interface