DLG4::VolumeBuilders
A fluent interface for Geant4 geometry definition.
|
Functions | |
DerivedPtr | ForkForPlacement (std::optional< int > copy_no=std::nullopt, const G4String &name_override="") |
DerivedPtr | ForkForLogicalVolume (const G4String &new_name) |
virtual DerivedPtr | ForkAndReset (const G4String &new_name) const |
DerivedPtr | ForkForFinalSolid (const G4String &new_name) |
DerivedPtr | ForkForLogicalVolume (const G4String &new_name) |
DerivedPtr | ForkForPlacement (std::optional< int > copy_no=std::nullopt, const G4String &name_override="", bool parent_name_was_set=false) |
Copy Builders from various build steps.
These allow you to base placement builders on previously constructed solids etc.
|
virtual |
Copy a configured/unbuilt Builder, with a new name.
This is the most generic all-purpose copier, but can result in some duplication of constituent solids, etc.
Copies all configurations. You can modify and rebuild all products. Copying-Transformations are not remembered. Base implementation is in VolumeBuilder, but can be overridden for Solid-Builder specific needs.
new_name |
Definition at line 659 of file VolumeBuilder.hpp.
VolumeBuilder< U >::DerivedPtr ForkForFinalSolid | ( | const G4String & | new_name | ) |
Calls MakeSolid() and copies builder with products cleared for further construction.
Configurations from ALL stages (including later) are kept.
new_name | The base name for the new builder's Geant products. |
Definition at line 668 of file VolumeBuilder.hpp.
DerivedPtr ForkForLogicalVolume | ( | const G4String & | new_name | ) |
Makes final solid (including booleans) if unbuilt and copies builder with products cleared for further construction.
Configurations from ALL stages (including later) are kept.
This one seems pretty specific, but could be useful for extending a boolean build more easily possibly
new_name | The base name for the new builder's logical and physical volumes. |
VolumeBuilder< U >::DerivedPtr ForkForLogicalVolume | ( | const G4String & | new_name | ) |
Makes final solid (including booleans) if unbuilt and copies builder with products cleared for further construction.
Configurations from ALL stages (including later) are kept.
This one seems pretty specific, but could be useful for extending a boolean build more easily possibly
new_name | The base name for the new builder's logical and physical volumes. |
Definition at line 682 of file VolumeBuilder.hpp.
DerivedPtr ForkForPlacement | ( | std::optional< int > | copy_no = std::nullopt , |
const G4String & | name_override = "" |
||
) |
Calls MakeLogicalVolume() and creates a new builder instance with a copy of all placement-related configs.
This will be called automatically by consecutive calls to MakePlacement(). All physical volume and (future?) derived products are reset to be rebuilt. Copy_no and placement name can be auto incremented (number only by default) or overridden.
The copy_no will be incremented.
copy_no | no arguments or std::nullopt to leave as auto. Must set on every use to get manual numbering. |
name_override | An optional name override for the physical volume. Leave blank to use auto controls instead. |
VolumeBuilder< U >::DerivedPtr ForkForPlacement | ( | std::optional< int > | copy_no = std::nullopt , |
const G4String & | name_override = "" , |
||
bool | parent_name_was_set = false |
||
) |
Calls MakeLogicalVolume() and creates a new builder instance with a copy of all placement-related configs.
This will be called automatically by consecutive calls to MakePlacement(). All physical volume and (future?) derived products are reset to be rebuilt. Copy_no and placement name can be auto incremented (number only by default) or overridden.
The copy_no will be incremented.
copy_no | no arguments or std::nullopt to leave as auto. Must set on every use to get manual numbering. |
name_override | An optional name override for the physical volume. Leave blank to use auto controls instead. |
Definition at line 701 of file VolumeBuilder.hpp.