source: trunk/source/event/include/G4GeneralParticleSourceMessenger.hh@ 1182

Last change on this file since 1182 was 816, checked in by garnier, 17 years ago

import all except CVS

File size: 10.3 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26///////////////////////////////////////////////////////////////////////////////
27//
28// MODULE: G4GeneralParticleSourceMessenger.hh
29//
30// Version: 2.0
31// Date: 5/02/04
32// Author: Fan Lei
33// Organisation: QinetiQ ltd.
34// Customer: ESA/ESTEC
35//
36///////////////////////////////////////////////////////////////////////////////
37//
38// CHANGE HISTORY
39// --------------
40//
41// Version 2.0, 05/02/2004, Fan Lei, Created.
42// After changes to version 1.1 as in Geant4 v6.0
43// - Mutilple particle source definition
44// - Re-structured commands
45// - old commonds have been retained for backward compatibility, will be
46// removed in the future.
47//
48///////////////////////////////////////////////////////////////////////////////
49//
50//
51// Class Description:
52//
53// The function of the G4GeneralParticleSourceMessenger is to allow the user to
54// enter commands either in interactive command line mode or through macros to
55// control the G4GeneralParticleSource.
56//
57///////////////////////////////////////////////////////////////////////////////
58//
59// MEMBER FUNCTIONS
60// ----------------
61//
62// G4GeneralParticleSourceMessenger(G4GeneralParticleSource *fPtclGun)
63// Constructor: Sets up commands.
64//
65// ~G4GeneralParticleSourceMessenger()
66// Destructor: Deletes commands.
67//
68// void SetParticleGun(G4SingleParticleSource *fpg) { fParticleGun = fpg; } ;
69// To selecte the particle gun to be defined/modified.
70// void SetNewValue(G4UIcommand *command, G4String newValues)
71// Uses the appropriate methods in the G4GeneralParticleSource to carry out
72// the user commands.
73// G4String GetCurrentValue(G4UIcommand *command)
74// Allows the user to retrieve the current values of parameters.
75// Not implemented yet.
76//
77///////////////////////////////////////////////////////////////////////////////
78//
79#ifndef G4GeneralParticleSourceMessenger_h
80#define G4GeneralParticleSourceMessenger_h 1
81
82#include "G4UImessenger.hh"
83#include "globals.hh"
84
85class G4ParticleTable;
86class G4UIcommand;
87class G4UIdirectory;
88class G4UIcmdWithoutParameter;
89class G4UIcmdWithAString;
90class G4UIcmdWithADoubleAndUnit;
91class G4UIcmdWith3Vector;
92class G4UIcmdWith3VectorAndUnit;
93class G4UIcmdWithAnInteger;
94class G4UIcmdWithADouble;
95class G4UIcmdWithABool;
96class G4UIcmdWithoutParameter;
97
98class G4SingleParticleSource;
99class G4GeneralParticleSource;
100
101class G4GeneralParticleSourceMessenger: public G4UImessenger
102{
103public:
104 G4GeneralParticleSourceMessenger(G4GeneralParticleSource*);
105 ~G4GeneralParticleSourceMessenger();
106
107 void SetParticleGun(G4SingleParticleSource *fpg) { fParticleGun = fpg; } ;
108 // To selecte the particle gun to be defined/modified.
109 void SetNewValue(G4UIcommand *command, G4String newValues);
110 // Identifies the command which has been invoked by the user, extracts the
111 // parameters associated with that command (held in newValues), and uses
112 // these values with the appropriate member function of G4GeneralParticleSource.
113 G4String GetCurrentValue(G4UIcommand *command);
114
115private:
116 void IonCommand(G4String newValues);
117
118private:
119 G4GeneralParticleSource *fGPS;
120 G4SingleParticleSource *fParticleGun;
121 G4ParticleTable *particleTable;
122 G4String histtype;
123
124private: //commands
125 G4UIdirectory *gpsDirectory;
126 // multiple source control commands
127 G4UIdirectory *sourceDirectory;
128 G4UIcmdWithADouble *addsourceCmd;
129 G4UIcmdWithoutParameter *listsourceCmd;
130 G4UIcmdWithoutParameter *clearsourceCmd;
131 G4UIcmdWithoutParameter *getsourceCmd;
132 G4UIcmdWithAnInteger *setsourceCmd;
133 G4UIcmdWithADouble *setintensityCmd;
134 G4UIcmdWithAnInteger *deletesourceCmd;
135 G4UIcmdWithABool *multiplevertexCmd;
136 G4UIcmdWithABool *flatsamplingCmd;
137 // positional commands
138 G4UIdirectory *positionDirectory;
139 G4UIcmdWithAString *typeCmd1;
140 G4UIcmdWithAString *shapeCmd1;
141 G4UIcmdWith3VectorAndUnit *centreCmd1;
142 G4UIcmdWith3Vector *posrot1Cmd1;
143 G4UIcmdWith3Vector *posrot2Cmd1;
144 G4UIcmdWithADoubleAndUnit *halfxCmd1;
145 G4UIcmdWithADoubleAndUnit *halfyCmd1;
146 G4UIcmdWithADoubleAndUnit *halfzCmd1;
147 G4UIcmdWithADoubleAndUnit *radiusCmd1;
148 G4UIcmdWithADoubleAndUnit *radius0Cmd1;
149 G4UIcmdWithADoubleAndUnit *possigmarCmd1;
150 G4UIcmdWithADoubleAndUnit *possigmaxCmd1;
151 G4UIcmdWithADoubleAndUnit *possigmayCmd1;
152 G4UIcmdWithADoubleAndUnit *paralpCmd1;
153 G4UIcmdWithADoubleAndUnit *partheCmd1;
154 G4UIcmdWithADoubleAndUnit *parphiCmd1;
155 G4UIcmdWithAString *confineCmd1;
156 //old ones, will be reomved soon
157 G4UIcmdWithAString *typeCmd;
158 G4UIcmdWithAString *shapeCmd;
159 G4UIcmdWith3VectorAndUnit *centreCmd;
160 G4UIcmdWith3Vector *posrot1Cmd;
161 G4UIcmdWith3Vector *posrot2Cmd;
162 G4UIcmdWithADoubleAndUnit *halfxCmd;
163 G4UIcmdWithADoubleAndUnit *halfyCmd;
164 G4UIcmdWithADoubleAndUnit *halfzCmd;
165 G4UIcmdWithADoubleAndUnit *radiusCmd;
166 G4UIcmdWithADoubleAndUnit *radius0Cmd;
167 G4UIcmdWithADoubleAndUnit *possigmarCmd;
168 G4UIcmdWithADoubleAndUnit *possigmaxCmd;
169 G4UIcmdWithADoubleAndUnit *possigmayCmd;
170 G4UIcmdWithADoubleAndUnit *paralpCmd;
171 G4UIcmdWithADoubleAndUnit *partheCmd;
172 G4UIcmdWithADoubleAndUnit *parphiCmd;
173 G4UIcmdWithAString *confineCmd;
174 // angular commands
175 G4UIdirectory *angularDirectory;
176 G4UIcmdWithAString *angtypeCmd1;
177 G4UIcmdWith3Vector *angrot1Cmd1;
178 G4UIcmdWith3Vector *angrot2Cmd1;
179 G4UIcmdWithADoubleAndUnit *minthetaCmd1;
180 G4UIcmdWithADoubleAndUnit *maxthetaCmd1;
181 G4UIcmdWithADoubleAndUnit *minphiCmd1;
182 G4UIcmdWithADoubleAndUnit *maxphiCmd1;
183 G4UIcmdWithADoubleAndUnit *angsigmarCmd1;
184 G4UIcmdWithADoubleAndUnit *angsigmaxCmd1;
185 G4UIcmdWithADoubleAndUnit *angsigmayCmd1;
186 G4UIcmdWith3VectorAndUnit *angfocusCmd;
187 G4UIcmdWithABool *useuserangaxisCmd1;
188 G4UIcmdWithABool *surfnormCmd1;
189 // old ones, will be removed soon
190 G4UIcmdWithAString *angtypeCmd;
191 G4UIcmdWith3Vector *angrot1Cmd;
192 G4UIcmdWith3Vector *angrot2Cmd;
193 G4UIcmdWithADoubleAndUnit *minthetaCmd;
194 G4UIcmdWithADoubleAndUnit *maxthetaCmd;
195 G4UIcmdWithADoubleAndUnit *minphiCmd;
196 G4UIcmdWithADoubleAndUnit *maxphiCmd;
197 G4UIcmdWithADoubleAndUnit *angsigmarCmd;
198 G4UIcmdWithADoubleAndUnit *angsigmaxCmd;
199 G4UIcmdWithADoubleAndUnit *angsigmayCmd;
200 G4UIcmdWithABool *useuserangaxisCmd;
201 G4UIcmdWithABool *surfnormCmd;
202 // energy commands
203 G4UIdirectory *energyDirectory;
204 G4UIcmdWithAString *energytypeCmd1;
205 G4UIcmdWithADoubleAndUnit *eminCmd1;
206 G4UIcmdWithADoubleAndUnit *emaxCmd1;
207 G4UIcmdWithADoubleAndUnit *monoenergyCmd1;
208 G4UIcmdWithADoubleAndUnit *engsigmaCmd1;
209 G4UIcmdWithADouble *alphaCmd1;
210 G4UIcmdWithADouble *tempCmd1;
211 G4UIcmdWithADouble *ezeroCmd1;
212 G4UIcmdWithADouble *gradientCmd1;
213 G4UIcmdWithADouble *interceptCmd1;
214 G4UIcmdWithoutParameter *calculateCmd1;
215 G4UIcmdWithABool *energyspecCmd1;
216 G4UIcmdWithABool *diffspecCmd1;
217 // old ones, will be removed soon
218 G4UIcmdWithAString *energytypeCmd;
219 G4UIcmdWithADoubleAndUnit *eminCmd;
220 G4UIcmdWithADoubleAndUnit *emaxCmd;
221 G4UIcmdWithADoubleAndUnit *monoenergyCmd;
222 G4UIcmdWithADoubleAndUnit *engsigmaCmd;
223 G4UIcmdWithADouble *alphaCmd;
224 G4UIcmdWithADouble *tempCmd;
225 G4UIcmdWithADouble *ezeroCmd;
226 G4UIcmdWithADouble *gradientCmd;
227 G4UIcmdWithADouble *interceptCmd;
228 G4UIcmdWithoutParameter *calculateCmd;
229 G4UIcmdWithABool *energyspecCmd;
230 G4UIcmdWithABool *diffspecCmd;
231 // histogram commands
232 G4UIdirectory *histDirectory;
233 G4UIcmdWith3Vector *histpointCmd;
234 G4UIcmdWithAString *histnameCmd;
235 G4UIcmdWithAString *arbintCmd;
236 G4UIcmdWithAString *resethistCmd;
237 // old ones, will be removed soon
238 G4UIcmdWith3Vector *histpointCmd1;
239 G4UIcmdWithAString *histnameCmd1;
240 G4UIcmdWithAString *arbintCmd1;
241 G4UIcmdWithAString *resethistCmd1;
242
243 //
244 G4UIcmdWithAnInteger *verbosityCmd;
245
246 // below are commands from G4ParticleGun
247
248 G4UIcommand *ionCmd;
249 G4UIcmdWithAString *particleCmd;
250 G4UIcmdWithADoubleAndUnit *timeCmd;
251 G4UIcmdWith3Vector *polCmd;
252 G4UIcmdWithAnInteger *numberCmd;
253 G4UIcmdWith3VectorAndUnit *positionCmd;
254 G4UIcmdWith3Vector *directionCmd;
255 G4UIcmdWithADoubleAndUnit *energyCmd;
256 G4UIcmdWithoutParameter *listCmd;
257
258
259 private: // for ion shooting
260 G4bool fShootIon;
261 G4int fAtomicNumber;
262 G4int fAtomicMass;
263 G4int fIonCharge;
264 G4double fIonExciteEnergy;
265
266};
267
268#endif
269
Note: See TracBrowser for help on using the repository browser.