Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE03PrimaryGeneratorAction Class Reference

#include <RE03PrimaryGeneratorAction.hh>

Inheritance diagram for RE03PrimaryGeneratorAction:
Collaboration diagram for RE03PrimaryGeneratorAction:

Public Member Functions

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

Detailed Description

Definition at line 41 of file RE03PrimaryGeneratorAction.hh.

Constructor & Destructor Documentation

RE03PrimaryGeneratorAction::RE03PrimaryGeneratorAction ( )

Definition at line 41 of file RE03PrimaryGeneratorAction.cc.

43  fParticleGun(0)
44 {
45  G4int n_particle = 1;
46  fParticleGun = new G4ParticleGun(n_particle);
47 
48  // default particle kinematic
50  G4String particleName;
51  G4ParticleDefinition* particle
52  = particleTable->FindParticle(particleName="e-");
53  fParticleGun->SetParticleDefinition(particle);
54  fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
55  fParticleGun->SetParticlePosition(G4ThreeVector(0.,0.,-1.01*m));
56  fParticleGun->SetParticleEnergy(1.*GeV);
57 }
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
CLHEP::Hep3Vector G4ThreeVector
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
int G4int
Definition: G4Types.hh:78
void SetParticlePosition(G4ThreeVector aPosition)
static constexpr double m
Definition: G4SIunits.hh:129
void SetParticleEnergy(G4double aKineticEnergy)
static G4ParticleTable * GetParticleTable()
static constexpr double GeV
Definition: G4SIunits.hh:217
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)

Here is the call graph for this function:

RE03PrimaryGeneratorAction::~RE03PrimaryGeneratorAction ( )
virtual

Definition at line 60 of file RE03PrimaryGeneratorAction.cc.

61 {
62  delete fParticleGun;
63 }

Member Function Documentation

void RE03PrimaryGeneratorAction::GeneratePrimaries ( G4Event anEvent)
virtual

Implements G4VUserPrimaryGeneratorAction.

Definition at line 66 of file RE03PrimaryGeneratorAction.cc.

67 {
68  fParticleGun->GeneratePrimaryVertex(anEvent);
69 }
virtual void GeneratePrimaryVertex(G4Event *evt)

Here is the call graph for this function:


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