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

Creates commands that allows the user to control the PrimaryGenerator via the command line. More...

#include <PrimaryGeneratorMessenger.hh>

List of all members.

Classes

class  AllAccumulatedStatistics
 Small class to keep track of the accumulated statistics. More...
class  DetectorConstruction
 This class constructs the detector, according to specifications. More...
class  DetectorMessenger
 Creates commands that the user can invoke via the command line. More...
class  EventHit
 Holds accumulated statistics for a single event hit. More...
class  PrimaryGeneratorAction
 Mandatory user class providing the primary particle generator. More...
class  RunActionMessenger
 Creates commands that can be used to control the RunAction via the command line. More...

Public Member Functions

void DetectorConstruction::ComputeDependentDetectorParameters ()
 PrimaryGeneratorMessenger (PrimaryGeneratorAction *)
 Constructor, constructs the object.
virtual ~PrimaryGeneratorMessenger ()
 Destructor, destroys the object.
void SetNewValue (G4UIcommand *, G4String)
 This method is invoked when a command to the primarygenerator is typed in via the command line.

Private Attributes

PrimaryGeneratorActionAction
 The PrimaryGeneratorAction asssociated with this PrimaryGeneratorMessenger.
G4UIdirectory * gunDir
 The directory used for the gun settings.
G4UIcmdWithAString * RndmCmd
 Lets us choose if the incident particle should be shot randomly or not.
G4UIcmdWithAnInteger * gunZ
 Command for setting Z, the atomic number of the particle.
G4UIcmdWithAnInteger * gunA
 Command for setting A, the atomic mass of the particle.
G4UIcmdWithADouble * gunE
 Command for setting E, the excitation energy of the particle.
G4UIcmdWithADouble * gunQ
 Command for setting Q, the charge of the particle.
G4UIcmdWithoutParameter * targetArea
 Show target area.
G4int currentGunZ
 Current value of gun Z.
G4int currentGunA
 Current value of gun A.
G4int currentGunE
 Current value of gun E.
G4int currentGunQ
 Current value of gun Q.

Detailed Description

Creates commands that allows the user to control the PrimaryGenerator via the command line.

Definition at line 35 of file PrimaryGeneratorMessenger.hh.


Constructor & Destructor Documentation

PrimaryGeneratorMessenger::PrimaryGeneratorMessenger ( PrimaryGeneratorAction Gun)

Constructor, constructs the object.

Parameters:
GunThe PrimaryGeneratorAction to be associated with this PrimaryGeneratorMessenger.

Definition at line 3 of file PrimaryGeneratorMessenger.cc.

References currentGunA, currentGunE, currentGunQ, currentGunZ, gunA, gunDir, gunE, gunQ, gunZ, RndmCmd, and targetArea.

:Action(Gun)
{
  gunDir = new G4UIdirectory("/PIBIDS/gun/");
  gunDir->SetGuidance("PrimaryGenerator control");
   
  RndmCmd = new G4UIcmdWithAString("/PIBIDS/gun/rndm",this);
  RndmCmd->SetGuidance("Shoot randomly the incident particle.");
  RndmCmd->SetGuidance("  Choice : on(default), off");
  RndmCmd->SetParameterName("choice",true);
  RndmCmd->SetDefaultValue("on");
  RndmCmd->SetCandidates("on off");
  RndmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);

  gunZ = new G4UIcmdWithAnInteger("/PIBIDS/gun/Z",this);
  gunZ->SetGuidance("Set the atomic number of the incident particle");
  gunZ->SetParameterName("Z",true);
  gunZ->SetDefaultValue(6);
  currentGunZ = 6;
  gunZ->SetRange("Z>=0");

  gunA = new G4UIcmdWithAnInteger("/PIBIDS/gun/A",this);
  gunA->SetGuidance("Set the atomic number of the incident particle");
  gunA->SetParameterName("A",true);
  gunA->SetDefaultValue(17);
  currentGunA = 17;
  gunA->SetRange("A>=0");

  gunE = new G4UIcmdWithADouble("/PIBIDS/gun/E",this);
  gunE->SetGuidance("Set the excitation energy of the incident particle");
  gunE->SetParameterName("E",true);
  gunE->SetDefaultValue(0.);
  currentGunE = 0.;

  gunQ = new G4UIcmdWithADouble("/PIBIDS/gun/Q",this);
  gunQ->SetGuidance("Set the charge of the incident particle");
  gunQ->SetParameterName("E",true);
  gunQ->SetDefaultValue(0.);
  currentGunQ = 0.;

  targetArea = new G4UIcmdWithoutParameter("/PIBIDS/gun/area",this);
  targetArea->SetGuidance("Show target area");
}

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

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

Created by Rikard Lundmark