DLG4::VolumeBuilders
A fluent interface for Geant4 geometry definition.
|
Placement Configuration Setters These all return the builder for fluent interface.
|
inline |
A helper to get the Physical Volume transform with units applied This is built from rotation and translatin if they were provided, or from a transform if it was provided, with units applied as specified.
Basically allows you to get the unit-multiplied version for use in direct Geant calls.
Definition at line 290 of file StructureBuilder.hh.
|
inlinefinalvirtual |
A helper to get the Physical Volume transform with units applied This is built from rotation and translatin if they were provided, or from a transform if it was provided, with units applied as specified.
Basically allows you to get the unit-multiplied version for use in direct Geant calls.
Implements IVolumeBuilder.
Definition at line 383 of file VolumeBuilder.hh.
DerivedPtr OverridePlacementName | ( | const G4String & | pName | ) |
Set the placement name for the volume.
pName | Name for the placement. |
VolumeBuilder< U >::DerivedPtr OverridePlacementName | ( | const G4String & | pName | ) |
Set the placement name for the volume.
pName | Name for the placement. |
Definition at line 622 of file VolumeBuilder.hpp.
DerivedPtr PlaceAndFork | ( | ) |
An alias for MakePlacement and ClonePlacement Used for one or many unaltered placments in sequence, usually with auto naming and/or numbering.
|
inline |
An alias for MakePlacement and ForkForPlacement Used for one or many unaltered placments in sequence, usually with auto naming and/or numbering.
Definition at line 109 of file VolumeBuilder.hh.
DerivedPtr SetAutoCopyNo | ( | bool | set | ) |
Enable (disable for false) auto Physical Volume numbering, on by default.
Adds a copy number to every name. By default copy numbers auto increment. Or you can set explicit names and numbers in ClonePlacement.
set | True before setting. |
VolumeBuilder< U >::DerivedPtr SetAutoCopyNo | ( | bool | set | ) |
Enable (disable for false) auto Physical Volume numbering, on by default.
Adds a copy number to every name. By default copy numbers auto increment. Or you can set explicit names and numbers in ClonePlacement.
set | True before setting. |
Definition at line 736 of file VolumeBuilder.hpp.
DerivedPtr SetAutoPlacementNaming | ( | bool | set | ) |
Enable auto Physical Volume naming.
Adds a copy number to every name. By default copy numbers auto increment.
This will turn that off. Both makes no sense.
Or you can set explicit names and numbers in ClonePlacement.
set | False before setting. |
VolumeBuilder< U >::DerivedPtr SetAutoPlacementNaming | ( | bool | set | ) |
Enable auto Physical Volume naming.
Adds a copy number to every name. By default copy numbers auto increment.
This will turn that off. Both makes no sense.
Or you can set explicit names and numbers in ClonePlacement.
set | False before setting. |
Definition at line 727 of file VolumeBuilder.hpp.
VolumeBuilder< U >::DerivedPtr SetBooleanName | ( | const G4String & | name | ) |
Pre-set base name for logical and physical volumes.
_L and _P will be appended, respectively.
If not set, the builder will take it from the builder name. But this is useful for unions where the starting solid name may be more specific.
name |
Definition at line 159 of file VolumeBuilder.hpp.
DerivedPtr SetCopyNo | ( | G4int | pCopyNo | ) |
Set the copy number for the placement.
pCopyNo | Copy number. |
VolumeBuilder< U >::DerivedPtr SetCopyNo | ( | G4int | pCopyNo | ) |
Set the copy number for the placement.
pCopyNo | Copy number. |
Definition at line 630 of file VolumeBuilder.hpp.
VolumeBuilder< U >::DerivedPtr SetLogicalVolume | ( | G4LogicalVolume * | logical_volume | ) |
Directly Provide a Logical Volume Instead of using the builder.
logical_volume |
Definition at line 192 of file VolumeBuilder.hpp.
DerivedPtr SetMother | ( | const BuilderView & | mother | ) |
Set the mother volume with a builder, or G4VPhysicalVolume or G4VLogicalVolume through implicit conversion.
This does NOT immediately force a build the mother builder, just pre-sets the relationship.
mother | olumeReferencePtrparameter accepts a builder or a G4VSolid through implicit ctor |
VolumeBuilder< U >::DerivedPtr SetMother | ( | const BuilderView & | mother | ) |
Set the mother volume with a builder, or G4VPhysicalVolume or G4VLogicalVolume through implicit conversion.
This does NOT immediately force a build the mother builder, just pre-sets the relationship.
mother | olumeReferencePtrparameter accepts a builder or a G4VSolid through implicit ctor |
Definition at line 645 of file VolumeBuilder.hpp.
DerivedPtr SetPhysOffset | ( | const Unit3Vec & | offset = {CLHEP::mm, 0, 0, 0} | ) |
Set the translation vector for placement.
Using Set, rotation applies before translation, regardless of order set, just as in G4PVPlacement() You can pass (unit, x, y, z) or use the default unit with (x, y, z).
Examples: SetPhysOffset({CLHEP::cm, 1, 2, 3}) // 1cm, 2cm, 3cm SetPhysOffset({1, 2, 3}) // Uses default default unit (usually mm) SetDefaultUnit(CLHEP::cm); SetPhysOffset({1, 2, 3}) // 1cm, 2cm, 3cm SetDefaultUnit(1); SetPhysOffset({10*CLHEP::mm, 20*CLHEP::mm, 30*CLHEP::mm}) // Values already have units
offset | Translation vector. See method description for details. |
VolumeBuilder< U >::DerivedPtr SetPhysOffset | ( | const Unit3Vec & | offset = {CLHEP::mm, 0, 0, 0} | ) |
Set the translation vector for placement.
Using Set, rotation applies before translation, regardless of order set, just as in G4PVPlacement() You can pass (unit, x, y, z) or use the default unit with (x, y, z).
Examples: SetPhysOffset({CLHEP::cm, 1, 2, 3}) // 1cm, 2cm, 3cm SetPhysOffset({1, 2, 3}) // Uses default default unit (usually mm) SetDefaultUnit(CLHEP::cm); SetPhysOffset({1, 2, 3}) // 1cm, 2cm, 3cm SetDefaultUnit(1); SetPhysOffset({10*CLHEP::mm, 20*CLHEP::mm, 30*CLHEP::mm}) // Values already have units
offset | Translation vector. See method description for details. |
Definition at line 561 of file VolumeBuilder.hpp.
DerivedPtr SetPhysRotation | ( | const G4RotationMatrix & | rot | ) |
Set the rotation matrix for placement.
Using Set, rotation applies before translation, regardless of order set, just as in G4PVPlacement()
rot | Pointer to the rotation matrix. |
VolumeBuilder< U >::DerivedPtr SetPhysRotation | ( | const G4RotationMatrix & | rot | ) |
Set the rotation matrix for placement.
Using Set, rotation applies before translation, regardless of order set, just as in G4PVPlacement()
rot | Pointer to the rotation matrix. |
Definition at line 538 of file VolumeBuilder.hpp.
DerivedPtr SetPhysTransform | ( | const UnitlessG4Transform3D & | new_transform | ) |
Set the G4Transform3D for placment The tranformation provided is meant to be UNITLESS unless you SetDefaultUnit(1).
Otherwise ex: SetDefaultUnit(CLHEP::cm) and proivde a UNITLESS transform. To supply units for each G4Tranform3D separately, just call SetDefaultUnit(unit) before each call. Will overwite/replace rotation and translation.
new_transform | Translation vector. |
VolumeBuilder< U >::DerivedPtr SetPhysTransform | ( | const UnitlessG4Transform3D & | new_transform | ) |
Set the G4Transform3D for placment The tranformation provided is meant to be UNITLESS unless you SetDefaultUnit(1).
Otherwise ex: SetDefaultUnit(CLHEP::cm) and proivde a UNITLESS transform. To supply units for each G4Tranform3D separately, just call SetDefaultUnit(unit) before each call. Will overwite/replace rotation and translation.
new_transform | Translation vector. |
Definition at line 578 of file VolumeBuilder.hpp.
DerivedPtr SetSurfaceCheck | ( | G4bool | pSurfChk | ) |
Set the surface check flag for the placement.
pSurfChk | Boolean flag for surface check. |
VolumeBuilder< U >::DerivedPtr SetSurfaceCheck | ( | G4bool | pSurfChk | ) |
Set the surface check flag for the placement.
pSurfChk | Boolean flag for surface check. |
Definition at line 638 of file VolumeBuilder.hpp.