Geant4  10.03
G4SingleParticleSource Class Reference

Andrea Dotti Feb 2015 Important: This is a shared class between threads. More...

#include <G4SingleParticleSource.hh>

+ Inheritance diagram for G4SingleParticleSource:
+ Collaboration diagram for G4SingleParticleSource:

Classes

struct  part_prop_t
 

Public Member Functions

 G4SingleParticleSource ()
 
 ~G4SingleParticleSource ()
 
void GeneratePrimaryVertex (G4Event *evt)
 
G4SPSPosDistributionGetPosDist () const
 
G4SPSAngDistributionGetAngDist () const
 
G4SPSEneDistributionGetEneDist () const
 
G4SPSRandomGeneratorGetBiasRndm () const
 
void SetVerbosity (G4int)
 
void SetParticleDefinition (G4ParticleDefinition *aParticleDefinition)
 
G4ParticleDefinitionGetParticleDefinition () const
 
void SetParticleCharge (G4double aCharge)
 
void SetParticlePolarization (G4ThreeVector aVal)
 
G4ThreeVector GetParticlePolarization () const
 
void SetParticleTime (G4double aTime)
 
G4double GetParticleTime () const
 
void SetNumberOfParticles (G4int i)
 
G4int GetNumberOfParticles () const
 
G4ThreeVector GetParticlePosition () const
 
G4ThreeVector GetParticleMomentumDirection () const
 
G4double GetParticleEnergy () const
 
- Public Member Functions inherited from G4VPrimaryGenerator
 G4VPrimaryGenerator ()
 
virtual ~G4VPrimaryGenerator ()
 
G4ThreeVector GetParticlePosition ()
 
G4double GetParticleTime ()
 
void SetParticlePosition (G4ThreeVector aPosition)
 
void SetParticleTime (G4double aTime)
 

Private Attributes

G4SPSPosDistributionposGenerator
 
G4SPSAngDistributionangGenerator
 
G4SPSEneDistributioneneGenerator
 
G4SPSRandomGeneratorbiasRndm
 
G4Cache< part_prop_tParticleProperties
 
G4int NumberOfParticlesToBeGenerated
 
G4ParticleDefinitiondefinition
 
G4double charge
 
G4double time
 
G4ThreeVector polarization
 
G4int verbosityLevel
 
G4Mutex mutex
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPrimaryGenerator
static G4bool CheckVertexInsideWorld (const G4ThreeVector &pos)
 
- Protected Attributes inherited from G4VPrimaryGenerator
G4ThreeVector particle_position
 
G4double particle_time
 

Detailed Description

Andrea Dotti Feb 2015 Important: This is a shared class between threads.

Only one thread should use the set-methods here. Note that this is exactly what is achieved using UI commands. If you use the set methods to set defaults in your application take care that only one thread is executing them. In addition take care of calling these methods before the run is started Do not use these setters during the event loop

Definition at line 141 of file G4SingleParticleSource.hh.

Constructor & Destructor Documentation

G4SingleParticleSource::G4SingleParticleSource ( )
G4SingleParticleSource::~G4SingleParticleSource ( )

Member Function Documentation

void G4SingleParticleSource::GeneratePrimaryVertex ( G4Event evt)
virtual
G4SPSRandomGenerator* G4SingleParticleSource::GetBiasRndm ( ) const
inline

Definition at line 161 of file G4SingleParticleSource.hh.

References biasRndm.

Referenced by G4GeneralParticleSourceData::IntensityNormalise(), and G4GeneralParticleSourceMessenger::SetNewValue().

+ Here is the caller graph for this function:

G4SPSEneDistribution* G4SingleParticleSource::GetEneDist ( ) const
inline
G4int G4SingleParticleSource::GetNumberOfParticles ( ) const
inline

Definition at line 206 of file G4SingleParticleSource.hh.

References NumberOfParticlesToBeGenerated.

Referenced by G4GeneralParticleSource::GetNumberOfParticles(), and G4GeneralParticleSource::ListSource().

+ Here is the caller graph for this function:

G4ParticleDefinition* G4SingleParticleSource::GetParticleDefinition ( ) const
inline

Definition at line 171 of file G4SingleParticleSource.hh.

References definition.

Referenced by G4GeneralParticleSource::GetParticleDefinition(), and G4GeneralParticleSource::ListSource().

+ Here is the caller graph for this function:

G4double G4SingleParticleSource::GetParticleEnergy ( ) const
inline

Definition at line 218 of file G4SingleParticleSource.hh.

References ParticleProperties.

