ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4SingleParticleSource Class Reference

#include <geant4/tree/geant4-10.6-release/source/event/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.

View newest version in sPHENIX GitHub at line 141 of file G4SingleParticleSource.hh

Constructor & Destructor Documentation

G4SingleParticleSource::G4SingleParticleSource ( )

Definition at line 71 of file G4SingleParticleSource.cc.

View newest version in sPHENIX GitHub at line 71 of file G4SingleParticleSource.cc

References angGenerator, biasRndm, charge, definition, eneGenerator, G4MUTEXINIT, G4Geantino::GeantinoDefinition(), NumberOfParticlesToBeGenerated, polarization, posGenerator, G4SPSAngDistribution::SetBiasRndm(), G4SPSPosDistribution::SetBiasRndm(), G4SPSEneDistribution::SetBiasRndm(), G4SPSAngDistribution::SetPosDistribution(), time, and verbosityLevel.

+ Here is the call graph for this function:

G4SingleParticleSource::~G4SingleParticleSource ( )

Definition at line 103 of file G4SingleParticleSource.cc.

View newest version in sPHENIX GitHub at line 103 of file G4SingleParticleSource.cc

References angGenerator, biasRndm, eneGenerator, G4MUTEXDESTROY, and posGenerator.

Member Function Documentation

void G4SingleParticleSource::GeneratePrimaryVertex ( G4Event evt)
virtual

Implements G4VPrimaryGenerator.

Definition at line 126 of file G4SingleParticleSource.cc.

View newest version in sPHENIX GitHub at line 126 of file G4SingleParticleSource.cc

References G4Event::AddPrimaryVertex(), angGenerator, biasRndm, charge, definition, eneGenerator, G4SingleParticleSource::part_prop_t::energy, G4cout, G4endl, G4SPSPosDistribution::GenerateOne(), G4SPSAngDistribution::GenerateOne(), G4SPSEneDistribution::GenerateOne(), G4Cache< VALTYPE >::Get(), G4SPSRandomGenerator::GetBiasWeight(), G4ParticleDefinition::GetParticleName(), G4ParticleDefinition::GetPDGMass(), G4SPSEneDistribution::GetWeight(), mass, G4SingleParticleSource::part_prop_t::momentum_direction, NumberOfParticlesToBeGenerated, particle, ParticleProperties, polarization, posGenerator, G4SingleParticleSource::part_prop_t::position, G4InuclParticleNames::pp, return(), G4PrimaryParticle::SetCharge(), G4PrimaryParticle::SetKineticEnergy(), G4PrimaryParticle::SetMass(), G4PrimaryParticle::SetMomentumDirection(), G4PrimaryParticle::SetPolarization(), G4PrimaryVertex::SetPrimary(), G4PrimaryParticle::SetWeight(), time, verbosityLevel, weight, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by G4AdjointPrimaryGenerator::GenerateAdjointPrimaryVertex(), G4AdjointPrimaryGenerator::GenerateFwdPrimaryVertex(), and G4GeneralParticleSource::GeneratePrimaryVertex().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4SPSRandomGenerator* G4SingleParticleSource::GetBiasRndm ( ) const
inline

Definition at line 161 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub at line 218 of file G4SingleParticleSource.hh

References G4Cache< VALTYPE >::Get(), and ParticleProperties.

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ThreeVector G4SingleParticleSource::GetParticleMomentumDirection ( ) const
inline

Definition at line 214 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 214 of file G4SingleParticleSource.hh

References G4Cache< VALTYPE >::Get(), and ParticleProperties.

Referenced by G4GeneralParticleSource::GetParticleMomentumDirection().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ThreeVector G4SingleParticleSource::GetParticlePolarization ( ) const
inline

Definition at line 186 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub at line 210 of file G4SingleParticleSource.hh

References G4Cache< VALTYPE >::Get(), and ParticleProperties.

Referenced by HadrontherapyPrimaryGeneratorAction::GeneratePrimaries(), and G4GeneralParticleSource::GetParticlePosition().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4SingleParticleSource::GetParticleTime ( ) const
inline

Definition at line 196 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub at line 120 of file G4SingleParticleSource.cc

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

Referenced by G4AdjointPrimaryGenerator::GenerateAdjointPrimaryVertex(), G4AdjointPrimaryGenerator::GenerateFwdPrimaryVertex(), HadrontherapyPrimaryGeneratorAction::GeneratePrimaries(), 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.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub 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.

View newest version in sPHENIX GitHub 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

Definition at line 226 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 226 of file G4SingleParticleSource.hh

Referenced by G4SingleParticleSource(), GeneratePrimaryVertex(), GetAngDist(), SetVerbosity(), and ~G4SingleParticleSource().

G4SPSRandomGenerator* G4SingleParticleSource::biasRndm
private

Definition at line 228 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 228 of file G4SingleParticleSource.hh

Referenced by G4SingleParticleSource(), GeneratePrimaryVertex(), GetBiasRndm(), and ~G4SingleParticleSource().

G4double G4SingleParticleSource::charge
private

Definition at line 243 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 243 of file G4SingleParticleSource.hh

Referenced by G4SingleParticleSource(), GeneratePrimaryVertex(), SetParticleCharge(), and SetParticleDefinition().

G4ParticleDefinition* G4SingleParticleSource::definition
private

Definition at line 242 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 242 of file G4SingleParticleSource.hh

Referenced by G4SingleParticleSource(), GeneratePrimaryVertex(), GetParticleDefinition(), and SetParticleDefinition().

G4SPSEneDistribution* G4SingleParticleSource::eneGenerator
private

Definition at line 227 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 227 of file G4SingleParticleSource.hh

Referenced by G4SingleParticleSource(), GeneratePrimaryVertex(), GetEneDist(), SetVerbosity(), and ~G4SingleParticleSource().

G4Mutex G4SingleParticleSource::mutex
private

Definition at line 251 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 251 of file G4SingleParticleSource.hh

G4int G4SingleParticleSource::NumberOfParticlesToBeGenerated
private

Definition at line 241 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 241 of file G4SingleParticleSource.hh

Referenced by G4SingleParticleSource(), GeneratePrimaryVertex(), GetNumberOfParticles(), and SetNumberOfParticles().

G4Cache<part_prop_t> G4SingleParticleSource::ParticleProperties
private

Definition at line 240 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 240 of file G4SingleParticleSource.hh

Referenced by GeneratePrimaryVertex(), GetParticleEnergy(), GetParticleMomentumDirection(), and GetParticlePosition().

G4ThreeVector G4SingleParticleSource::polarization
private

Definition at line 245 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 245 of file G4SingleParticleSource.hh

Referenced by G4SingleParticleSource(), GeneratePrimaryVertex(), GetParticlePolarization(), and SetParticlePolarization().

G4SPSPosDistribution* G4SingleParticleSource::posGenerator
private

Definition at line 221 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 221 of file G4SingleParticleSource.hh

Referenced by G4SingleParticleSource(), GeneratePrimaryVertex(), GetPosDist(), SetVerbosity(), and ~G4SingleParticleSource().

G4double G4SingleParticleSource::time
private

Definition at line 244 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 244 of file G4SingleParticleSource.hh

Referenced by G4SingleParticleSource(), GeneratePrimaryVertex(), GetParticleTime(), and SetParticleTime().

G4int G4SingleParticleSource::verbosityLevel
private

Definition at line 248 of file G4SingleParticleSource.hh.

View newest version in sPHENIX GitHub at line 248 of file G4SingleParticleSource.hh

Referenced by G4SingleParticleSource(), GeneratePrimaryVertex(), and SetVerbosity().


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