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

#include <HadrontherapyPrimaryGeneratorMessenger.hh>

Inheritance diagram for HadrontherapyPrimaryGeneratorMessenger:
Collaboration diagram for HadrontherapyPrimaryGeneratorMessenger:

Public Member Functions

 HadrontherapyPrimaryGeneratorMessenger (HadrontherapyPrimaryGeneratorAction *)
 
 ~HadrontherapyPrimaryGeneratorMessenger ()
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Public Attributes

HadrontherapyPrimaryGeneratorActionHadrontherapyAction
 
G4UIcmdWithADoubleAndUnitmeanKineticEnergyCmd
 
G4UIcmdWithADoubleAndUnitsigmaEnergyCmd
 
G4UIcmdWithADoubleAndUnitXpositionCmd
 
G4UIcmdWithADoubleAndUnitYpositionCmd
 
G4UIcmdWithADoubleAndUnitZpositionCmd
 
G4UIcmdWithADoubleAndUnitsigmaYCmd
 
G4UIcmdWithADoubleAndUnitsigmaZCmd
 
G4UIcmdWithADoublesigmaMomentumYCmd
 
G4UIcmdWithADoublesigmaMomentumZCmd
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 40 of file HadrontherapyPrimaryGeneratorMessenger.hh.

Constructor & Destructor Documentation

HadrontherapyPrimaryGeneratorMessenger::HadrontherapyPrimaryGeneratorMessenger ( HadrontherapyPrimaryGeneratorAction HadrontherapyGun)

Definition at line 36 of file HadrontherapyPrimaryGeneratorMessenger.cc.

38 :HadrontherapyAction(HadrontherapyGun)
39 {
40  //
41  // Definition of the interactive commands to modify the parameters of the
42  // generation of primary particles
43  //
44  beamParametersDir = new G4UIdirectory("/beam/");
45  beamParametersDir -> SetGuidance("set parameters of beam");
46 
47  EnergyDir = new G4UIdirectory("/beam/energy/");
48  EnergyDir -> SetGuidance ("set energy of beam");
49 
50  particlePositionDir = new G4UIdirectory("/beam/position/");
51  particlePositionDir -> SetGuidance ("set position of particle");
52 
53  MomentumDir = new G4UIdirectory("/beam/momentum/");
54  MomentumDir -> SetGuidance ("set momentum of particle ");
55 /*
56  sigmaMomentumYCmd = new G4UIcmdWithADouble("/beam/momentum/sigmaY",this);
57  sigmaMomentumYCmd -> SetGuidance("set sigma momentum y");
58  sigmaMomentumYCmd -> SetParameterName("momentum",false);
59  sigmaMomentumYCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
60 
61  sigmaMomentumZCmd = new G4UIcmdWithADouble("/beam/momentum/sigmaZ",this);
62  sigmaMomentumZCmd -> SetGuidance("set sigma momentum z");
63  sigmaMomentumZCmd -> SetParameterName("momentum",false);
64  sigmaMomentumZCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
65 
66  meanKineticEnergyCmd = new G4UIcmdWithADoubleAndUnit("/beam/energy/meanEnergy",this);
67  meanKineticEnergyCmd -> SetGuidance("set mean Kinetic energy");
68  meanKineticEnergyCmd -> SetParameterName("Energy",false);
69  meanKineticEnergyCmd -> SetDefaultUnit("MeV");
70  meanKineticEnergyCmd -> SetUnitCandidates("eV keV MeV GeV TeV");
71  meanKineticEnergyCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
72 
73  sigmaEnergyCmd = new G4UIcmdWithADoubleAndUnit("/beam/energy/sigmaEnergy",this);
74  sigmaEnergyCmd -> SetGuidance("set sigma energy");
75  sigmaEnergyCmd -> SetParameterName("Energy",false);
76  sigmaEnergyCmd -> SetDefaultUnit("keV");
77  sigmaEnergyCmd -> SetUnitCandidates("eV keV MeV GeV TeV");
78  sigmaEnergyCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
79 
80  XpositionCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Xposition",this);
81  XpositionCmd -> SetGuidance("set x coordinate of particle");
82  XpositionCmd -> SetParameterName("position",false);
83  XpositionCmd -> SetDefaultUnit("mm");
84  XpositionCmd -> SetUnitCandidates("mm cm m");
85  XpositionCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
86 
87  YpositionCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Yposition",this);
88  YpositionCmd -> SetGuidance("set y coordinate of particle");
89  YpositionCmd -> SetParameterName("position",false);
90  YpositionCmd -> SetDefaultUnit("mm");
91  YpositionCmd -> SetUnitCandidates("mm cm m");
92  YpositionCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
93 
94  sigmaYCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Yposition/sigmaY",this);
95  sigmaYCmd -> SetGuidance("set sigma y");
96  sigmaYCmd -> SetParameterName("position",false);
97  sigmaYCmd -> SetDefaultUnit("mm");
98  sigmaYCmd -> SetUnitCandidates("mm cm m");
99  sigmaYCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
100 
101  ZpositionCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Zposition",this);
102  ZpositionCmd -> SetGuidance("set z coordinate of particle");
103  ZpositionCmd -> SetParameterName("position",false);
104  ZpositionCmd -> SetDefaultUnit("mm");
105  ZpositionCmd -> SetUnitCandidates("mm cm m");
106  ZpositionCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
107 
108  sigmaZCmd = new G4UIcmdWithADoubleAndUnit("/beam/position/Zposition/sigmaZ",this);
109  sigmaZCmd -> SetGuidance("set sigma z");
110  sigmaZCmd -> SetParameterName("position",false);
111  sigmaZCmd -> SetDefaultUnit("mm");
112  sigmaZCmd -> SetUnitCandidates("mm cm m");
113  sigmaZCmd -> AvailableForStates(G4State_PreInit,G4State_Idle);
114 */
115 }
HadrontherapyPrimaryGeneratorAction * HadrontherapyAction
HadrontherapyPrimaryGeneratorMessenger::~HadrontherapyPrimaryGeneratorMessenger ( )

