Geant4  10.02.p02
RE02PrimaryGeneratorAction Class Reference

User primary particle generator class. More...

#include <RE02PrimaryGeneratorAction.hh>

+ Inheritance diagram for RE02PrimaryGeneratorAction:
+ Collaboration diagram for RE02PrimaryGeneratorAction:

Public Member Functions

 RE02PrimaryGeneratorAction ()
 
 ~RE02PrimaryGeneratorAction ()
 
virtual void GeneratePrimaries (G4Event *)
 
- Public Member Functions inherited from G4VUserPrimaryGeneratorAction
 G4VUserPrimaryGeneratorAction ()
 
virtual ~G4VUserPrimaryGeneratorAction ()
 

Private Attributes

G4double fSigmaPosition
 
G4ParticleGunfParticleGun
 

Detailed Description

User primary particle generator class.

  • void GeneratePrimaries(G4Event*) an incident particle is proton with 150 MeV energy at the position (x,y,-100 cm) toward the (0,0,1) direction. The x and y positions are uniformly varied from -5 mm to 5 mm, respectively.

Definition at line 51 of file RE02PrimaryGeneratorAction.hh.

Constructor & Destructor Documentation

RE02PrimaryGeneratorAction::RE02PrimaryGeneratorAction ( )

Definition at line 45 of file RE02PrimaryGeneratorAction.cc.

References cm, G4ParticleTable::FindParticle(), fParticleGun, fSigmaPosition, G4ParticleTable::GetParticleTable(), MeV, mm, position, G4ParticleGun::SetParticleDefinition(), G4ParticleGun::SetParticleEnergy(), G4ParticleGun::SetParticleMomentumDirection(), and G4VPrimaryGenerator::SetParticlePosition().

+ Here is the call graph for this function:

RE02PrimaryGeneratorAction::~RE02PrimaryGeneratorAction ( )

Definition at line 72 of file RE02PrimaryGeneratorAction.cc.

References fParticleGun.

Member Function Documentation

void RE02PrimaryGeneratorAction::GeneratePrimaries ( G4Event anEvent)
virtual

Implements G4VUserPrimaryGeneratorAction.

Definition at line 79 of file RE02PrimaryGeneratorAction.cc.

References fParticleGun, fSigmaPosition, G4UniformRand, G4ParticleGun::GeneratePrimaryVertex(), G4VPrimaryGenerator::GetParticlePosition(), position, and G4VPrimaryGenerator::SetParticlePosition().

+ Here is the call graph for this function:

Member Data Documentation

G4ParticleGun* RE02PrimaryGeneratorAction::fParticleGun
private
G4double RE02PrimaryGeneratorAction::fSigmaPosition
private

Definition at line 61 of file RE02PrimaryGeneratorAction.hh.

Referenced by GeneratePrimaries(), and RE02PrimaryGeneratorAction().


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