Celeritas 0.7.0-3+develop.835656ac1
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
celeritas::optical::Runner Class Reference

Manage execution of a standalone Celeritas optical stepping loop. More...

#include <Runner.hh>

Classes

struct  Result
 

Public Types

Type aliases
using Input = inp::OpticalStandaloneInput
 
using SPConstParams = std::shared_ptr< CoreParams const >
 
using SpanConstTrackInit = DirectGeneratorAction::SpanConstData
 
using SpanConstGenDist = GeneratorAction::SpanConstData
 

Public Member Functions

 Runner (Input &&)
 Construct with optical problem input definition.
 
void insert ()
 Set the number of pending tracks for a primary generator.
 
void insert (SpanConstTrackInit)
 Insert track initializers.
 
void insert (SpanConstGenDist)
 Insert distributions for generating through scintillation or Cherenkov.
 
Result operator() ()
 Generate optical photons and transport to completion.
 
CounterAccumStats exchange_counters ()
 Get and reset accumulated track counters.
 
ActionTimes::MapStrDbl exchange_action_times ()
 Get accumulated wall times for each action.
 
StepTimes::VecDbl exchange_step_times ()
 Get and reset the wall time for each step iteration.
 
SPConstParams const & params () const
 Access the shared params.
 
setup::OpticalProblemLoaded const & problem () const
 Access the problem setup.
 

Detailed Description

Manage execution of a standalone Celeritas optical stepping loop.

Used by the celer-optical app and the LarStandaloneRunner .

Note
When parallelizing on the CPU using OpenMP, this class expects track-level parallelism be enabled (transporting all tracks with a single stream and state) rather than event-level parallelism (transporting events on separate streams with one state per stream). Similarly on the GPU a single stream and state will be used.

Member Function Documentation

◆ exchange_counters()

CounterAccumStats celeritas::optical::Runner::exchange_counters ( )

Get and reset accumulated track counters.

See also
OpticalCollector::exchange_counters

◆ insert()

void celeritas::optical::Runner::insert ( SpanConstGenDist  data)

Insert distributions for generating through scintillation or Cherenkov.

Todo:
We could accumulate and update the number of pending tracks directly in GeneratorAction::insert, though this would be less efficient for some run modes, e.g. offloading distributions through accel where we already know the number of pending tracks.

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