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

#include <B01PrimaryGeneratorAction.hh>

Inheritance diagram for B01PrimaryGeneratorAction:
Collaboration diagram for B01PrimaryGeneratorAction:

Public Member Functions

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

Detailed Description

Definition at line 39 of file B01PrimaryGeneratorAction.hh.

Constructor & Destructor Documentation

B01PrimaryGeneratorAction::B01PrimaryGeneratorAction ( )

Definition at line 45 of file B01PrimaryGeneratorAction.cc.

45  :
46  G4VUserPrimaryGeneratorAction(), fParticleGun(0)
47 {
48  G4int n_particle = 1;
49  fParticleGun = new G4ParticleGun(n_particle);
51  fParticleGun->SetParticleEnergy(10.0*MeV);
52  fParticleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, -90.0005*cm));
53  fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
54 }
CLHEP::Hep3Vector G4ThreeVector
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
int G4int
Definition: G4Types.hh:78
void SetParticlePosition(G4ThreeVector aPosition)
static constexpr double cm
Definition: G4SIunits.hh:119
void SetParticleEnergy(G4double aKineticEnergy)
static constexpr double MeV
Definition: G4SIunits.hh:214
static G4Neutron * NeutronDefinition()
Definition: G4Neutron.cc:99
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)

Here is the call graph for this function:

B01PrimaryGeneratorAction::~B01PrimaryGeneratorAction ( )

Definition at line 58 of file B01PrimaryGeneratorAction.cc.

59 {
60  delete fParticleGun;
61 }

Member Function Documentation

void B01PrimaryGeneratorAction::GeneratePrimaries ( G4Event anEvent)
virtual

Implements G4VUserPrimaryGeneratorAction.

Definition at line 65 of file B01PrimaryGeneratorAction.cc.

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

Here is the call graph for this function:


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