Precalibrated Ion Beam Identification Detector Simulation 1.0
A pilot study detector simulation, written in C++ with Geant4.
Public Member Functions | Private Attributes
PrimaryGeneratorMessenger::PrimaryGeneratorAction Class Reference

Mandatory user class providing the primary particle generator. More...

#include <PrimaryGeneratorMessenger.hh>

List of all members.

Public Member Functions

 PrimaryGeneratorAction (DetectorConstruction *, RunAction *)
 Constructor. Sets the particle gun position, energy and direction.
void SetParticle (G4int Z=6, G4int A=17, G4double E=0., G4double Q=0.)
 Obtains pointers to particle and ion tables, and retrieves the particle we want from them.
virtual ~PrimaryGeneratorAction ()
 Destructor, destroys the object.
void GeneratePrimaries (G4Event *)
 Randoms the particle gun's position (if desired) and generates an event.
void SetRndmFlag (G4String val)
 If rndmFlag is true, the gun's position is randomized at the beginning of each event.
G4ParticleGun * GetParticleGun ()
 Returns the ParticleGun.
void PrintTargetSize ()
 Print target size.

Private Attributes

G4ParticleGun * particleGun
 Pointer a to the G4ParticleGun class.
DetectorConstructionDetector
 Pointer to DetectorConstruction.
RunActionmyRunAction
PrimaryGeneratorMessengergunMessenger
 Messenger for this class.
G4String rndmFlag
 Flag for random gun position.

Detailed Description

Mandatory user class providing the primary particle generator.

Definition at line 42 of file PrimaryGeneratorMessenger.hh.


Member Function Documentation

void PrimaryGeneratorMessenger::PrimaryGeneratorAction::SetParticle ( G4int  Z = 6,
G4int  A = 17,
G4double  E = 0.,
G4double  Q = 0. 
)

Obtains pointers to particle and ion tables, and retrieves the particle we want from them.

Parameters:
ZThe atomic number of the particle.
AThe atomic mass of the particle.
EThe excitation energy of the particle.
QThe charge of the particle.

Referenced by PrimaryGeneratorMessenger::SetNewValue().


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Defines

Back to the main page of the Precalibrated Ion Beam Identification Detector project

Created by Rikard Lundmark