|
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 294 of file StructureBuilderBase.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 387 of file VolumeBuilderBase.hh.
| DerivedPtr OverridePlacementName | ( | const G4String & | pName | ) |
Set the placement name for the volume.
| pName | Name for the placement. |
| VolumeBuilderBase< U >::DerivedPtr OverridePlacementName | ( | const G4String & | pName | ) |
Set the placement name for the volume.
| pName | Name for the placement. |
Definition at line 619 of file VolumeBuilderBase.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 112 of file VolumeBuilderBase.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. |
| VolumeBuilderBase< 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 733 of file VolumeBuilderBase.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. |
| VolumeBuilderBase< 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 724 of file VolumeBuilderBase.hpp.
| VolumeBuilderBase< 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 156 of file VolumeBuilderBase.hpp.
| DerivedPtr SetCopyNo | ( | G4int | pCopyNo | ) |
Set the copy number for the placement.
| pCopyNo | Copy number. |
| VolumeBuilderBase< U >::DerivedPtr SetCopyNo | ( | G4int | pCopyNo | ) |
Set the copy number for the placement.
| pCopyNo | Copy number. |
Definition at line 627 of file VolumeBuilderBase.hpp.
| VolumeBuilderBase< U >::DerivedPtr SetLogicalVolume | ( | G4LogicalVolume * | logical_volume | ) |
Directly Provide a Logical Volume Instead of using the builder.
| logical_volume |
Definition at line 189 of file VolumeBuilderBase.hpp.
| DerivedPtr SetMother | ( | const VolumeBuilder & | 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 | BuilderView parameter accepts a builder or a G4VSolid through implicit ctor |
| VolumeBuilderBase< U >::DerivedPtr SetMother | ( | const VolumeBuilder & | 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 | BuilderVew parameter accepts a builder or a G4VSolid through implicit ctor |
Definition at line 642 of file VolumeBuilderBase.hpp.
| DerivedPtr SetPhysOffset | ( | const DLG4::VolumeBuilders::ThreeVecDimensioner & | offset = {0, 0, 0, VB::Length::mm} | ) |
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({ 1, 2, 3, VB::cm}) // 1cm, 2cm, 3cm SetPhysOffset({1, 2, 3}) // Uses default default unit (usually mm) SetDefaultUnit(VB::cm); SetPhysOffset({1, 2, 3}) // 1cm, 2cm, 3cm // or work with raw geant values, must use CLHEP units, not VB: SetDefaultUnit(VB::native); SetPhysOffset({10*CLHEP::mm, 20*CLHEP::mm, 30*CLHEP::mm})
| offset | Translation vector. See method description for details. |
| VolumeBuilderBase< U >::DerivedPtr SetPhysOffset | ( | const DLG4::VolumeBuilders::ThreeVecDimensioner & | offset = {0, 0, 0, VB::Length::mm} | ) |
Set the translation vector for placement.
Using Set, rotation applies before translation, regardless of order set, just as in G4PVPlacement() You can pass (x, y, z, unit) or use the default unit with (x, y, z).
Examples: SetPhysOffset({ 1, 2, 3, VB::cm}) // 1cm, 2cm, 3cm SetPhysOffset({1, 2, 3}) // Uses default default unit (usually mm) SetDefaultUnit(VB::cm); SetPhysOffset({1, 2, 3}) // 1cm, 2cm, 3cm // or work with raw geant values, must use CLHEP units, not VB: SetDefaultUnit(VB::native); SetPhysOffset({10*CLHEP::mm, 20*CLHEP::mm, 30*CLHEP::mm})
| offset | Translation vector. See method description for details. |
Definition at line 558 of file VolumeBuilderBase.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. |
| VolumeBuilderBase< 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 535 of file VolumeBuilderBase.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(VB::Length::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. |
| VolumeBuilderBase< U >::DerivedPtr SetPhysTransform | ( | const UnitlessG4Transform3D & | new_transform | ) |
Set the G4Transform3D for placment.
The tranformation provided is meant to be in UNITLESS values. Ie the unit is already pre-configured but not included in the values. So passing 5 means 5cm if SetDefault(VB::Length::cm) was set. Otherwise you SetDefaultUnit(VB::roaw), and pass a value that was already multipled by units. To supply different units for each G4Tranform3D separately, just call SetDefaultUnit(unit) before each call. The call will overwite/replace rotation and translation.
| new_transform | Translation vector. |
Definition at line 575 of file VolumeBuilderBase.hpp.
| DerivedPtr SetSurfaceCheck | ( | G4bool | pSurfChk | ) |
Set the surface check flag for the placement.
| pSurfChk | Boolean flag for surface check. |
| VolumeBuilderBase< U >::DerivedPtr SetSurfaceCheck | ( | G4bool | pSurfChk | ) |
Set the surface check flag for the placement.
| pSurfChk | Boolean flag for surface check. |
Definition at line 635 of file VolumeBuilderBase.hpp.