g4system
Loading...
Searching...
No Matches
g4NativeObjectsFactory.h
Go to the documentation of this file.
1#pragma once
13// c++
14#include <set> // std::set (parameter-count tables)
15#include <vector> // std::vector
16#include <unordered_map> // std::unordered_map
17
18// g4system
20#include "g4systemConventions.h"
21
22// gemc utility helpers
23#include "gutilities.h"
24
25#include "g4objectsFactory.h"
26
39{
40public:
41 // inherit the base (const std::shared_ptr<GOptions>&) ctor
43
48 [[nodiscard]] std::string_view className() const override { return "G4NativeSystemFactory"; }
49
50protected:
65 G4VSolid* buildSolid(const GVolume* s,
66 std::unordered_map<std::string, G4Volume*>* g4s) override;
67
81 std::vector<double> checkAndReturnParameters(const GVolume* s);
82};
Implements solid creation for Geant4 CSG primitives and validates constructor parameter counts.
std::string_view className() const override
Human-readable name used for logging.
std::vector< double > checkAndReturnParameters(const GVolume *s)
Validate the number of parameters for the given primitive and return them as numeric values.
G4VSolid * buildSolid(const GVolume *s, std::unordered_map< std::string, G4Volume * > *g4s) override
Create (or reuse) a native Geant4 solid based on the GVolume "type".
Definition buildSolid.cc:24
Base class orchestrating the conversion of a GVolume into a Geant4 representation.
G4ObjectsFactory(const std::shared_ptr< GOptions > &g)
Construct a factory using the global option set.
Factory that builds Geant4 native primitive solids (G4Box, G4Cons, G4Trap, ...) from GEMC GVolume rec...
Abstract factory that converts a GEMC DB GVolume into Geant4 objects.
Conventions, labels, and error codes used by the g4system geometry/material layer.