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

#include <LXePrimaryGeneratorAction.hh>

Inheritance diagram for LXePrimaryGeneratorAction:
Collaboration diagram for LXePrimaryGeneratorAction:

Public Member Functions

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

Detailed Description

Definition at line 40 of file LXePrimaryGeneratorAction.hh.

Constructor & Destructor Documentation

LXePrimaryGeneratorAction::LXePrimaryGeneratorAction ( )

Definition at line 43 of file LXePrimaryGeneratorAction.cc.

43  {
44  G4int n_particle = 1;
45  fParticleGun = new G4ParticleGun(n_particle);
46 
48 
49  G4String particleName;
50  fParticleGun->SetParticleDefinition(particleTable->
51  FindParticle(particleName="gamma"));
52  //Default energy,position,momentum
53  fParticleGun->SetParticleEnergy(511.*keV);
54  fParticleGun->SetParticlePosition(G4ThreeVector(0.0 , 0.0, -20.0*cm));
55  fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
56 }
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 G4ParticleTable * GetParticleTable()
static constexpr double keV
Definition: G4SIunits.hh:216
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)

Here is the call graph for this function:

LXePrimaryGeneratorAction::~LXePrimaryGeneratorAction ( )
virtual

Definition at line 60 of file LXePrimaryGeneratorAction.cc.

60  {
61  delete fParticleGun;
62 }

Member Function Documentation

void LXePrimaryGeneratorAction::GeneratePrimaries ( G4Event anEvent)
virtual

Implements G4VUserPrimaryGeneratorAction.

Definition at line 66 of file LXePrimaryGeneratorAction.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: