gparticle
Loading...
Searching...
No Matches
gparticle Namespace Reference

Functions

vector< GparticlePtrgetGParticlesFromOption (const std::shared_ptr< GOptions > &gopts, std::shared_ptr< GLogger > &logger)
 Builds inline generator particles from only the -gparticle option.
 
vector< GparticlePtrgetGParticles (const std::shared_ptr< GOptions > &gopts, std::shared_ptr< GLogger > &logger)
 Builds the list of generator particles from structured options.
 
GOptions defineOptions ()
 Defines the structured options used by the gparticle module.
 
const std::vector< std::string > & supported_static_reader_formats ()
 Returns built-in file-reader format tokens.
 
std::vector< GParticleSourceDefinitiongetGParticleSourceDefinitions (const std::shared_ptr< GOptions > &gopts)
 Parses all configured -gparticlefile entries.
 
std::vector< GparticlePtrgetGParticlesFromSources (const std::shared_ptr< GOptions > &gopts, std::shared_ptr< GLogger > &logger)
 Loads propagated particles from all configured file sources.
 
GParticleEvents getGParticleEventsFromSources (const std::shared_ptr< GOptions > &gopts, std::shared_ptr< GLogger > &logger, bool propagated_only=true)
 Loads event-indexed propagated particles from all configured file sources.
 
GParticleRecordEvents getGParticleRecordEventsFromSources (const std::shared_ptr< GOptions > &gopts, std::shared_ptr< GLogger > &logger)
 Loads event-indexed generated-particle records from all configured file sources.
 

Function Documentation

◆ getGParticleEventsFromSources()

GParticleEvents gparticle::getGParticleEventsFromSources ( const std::shared_ptr< GOptions > & gopts,
std::shared_ptr< GLogger > & logger,
bool propagated_only = true )
Parameters
goptsParsed options.
loggerLogger used for diagnostics.
propagated_onlyWhether to restrict file rows to Geant4-propagated particles.
Returns
Event-indexed generated particles.

Definition at line 99 of file gparticle_reader.cc.

◆ getGParticleRecordEventsFromSources()

GParticleRecordEvents gparticle::getGParticleRecordEventsFromSources ( const std::shared_ptr< GOptions > & gopts,
std::shared_ptr< GLogger > & logger )

This is the data source for the generated output bank. It preserves every parsed file particle, including particles that are not propagated in Geant4.

Parameters
goptsParsed options.
loggerLogger used for diagnostics.
Returns
Event-indexed generated-particle records.

Definition at line 137 of file gparticle_reader.cc.

◆ getGParticlesFromSources()

std::vector< GparticlePtr > gparticle::getGParticlesFromSources ( const std::shared_ptr< GOptions > & gopts,
std::shared_ptr< GLogger > & logger )
Parameters
goptsParsed options.
loggerLogger used for diagnostics.
Returns
Flattened vector of Geant4-propagated particles.

Definition at line 90 of file gparticle_reader.cc.

◆ getGParticleSourceDefinitions()

std::vector< GParticleSourceDefinition > gparticle::getGParticleSourceDefinitions ( const std::shared_ptr< GOptions > & gopts)
Parameters
goptsParsed options containing the optional gparticlefile node.
Returns
Source definitions in configuration order.

Definition at line 71 of file gparticle_reader.cc.

◆ supported_static_reader_formats()

const std::vector< std::string > & gparticle::supported_static_reader_formats ( )
Returns
Static list of built-in reader formats.

Definition at line 66 of file gparticle_reader.cc.