Celeritas 0.7.0-dev.127+develop.e63889793
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
celeritas::ProcessBuilder Class Reference

Construct Celeritas EM processes from imported data. More...

#include <ProcessBuilder.hh>

Public Types

Type aliases
using IPC = ImportProcessClass
 
using SPProcess = std::shared_ptr< Process >
 
using SPConstParticle = std::shared_ptr< ParticleParams const >
 
using SPConstMaterial = std::shared_ptr< MaterialParams const >
 
using SPConstImported = std::shared_ptr< ImportedProcesses const >
 
User builder type aliases
using UserBuildInput = inp::ProcessBuilderInput
 
using UserBuildFunction = inp::ProcessBuilderFunction
 
using UserBuildMap = inp::ProcessBuilderMap
 

Public Member Functions

 ProcessBuilder (ImportData const &data, SPConstParticle particle, SPConstMaterial material, UserBuildMap user_build)
 Construct imported process data.
 
 ProcessBuilder (ImportData const &data, SPConstParticle particle, SPConstMaterial material)
 Construct without custom user builders.
 
 ~ProcessBuilder ()
 Default destructor.
 
SPProcess operator() (IPC ipc)
 Construct a Process from a given process class.
 

Static Public Member Functions

static std::set< IPCget_all_process_classes (std::vector< ImportProcess > const &processes)
 Get an ordered set of all available processes.
 

Detailed Description

Construct Celeritas EM processes from imported data.

This factory class has a hardcoded map that takes a ImportProcessClass and constructs a built-in EM process (which will then build corresponding models). This map can be overridden or extended by the user_build constructor argument, which is a mapping of process class to user-supplied factory functions.

The function can return a null process pointer (in which case the caller must ignore it) to indicate that a process should be deliberately omitted from Celeritas. This can be used to (for example) skip very-high-energy processes if Celeritas offloads only tracks below some energy cutoff. See WarnAndIgnoreProcess below for a helper function for this purpose.

Note
Imported data may have multiple duplicate "process" entries, one per particle type, because that's how Geant4 manages processes.
Todo:
This will be basically deleted, replaced by a PhysicsBuilder that uses a celeritas::inp volume physics input to construct processes.

Constructor & Destructor Documentation

◆ ProcessBuilder()

celeritas::ProcessBuilder::ProcessBuilder ( ImportData const data,
SPConstParticle  particle,
SPConstMaterial  material,
UserBuildMap  user_build 
)

Construct imported process data.

Precondition
The import data must have already been converted to the native unit system.

Member Function Documentation

◆ operator()()

auto celeritas::ProcessBuilder::operator() ( IPC  ipc)

Construct a Process from a given process class.

This may return a null process (with a warning) if the user specifically requests that the process be omitted.


The documentation for this class was generated from the following files: