Celeritas
0.5.0-86+4a8eea4
|
Construct Celeritas EM processes from imported data. More...
#include <ProcessBuilder.hh>
Classes | |
struct | UserBuildInput |
Input argument for user-provided process construction. More... | |
Public Types | |
Type aliases | |
using | IPC = ImportProcessClass |
using | Options = ProcessBuilderOptions |
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 | UserBuildFunction = std::function< SPProcess(UserBuildInput const &)> |
using | UserBuildMap = std::unordered_map< IPC, UserBuildFunction > |
Public Member Functions | |
ProcessBuilder (ImportData const &data, SPConstParticle particle, SPConstMaterial material, UserBuildMap user_build, Options options) | |
Construct imported process data. More... | |
ProcessBuilder (ImportData const &data, SPConstParticle particle, SPConstMaterial material, Options options) | |
Construct without custom user builders. | |
~ProcessBuilder () | |
Default destructor. | |
SPProcess | operator() (IPC ipc) |
Construct a Process from a given processs class. More... | |
Static Public Member Functions | |
static std::set< IPC > | get_all_process_classes (std::vector< ImportProcess > const &processes) |
Get an ordered set of all available processes. | |
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.
celeritas::ProcessBuilder::ProcessBuilder | ( | ImportData const & | data, |
SPConstParticle | particle, | ||
SPConstMaterial | material, | ||
UserBuildMap | user_build, | ||
Options | options | ||
) |
Construct imported process data.
ProcessBuilder
instance. auto celeritas::ProcessBuilder::operator() | ( | IPC | ipc | ) |
Construct a Process
from a given processs class.
This may return a null process (with a warning) if the user specifically requests that the process be omitted.