PosGen_Multipoint Class Reference

Ratpac-two: RAT::PosGen_Multipoint Class Reference
Ratpac-two
Inheritance diagram for RAT::PosGen_Multipoint:
GLG4PosGen

Public Member Functions

 PosGen_Multipoint (const char *arg_dbname="multipoint")
 
virtual void GeneratePosition (G4ThreeVector &argResult)
 
void SetState (G4String newValues)
 
G4String GetState () const
 
- Public Member Functions inherited from GLG4PosGen
 GLG4PosGen (const char *arg_dbname="pos")
 

Protected Types

enum  { MULTIPOINT_TABLE , MULTIPOINT_UNIFORM }
 

Protected Member Functions

void LoadUniformPoints (unsigned numPoints, double innerRadius, double outerRadius)
 
void LoadTablePoints (std::string tableName, std::string tableIndex)
 

Protected Attributes

enum RAT::PosGen_Multipoint:: { ... }  MultipointTypeList
 
int fType
 
std::string fTableName
 
std::string fTableIndex
 
double fInnerRadius
 
double fOuterRadius
 
std::vector< G4ThreeVector > fPos
 
int fNextPosIndex
 
- Protected Attributes inherited from GLG4PosGen
G4String _dbname
 

Constructor & Destructor Documentation

◆ PosGen_Multipoint()

PosGen_Multipoint::PosGen_Multipoint ( const char *  arg_dbname = "multipoint")

Create a new position generator.

The default is an empty list, triggering an error if you don't configure this generator with SetState before calling GeneratePosition.

Member Function Documentation

◆ GeneratePosition()

void PosGen_Multipoint::GeneratePosition ( G4ThreeVector &  argResult)
virtual

Returns the next position in the list of points.

Implements GLG4PosGen.

◆ GetState()

G4String PosGen_Multipoint::GetState ( ) const
virtual

Return state as string in same format as SetState()

Implements GLG4PosGen.

◆ SetState()

void PosGen_Multipoint::SetState ( G4String  newValues)
virtual

Sets the point list.

There are two options: /generator/pos/set uniform [# of points] [inner radius] [outer radius] and /generator/pos/set table [table name]

The first version generates a list of points uniformly distributed in volume between the inner radius and outer radius, also uniform in theta and phi. The method used to generate this list is non-random so you will get the same list on every job. Moreover, the sequence is fixed so that jobs with a greater number of points will start with the same sequency of points as a job with fewer points.

The second version reads the point list from the named table. You can include a table index using the bracket notation. For example: MULTIPOINT[led]

Implements GLG4PosGen.

Member Data Documentation

◆ fTableIndex

std::string RAT::PosGen_Multipoint::fTableIndex
protected

Only set if using table variant of this generator

◆ fTableName

std::string RAT::PosGen_Multipoint::fTableName
protected

Type of multipoint generator. Value must be from above enum.


The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/PosGen_Multipoint.hh
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/src/PosGen_Multipoint.cc