Definition at line 117 of file HadrontherapyPrimaryGeneratorMessenger.cc.

118 {
119  delete beamParametersDir;
120  delete EnergyDir;
121  // delete meanKineticEnergyCmd;
122  // delete sigmaEnergyCmd;
123  delete particlePositionDir;
124  delete MomentumDir;
125 /* delete XpositionCmd;
126  delete YpositionCmd;
127  delete ZpositionCmd;
128  delete sigmaYCmd;
129  delete sigmaZCmd;
130  delete sigmaMomentumYCmd;
131  delete sigmaMomentumZCmd; */
132 }

Member Data Documentation

HadrontherapyPrimaryGeneratorAction* HadrontherapyPrimaryGeneratorMessenger::HadrontherapyAction

Definition at line 45 of file HadrontherapyPrimaryGeneratorMessenger.hh.

G4UIcmdWithADoubleAndUnit* HadrontherapyPrimaryGeneratorMessenger::meanKineticEnergyCmd

Definition at line 46 of file HadrontherapyPrimaryGeneratorMessenger.hh.

G4UIcmdWithADoubleAndUnit* HadrontherapyPrimaryGeneratorMessenger::sigmaEnergyCmd

Definition at line 47 of file HadrontherapyPrimaryGeneratorMessenger.hh.

G4UIcmdWithADouble* HadrontherapyPrimaryGeneratorMessenger::sigmaMomentumYCmd

Definition at line 53 of file HadrontherapyPrimaryGeneratorMessenger.hh.

G4UIcmdWithADouble* HadrontherapyPrimaryGeneratorMessenger::sigmaMomentumZCmd

Definition at line 54 of file HadrontherapyPrimaryGeneratorMessenger.hh.

G4UIcmdWithADoubleAndUnit* HadrontherapyPrimaryGeneratorMessenger::sigmaYCmd

Definition at line 51 of file HadrontherapyPrimaryGeneratorMessenger.hh.

G4UIcmdWithADoubleAndUnit* HadrontherapyPrimaryGeneratorMessenger::sigmaZCmd

Definition at line 52 of file HadrontherapyPrimaryGeneratorMessenger.hh.

G4UIcmdWithADoubleAndUnit* HadrontherapyPrimaryGeneratorMessenger::XpositionCmd

Definition at line 48 of file HadrontherapyPrimaryGeneratorMessenger.hh.

G4UIcmdWithADoubleAndUnit* HadrontherapyPrimaryGeneratorMessenger::YpositionCmd

Definition at line 49 of file HadrontherapyPrimaryGeneratorMessenger.hh.

G4UIcmdWithADoubleAndUnit* HadrontherapyPrimaryGeneratorMessenger::ZpositionCmd

Definition at line 50 of file HadrontherapyPrimaryGeneratorMessenger.hh.


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