Geant4  10.00.p01
B5PrimaryGeneratorAction Class Reference

Primary generator. More...

#include <B5PrimaryGeneratorAction.hh>

+ Inheritance diagram for B5PrimaryGeneratorAction:
+ Collaboration diagram for B5PrimaryGeneratorAction:

Public Member Functions

 B5PrimaryGeneratorAction ()
 
virtual ~B5PrimaryGeneratorAction ()
 
virtual void GeneratePrimaries (G4Event *)
 
void SetMomentum (G4double val)
 
G4double GetMomentum () const
 
void SetSigmaMomentum (G4double val)
 
G4double GetSigmaMomentum () const
 
void SetSigmaAngle (G4double val)
 
G4double GetSigmaAngle () const
 
void SetRandomize (G4bool val)
 
G4bool GetRandomize () const
 
- Public Member Functions inherited from G4VUserPrimaryGeneratorAction
 G4VUserPrimaryGeneratorAction ()
 
virtual ~G4VUserPrimaryGeneratorAction ()
 

Private Member Functions

void DefineCommands ()
 

Private Attributes

G4ParticleGunfParticleGun
 
G4GenericMessengerfMessenger
 
G4ParticleDefinitionfPositron
 
G4ParticleDefinitionfMuon
 
G4ParticleDefinitionfPion
 
G4ParticleDefinitionfKaon
 
G4ParticleDefinitionfProton
 
G4double fMomentum
 
G4double fSigmaMomentum
 
G4double fSigmaAngle
 
G4bool fRandomizePrimary
 

Detailed Description

Primary generator.

A single particle is generated. User can select

  • the initial momentum and angle
  • the momentum and angle spreads
  • random selection of a particle type from proton, kaon+, pi+, muon+, e+

Definition at line 51 of file B5PrimaryGeneratorAction.hh.

Constructor & Destructor Documentation

B5PrimaryGeneratorAction::B5PrimaryGeneratorAction ( )

Definition at line 43 of file B5PrimaryGeneratorAction.cc.

References DefineCommands(), G4ParticleTable::FindParticle(), fKaon, fMuon, fParticleGun, fPion, fPositron, fProton, G4ParticleTable::GetParticleTable(), m, G4ParticleGun::SetParticleDefinition(), and G4VPrimaryGenerator::SetParticlePosition().

+ Here is the call graph for this function:

B5PrimaryGeneratorAction::~B5PrimaryGeneratorAction ( )
virtual

Definition at line 73 of file B5PrimaryGeneratorAction.cc.

References fMessenger, and fParticleGun.

Member Function Documentation

void B5PrimaryGeneratorAction::DefineCommands ( )
private

Definition at line 127 of file B5PrimaryGeneratorAction.cc.

References G4GenericMessenger::DeclareProperty(), G4GenericMessenger::DeclarePropertyWithUnit(), fMessenger, fMomentum, fRandomizePrimary, fSigmaAngle, fSigmaMomentum, G4GenericMessenger::Command::SetDefaultValue(), G4GenericMessenger::Command::SetGuidance(), G4GenericMessenger::Command::SetParameterName(), and G4GenericMessenger::Command::SetRange().

Referenced by B5PrimaryGeneratorAction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void B5PrimaryGeneratorAction::GeneratePrimaries ( G4Event event)
virtual
G4double B5PrimaryGeneratorAction::GetMomentum ( ) const
inline

Definition at line 60 of file B5PrimaryGeneratorAction.hh.

References fMomentum.

G4bool B5PrimaryGeneratorAction::GetRandomize ( ) const
inline

Definition at line 69 of file B5PrimaryGeneratorAction.hh.

References fRandomizePrimary.

G4double B5PrimaryGeneratorAction::GetSigmaAngle ( ) const
inline

Definition at line 66 of file B5PrimaryGeneratorAction.hh.

References fSigmaAngle.

G4double B5PrimaryGeneratorAction::GetSigmaMomentum ( ) const
inline

Definition at line 63 of file B5PrimaryGeneratorAction.hh.

References fSigmaMomentum.

void B5PrimaryGeneratorAction::SetMomentum ( G4double  val)
inline

Definition at line 59 of file B5PrimaryGeneratorAction.hh.

References fMomentum.

void B5PrimaryGeneratorAction::SetRandomize ( G4bool  val)
inline

Definition at line 68 of file B5PrimaryGeneratorAction.hh.

References fRandomizePrimary.

void B5PrimaryGeneratorAction::SetSigmaAngle ( G4double  val)
inline

Definition at line 65 of file B5PrimaryGeneratorAction.hh.

References fSigmaAngle.

void B5PrimaryGeneratorAction::SetSigmaMomentum ( G4double  val)
inline

Definition at line 62 of file B5PrimaryGeneratorAction.hh.

References fSigmaMomentum.

Member Data Documentation

G4ParticleDefinition* B5PrimaryGeneratorAction::fKaon
private

Definition at line 79 of file B5PrimaryGeneratorAction.hh.

Referenced by B5PrimaryGeneratorAction(), and GeneratePrimaries().

G4GenericMessenger* B5PrimaryGeneratorAction::fMessenger
private

Definition at line 75 of file B5PrimaryGeneratorAction.hh.

Referenced by DefineCommands(), and ~B5PrimaryGeneratorAction().

G4double B5PrimaryGeneratorAction::fMomentum
private
G4ParticleDefinition* B5PrimaryGeneratorAction::fMuon
private

Definition at line 77 of file B5PrimaryGeneratorAction.hh.

Referenced by B5PrimaryGeneratorAction(), and GeneratePrimaries().

G4ParticleGun* B5PrimaryGeneratorAction::fParticleGun
private
G4ParticleDefinition* B5PrimaryGeneratorAction::fPion
private

Definition at line 78 of file B5PrimaryGeneratorAction.hh.

Referenced by B5PrimaryGeneratorAction(), and GeneratePrimaries().

G4ParticleDefinition* B5PrimaryGeneratorAction::fPositron
private

Definition at line 76 of file B5PrimaryGeneratorAction.hh.

Referenced by B5PrimaryGeneratorAction(), and GeneratePrimaries().

G4ParticleDefinition* B5PrimaryGeneratorAction::fProton
private

Definition at line 80 of file B5PrimaryGeneratorAction.hh.

Referenced by B5PrimaryGeneratorAction(), and GeneratePrimaries().

G4bool B5PrimaryGeneratorAction::fRandomizePrimary
private
G4double B5PrimaryGeneratorAction::fSigmaAngle
private
G4double B5PrimaryGeneratorAction::fSigmaMomentum
private

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