Class for generating vertices in physical or geometrical volumes. More...
#include <RMGVertexConfinement.hh>


Classes | |
| struct | GenericGeometricalSolidData |
| Information about the geometrical (user) defined solids. More... | |
| struct | SampleableObject |
| struct | SampleableObjectCollection |
A collection of SampleableObject objects. It can be used to sample from by selecting a volume weighted by surface area or volume. More... | |
Public Types | |
| enum class | GeometricalSolidType { kSphere , kCylinder , kBox } |
| Different types of geometrical (user) defined solids. | |
| enum class | SamplingMode { kIntersectPhysicalWithGeometrical , kUnionAll , kSubtractGeometrical } |
| Strategy for sampling physical and geometrical volumes. More... | |
| enum class | VolumeType { kPhysical , kGeometrical , kUnset } |
| Types of volume to sample, either physical (a volume in the geometry), geometrical (defined by the user) or unset. | |
Public Member Functions | |
| void | BeginOfRunAction (const G4Run *run) override |
| void | EndOfRunAction (const G4Run *run) override |
| bool | GenerateVertex (G4ThreeVector &v) override |
| Generate the actual vertex, according to the sampling mode (see RMGVertexConfinement::SamplingMode). | |
| void | AddPhysicalVolumeNameRegex (std::string name, std::string copy_nr=".*") |
| void | AddGeometricalVolume (GenericGeometricalSolidData &data) |
| void | Reset () |
| void | SetSamplingMode (SamplingMode mode) |
| void | SetFirstSamplingVolumeType (VolumeType type) |
| void | SetWeightByMass (bool mode) |
| void | SetWeightByMassIsotope (int z, int n) |
| std::vector< GenericGeometricalSolidData > & | GetGeometricalSolidDataList () |
Public Member Functions inherited from RMGVVertexGenerator | |
| RMGVVertexGenerator (std::string name) | |
| RMGVVertexGenerator (RMGVVertexGenerator const &)=delete | |
| RMGVVertexGenerator & | operator= (RMGVVertexGenerator const &)=delete |
| RMGVVertexGenerator (RMGVVertexGenerator &&)=delete | |
| RMGVVertexGenerator & | operator= (RMGVVertexGenerator &&)=delete |
| void | SetMaxAttempts (int val) |
| Set the maximum number of attempts for vertex generation. | |
| int | GetMaxAttempts () const |
| Get the maximum number of attempts for vertex generation. | |
Additional Inherited Members | |
Protected Attributes inherited from RMGVVertexGenerator | |
| std::string | fGeneratorName |
| int | fMaxAttempts = 100 |
| const G4ThreeVector | kDummyPrimaryPosition = G4ThreeVector(0, 0, 0) |
| std::unique_ptr< G4UImessenger > | fMessenger |
Class for generating vertices in physical or geometrical volumes.
|
strong |
Strategy for sampling physical and geometrical volumes.
Can be either:
kIntersectPhysicalWithGeometrical : In which case vertices are generated in the intersection of the set of physical and geometrical volumes.kUnionAll Generate in the union of all volumes, weighted by surface area / volume.kSubtractGeometrical : Similar to kIntersectPhysicalWithGeometrical but specified regions can also be excluded. | void RMGVertexConfinement::AddPhysicalVolumeNameRegex | ( | std::string | name, |
| std::string | copy_nr = ".*" ) |
This function is used by the messenger command to add a physical volume(s) to the list of volumes to consider for sampling.
| name | The name of the physical volume or a regular expression supported by std::regex |
| copy_nr | The copy number of the physical volume or a regular expression supported by std::regex |
|
overridevirtual |
Reimplemented from RMGVVertexGenerator.
|
overridevirtual |
Reimplemented from RMGVVertexGenerator.
|
overridevirtual |
Generate the actual vertex, according to the sampling mode (see RMGVertexConfinement::SamplingMode).
Reimplemented from RMGVVertexGenerator.