Referenced by G4GeneralParticleSource::GetParticleEnergy(), and G4GeneralParticleSource::ListSource().

+ Here is the caller graph for this function:

G4ThreeVector G4SingleParticleSource::GetParticleMomentumDirection ( ) const
inline

Definition at line 214 of file G4SingleParticleSource.hh.

References ParticleProperties.

Referenced by G4GeneralParticleSource::GetParticleMomentumDirection().

+ Here is the caller graph for this function:

G4ThreeVector G4SingleParticleSource::GetParticlePolarization ( ) const
inline

Definition at line 186 of file G4SingleParticleSource.hh.

References polarization.

Referenced by G4GeneralParticleSource::GetParticlePolarization().

+ Here is the caller graph for this function:

G4ThreeVector G4SingleParticleSource::GetParticlePosition ( ) const
inline

Definition at line 210 of file G4SingleParticleSource.hh.

References ParticleProperties.

Referenced by G4GeneralParticleSource::GetParticlePosition().

+ Here is the caller graph for this function:

G4double G4SingleParticleSource::GetParticleTime ( ) const
inline

Definition at line 196 of file G4SingleParticleSource.hh.

References time.

Referenced by G4GeneralParticleSource::GetParticleTime().

+ Here is the caller graph for this function:

void G4SingleParticleSource::SetNumberOfParticles ( G4int  i)
inline

Definition at line 201 of file G4SingleParticleSource.hh.

References NumberOfParticlesToBeGenerated.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue(), and G4GeneralParticleSource::SetNumberOfParticles().

+ Here is the caller graph for this function:

void G4SingleParticleSource::SetParticleCharge ( G4double  aCharge)
inline

Definition at line 176 of file G4SingleParticleSource.hh.

References charge.

Referenced by G4GeneralParticleSourceMessenger::IonCommand(), G4GeneralParticleSourceMessenger::IonLvlCommand(), and G4GeneralParticleSource::SetParticleCharge().

+ Here is the caller graph for this function:

void G4SingleParticleSource::SetParticleDefinition ( G4ParticleDefinition aParticleDefinition)

Definition at line 120 of file G4SingleParticleSource.cc.

References charge, definition, and G4ParticleDefinition::GetPDGCharge().

Referenced by G4AdjointPrimaryGenerator::GenerateAdjointPrimaryVertex(), G4AdjointPrimaryGenerator::GenerateFwdPrimaryVertex(), G4GeneralParticleSourceMessenger::IonCommand(), G4GeneralParticleSourceMessenger::IonLvlCommand(), G4GeneralParticleSourceMessenger::SetNewValue(), and G4GeneralParticleSource::SetParticleDefinition().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4SingleParticleSource::SetParticlePolarization ( G4ThreeVector  aVal)
inline

Definition at line 182 of file G4SingleParticleSource.hh.

References polarization.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue(), and G4GeneralParticleSource::SetParticlePolarization().

+ Here is the caller graph for this function:

void G4SingleParticleSource::SetParticleTime ( G4double  aTime)
inline

Definition at line 192 of file G4SingleParticleSource.hh.

References time.

Referenced by G4GeneralParticleSourceMessenger::SetNewValue(), and G4GeneralParticleSource::SetParticleTime().

+ Here is the caller graph for this function:

void G4SingleParticleSource::SetVerbosity ( G4int  vL)

Definition at line 111 of file G4SingleParticleSource.cc.

References angGenerator, eneGenerator, posGenerator, G4SPSPosDistribution::SetVerbosity(), G4SPSAngDistribution::SetVerbosity(), G4SPSEneDistribution::SetVerbosity(), and verbosityLevel.

+ Here is the call graph for this function:

Member Data Documentation

G4SPSAngDistribution* G4SingleParticleSource::angGenerator
private
G4SPSRandomGenerator* G4SingleParticleSource::biasRndm
private
G4double G4SingleParticleSource::charge
private
G4ParticleDefinition* G4SingleParticleSource::definition
private
G4SPSEneDistribution* G4SingleParticleSource::eneGenerator
private
G4Mutex G4SingleParticleSource::mutex
private

Definition at line 251 of file G4SingleParticleSource.hh.

G4int G4SingleParticleSource::NumberOfParticlesToBeGenerated
private
G4Cache<part_prop_t> G4SingleParticleSource::ParticleProperties
private
G4ThreeVector G4SingleParticleSource::polarization
private
G4SPSPosDistribution* G4SingleParticleSource::posGenerator
private
G4double G4SingleParticleSource::time
private
G4int G4SingleParticleSource::verbosityLevel
private

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