|
| | GVolume (const std::shared_ptr< GLogger > &log, const std::string &system, std::vector< std::string > pars, std::optional< std::string > importPath=std::nullopt) |
| | 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 the native-solid dimensions parsed from the parameters string.
|
| const std::optional< std::string > & | getImportedFile () const |
| | 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.
|
| std::string | getSystem () const |
| std::string | getName () const |
| std::string | getMotherName () const |
| const std::string & | getG4Name () const |
| const std::string & | getG4MotherName () const |
| std::string | getType () const |
| const std::optional< std::string > & | getParameters () const |
| std::string | getMaterial () const |
| const std::optional< std::string > & | getEMField () const |
| int | getPCopyNo () const |
| std::string_view | getColor () const |
| double | getOpacity () const |
| bool | isVisible () const |
| int | getStyle () const |
| bool | getExistence () const |
| std::string | getPos () const |
| std::string | getRot () const |
| std::string | getG4PlacementType () const |
| const std::optional< std::string > & | getShift () const |
| const std::optional< std::string > & | getTilt () const |
| const std::optional< std::string > & | getDigitization () const |
| const std::optional< std::string > & | getGIdentity () const |
| const std::optional< std::string > & | getCopyOf () const |
| const std::optional< std::string > & | getSolidsOpr () const |
| const std::optional< std::string > & | getMirror () const |
| std::string | getDescription () const |
| void | applyShift (std::optional< std::string > s) |
| | Apply an additional translation to this volume.
|
| void | applyTilt (std::optional< 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::optional< std::string > d) |
| | Override the digitization label after loading.
|
| void | setGIdentity (std::optional< std::string > g) |
| | Override the identity string after loading.
|
| | GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="") |
| virtual | ~GBase () |
| GBase & | operator= (const GBase &)=default |
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 (gsystem::GVOLUMENUMBEROFPARS). The class stores:
- solid definition (type + parameters);
- visualization attributes (visibility/style/color/opacity);
- placement attributes (mother/pos/rot);
- Geant4 placement constructor convention;
- logical attributes (material, EM field);
- digitization/identity metadata;
- optional import filename for CAD/GDML sourced volumes;
- post-load modifiers (shift/tilt/existence) applied by GWorld;
- final Geant4 naming assigned during GWorld bookkeeping.
Definition at line 35 of file gvolume.h.
| std::vector< double > GVolume::getDetectorDimensions |
( |
| ) |
const |
|
inlinenodiscard |
- Returns
- Vector of numeric values in Geant4 internal units (e.g. mm, deg), one entry per dimension token in
parameters. Empty when the volume has no native-solid dimensions to report (see the two cases below).
For a native Geant4 solid (G4Box, G4Tubs, ...) the parameters string holds the constructor dimensions, e.g. "1*cm, 2*cm, 3*cm". Parsing is delegated to gutilities::getG4NumbersFromString, which interprets the unit suffix on each token.
An empty vector is returned in two cases:
parameters is unset (std::nullopt);
- the volume is CAD-imported (
type equals gsystem::GSYSTEMCADTFACTORYLABEL). A mesh volume has no native solid: its parameters field instead carries the resolved mesh path, optionally followed by a numeric suffix (e.g. "stls/heart_NIH3D.stl, 130"). Parsing that string would inject a spurious dimension into the touchable/hit metadata that gdetectorConstruction forwards to digitization for sensitive volumes, so CAD volumes deliberately report no dimensions here.
Definition at line 175 of file gvolume.h.