ACTARSim
ACTAR TPC Simulation Reference Guide
ActarSimPrimaryGeneratorMessenger.hh
Go to the documentation of this file.
1 // - AUTHOR: Hector Alvarez-Pol 11/2004
2 /******************************************************************
3  * Copyright (C) 2005-2016, Hector Alvarez-Pol *
4  * All rights reserved. *
5  * *
6  * License according to GNU LESSER GPL (see lgpl-3.0.txt). *
7  * For the list of contributors see CREDITS. *
8  ******************************************************************/
9 
10 #ifndef ActarSimPrimaryGeneratorMessenger_h
11 #define ActarSimPrimaryGeneratorMessenger_h 1
12 
13 #include "G4UImessenger.hh"
14 #include "globals.hh"
15 
17 class G4ParticleTable;
18 class G4IonTable;
19 class G4UIdirectory;
20 class G4UIcommand;
21 class G4UIcmdWithoutParameter;
22 class G4UIcmdWith3Vector;
23 class G4UIcmdWith3VectorAndUnit;
24 class G4UIcmdWithAnInteger;
25 class G4UIcmdWithAString;
26 class G4UIcmdWithADoubleAndUnit;
27 class G4UIcmdWithADouble;
28 
29 class ActarSimPrimaryGeneratorMessenger: public G4UImessenger {
30 private:
31  ActarSimPrimaryGeneratorAction* actarSimActionGun; ///< Pointer to main primary generator class
32  G4ParticleTable* particleTable; ///< Pointer to the global particle table
33  G4IonTable* ionTable; ///< Pointer to the global particle table
34 
35  G4UIdirectory* gunDir; ///< Directory for gun commands
36  G4UIdirectory* CineDir; ///< Directory for CINE commands
37  G4UIcmdWithoutParameter* listCmd; ///< List available particles.
38  G4UIcmdWithAString* particleCmd; ///< Select the incident particle.
39  G4UIcmdWithAString* realisticBeamCmd; ///< Simulates beam emittance according to emittance parameters.
40  G4UIcmdWithAString* beamInteractionCmd; ///< Simulates the beam energy loss in gas.
41  G4UIcmdWithAString* reactionFromFileCmd; ///< Select a reaction from an input file
42  G4UIcmdWithAString* reactionFromCrossSectionCmd; ///< DO NOT USE. Simulates beam/target from the cross-sections. DO NOT USE.
43  G4UIcmdWithAString* reactionFromEvGenCmd; ///< DO NOT USE. Simulates beam/target from event generator. DO NOT USE.
44  G4UIcmdWithAString* reactionFromCineCmd; ///< Select a reaction using Cine
45  G4UIcmdWithAString* reactionFileCmd; ///< Select the reaction definition file.
46  G4UIcmdWithAString* randomThetaCmd; ///< Select a random Theta angle for the scattered particle.
47  G4UIcmdWithAString* randomPhiCmd; ///< Select a random Phi angle for the scattered particle.
48  G4UIcmdWithAString* alphaSourceCmd; ///< NOT VALIDATED. CHECK THIS COMMAND!
49  G4UIcmdWithAString* CinerandomThetaCmd; ///< Select a random Theta angle for the scattered particle.
50  G4UIcommand* randomThetaValCmd; ///< Sets the limits in the Theta angle for the scattered particle.
51  G4UIcommand* randomPhiValCmd; ///< Sets the limits in the Phi angle for the scattered particle.
52  G4UIcommand* CinerandomThetaValCmd; ///< Sets the limist in the Theta angle for the scattered particle.
53  G4UIcmdWithADoubleAndUnit* energyCmd; ///< Sets the kinetic energy of the primary particle
54  G4UIcmdWith3Vector* directionCmd; ///< Set momentum direction.
55  G4UIcmdWithADoubleAndUnit* beamThetaCmd; ///< Sets theta angle for beam (in degrees)
56  G4UIcmdWithADoubleAndUnit* beamPhiCmd; ///< Sets phi angle for beam (in degrees)
57  G4UIcmdWith3VectorAndUnit* positionCmd; ///< Set starting position of the particle.
58  G4UIcmdWithADoubleAndUnit* timeCmd; ///< Set initial time of the particle.
59  G4UIcmdWithAString* randomVertexZPositionCmd; ///< Randomize the reaction vertex Z position
60  G4UIcommand* randomVertexZPositionRangeCmd; ///< Set the min and max Z-value of random vertex position
61  G4UIcmdWithADoubleAndUnit* vertexZPositionCmd; ///< Set the Z-value of the reaction vertex.
62  G4UIcmdWith3Vector* polCmd; ///< Set polarization.
63  G4UIcmdWithAnInteger* numberCmd; ///< Set number of particles to be generated in a single event
64 
65  G4UIcmdWithADouble* emittanceCmd; ///< Selects the value of the emittance [in mm mrad].
66  G4UIcmdWith3Vector* beamDirectionCmd; ///< Set beam momentum direction.
67  G4UIcmdWith3VectorAndUnit* beamPositionCmd; ///< Set beam starting position.
68  G4UIcmdWithADoubleAndUnit* beamRadiusAtEntranceCmd; ///< Selects the beam radius at entrance of ACTAR.
69 
70  G4UIdirectory* KineDir; ///< Directory for CINE commands
71  G4UIcmdWithAString* reactionFromKineCmd; ///< Select a reaction using Kine
72  G4UIcmdWithAString* KineRandomThetaCmd; ///< Randomize Theta_CM of outgoing particles
73  G4UIcommand* KineRandomThetaRangeCmd; ///< Sets the limits in the Theta angle for the scattered particle.
74  G4UIcmdWithAString* KineRandomPhiAngleCmd; ///< Randomize Lab Phi angles of out-going particles
75  G4UIcommand* KineIncidentIonCmd; ///< Set properties of incident ion to be generated.
76  G4UIcommand* KineTargetIonCmd; ///< Set properties of target ion to be generated.
77  G4UIcommand* KineScatteredIonCmd; ///< Set properties of scattered ion to be generated.
78  G4UIcommand* KineRecoilIonCmd; ///< Set properties of recoil ion to be generated.
79  G4UIcmdWithADoubleAndUnit* KineLabEnergyCmd; ///< Sets the laboratory energy.
80  G4UIcmdWithADoubleAndUnit* KineUserThetaCMCmd; ///< Sets theta CM angle for scattered particle (in degrees)
81  G4UIcmdWithADoubleAndUnit* KineUserPhiAngleCmd; ///< User set phi angle for outgoing particle in the Lab system (in degrees)
82  G4UIcmdWith3VectorAndUnit* vertexPositionCmd; ///< Set the position of the vertex.
83 
84  G4UIcommand* incidentIonCmd; ///< Set properties of incident ion to be generated.
85  G4UIcommand* targetIonCmd; ///< Set properties of target ion to be generated.
86  G4UIcommand* scatteredIonCmd; ///< Set properties of scattered ion to be generated.
87  G4UIcommand* recoilIonCmd; ///< Set properties of recoil ion to be generated.
88 
89  G4UIcmdWithADoubleAndUnit* reactionQCmd; ///< Sets the reaction Q
90  G4UIcmdWithADoubleAndUnit* labEnergyCmd; ///< Sets the laboratory energy
91  G4UIcmdWithADoubleAndUnit* thetaLabAngleCmd; ///< Sets theta lab angle for the scattered particle (degrees)
92 
93  G4UIcommand* ionCmd; ///< Set properties of ion to be generated.
94 
95  // for ion shooting
96  G4bool fShootIon; ///< Internal variables for ion creation
97  G4int fAtomicNumber; ///< Internal variables for ion creation: atomic number
98  G4int fAtomicMass; ///< Internal variables for ion creation: atomic mass
99  G4int fIonCharge; ///< Internal variables for ion creation: ion charge
100  G4double fIonExciteEnergy; ///< Internal variables for ion creation: ion excitation energy
101 
102  // for Kine command
103  G4double fIonMass; ///< Internal variables for ion creation: ion mass in atomic mass unit u
104 
105  void IonCommand(G4String newValues);
106  void incidentIonCommand(G4String newValues);
107  void targetIonCommand(G4String newValues);
108  void scatteredIonCommand(G4String newValues);
109  void recoilIonCommand(G4String newValues);
110  void KineIncidentIonCommand(G4String newValues);
111  void KineTargetIonCommand(G4String newValues);
112  void KineScatteredIonCommand(G4String newValues);
113  void KineRecoilIonCommand(G4String newValues);
114 
115 public:
118 
119  void SetNewValue(G4UIcommand*, G4String);
120  G4String GetCurrentValue(G4UIcommand * command);
121 };
122 #endif
G4UIcommand * KineTargetIonCmd
Set properties of target ion to be generated.
G4bool fShootIon
Internal variables for ion creation.
G4UIcmdWithADoubleAndUnit * beamPhiCmd
Sets phi angle for beam (in degrees)
G4UIcmdWith3Vector * beamDirectionCmd
Set beam momentum direction.
G4UIcmdWithADoubleAndUnit * timeCmd
Set initial time of the particle.
G4UIcommand * CinerandomThetaValCmd
Sets the limist in the Theta angle for the scattered particle.
G4UIcommand * recoilIonCmd
Set properties of recoil ion to be generated.
G4UIcmdWithAString * reactionFromCineCmd
Select a reaction using Cine.
G4UIcmdWithAnInteger * numberCmd
Set number of particles to be generated in a single event.
G4UIcmdWithAString * reactionFromCrossSectionCmd
DO NOT USE. Simulates beam/target from the cross-sections. DO NOT USE.
G4UIcmdWithADoubleAndUnit * energyCmd
Sets the kinetic energy of the primary particle.
G4UIcmdWithAString * KineRandomThetaCmd
Randomize Theta_CM of outgoing particles.
G4UIdirectory * KineDir
Directory for CINE commands.
G4UIcmdWithADoubleAndUnit * vertexZPositionCmd
Set the Z-value of the reaction vertex.
G4UIcommand * randomThetaValCmd
Sets the limits in the Theta angle for the scattered particle.
void KineTargetIonCommand(G4String newValues)
Particular behavior of the (KINE) target ion command. Ion state should be selected.
G4UIcommand * scatteredIonCmd
Set properties of scattered ion to be generated.
G4UIcmdWith3Vector * polCmd
Set polarization.
G4UIcmdWithADoubleAndUnit * KineUserThetaCMCmd
Sets theta CM angle for scattered particle (in degrees)
G4UIcommand * KineRecoilIonCmd
Set properties of recoil ion to be generated.
G4UIcmdWithADoubleAndUnit * labEnergyCmd
Sets the laboratory energy.
void KineRecoilIonCommand(G4String newValues)
Particular behavior of the (KINE) recoil ion command. Ion state should be selected.
G4String GetCurrentValue(G4UIcommand *command)
Get current value from commands.
G4UIcommand * KineScatteredIonCmd
Set properties of scattered ion to be generated.
G4UIcommand * randomVertexZPositionRangeCmd
Set the min and max Z-value of random vertex position.
G4UIcommand * KineRandomThetaRangeCmd
Sets the limits in the Theta angle for the scattered particle.
G4UIcommand * incidentIonCmd
Set properties of incident ion to be generated.
G4IonTable * ionTable
Pointer to the global particle table.
G4int fIonCharge
Internal variables for ion creation: ion charge.
void SetNewValue(G4UIcommand *, G4String)
Setting the values using the interface.
ActarSimPrimaryGeneratorAction * actarSimActionGun
Pointer to main primary generator class.
void KineIncidentIonCommand(G4String newValues)
Particular behavior of the (KINE) incident ion command. Ion state should be selected.
G4UIcmdWithADoubleAndUnit * beamRadiusAtEntranceCmd
Selects the beam radius at entrance of ACTAR.
ActarSimPrimaryGeneratorMessenger(ActarSimPrimaryGeneratorAction *)
G4UIcmdWithADoubleAndUnit * beamThetaCmd
Sets theta angle for beam (in degrees)
void scatteredIonCommand(G4String newValues)
Particular behavior of the scattered ion command. Ion state should be selected.
G4UIcmdWithAString * particleCmd
Select the incident particle.
void recoilIonCommand(G4String newValues)
Particular behavior of the recoil ion command. Ion state should be selected.
G4UIcommand * randomPhiValCmd
Sets the limits in the Phi angle for the scattered particle.
G4UIcmdWithADoubleAndUnit * thetaLabAngleCmd
Sets theta lab angle for the scattered particle (degrees)
G4UIcommand * KineIncidentIonCmd
Set properties of incident ion to be generated.
G4UIcmdWithoutParameter * listCmd
List available particles.
G4UIcmdWithADoubleAndUnit * KineLabEnergyCmd
Sets the laboratory energy.
G4UIcmdWith3VectorAndUnit * vertexPositionCmd
Set the position of the vertex.
G4UIcmdWithADoubleAndUnit * reactionQCmd
Sets the reaction Q.
G4double fIonExciteEnergy
Internal variables for ion creation: ion excitation energy.
G4UIcmdWithAString * realisticBeamCmd
Simulates beam emittance according to emittance parameters.
G4UIcmdWithADouble * emittanceCmd
Selects the value of the emittance [in mm mrad].
void KineScatteredIonCommand(G4String newValues)
Particular behavior of the (KINE) scattered ion command. Ion state should be selected.
G4UIdirectory * CineDir
Directory for CINE commands.
G4UIcmdWithAString * reactionFileCmd
Select the reaction definition file.
G4UIcmdWithAString * beamInteractionCmd
Simulates the beam energy loss in gas.
G4UIcmdWithAString * randomPhiCmd
Select a random Phi angle for the scattered particle.
G4UIcmdWith3Vector * directionCmd
Set momentum direction.
G4UIcommand * targetIonCmd
Set properties of target ion to be generated.
void incidentIonCommand(G4String newValues)
Particular behavior of the incident ion command. Ion state should be selected.
G4UIcmdWithAString * KineRandomPhiAngleCmd
Randomize Lab Phi angles of out-going particles.
G4ParticleTable * particleTable
Pointer to the global particle table.
G4UIcmdWithAString * reactionFromFileCmd
Select a reaction from an input file.
G4UIcmdWithAString * CinerandomThetaCmd
Select a random Theta angle for the scattered particle.
G4UIcmdWithAString * alphaSourceCmd
NOT VALIDATED. CHECK THIS COMMAND!
G4int fAtomicNumber
Internal variables for ion creation: atomic number.
G4UIcmdWithAString * reactionFromKineCmd
Select a reaction using Kine.
G4UIcmdWithAString * reactionFromEvGenCmd
DO NOT USE. Simulates beam/target from event generator. DO NOT USE.
void IonCommand(G4String newValues)
Particular behavior of the ion command. Ion state should be selected.
G4int fAtomicMass
Internal variables for ion creation: atomic mass.
G4UIdirectory * gunDir
Directory for gun commands.
G4double fIonMass
Internal variables for ion creation: ion mass in atomic mass unit u.
void targetIonCommand(G4String newValues)
Particular behavior of the target ion command. Ion state should be selected.
G4UIcmdWith3VectorAndUnit * positionCmd
Set starting position of the particle.
G4UIcommand * ionCmd
Set properties of ion to be generated.
G4UIcmdWithAString * randomThetaCmd
Select a random Theta angle for the scattered particle.
G4UIcmdWithADoubleAndUnit * KineUserPhiAngleCmd
User set phi angle for outgoing particle in the Lab system (in degrees)
G4UIcmdWithAString * randomVertexZPositionCmd
Randomize the reaction vertex Z position.
G4UIcmdWith3VectorAndUnit * beamPositionCmd
Set beam starting position.