Celeritas 0.6.0-dev.115+3b60a5fd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
celeritas::GeantImporter Class Referencefinal

Load problem data directly from Geant4. More...

#include <GeantImporter.hh>

Inheritance diagram for celeritas::GeantImporter:
Inheritance graph
[legend]

Public Types

Type aliases
using DataSelection = GeantImportDataSelection
 

Public Member Functions

 GeantImporter (G4VPhysicalVolume const *world)
 Construct from an existing Geant4 geometry, assuming physics is loaded.
 
 GeantImporter (GeantSetup &&setup)
 Construct by capturing a GeantSetup object.
 
ImportData operator() (DataSelection const &selection)
 Load data from Geant4.
 
ImportData operator() () final
 Fill all available data from Geant4.
 

Static Public Member Functions

static G4VPhysicalVolume constget_world_volume ()
 Get an externally loaded Geant4 top-level geometry element.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::ImporterInterface
 CELER_DEFAULT_COPY_MOVE (ImporterInterface)
 

Detailed Description

Load problem data directly from Geant4.

This can be used to circumvent ROOT as a serialization tool, whether to simplify the toolchain or to integrate better with user frameworks. As much data as possible is imported (subject to the data selection); downstream Celeritas classes will validate the imported data as needed.

GeantImporter import(GeantSetup("blah.gdml"));
ImportData data = import();
Load problem data directly from Geant4.
Definition GeantImporter.hh:72
Construct a Geant 4 run manager and populate internal Geant4 physics.
Definition GeantSetup.hh:36
Store imported physics data from external sources.
Definition ImportData.hh:54

or to import from an existing, initialized Geant4 state:

GeantImport import(world_volume);
ImportData data = import();

Member Function Documentation

◆ get_world_volume()

G4VPhysicalVolume const * celeritas::GeantImporter::get_world_volume ( )
inlinestatic

Get an externally loaded Geant4 top-level geometry element.

This is only defined if Geant4 has already been set up. It's meant to be used in concert with GeantImporter or other Geant-importing classes.

◆ operator()()

ImportData celeritas::GeantImporter::operator() ( )
inlinefinalvirtual

Fill all available data from Geant4.

Implements celeritas::ImporterInterface.


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