|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4ReflectionFactory provides functions for volumes placements with a general transfomation that can contain a reflection. Reflection is then applied to a solid: a new G4ReflectedSolid instance is created and is placed with a transformation containing pure rotation and translation only. The pair of constituent and reflected logical volumes is considered as a generalised logical volume that is addressed by user specifying the constituent logical volume. More...
#include <G4ReflectionFactory.hh>
Static Public Member Functions | |
| static G4ReflectionFactory * | Instance () |
G4ReflectionFactory provides functions for volumes placements with a general transfomation that can contain a reflection. Reflection is then applied to a solid: a new G4ReflectedSolid instance is created and is placed with a transformation containing pure rotation and translation only. The pair of constituent and reflected logical volumes is considered as a generalised logical volume that is addressed by user specifying the constituent logical volume.
Decomposition of a general transformation that can include reflection in a "reflection-free" transformation:
x(inM') = TG*x(inM) TG - general transformation = T*(R*x(inM)) T - "reflection-free" transformation = T* x(inReflM)
Daughters transformation: When a volume V containing daughter D with transformation TD is placed in mother M with a general tranformation TGV, the TGV is decomposed. New reflected volume ReflV containing a new daughter ReflD with reflected transformation ReflTD is created:
x(inV) = TD * x(inD); x(inM) = TGV * x(inV) = TV * R * x(inV) = TV * R * TD * x(inD) = TV * R*TD*R-1 * R*x(inD) = TV * ReflTD * x(inReflD)
Definition at line 89 of file G4ReflectionFactory.hh.
| G4ReflectionFactory::~G4ReflectionFactory | ( | ) |
|
delete |
Copy constructor and assignment operator not allowed.
Referenced by G4ReflectionFactory(), Instance(), and operator=().
| void G4ReflectionFactory::Clean | ( | ) |
Clears the maps of constituent and reflected volumes.
Definition at line 743 of file G4ReflectionFactory.cc.
| G4PhysicalVolumesPair G4ReflectionFactory::Divide | ( | const G4String & | name, |
| G4LogicalVolume * | LV, | ||
| G4LogicalVolume * | motherLV, | ||
| EAxis | axis, | ||
| G4double | width, | ||
| G4double | offset ) |
Definition at line 319 of file G4ReflectionFactory.cc.
| G4PhysicalVolumesPair G4ReflectionFactory::Divide | ( | const G4String & | name, |
| G4LogicalVolume * | LV, | ||
| G4LogicalVolume * | motherLV, | ||
| EAxis | axis, | ||
| G4int | nofDivisions, | ||
| G4double | offset ) |
Definition at line 278 of file G4ReflectionFactory.cc.
| G4PhysicalVolumesPair G4ReflectionFactory::Divide | ( | const G4String & | name, |
| G4LogicalVolume * | LV, | ||
| G4LogicalVolume * | motherLV, | ||
| EAxis | axis, | ||
| G4int | nofDivisions, | ||
| G4double | width, | ||
| G4double | offset ) |
Methods to create a division in the given mother, along with the possible specifications for creating a division.
Definition at line 236 of file G4ReflectionFactory.cc.
Referenced by G4GDMLReadStructure::DivisionvolRead().
| G4LogicalVolume * G4ReflectionFactory::GetConstituentLV | ( | G4LogicalVolume * | reflLV | ) | const |
Returns the consituent volume of the given reflected volume. Returns nullptr if the given reflected volume was not found.
Definition at line 672 of file G4ReflectionFactory.cc.
| G4LogicalVolume * G4ReflectionFactory::GetReflectedLV | ( | G4LogicalVolume * | lv | ) | const |
Returns the reflected volume of the given consituent volume. Returns nullptr if the given volume was not reflected.
Definition at line 688 of file G4ReflectionFactory.cc.
Referenced by Divide(), Divide(), Divide(), Place(), and Replicate().
| const G4ReflectedVolumesMap & G4ReflectionFactory::GetReflectedVolumesMap | ( | ) | const |
Returns a handle to the internal map of volumes which have been reflected, after that placement or replication is performed.
Definition at line 736 of file G4ReflectionFactory.cc.
| G4double G4ReflectionFactory::GetScalePrecision | ( | ) | const |
Definition at line 830 of file G4ReflectionFactory.cc.
| G4int G4ReflectionFactory::GetVerboseLevel | ( | ) | const |
Definition at line 844 of file G4ReflectionFactory.cc.
| const G4String & G4ReflectionFactory::GetVolumesNameExtension | ( | ) | const |
Definition at line 858 of file G4ReflectionFactory.cc.
|
static |
Gets pointer to the instance of the singleton.
Definition at line 67 of file G4ReflectionFactory.cc.
Referenced by G4tgbVolume::ConstructG4PhysVol(), G3Division::CreatePVReplica(), G4GDMLReadStructure::DivisionvolRead(), G4tgbGeometryDumper::DumpPhysVol(), G4tgbGeometryDumper::DumpPVPlacement(), G3toG4BuildPVTree(), G4GDMLWriteStructure::G4GDMLWriteStructure(), G4tgbVolumeMgr::G4tgbVolumeMgr(), G4GDMLReadStructure::PhysvolRead(), and G4GDMLReadStructure::ReplicaRead().
| G4bool G4ReflectionFactory::IsConstituent | ( | G4LogicalVolume * | lv | ) | const |
Returns true if the given volume has been already reflected (i.e. is in the map of constituent volumes).
Definition at line 703 of file G4ReflectionFactory.cc.
| G4bool G4ReflectionFactory::IsReflected | ( | G4LogicalVolume * | lv | ) | const |
Returns true if the given volume is a reflected volume (i.e. is in the map reflected volumes).
Definition at line 714 of file G4ReflectionFactory.cc.
Referenced by G4tgbGeometryDumper::DumpPhysVol(), and G4tgbGeometryDumper::DumpPVPlacement().
|
delete |
| G4PhysicalVolumesPair G4ReflectionFactory::Place | ( | const G4Transform3D & | transform3D, |
| const G4String & | name, | ||
| G4LogicalVolume * | LV, | ||
| G4LogicalVolume * | motherLV, | ||
| G4bool | isMany, | ||
| G4int | copyNo, | ||
| G4bool | surfCheck = false ) |
Evaluates the passed transformation; if it contains reflection it performs its decomposition, creates new reflected solid and logical volume (or retrieves them from a map if the reflected objects were already created), transforms the daughters (if present) and places it in the given mother.
| [in] | transform3D | The transformation in 3D space that can contain a reflection. |
| [in] | pName | The volume name. |
| [in] | LV | Pointer to the logical volume to be placed. |
| [in] | motherLV | Pointer to the logical volume of the mother. |
| [in] | isMany | Not used. |
| [in] | copyNo | The optional custom copy number. |
| [in] | surfCheck | Boolean flag, if true activates check for overlaps with existing volumes (false by default). |
Definition at line 104 of file G4ReflectionFactory.cc.
Referenced by G4tgbVolume::ConstructG4PhysVol(), G3Division::CreatePVReplica(), G3toG4BuildPVTree(), and G4GDMLReadStructure::PhysvolRead().
| G4PhysicalVolumesPair G4ReflectionFactory::Replicate | ( | const G4String & | name, |
| G4LogicalVolume * | LV, | ||
| G4LogicalVolume * | motherLV, | ||
| EAxis | axis, | ||
| G4int | nofReplicas, | ||
| G4double | width, | ||
| G4double | offset = 0. ) |
Creates a replica in the given mother.
| [in] | name | The volume name. |
| [in] | LV | Pointer to the logical volume to be replicated. |
| [in] | motherLV | Pointer to the logical volume of the mother. |
| [in] | axis | The axis along which do the replication. |
| [in] | nofReplicas | The number of copies to replicate. |
| [in] | width | The witdh of the replicated object along the axis. |
| [in] | offset | The optional offset distance from mother's border. |
Definition at line 197 of file G4ReflectionFactory.cc.
Referenced by G3Division::CreatePVReplica(), and G4GDMLReadStructure::ReplicaRead().
| void G4ReflectionFactory::SetScalePrecision | ( | G4double | scaleValue | ) |
Sets/gets the precision factor for the scale consistency check. The default value is set to 10*kCarTolerance.
Definition at line 823 of file G4ReflectionFactory.cc.
Referenced by G4tgbVolumeMgr::G4tgbVolumeMgr().
| void G4ReflectionFactory::SetVerboseLevel | ( | G4int | verboseLevel | ) |
Verbosity control.
Definition at line 837 of file G4ReflectionFactory.cc.
| void G4ReflectionFactory::SetVolumesNameExtension | ( | const G4String & | nameExtension | ) |
Sets/returns the name extension for the reflected solids and logical volumes.
Definition at line 851 of file G4ReflectionFactory.cc.