|
g4system
|
Builds a tessellated solid from CAD files using CADMesh. More...
#include <cadSystemFactory.h>
Public Member Functions | |
| std::string_view | className () const override |
| Factory label used in logs. | |
| G4ObjectsFactory (const std::shared_ptr< GOptions > &g) | |
| Construct a factory using the global option set. | |
Public Member Functions inherited from G4ObjectsFactory | |
| ~G4ObjectsFactory () override=default | |
| G4ObjectsFactory (const std::shared_ptr< GOptions > &g) | |
| Construct a factory using the global option set. | |
| void | initialize_context (int checkOverlaps, const std::string &backupMaterial) |
| Configure overlap checking and backup material behavior for this factory. | |
| bool | build_g4volume (const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s) |
Build (or retrieve) solid, logical, and physical volumes for a given GVolume. | |
Public Member Functions inherited from GBase< G4ObjectsFactory > | |
| GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="") | |
| GBase (const std::shared_ptr< GLogger > &logger) | |
| GBase (const GBase &)=default | |
| GBase (GBase &&) noexcept=default | |
| virtual | ~GBase () |
| GBase & | operator= (const GBase &)=default |
| GBase & | operator= (GBase &&) noexcept=default |
Protected Member Functions | |
| G4VSolid * | buildSolid (const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s) override |
| Create (or fetch) a tessellated solid from a CAD file. | |
Protected Member Functions inherited from G4ObjectsFactory | |
| virtual G4LogicalVolume * | buildLogical (const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s) |
Build or retrieve the G4LogicalVolume for a volume. | |
| virtual G4VPhysicalVolume * | buildPhysical (const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s) |
Build or retrieve the G4VPhysicalVolume for a volume. | |
| G4Volume * | getOrCreateG4Volume (const std::string &volume_name, std::unordered_map< std::string, G4Volume * > *g4s) |
Get or create a G4Volume wrapper entry in the map. | |
| G4VisAttributes | createVisualAttributes (const GVolume *s) |
| Build visualization attributes from the volume definition. | |
| bool | checkSolidDependencies (const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s) |
| Check whether all prerequisites to build a solid are satisfied. | |
| bool | checkPhysicalDependencies (const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s) |
| Verify prerequisites to build a physical placement. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from G4ObjectsFactory | |
| static G4VSolid * | getSolidFromMap (const std::string &volume_name, std::unordered_map< std::string, G4Volume * > *g4s) |
Lookup solid in the g4s map. | |
| static G4LogicalVolume * | getLogicalFromMap (const std::string &volume_name, std::unordered_map< std::string, G4Volume * > *g4s) |
Lookup logical volume in the g4s map. | |
| static G4VPhysicalVolume * | getPhysicalFromMap (const std::string &volume_name, std::unordered_map< std::string, G4Volume * > *g4s) |
Lookup physical volume in the g4s map. | |
| static bool | checkLogicalDependencies (const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s) |
| Logical dependency check placeholder. | |
| static G4RotationMatrix * | getRotation (const GVolume *s) |
| Parse rotation string and build a Geant4 rotation matrix. | |
| static G4ThreeVector | getPosition (const GVolume *s) |
| Parse position and optional shift strings to compute placement translation. | |
Protected Attributes inherited from G4ObjectsFactory | |
| int | checkOverlaps {0} |
| std::string | backupMaterial |
| Backup material name used if the requested material is absent. | |
Protected Attributes inherited from GBase< G4ObjectsFactory > | |
| std::shared_ptr< GLogger > | log |
The factory implements buildSolid() to produce a G4VSolid. Logical and physical construction are provided by the base class and therefore follow the same material lookup, visualization attribute, and placement rules used by other factories.
Definition at line 38 of file cadSystemFactory.h.
|
overrideprotectedvirtual |
| s | GEMC volume definition. The file path is read from s->getDescription(). |
| g4s | Map holding cached G4Volume wrappers. |
nullptr if dependencies are missing or format unsupported.The method performs:
Recognized extensions are:
ply stl Any other extension results in a warning and nullptr.
Implements G4ObjectsFactory.
Definition at line 38 of file buildSolid.cc.
|
inlineoverridevirtual |
"G4CadSystemFactory". Implements G4ObjectsFactory.
Definition at line 48 of file cadSystemFactory.h.
|
inlineexplicit |
| g | Shared option set used to initialize the logging base and other behaviors. |
Definition at line 62 of file g4objectsFactory.h.