Celeritas  0.5.0-86+4a8eea4
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 const * get_world_volume ()
 Get an externally loaded Geant4 top-level geometry element. More...
 

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();
GeantImporter(G4VPhysicalVolume const *world)
Construct from an existing Geant4 geometry, assuming physics is loaded.
Definition: GeantImporter.cc:1118

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.


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