remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGVertexConfinement Class Reference

Class for generating vertices in physical or geometrical volumes. More...

#include <RMGVertexConfinement.hh>

Inheritance diagram for RMGVertexConfinement:
Collaboration diagram for RMGVertexConfinement:

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
 
RMGVVertexGeneratoroperator= (RMGVVertexGenerator const &)=delete
 
 RMGVVertexGenerator (RMGVVertexGenerator &&)=delete
 
RMGVVertexGeneratoroperator= (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< G4UImessengerfMessenger
 

Detailed Description

Class for generating vertices in physical or geometrical volumes.

Member Enumeration Documentation

◆ SamplingMode

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.

Member Function Documentation

◆ AddPhysicalVolumeNameRegex()

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.

Parameters
nameThe name of the physical volume or a regular expression supported by std::regex
copy_nrThe copy number of the physical volume or a regular expression supported by std::regex

◆ BeginOfRunAction()

void RMGVertexConfinement::BeginOfRunAction ( const G4Run * run)
overridevirtual

Reimplemented from RMGVVertexGenerator.

◆ EndOfRunAction()

void RMGVertexConfinement::EndOfRunAction ( const G4Run * run)
overridevirtual

Reimplemented from RMGVVertexGenerator.

◆ GenerateVertex()

bool RMGVertexConfinement::GenerateVertex ( G4ThreeVector & v)
overridevirtual

Generate the actual vertex, according to the sampling mode (see RMGVertexConfinement::SamplingMode).

Reimplemented from RMGVVertexGenerator.


The documentation for this class was generated from the following files: