|
gsystem
|
Geometry volume record loaded into a GSystem. More...
#include <gvolume.h>
Public Member Functions | |
| GVolume (const std::shared_ptr< GLogger > &log, const std::string &system, std::vector< std::string > pars, const std::string &importPath=UNINITIALIZEDSTRINGQUANTITY) | |
| Construct a volume from a serialized parameter vector. | |
| GVolume (const std::string &rootVolumeDefinition, const std::shared_ptr< GLogger > &log) | |
| Construct the special ROOT/world volume. | |
| virtual std::unique_ptr< GVolume > | clone () const |
| Polymorphic deep-copy. | |
| virtual | ~GVolume ()=default |
| Virtual destructor (safe deletion through base pointers). | |
| std::vector< double > | getDetectorDimensions () const |
Returns numeric detector dimensions parsed from the parameters string. | |
| std::string | getImportedFile () |
| Return the import filename (path) for imported volumes. | |
| void | assignG4Names (const std::string &g4n, const std::string &g4m) |
| Assign Geant4 names after all volumes are loaded. | |
Identity and naming | |
| std::string | getSystem () const |
| std::string | getName () const |
| std::string | getMotherName () const |
| std::string | getG4Name () const |
| std::string | getG4MotherName () const |
Solid definition | |
| std::string | getType () const |
| std::string | getParameters () const |
Logical attributes | |
| std::string | getMaterial () const |
| std::string | getEMField () const |
Visualization attributes | |
| int | getPCopyNo () const |
| std::string_view | getColor () const |
| double | getOpacity () const |
| bool | isVisible () const |
| int | getStyle () const |
Placement attributes and post-load modifiers | |
| bool | getExistence () const |
| std::string | getPos () const |
| std::string | getRot () const |
| std::string | getShift () const |
| std::string | getTilt () const |
Digitization and identity metadata | |
| std::string | getDigitization () const |
| std::string | getGIdentity () const |
Special cases / advanced features | |
| std::string | getCopyOf () const |
| std::string | getSolidsOpr () const |
| std::string | getDescription () const |
Modifier application (performed by GWorld) | |
| void | applyShift (std::string s) |
| Apply an additional translation to this volume. | |
| void | applyTilt (std::string t) |
| Apply an additional rotation to this volume. | |
| void | modifyExistence (bool e) |
| Enable or disable this volume in the final assembled world. | |
| void | resetMotherName (std::string m) |
| Override the mother name (placement parent) after loading. | |
| void | setColor (std::string c) |
| Override the color after loading. | |
| void | setMaterial (std::string m) |
| Override the material name after loading. | |
| void | setDigitization (std::string d) |
| Override the digitization label after loading. | |
| void | setGIdentity (std::string g) |
| Override the identity string after loading. | |
Public Member Functions inherited from GBase< GVolume > | |
| 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 |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const GVolume &) |
| Stream operator used for logging volume summaries. | |
Additional Inherited Members | |
Protected Attributes inherited from GBase< GVolume > | |
| std::shared_ptr< GLogger > | log |
A GVolume represents a single placed detector volume as loaded from a geometry source (sqlite DB, ASCII text files, CAD import, GDML import, etc.).
The constructor takes a serialized parameter vector whose positional layout matches the geometry database row layout (GVOLUMENUMBEROFPARS). The class stores:
| GVolume::GVolume | ( | const std::shared_ptr< GLogger > & | log, |
| const std::string & | system, | ||
| std::vector< std::string > | pars, | ||
| const std::string & | importPath = UNINITIALIZEDSTRINGQUANTITY ) |
| log | Logger used for diagnostics and error reporting. |
| system | Name of the system that owns this volume. |
| pars | Serialized parameter list (must match GVOLUMENUMBEROFPARS). |
| importPath | Optional import path used by file-based factories (CAD/GDML). |
The parameter vector is positional; the implementation parses it in order. If the vector size is incorrect, the constructor logs an error.
The positional semantics are stable across DB and ASCII sources, and include:
Definition at line 18 of file gvolume.cc.
|
explicit |
| rootVolumeDefinition | Definition string like: "G4Box 15*m 15*m 15*m G4_AIR". |
| log | Logger used for diagnostics. |
This constructor is used when the world volume is injected automatically. It creates a top-level volume whose mother is MOTHEROFUSALL and whose position/rotation default to DEFAULTPOSITION / DEFAULTROTATION.
Definition at line 126 of file gvolume.cc.
|
virtualdefault |
|
inline |
|
inline |
|
inline |
| g4n | Fully-qualified volume name ("<system>/<name>"). |
| g4m | Fully-qualified mother name ("<motherSystem>/<motherName>"). |
This is called by GWorld during the final bookkeeping step. The values are stored and used later when constructing the runtime geometry.
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
friend |
Definition at line 82 of file gvolume.cc.