Geant4-11
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
G4GeneralParticleSourceMessenger Class Reference

#include <G4GeneralParticleSourceMessenger.hh>

Inheritance diagram for G4GeneralParticleSourceMessenger:
G4UImessenger

Public Member Functions

G4bool CommandsShouldBeInMaster () const
 
G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator!= (const G4UImessenger &messenger) const
 
G4bool operator== (const G4UImessenger &messenger) const
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
void SetParticleGun (G4SingleParticleSource *fpg)
 

Static Public Member Functions

static void Destroy ()
 
static G4GeneralParticleSourceMessengerGetInstance (G4GeneralParticleSource *)
 

Protected Member Functions

void AddUIcommand (G4UIcommand *newCommand)
 
G4String BtoS (G4bool b)
 
template<typename T >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
G4String DtoS (G4double a)
 
G4String ItoS (G4int i)
 
G4bool StoB (G4String s)
 
G4double StoD (G4String s)
 
G4int StoI (G4String s)
 
G4long StoL (G4String s)
 

Protected Attributes

G4UIdirectorybaseDir = nullptr
 
G4String baseDirName = ""
 
G4bool commandsShouldBeInMaster = false
 

Private Member Functions

 G4GeneralParticleSourceMessenger (G4GeneralParticleSource *)
 
void IonCommand (G4String newValues)
 
void IonLvlCommand (G4String newValues)
 
 ~G4GeneralParticleSourceMessenger ()
 

Private Attributes

G4UIcmdWithADoubleaddsourceCmd
 
G4UIcmdWithADoublealphaCmd1
 
G4UIcmdWith3VectorAndUnitangfocusCmd
 
G4UIcmdWith3Vectorangrot1Cmd1
 
G4UIcmdWith3Vectorangrot2Cmd1
 
G4UIcmdWithADoubleAndUnitangsigmarCmd1
 
G4UIcmdWithADoubleAndUnitangsigmaxCmd1
 
G4UIcmdWithADoubleAndUnitangsigmayCmd1
 
G4UIcmdWithAStringangtypeCmd1
 
G4UIdirectoryangularDirectory
 
G4UIcmdWithABoolapplyEnergyWeightCmd1
 
G4UIcmdWithADoublearbeintCmd1
 
G4UIcmdWithAStringarbintCmd1
 
G4UIcmdWithoutParametercalculateCmd1
 
G4UIcmdWith3VectorAndUnitcentreCmd1
 
G4UIcmdWithoutParameterclearsourceCmd
 
G4UIcmdWithAStringconfineCmd1
 
G4UIcmdWithAnIntegerdeletesourceCmd
 
G4UIcmdWithABooldiffspecCmd1
 
G4UIcmdWith3VectordirectionCmd
 
G4UIcmdWithADoubleAndUnitemaxCmd1
 
G4UIcmdWithADoubleAndUniteminCmd1
 
G4UIcmdWithADoubleAndUnitenergyCmd
 
G4UIdirectoryenergyDirectory
 
G4UIcmdWithABoolenergyspecCmd1
 
G4UIcmdWithAStringenergytypeCmd1
 
G4UIcmdWithADoubleAndUnitengsigmaCmd1
 
G4UIcmdWithADoubleezeroCmd1
 
G4int fAtomicMass = 0
 
G4int fAtomicMassL = 0
 
G4int fAtomicNumber = 0
 
G4int fAtomicNumberL = 0
 
G4GeneralParticleSourcefGPS = nullptr
 
G4int fIonCharge = 0
 
G4int fIonChargeL = 0
 
G4int fIonEnergyLevel = 0
 
G4double fIonExciteEnergy = 0.0
 
G4UIcmdWithABoolflatsamplingCmd
 
G4SingleParticleSourcefParticleGun = nullptr
 
G4bool fShootIon = false
 
G4UIcmdWithoutParametergetsourceCmd
 
G4UIdirectorygpsDirectory
 
G4UIcmdWithADoublegradientCmd1
 
G4UIcmdWithADoubleAndUnithalfxCmd1
 
G4UIcmdWithADoubleAndUnithalfyCmd1
 
G4UIcmdWithADoubleAndUnithalfzCmd1
 
G4UIdirectoryhistDirectory
 
G4UIcmdWithAStringhistfileCmd1
 
G4UIcmdWithAStringhistnameCmd1
 
G4UIcmdWith3VectorhistpointCmd1
 
G4String histtype
 
G4UIcmdWithADoubleinterceptCmd1
 
G4UIcommandionCmd
 
G4UIcommandionLvlCmd
 
G4UIcmdWithoutParameterlistCmd
 
G4UIcmdWithoutParameterlistsourceCmd
 
G4UIcmdWithADoubleAndUnitmaxphiCmd1
 
G4UIcmdWithADoubleAndUnitmaxthetaCmd1
 
G4UIcmdWithADoubleAndUnitminphiCmd1
 
G4UIcmdWithADoubleAndUnitminthetaCmd1
 
G4UIcmdWithADoubleAndUnitmonoenergyCmd1
 
G4UIcmdWithABoolmultiplevertexCmd
 
G4UIcmdWithAnIntegernumberCmd
 
G4UIcmdWithADoubleAndUnitparalpCmd1
 
G4UIcmdWithADoubleAndUnitparphiCmd1
 
G4UIcmdWithADoubleAndUnitpartheCmd1
 
G4UIcmdWithAStringparticleCmd
 
G4ParticleTableparticleTable = nullptr
 
G4UIcmdWith3VectorpolCmd
 
G4UIcmdWith3VectorAndUnitpositionCmd
 
G4UIdirectorypositionDirectory
 
G4UIcmdWith3Vectorposrot1Cmd1
 
G4UIcmdWith3Vectorposrot2Cmd1
 
G4UIcmdWithADoubleAndUnitpossigmarCmd1
 
G4UIcmdWithADoubleAndUnitpossigmaxCmd1
 
G4UIcmdWithADoubleAndUnitpossigmayCmd1
 
G4UIcmdWithADoubleAndUnitradius0Cmd1
 
G4UIcmdWithADoubleAndUnitradiusCmd1
 
G4UIcmdWithAStringresethistCmd1
 
G4UIcmdWithADoublesetintensityCmd
 
G4UIcmdWithAnIntegersetsourceCmd
 
G4UIcmdWithAStringshapeCmd1
 
G4UIdirectorysourceDirectory
 
G4UIcmdWithABoolsurfnormCmd1
 
G4UIcmdWithADoubletempCmd1
 
G4UIcmdWithADoubleAndUnittimeCmd
 
G4UIcmdWithAStringtypeCmd1
 
G4UIcmdWithABooluseuserangaxisCmd1
 
G4UIcmdWithAnIntegerverbosityCmd
 

Detailed Description

Definition at line 74 of file G4GeneralParticleSourceMessenger.hh.

Constructor & Destructor Documentation

◆ G4GeneralParticleSourceMessenger()

G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger ( G4GeneralParticleSource fPtclGun)
private

Definition at line 85 of file G4GeneralParticleSourceMessenger.cc.

87 : fGPS(fPtclGun)
88{
89 // A.Dotti - 10th October 2014
90 // This messenger is special: it is instantiated in a user action but (e.g.
91 // in a thread).
92 // The UI commands it defines should be executed by the *master* thread
93 // because they operate on shared resources and we want the UI commands to
94 // take effect BEFORE the threads do some work (so all data are properly
95 // initialized).
96 // To achieve this behavior we set to true a base class protected
97 // data member. Since it makes no sense to have more than one instance
98 // of the messenger, we check that we actually have only one.
99 // Note that the logic of implementing, in a given worker thread only one
100 // messenger is deleted/fated to the creator
101
103
105 histtype = "biasx";
106
107 // UI Commands only for master
108 //
109 G4bool broadcast = false;
110 gpsDirectory = new G4UIdirectory("/gps/",broadcast);
111
112 gpsDirectory->SetGuidance("General Particle Source control commands.");
113
114 // Now the commands for multiple sources
115 //
116 sourceDirectory = new G4UIdirectory("/gps/source/");
117 sourceDirectory->SetGuidance("Multiple source control sub-directory");
118
119 addsourceCmd = new G4UIcmdWithADouble("/gps/source/add",this);
120 addsourceCmd->SetGuidance("Add a new source definition to the particle gun");
121 addsourceCmd->SetGuidance(" with the specified intensity");
122 addsourceCmd->SetParameterName("addsource",false,false);
123 addsourceCmd->SetRange("addsource > 0.");
124
125 listsourceCmd = new G4UIcmdWithoutParameter("/gps/source/list",this);
126 listsourceCmd->SetGuidance("List the defined particle sources");
127
128 clearsourceCmd = new G4UIcmdWithoutParameter("/gps/source/clear",this);
129 clearsourceCmd->SetGuidance("Remove all the defined particle sources");
130
131 getsourceCmd = new G4UIcmdWithoutParameter("/gps/source/show",this);
132 getsourceCmd->SetGuidance("Show the current source index and intensity");
133
134 setsourceCmd = new G4UIcmdWithAnInteger("/gps/source/set",this);
135 setsourceCmd->SetGuidance("Set the indexed source as the current one");
136 setsourceCmd->SetGuidance(" so one can change its source definition");
137 setsourceCmd->SetParameterName("setsource",false,false);
138 setsourceCmd->SetRange("setsource >= 0");
139
140 deletesourceCmd = new G4UIcmdWithAnInteger("/gps/source/delete",this);
141 deletesourceCmd->SetGuidance("Delete the indexed source from the list");
142 deletesourceCmd->SetParameterName("deletesource",false,false);
143 deletesourceCmd->SetRange("deletesource > 0");
144
145 setintensityCmd = new G4UIcmdWithADouble("/gps/source/intensity",this);
146 setintensityCmd->SetGuidance("Reset the current source to the specified intensity");
147 setintensityCmd->SetParameterName("setintensity",false,false);
148 setintensityCmd->SetRange("setintensity > 0.");
149
150 multiplevertexCmd = new G4UIcmdWithABool("/gps/source/multiplevertex",this);
151 multiplevertexCmd->SetGuidance("True for simultaneous generation multiple vertex");
152 multiplevertexCmd->SetGuidance(" Default is false");
153 multiplevertexCmd->SetParameterName("multiplevertex",true);
155
156 flatsamplingCmd = new G4UIcmdWithABool("/gps/source/flatsampling",this);
157 flatsamplingCmd->SetGuidance("True for applying flat (biased) sampling among the sources");
158 flatsamplingCmd->SetGuidance("Default is false");
159 flatsamplingCmd->SetParameterName("flatsampling",true);
161
162 // Below we reproduce commands awailable in G4Particle Gun
163 //
164 listCmd = new G4UIcmdWithoutParameter("/gps/List",this);
165 listCmd->SetGuidance("List available particles.");
166 listCmd->SetGuidance(" Invoke G4ParticleTable.");
167
168 particleCmd = new G4UIcmdWithAString("/gps/particle",this);
169 particleCmd->SetGuidance("Set particle to be generated.");
170 particleCmd->SetGuidance(" (geantino is default)");
171 particleCmd->SetGuidance(" (ion can be specified for shooting ions)");
172 particleCmd->SetParameterName("particleName",true);
173 particleCmd->SetDefaultValue("geantino");
174 G4String candidateList;
175 G4int nPtcl = particleTable->entries();
176 for(G4int i=0; i<nPtcl; ++i)
177 {
178 candidateList += particleTable->GetParticleName(i);
179 candidateList += " ";
180 }
181 candidateList += "ion ";
182 particleCmd->SetCandidates(candidateList);
183
184 directionCmd = new G4UIcmdWith3Vector("/gps/direction",this);
185 directionCmd->SetGuidance("Set momentum direction.");
186 directionCmd->SetGuidance(" Direction needs not to be a unit vector.");
187 directionCmd->SetGuidance(" Angular distribution type is set to planar.");
188 directionCmd->SetParameterName("Px","Py","Pz",false,false);
189 directionCmd->SetRange("Px != 0 || Py != 0 || Pz != 0");
190
191 energyCmd = new G4UIcmdWithADoubleAndUnit("/gps/energy",this);
192 energyCmd->SetGuidance("Set kinetic energy.");
193 energyCmd->SetParameterName("Energy",false,false);
195 //energyCmd->SetUnitCategory("Energy");
196 //energyCmd->SetUnitCandidates("eV keV MeV GeV TeV");
197
198 positionCmd = new G4UIcmdWith3VectorAndUnit("/gps/position",this);
199 positionCmd->SetGuidance("Set starting position of the particle for a Point like source.");
200 positionCmd->SetGuidance(" Same effect as the two /gps/pos/type Point /gps/pos/centre commands.");
201 positionCmd->SetParameterName("X","Y","Z",false,false);
203 //positionCmd->SetUnitCategory("Length");
204 //positionCmd->SetUnitCandidates("microm mm cm m km");
205
206 ionCmd = new G4UIcommand("/gps/ion",this);
207 ionCmd->SetGuidance("Set properties of ion to be generated.");
208 ionCmd->SetGuidance("[usage] /gps/ion Z A Q E");
209 ionCmd->SetGuidance(" Z:(int) AtomicNumber");
210 ionCmd->SetGuidance(" A:(int) AtomicMass");
211 ionCmd->SetGuidance(" Q:(int) Charge of Ion (in unit of e)");
212 ionCmd->SetGuidance(" E:(double) Excitation energy (in keV)");
213
214 G4UIparameter* param;
215 param = new G4UIparameter("Z",'i',false);
216 param->SetDefaultValue("1");
217 ionCmd->SetParameter(param);
218 param = new G4UIparameter("A",'i',false);
219 param->SetDefaultValue("1");
220 ionCmd->SetParameter(param);
221 param = new G4UIparameter("Q",'i',true);
222 param->SetDefaultValue("0");
223 ionCmd->SetParameter(param);
224 param = new G4UIparameter("E",'d',true);
225 param->SetDefaultValue("0.0");
226 ionCmd->SetParameter(param);
227
228 ionLvlCmd = new G4UIcommand("/gps/ionLvl",this);
229 ionLvlCmd->SetGuidance("Set properties of ion to be generated.");
230 ionLvlCmd->SetGuidance("[usage] /gps/ion Z A Q Lvl");
231 ionLvlCmd->SetGuidance(" Z:(int) AtomicNumber");
232 ionLvlCmd->SetGuidance(" A:(int) AtomicMass");
233 ionLvlCmd->SetGuidance(" Q:(int) Charge of Ion (in unit of e)");
234 ionLvlCmd->SetGuidance(" Lvl:(int) Number of metastable state excitation level (0-9)");
235
236 G4UIparameter* paramL;
237 paramL = new G4UIparameter("Z",'i',false);
238 paramL->SetDefaultValue("1");
239 ionLvlCmd->SetParameter(paramL);
240 paramL = new G4UIparameter("A",'i',false);
241 paramL->SetDefaultValue("1");
242 ionLvlCmd->SetParameter(paramL);
243 paramL = new G4UIparameter("Q",'i',true);
244 paramL->SetDefaultValue("0");
245 ionLvlCmd->SetParameter(paramL);
246 paramL = new G4UIparameter("Lvl",'i',true);
247 paramL->SetDefaultValue("0.0");
248 ionLvlCmd->SetParameter(paramL);
249
250 timeCmd = new G4UIcmdWithADoubleAndUnit("/gps/time",this);
251 timeCmd->SetGuidance("Set initial time of the particle.");
252 timeCmd->SetParameterName("t0",false,false);
253 timeCmd->SetDefaultUnit("ns");
254 //timeCmd->SetUnitCategory("Time");
255 //timeCmd->SetUnitCandidates("ns ms s");
256
257 polCmd = new G4UIcmdWith3Vector("/gps/polarization",this);
258 polCmd->SetGuidance("Set polarization.");
259 polCmd->SetParameterName("Px","Py","Pz",false,false);
260 polCmd->SetRange("Px>=-1.&&Px<=1.&&Py>=-1.&&Py<=1.&&Pz>=-1.&&Pz<=1.");
261
262 numberCmd = new G4UIcmdWithAnInteger("/gps/number",this);
263 numberCmd->SetGuidance("Set number of particles to be generated per vertex.");
264 numberCmd->SetParameterName("N",false,false);
265 numberCmd->SetRange("N>0");
266
267 // Verbosity
268 //
269 verbosityCmd = new G4UIcmdWithAnInteger("/gps/verbose",this);
270 verbosityCmd->SetGuidance("Set Verbose level for GPS");
271 verbosityCmd->SetGuidance(" 0 : Silent");
272 verbosityCmd->SetGuidance(" 1 : Limited information");
273 verbosityCmd->SetGuidance(" 2 : Detailed information");
274 verbosityCmd->SetParameterName("level",false);
275 verbosityCmd->SetRange("level>=0 && level <=2");
276
277 // Now extended commands
278 // Positional ones:
279 //
280 positionDirectory = new G4UIdirectory("/gps/pos/");
281 positionDirectory->SetGuidance("Positional commands sub-directory");
282
283 typeCmd1 = new G4UIcmdWithAString("/gps/pos/type",this);
284 typeCmd1->SetGuidance("Sets source distribution type.");
285 typeCmd1->SetGuidance("Either Point, Beam, Plane, Surface or Volume");
286 typeCmd1->SetParameterName("DisType",false,false);
287 typeCmd1->SetDefaultValue("Point");
288 typeCmd1->SetCandidates("Point Beam Plane Surface Volume");
289
290 shapeCmd1 = new G4UIcmdWithAString("/gps/pos/shape",this);
291 shapeCmd1->SetGuidance("Sets source shape for Plan, Surface or Volume type source.");
292 shapeCmd1->SetParameterName("Shape",false,false);
293 shapeCmd1->SetDefaultValue("NULL");
294 shapeCmd1->SetCandidates("Circle Annulus Ellipse Square Rectangle Sphere Ellipsoid Cylinder EllipticCylinder Para");
295
296 centreCmd1 = new G4UIcmdWith3VectorAndUnit("/gps/pos/centre",this);
297 centreCmd1->SetGuidance("Set centre coordinates of source.");
298 centreCmd1->SetParameterName("X","Y","Z",false,false);
300 // centreCmd1->SetUnitCandidates("micron mm cm m km");
301
302 posrot1Cmd1 = new G4UIcmdWith3Vector("/gps/pos/rot1",this);
303 posrot1Cmd1->SetGuidance("Set the 1st vector defining the rotation matrix'.");
304 posrot1Cmd1->SetGuidance("It does not need to be a unit vector.");
305 posrot1Cmd1->SetParameterName("R1x","R1y","R1z",false,false);
306 posrot1Cmd1->SetRange("R1x != 0 || R1y != 0 || R1z != 0");
307
308 posrot2Cmd1 = new G4UIcmdWith3Vector("/gps/pos/rot2",this);
309 posrot2Cmd1->SetGuidance("Set the 2nd vector defining the rotation matrix'.");
310 posrot2Cmd1->SetGuidance("It does not need to be a unit vector.");
311 posrot2Cmd1->SetParameterName("R2x","R2y","R2z",false,false);
312 posrot2Cmd1->SetRange("R2x != 0 || R2y != 0 || R2z != 0");
313
314 halfxCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/halfx",this);
315 halfxCmd1->SetGuidance("Set x half length of source.");
316 halfxCmd1->SetParameterName("Halfx",false,false);
318 // halfxCmd1->SetUnitCandidates("micron mm cm m km");
319
320 halfyCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/halfy",this);
321 halfyCmd1->SetGuidance("Set y half length of source.");
322 halfyCmd1->SetParameterName("Halfy",false,false);
324 // halfyCmd1->SetUnitCandidates("micron mm cm m km");
325
326 halfzCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/halfz",this);
327 halfzCmd1->SetGuidance("Set z half length of source.");
328 halfzCmd1->SetParameterName("Halfz",false,false);
330 // halfzCmd1->SetUnitCandidates("micron mm cm m km");
331
332 radiusCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/radius",this);
333 radiusCmd1->SetGuidance("Set radius of source.");
334 radiusCmd1->SetParameterName("Radius",false,false);
336 // radiusCmd1->SetUnitCandidates("micron mm cm m km");
337
338 radius0Cmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/inner_radius",this);
339 radius0Cmd1->SetGuidance("Set inner radius of source when required.");
340 radius0Cmd1->SetParameterName("Radius0",false,false);
342 // radius0Cmd1->SetUnitCandidates("micron mm cm m km");
343
344 possigmarCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/sigma_r",this);
345 possigmarCmd1->SetGuidance("Set standard deviation in radial of the beam positional profile");
346 possigmarCmd1->SetGuidance(" applicable to Beam type source only");
347 possigmarCmd1->SetParameterName("Sigmar",false,false);
349 // possigmarCmd1->SetUnitCandidates("micron mm cm m km");
350
351 possigmaxCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/sigma_x",this);
352 possigmaxCmd1->SetGuidance("Set standard deviation of beam positional profile in x-dir");
353 possigmaxCmd1->SetGuidance(" applicable to Beam type source only");
354 possigmaxCmd1->SetParameterName("Sigmax",false,false);
356 // possigmaxCmd1->SetUnitCandidates("micron mm cm m km");
357
358 possigmayCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/sigma_y",this);
359 possigmayCmd1->SetGuidance("Set standard deviation of beam positional profile in y-dir");
360 possigmayCmd1->SetGuidance(" applicable to Beam type source only");
361 possigmayCmd1->SetParameterName("Sigmay",false,false);
363 // possigmayCmd1->SetUnitCandidates("micron mm cm m km");
364
365 paralpCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/paralp",this);
366 paralpCmd1->SetGuidance("Angle from y-axis of y' in Para");
367 paralpCmd1->SetParameterName("paralp",false,false);
369 // paralpCmd1->SetUnitCandidates("rad deg");
370
371 partheCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/parthe",this);
372 partheCmd1->SetGuidance("Polar angle through centres of z faces");
373 partheCmd1->SetParameterName("parthe",false,false);
375 // partheCmd1->SetUnitCandidates("rad deg");
376
377 parphiCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/parphi",this);
378 parphiCmd1->SetGuidance("Azimuth angle through centres of z faces");
379 parphiCmd1->SetParameterName("parphi",false,false);
381 // parphiCmd1->SetUnitCandidates("rad deg");
382
383 confineCmd1 = new G4UIcmdWithAString("/gps/pos/confine",this);
384 confineCmd1->SetGuidance("Confine source to volume (NULL to unset).");
385 confineCmd1->SetGuidance(" Usage: confine VolName");
386 confineCmd1->SetParameterName("VolName",false,false);
388
389 // Angular distribution commands
390 //
391 angularDirectory = new G4UIdirectory("/gps/ang/");
392 angularDirectory->SetGuidance("Angular commands sub-directory");
393
394 angtypeCmd1 = new G4UIcmdWithAString("/gps/ang/type",this);
395 angtypeCmd1->SetGuidance("Sets angular source distribution type");
396 angtypeCmd1->SetGuidance(" Possible variables are: iso, cos, planar, beam1d, beam2d, focused or user");
397 angtypeCmd1->SetParameterName("AngDis",false,false);
399 angtypeCmd1->SetCandidates("iso cos planar beam1d beam2d focused user");
400
401 angrot1Cmd1 = new G4UIcmdWith3Vector("/gps/ang/rot1",this);
402 angrot1Cmd1->SetGuidance("Sets the 1st vector for angular distribution rotation matrix");
403 angrot1Cmd1->SetGuidance(" Need not be a unit vector");
404 angrot1Cmd1->SetParameterName("AR1x","AR1y","AR1z",false,false);
405 angrot1Cmd1->SetRange("AR1x != 0 || AR1y != 0 || AR1z != 0");
406
407 angrot2Cmd1 = new G4UIcmdWith3Vector("/gps/ang/rot2",this);
408 angrot2Cmd1->SetGuidance("Sets the 2nd vector for angular distribution rotation matrix");
409 angrot2Cmd1->SetGuidance(" Need not be a unit vector");
410 angrot2Cmd1->SetParameterName("AR2x","AR2y","AR2z",false,false);
411 angrot2Cmd1->SetRange("AR2x != 0 || AR2y != 0 || AR2z != 0");
412
413 minthetaCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/mintheta",this);
414 minthetaCmd1->SetGuidance("Set minimum theta");
415 minthetaCmd1->SetParameterName("MinTheta",true,false);
418 // minthetaCmd1->SetUnitCandidates("rad deg");
419
420 maxthetaCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/maxtheta",this);
421 maxthetaCmd1->SetGuidance("Set maximum theta");
422 maxthetaCmd1->SetParameterName("MaxTheta",true,false);
425 // maxthetaCmd1->SetUnitCandidates("rad deg");
426
427 minphiCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/minphi",this);
428 minphiCmd1->SetGuidance("Set minimum phi");
429 minphiCmd1->SetParameterName("MinPhi",true,false);
432 // minphiCmd1->SetUnitCandidates("rad deg");
433
434 maxphiCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/maxphi",this);
435 maxphiCmd1->SetGuidance("Set maximum phi");
436 maxphiCmd1->SetParameterName("MaxPhi",true,false);
439 // maxphiCmd1->SetUnitCandidates("rad deg");
440
441 angsigmarCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/sigma_r",this);
442 angsigmarCmd1->SetGuidance("Set standard deviation in direction for 1D beam.");
443 angsigmarCmd1->SetParameterName("Sigmara",false,false);
445 // angsigmarCmd1->SetUnitCandidates("rad deg");
446
447 angsigmaxCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/sigma_x",this);
448 angsigmaxCmd1->SetGuidance("Set standard deviation in direction in x-direc. for 2D beam");
449 angsigmaxCmd1->SetParameterName("Sigmaxa",false,false);
451 // angsigmaxCmd1->SetUnitCandidates("rad deg");
452
453 angsigmayCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/sigma_y",this);
454 angsigmayCmd1->SetGuidance("Set standard deviation in direction in y-direc. for 2D beam");
455 angsigmayCmd1->SetParameterName("Sigmaya",false,false);
457 // angsigmayCmd1->SetUnitCandidates("rad deg");
458
459 angfocusCmd = new G4UIcmdWith3VectorAndUnit("/gps/ang/focuspoint",this);
460 angfocusCmd->SetGuidance("Set the focusing point for the beam");
461 angfocusCmd->SetParameterName("x","y","z",false,false);
463 // angfocusCmd->SetUnitCandidates("micron mm cm m km");
464
465 useuserangaxisCmd1 = new G4UIcmdWithABool("/gps/ang/user_coor",this);
466 useuserangaxisCmd1->SetGuidance("True for using user defined angular co-ordinates");
467 useuserangaxisCmd1->SetGuidance(" Default is false");
468 useuserangaxisCmd1->SetParameterName("useuserangaxis",true);
470
471 surfnormCmd1 = new G4UIcmdWithABool("/gps/ang/surfnorm",this);
472 surfnormCmd1->SetGuidance("Makes a user-defined distribution with respect to surface normals rather than x,y,z axes.");
473 surfnormCmd1->SetGuidance(" Default is false");
474 surfnormCmd1->SetParameterName("surfnorm",true);
476
477 // Energy commands
478 //
479 energyDirectory = new G4UIdirectory("/gps/ene/");
480 energyDirectory->SetGuidance("Spectral commands sub-directory");
481
482 energytypeCmd1 = new G4UIcmdWithAString("/gps/ene/type",this);
483 energytypeCmd1->SetGuidance("Sets energy distribution type");
484 energytypeCmd1->SetParameterName("EnergyDis",false,false);
486 energytypeCmd1->SetCandidates("Mono Lin Pow Exp CPow Gauss Brem Bbody Cdg User Arb Epn LW");
487
488 eminCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ene/min",this);
489 eminCmd1->SetGuidance("Sets minimum energy");
490 eminCmd1->SetParameterName("emin",false,false);
491 eminCmd1->SetDefaultUnit("keV");
492 // eminCmd1->SetUnitCandidates("eV keV MeV GeV TeV PeV");
493
494 emaxCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ene/max",this);
495 emaxCmd1->SetGuidance("Sets maximum energy");
496 emaxCmd1->SetParameterName("emax",false,false);
497 emaxCmd1->SetDefaultUnit("keV");
498 // emaxCmd1->SetUnitCandidates("eV keV MeV GeV TeV PeV");
499
500 monoenergyCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ene/mono",this);
501 monoenergyCmd1->SetGuidance("Sets a monocromatic energy (same as gps/energy)");
502 monoenergyCmd1->SetParameterName("monoenergy",false,false);
504 // monoenergyCmd1->SetUnitCandidates("eV keV MeV GeV TeV PeV");
505
506 engsigmaCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ene/sigma",this);
507 engsigmaCmd1->SetGuidance("Sets the standard deviation for Gaussian energy dist.");
508 engsigmaCmd1->SetParameterName("Sigmae",false,false);
510 // engsigmaCmd1->SetUnitCandidates("eV keV MeV GeV TeV PeV");
511
512 alphaCmd1 = new G4UIcmdWithADouble("/gps/ene/alpha",this);
513 alphaCmd1->SetGuidance("Sets Alpha (index) for power-law energy dist.");
514 alphaCmd1->SetParameterName("alpha",false,false);
515
516 tempCmd1 = new G4UIcmdWithADouble("/gps/ene/temp",this);
517 tempCmd1->SetGuidance("Sets the temperature for Brem and BBody distributions (in Kelvin)");
518 tempCmd1->SetParameterName("temp",false,false);
519
520 ezeroCmd1 = new G4UIcmdWithADouble("/gps/ene/ezero",this);
521 ezeroCmd1->SetGuidance("Sets E_0 for exponential distribution (in MeV)");
522 ezeroCmd1->SetParameterName("ezero",false,false);
523
524 gradientCmd1 = new G4UIcmdWithADouble("/gps/ene/gradient",this);
525 gradientCmd1->SetGuidance("Sets the gradient for Lin distribution (in 1/MeV)");
526 gradientCmd1->SetParameterName("gradient",false,false);
527
528 interceptCmd1 = new G4UIcmdWithADouble("/gps/ene/intercept",this);
529 interceptCmd1->SetGuidance("Sets the intercept for Lin distributions (in MeV)");
530 interceptCmd1->SetParameterName("intercept",false,false);
531
532 arbeintCmd1 = new G4UIcmdWithADouble("/gps/ene/biasAlpha",this);
533 arbeintCmd1->SetGuidance("Sets the power-law index for the energy sampling distri. )");
534 arbeintCmd1->SetParameterName("arbeint",false,false);
535
536 calculateCmd1 = new G4UIcmdWithoutParameter("/gps/ene/calculate",this);
537 calculateCmd1->SetGuidance("Calculates the distributions for Cdg and BBody");
538
539 energyspecCmd1 = new G4UIcmdWithABool("/gps/ene/emspec",this);
540 energyspecCmd1->SetGuidance("True for energy and false for momentum spectra");
541 energyspecCmd1->SetParameterName("energyspec",true);
543
544 diffspecCmd1 = new G4UIcmdWithABool("/gps/ene/diffspec",this);
545 diffspecCmd1->SetGuidance("True for differential and flase for integral spectra");
546 diffspecCmd1->SetParameterName("diffspec",true);
548
549 applyEnergyWeightCmd1 = new G4UIcmdWithABool("/gps/ene/applyEneWeight",this);
550 applyEnergyWeightCmd1->SetGuidance("Apply energy weight.");
551 applyEnergyWeightCmd1->SetGuidance("- Instead of using the Arb type histogram for sampling the energy spectrum,");
552 applyEnergyWeightCmd1->SetGuidance(" energy is sampled by Linear distribution, and the Arb type histogram is");
553 applyEnergyWeightCmd1->SetGuidance(" used for the weight of the generated particle.");
554 applyEnergyWeightCmd1->SetGuidance("- \"/gps/ene/type LW\" automatically applies this command.");
555 applyEnergyWeightCmd1->SetGuidance("- If this command has to be explicitly used, \"/gps/ene/type\" distribution mush be Lin.");
558
559 // Biasing + histograms in general
560 //
561 histDirectory = new G4UIdirectory("/gps/hist/");
562 histDirectory->SetGuidance("Histogram, biasing commands sub-directory");
563
564 histnameCmd1 = new G4UIcmdWithAString("/gps/hist/type",this);
565 histnameCmd1->SetGuidance("Sets histogram type");
566 histnameCmd1->SetParameterName("HistType",false,false);
568 histnameCmd1->SetCandidates("biasx biasy biasz biast biasp biase biaspt biaspp theta phi energy arb epn");
569
570 resethistCmd1 = new G4UIcmdWithAString("/gps/hist/reset",this);
571 resethistCmd1->SetGuidance("Reset (clean) the histogram ");
572 resethistCmd1->SetParameterName("HistType",false,false);
574 resethistCmd1->SetCandidates("biasx biasy biasz biast biasp biase biaspt biaspp theta phi energy arb epn");
575
576 histpointCmd1 = new G4UIcmdWith3Vector("/gps/hist/point",this);
577 histpointCmd1->SetGuidance("Allows user to define a histogram");
578 histpointCmd1->SetGuidance(" Enter: Ehi Weight");
579 histpointCmd1->SetParameterName("Ehi","Weight","Junk",true,true);
580 histpointCmd1->SetRange("Ehi >= 0. && Weight >= 0.");
581
582 histfileCmd1 = new G4UIcmdWithAString("/gps/hist/file",this);
583 histfileCmd1->SetGuidance("Imports the arb energy hist in an ASCII file");
584 histfileCmd1->SetParameterName("HistFile",false,false);
585
586 arbintCmd1 = new G4UIcmdWithAString("/gps/hist/inter",this);
587 arbintCmd1->SetGuidance("Sets the interpolation method for arbitrary distribution.");
588 arbintCmd1->SetGuidance("Spline interpolation may not be applicable for some distributions.");
589 arbintCmd1->SetParameterName("int",false,false);
591 arbintCmd1->SetCandidates("Lin Log Exp Spline");
592}
static constexpr double pi
Definition: G4SIunits.hh:55
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4int entries() const
static G4ParticleTable * GetParticleTable()
const G4String & GetParticleName(G4int index) const
void SetDefaultUnit(const char *defUnit)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetDefaultUnit(const char *defUnit)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:146
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:156
void SetRange(const char *rs)
Definition: G4UIcommand.hh:120
G4bool commandsShouldBeInMaster
void SetDefaultValue(const char *theDefaultValue)

References addsourceCmd, alphaCmd1, angfocusCmd, angrot1Cmd1, angrot2Cmd1, angsigmarCmd1, angsigmaxCmd1, angsigmayCmd1, angtypeCmd1, angularDirectory, applyEnergyWeightCmd1, arbeintCmd1, arbintCmd1, calculateCmd1, centreCmd1, clearsourceCmd, G4UImessenger::commandsShouldBeInMaster, confineCmd1, deletesourceCmd, diffspecCmd1, directionCmd, emaxCmd1, eminCmd1, energyCmd, energyDirectory, energyspecCmd1, energytypeCmd1, engsigmaCmd1, G4ParticleTable::entries(), ezeroCmd1, flatsamplingCmd, G4ParticleTable::GetParticleName(), G4ParticleTable::GetParticleTable(), getsourceCmd, gpsDirectory, gradientCmd1, halfxCmd1, halfyCmd1, halfzCmd1, histDirectory, histfileCmd1, histnameCmd1, histpointCmd1, histtype, interceptCmd1, ionCmd, ionLvlCmd, listCmd, listsourceCmd, maxphiCmd1, maxthetaCmd1, minphiCmd1, minthetaCmd1, monoenergyCmd1, multiplevertexCmd, numberCmd, paralpCmd1, parphiCmd1, partheCmd1, particleCmd, particleTable, pi, polCmd, positionCmd, positionDirectory, posrot1Cmd1, posrot2Cmd1, possigmarCmd1, possigmaxCmd1, possigmayCmd1, radius0Cmd1, radiusCmd1, resethistCmd1, G4UIcmdWithAString::SetCandidates(), G4UIcmdWith3VectorAndUnit::SetDefaultUnit(), G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), G4UIcmdWithAString::SetDefaultValue(), G4UIparameter::SetDefaultValue(), G4UIcmdWithABool::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcommand::SetGuidance(), setintensityCmd, G4UIcommand::SetParameter(), G4UIcmdWithABool::SetParameterName(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWith3Vector::SetParameterName(), G4UIcmdWith3VectorAndUnit::SetParameterName(), G4UIcommand::SetRange(), setsourceCmd, shapeCmd1, sourceDirectory, surfnormCmd1, tempCmd1, timeCmd, typeCmd1, useuserangaxisCmd1, and verbosityCmd.

Referenced by GetInstance().

◆ ~G4GeneralParticleSourceMessenger()

G4GeneralParticleSourceMessenger::~G4GeneralParticleSourceMessenger ( )
private

Definition at line 594 of file G4GeneralParticleSourceMessenger.cc.

595{
596 delete positionDirectory;
597 delete typeCmd1;
598 delete shapeCmd1;
599 delete centreCmd1;
600 delete posrot1Cmd1;
601 delete posrot2Cmd1;
602 delete halfxCmd1;
603 delete halfyCmd1;
604 delete halfzCmd1;
605 delete radiusCmd1;
606 delete radius0Cmd1;
607 delete possigmarCmd1;
608 delete possigmaxCmd1;
609 delete possigmayCmd1;
610 delete paralpCmd1;
611 delete partheCmd1;
612 delete parphiCmd1;
613 delete confineCmd1;
614
615 delete angularDirectory;
616 delete angtypeCmd1;
617 delete angrot1Cmd1;
618 delete angrot2Cmd1;
619 delete minthetaCmd1;
620 delete maxthetaCmd1;
621 delete minphiCmd1;
622 delete maxphiCmd1;
623 delete angsigmarCmd1;
624 delete angsigmaxCmd1;
625 delete angsigmayCmd1;
626 delete angfocusCmd;
627 delete useuserangaxisCmd1;
628 delete surfnormCmd1;
629
630 delete energyDirectory;
631 delete energytypeCmd1;
632 delete eminCmd1;
633 delete emaxCmd1;
634 delete monoenergyCmd1;
635 delete engsigmaCmd1;
636 delete alphaCmd1;
637 delete tempCmd1;
638 delete ezeroCmd1;
639 delete gradientCmd1;
640 delete interceptCmd1;
641 delete arbeintCmd1;
642 delete calculateCmd1;
643 delete energyspecCmd1;
644 delete diffspecCmd1;
646
647 delete histDirectory;
648 delete histnameCmd1;
649 delete resethistCmd1;
650 delete histpointCmd1;
651 delete histfileCmd1;
652 delete arbintCmd1;
653
654 delete verbosityCmd;
655 delete ionCmd;
656 delete ionLvlCmd;
657 delete particleCmd;
658 delete timeCmd;
659 delete polCmd;
660 delete numberCmd;
661 delete positionCmd;
662 delete directionCmd;
663 delete energyCmd;
664 delete listCmd;
665
666 delete sourceDirectory;
667 delete addsourceCmd;
668 delete listsourceCmd;
669 delete clearsourceCmd;
670 delete getsourceCmd;
671 delete setsourceCmd;
672 delete setintensityCmd;
673 delete deletesourceCmd;
674 delete multiplevertexCmd;
675 delete flatsamplingCmd;
676
677 delete gpsDirectory;
678 theInstance = nullptr;
679}

References addsourceCmd, alphaCmd1, angfocusCmd, angrot1Cmd1, angrot2Cmd1, angsigmarCmd1, angsigmaxCmd1, angsigmayCmd1, angtypeCmd1, angularDirectory, applyEnergyWeightCmd1, arbeintCmd1, arbintCmd1, calculateCmd1, centreCmd1, clearsourceCmd, confineCmd1, deletesourceCmd, diffspecCmd1, directionCmd, emaxCmd1, eminCmd1, energyCmd, energyDirectory, energyspecCmd1, energytypeCmd1, engsigmaCmd1, ezeroCmd1, flatsamplingCmd, getsourceCmd, gpsDirectory, gradientCmd1, halfxCmd1, halfyCmd1, halfzCmd1, histDirectory, histfileCmd1, histnameCmd1, histpointCmd1, interceptCmd1, ionCmd, ionLvlCmd, listCmd, listsourceCmd, maxphiCmd1, maxthetaCmd1, minphiCmd1, minthetaCmd1, monoenergyCmd1, multiplevertexCmd, numberCmd, paralpCmd1, parphiCmd1, partheCmd1, particleCmd, polCmd, positionCmd, positionDirectory, posrot1Cmd1, posrot2Cmd1, possigmarCmd1, possigmaxCmd1, possigmayCmd1, radius0Cmd1, radiusCmd1, resethistCmd1, setintensityCmd, setsourceCmd, shapeCmd1, sourceDirectory, surfnormCmd1, tempCmd1, anonymous_namespace{G4GeneralParticleSourceMessenger.cc}::theInstance, timeCmd, typeCmd1, useuserangaxisCmd1, and verbosityCmd.

Member Function Documentation

◆ AddUIcommand()

void G4UImessenger::AddUIcommand ( G4UIcommand newCommand)
protectedinherited

Definition at line 149 of file G4UImessenger.cc.

150{
151 G4cerr << "Warning : Old style definition of G4UIcommand <"
152 << newCommand->GetCommandPath() << ">." << G4endl;
153}
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:136

References G4cerr, G4endl, and G4UIcommand::GetCommandPath().

◆ BtoS()

G4String G4UImessenger::BtoS ( G4bool  b)
protectedinherited

Definition at line 98 of file G4UImessenger.cc.

99{
100 G4String vl = "0";
101 if(b)
102 vl = "true";
103 return vl;
104}

◆ CommandsShouldBeInMaster()

G4bool G4UImessenger::CommandsShouldBeInMaster ( ) const
inlineinherited

◆ CreateCommand()

template<typename T >
T * G4UImessenger::CreateCommand ( const G4String cname,
const G4String dsc 
)
protectedinherited

Definition at line 110 of file G4UImessenger.hh.

111{
112 G4String path;
113 if(cname[0] != '/')
114 {
115 path = baseDirName + cname;
116 if(path[0] != '/')
117 path = "/" + path;
118 }
119
120 T* command = new T(path.c_str(), this);
121 command->SetGuidance(dsc.c_str());
122
123 return command;
124}
G4String baseDirName

References G4UImessenger::baseDirName.

◆ CreateDirectory()

void G4UImessenger::CreateDirectory ( const G4String path,
const G4String dsc,
G4bool  commandsToBeBroadcasted = true 
)
protectedinherited

Definition at line 156 of file G4UImessenger.cc.

158{
160
161 G4String fullpath = path;
162 if(fullpath.back() != '/')
163 fullpath.append("/");
164
165 G4UIcommandTree* tree = ui->GetTree()->FindCommandTree(fullpath.c_str());
166 if(tree != nullptr)
167 {
168 baseDirName = tree->GetPathName();
169 }
170 else
171 {
172 baseDir = new G4UIdirectory(fullpath.c_str(), commandsToBeBroadcasted);
173 baseDirName = fullpath;
174 baseDir->SetGuidance(dsc.c_str());
175 }
176}
const G4String & GetPathName() const
G4UIcommandTree * FindCommandTree(const char *commandPath)
G4UIcommandTree * GetTree() const
Definition: G4UImanager.hh:186
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
G4UIdirectory * baseDir

References G4UImessenger::baseDir, G4UImessenger::baseDirName, G4UIcommandTree::FindCommandTree(), G4UIcommandTree::GetPathName(), G4UImanager::GetTree(), G4UImanager::GetUIpointer(), and G4UIcommand::SetGuidance().

Referenced by G4MoleculeShootMessenger::G4MoleculeShootMessenger(), and G4UImessenger::G4UImessenger().

◆ Destroy()

void G4GeneralParticleSourceMessenger::Destroy ( )
static

◆ DtoS()

G4String G4UImessenger::DtoS ( G4double  a)
protectedinherited

Definition at line 90 of file G4UImessenger.cc.

91{
92 std::ostringstream os;
93 os << a;
94 return G4String(os.str());
95}

Referenced by G4ScoreQuantityMessenger::FilterCommands(), and G4UIcontrolMessenger::SetNewValue().

◆ GetCurrentValue()

G4String G4GeneralParticleSourceMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 1486 of file G4GeneralParticleSourceMessenger.cc.

1487{
1488 G4String cv;
1489
1490 // if( command==directionCmd )
1491 // { cv = directionCmd->ConvertToString(fParticleGun->GetParticleMomentumDirection()); }
1492 // else if( command==energyCmd )
1493 // { cv = energyCmd->ConvertToString(fParticleGun->GetParticleEnergy(),"GeV"); }
1494 // else if( command==positionCmd )
1495 // { cv = positionCmd->ConvertToString(fParticleGun->GetParticlePosition(),"cm"); }
1496 // else if( command==timeCmd )
1497 // { cv = timeCmd->ConvertToString(fParticleGun->GetParticleTime(),"ns"); }
1498 // else if( command==polCmd )
1499 // { cv = polCmd->ConvertToString(fParticleGun->GetParticlePolarization()); }
1500 // else if( command==numberCmd )
1501 // { cv = numberCmd->ConvertToString(fParticleGun->GetNumberOfParticles()); }
1502
1503 cv = "Not implemented yet";
1504
1505 return cv;
1506}

◆ GetInstance()

G4GeneralParticleSourceMessenger * G4GeneralParticleSourceMessenger::GetInstance ( G4GeneralParticleSource psc)
static

◆ IonCommand()

void G4GeneralParticleSourceMessenger::IonCommand ( G4String  newValues)
private

Definition at line 1508 of file G4GeneralParticleSourceMessenger.cc.

1509{
1510 if (fShootIon)
1511 {
1512 G4Tokenizer next( newValues );
1513 // check argument
1514 fAtomicNumber = StoI(next());
1515 fAtomicMass = StoI(next());
1516 G4String sQ = next();
1517 if (sQ.empty())
1518 {
1520 }
1521 else
1522 {
1523 fIonCharge = StoI(sQ);
1524 sQ = next();
1525 if (sQ.empty())
1526 {
1527 fIonExciteEnergy = 0.0;
1528 }
1529 else
1530 {
1531 fIonExciteEnergy = StoD(sQ) * keV;
1532 }
1533 }
1536 if (ion==nullptr)
1537 {
1539 ed << "Ion with Z=" << fAtomicNumber;
1540 ed << " A=" << fAtomicMass << " is not defined";
1541 ionCmd->CommandFailed(ed);
1542 }
1543 else
1544 {
1547 }
1548 }
1549 else
1550 {
1552 ed << "Set /gps/particle to ion before using /gps/ion command";
1553 ionCmd->CommandFailed(ed);
1554 }
1555}
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
static constexpr double eplus
Definition: G4SIunits.hh:184
static constexpr double keV
Definition: G4SIunits.hh:202
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:522
static G4IonTable * GetIonTable()
Definition: G4IonTable.cc:170
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
void SetParticleCharge(G4double aCharge)
void CommandFailed(G4int errCode, G4ExceptionDescription &ed)
Definition: G4UIcommand.hh:179
G4int StoI(G4String s)
G4double StoD(G4String s)

References G4UIcommand::CommandFailed(), eplus, fAtomicMass, fAtomicNumber, fIonCharge, fIonExciteEnergy, fParticleGun, fShootIon, G4IonTable::GetIon(), G4IonTable::GetIonTable(), ionCmd, keV, G4SingleParticleSource::SetParticleCharge(), G4SingleParticleSource::SetParticleDefinition(), G4UImessenger::StoD(), and G4UImessenger::StoI().

Referenced by SetNewValue().

◆ IonLvlCommand()

void G4GeneralParticleSourceMessenger::IonLvlCommand ( G4String  newValues)
private

Definition at line 1557 of file G4GeneralParticleSourceMessenger.cc.

1558{
1559 if (fShootIon)
1560 {
1561 G4Tokenizer next(newValues);
1562 // check argument
1563 fAtomicNumberL = StoI(next());
1564 fAtomicMassL = StoI(next());
1565 G4String sQ = next();
1566 if (sQ.empty())
1567 {
1569 }
1570 else
1571 {
1572 fIonChargeL = StoI(sQ);
1573 sQ = next();
1574 if (sQ.empty())
1575 {
1576 fIonEnergyLevel = 0;
1577 }
1578 else
1579 {
1580 fIonEnergyLevel = StoI(sQ);
1581 }
1582 }
1583
1586 if (ion == nullptr)
1587 {
1589 ed << "Ion with Z=" << fAtomicNumberL;
1590 ed << " A=" << fAtomicMassL << " is not defined";
1592 }
1593 else
1594 {
1597 }
1598
1599 }
1600 else
1601 {
1603 ed << "Set /gps/particle to ion before using /gps/ionLvl command";
1605 }
1606}

References G4UIcommand::CommandFailed(), eplus, fAtomicMassL, fAtomicNumberL, fIonChargeL, fIonEnergyLevel, fParticleGun, fShootIon, G4IonTable::GetIon(), G4IonTable::GetIonTable(), ionLvlCmd, G4SingleParticleSource::SetParticleCharge(), G4SingleParticleSource::SetParticleDefinition(), and G4UImessenger::StoI().

Referenced by SetNewValue().

◆ ItoS()

G4String G4UImessenger::ItoS ( G4int  i)
protectedinherited

Definition at line 82 of file G4UImessenger.cc.

83{
84 std::ostringstream os;
85 os << i;
86 return G4String(os.str());
87}

Referenced by G4GenericMessenger::DeclareMethod(), and G4ParticleGunMessenger::GetCurrentValue().

◆ operator!=()

G4bool G4UImessenger::operator!= ( const G4UImessenger messenger) const
inherited

Definition at line 76 of file G4UImessenger.cc.

77{
78 return this != &messenger;
79}

◆ operator==()

G4bool G4UImessenger::operator== ( const G4UImessenger messenger) const
inherited

Definition at line 70 of file G4UImessenger.cc.

71{
72 return this == &messenger;
73}

◆ SetNewValue()

void G4GeneralParticleSourceMessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 691 of file G4GeneralParticleSourceMessenger.cc.

692{
693// if(command == typeCmd)
694// {
695// CHECKPG(); fParticleGun->GetPosDist()->SetPosDisType(newValues);
696// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
697// << " The command is obsolete and will be removed soon." << G4endl
698// << " Please try to use the new structured commands!" << G4endl;
699// }
700// else if(command == shapeCmd)
701// {
702// CHECKPG(); fParticleGun->GetPosDist()->SetPosDisShape(newValues);
703// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
704// << " The command is obsolete and will be removed soon." << G4endl
705// << " Please try to use the new structured commands!" << G4endl;
706// }
707// else if(command == centreCmd)
708// {
709// CHECKPG(); fParticleGun->GetPosDist()->SetCentreCoords(centreCmd->GetNew3VectorValue(newValues));
710// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
711// << " The command is obsolete and will be removed soon." << G4endl
712// << " Please try to use the new structured commands!" << G4endl;
713// }
714// else if(command == posrot1Cmd)
715// {
716// CHECKPG(); fParticleGun->GetPosDist()->SetPosRot1(posrot1Cmd->GetNew3VectorValue(newValues));
717// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
718// << " The command is obsolete and will be removed soon." << G4endl
719// << " Please try to use the new structured commands!" << G4endl;
720// }
721// else if(command == posrot2Cmd)
722// {
723// CHECKPG(); fParticleGun->GetPosDist()->SetPosRot2(posrot2Cmd->GetNew3VectorValue(newValues));
724// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
725// << " The command is obsolete and will be removed soon." << G4endl
726// << " Please try to use the new structured commands!" << G4endl;
727// }
728// else if(command == halfxCmd)
729// {
730// CHECKPG(); fParticleGun->GetPosDist()->SetHalfX(halfxCmd->GetNewDoubleValue(newValues));
731// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
732// << " The command is obsolete and will be removed soon." << G4endl
733// << " Please try to use the new structured commands!" << G4endl;
734// }
735// else if(command == halfyCmd)
736// {
737// CHECKPG(); fParticleGun->GetPosDist()->SetHalfY(halfyCmd->GetNewDoubleValue(newValues));
738// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
739// << " The command is obsolete and will be removed soon." << G4endl
740// << " Please try to use the new structured commands!" << G4endl;
741// }
742// else if(command == halfzCmd)
743// {
744// CHECKPG(); fParticleGun->GetPosDist()->SetHalfZ(halfzCmd->GetNewDoubleValue(newValues));
745// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
746// << " The command is obsolete and will be removed soon." << G4endl
747// << " Please try to use the new structured commands!" << G4endl;
748// }
749// else if(command == radiusCmd)
750// {
751// CHECKPG(); fParticleGun->GetPosDist()->SetRadius(radiusCmd->GetNewDoubleValue(newValues));
752// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
753// << " The command is obsolete and will be removed soon." << G4endl
754// << " Please try to use the new structured commands!" << G4endl;
755// }
756// else if(command == radius0Cmd)
757// {
758// CHECKPG(); fParticleGun->GetPosDist()->SetRadius0(radius0Cmd->GetNewDoubleValue(newValues));
759// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
760// << " The command is obsolete and will be removed soon." << G4endl
761// << " Please try to use the new structured commands!" << G4endl;
762// }
763// else if(command == possigmarCmd)
764// {
765// CHECKPG(); fParticleGun->GetPosDist()->SetBeamSigmaInR(possigmarCmd->GetNewDoubleValue(newValues));
766// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
767// << " The command is obsolete and will be removed soon." << G4endl
768// << " Please try to use the new structured commands!" << G4endl;
769// }
770// else if(command == possigmaxCmd)
771// {
772// CHECKPG(); fParticleGun->GetPosDist()->SetBeamSigmaInX(possigmaxCmd->GetNewDoubleValue(newValues));
773// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
774// << " The command is obsolete and will be removed soon." << G4endl
775// << " Please try to use the new structured commands!" << G4endl;
776// }
777// else if(command == possigmayCmd)
778// {
779// CHECKPG(); fParticleGun->GetPosDist()->SetBeamSigmaInY(possigmayCmd->GetNewDoubleValue(newValues));
780// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
781// << " The command is obsolete and will be removed soon." << G4endl
782// << " Please try to use the new structured commands!" << G4endl;
783// }
784// else if(command == paralpCmd)
785// {
786// CHECKPG(); fParticleGun->GetPosDist()->SetParAlpha(paralpCmd->GetNewDoubleValue(newValues));
787// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
788// << " The command is obsolete and will be removed soon." << G4endl
789// << " Please try to use the new structured commands!" << G4endl;
790// }
791// else if(command == partheCmd)
792// {
793// CHECKPG(); fParticleGun->GetPosDist()->SetParTheta(partheCmd->GetNewDoubleValue(newValues));
794// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
795// << " The command is obsolete and will be removed soon." << G4endl
796// << " Please try to use the new structured commands!" << G4endl;
797// }
798// else if(command == parphiCmd)
799// {
800// CHECKPG(); fParticleGun->GetPosDist()->SetParPhi(parphiCmd->GetNewDoubleValue(newValues));
801// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
802// << " The command is obsolete and will be removed soon." << G4endl
803// << " Please try to use the new structured commands!" << G4endl;
804// }
805// else if(command == confineCmd)
806// {
807// CHECKPG(); fParticleGun->GetPosDist()->ConfineSourceToVolume(newValues);
808// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
809// << " The command is obsolete and will be removed soon." << G4endl
810// << " Please try to use the new structured commands!" << G4endl;
811// }
812// else if(command == angtypeCmd)
813// {
814// CHECKPG(); fParticleGun->GetAngDist()->SetAngDistType(newValues);
815// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
816// << " The command is obsolete and will be removed soon." << G4endl
817// << " Please try to use the new structured commands!" << G4endl;
818// }
819// else if(command == angrot1Cmd)
820// {
821// CHECKPG();
822// G4String a = "angref1";
823// fParticleGun->GetAngDist()->DefineAngRefAxes(a,angrot1Cmd->GetNew3VectorValue(newValues));
824// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
825// << " The command is obsolete and will be removed soon." << G4endl
826// << " Please try to use the new structured commands!" << G4endl;
827// }
828// else if(command == angrot2Cmd)
829// {
830// CHECKPG();
831// G4String a = "angref2";
832// fParticleGun->GetAngDist()->DefineAngRefAxes(a,angrot2Cmd->GetNew3VectorValue(newValues));
833// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
834// << " The command is obsolete and will be removed soon." << G4endl
835// << " Please try to use the new structured commands!" << G4endl;
836// }
837// else if(command == minthetaCmd)
838// {
839// CHECKPG(); fParticleGun->GetAngDist()->SetMinTheta(minthetaCmd->GetNewDoubleValue(newValues));
840// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
841// << " The command is obsolete and will be removed soon." << G4endl
842// << " Please try to use the new structured commands!" << G4endl;
843// }
844// else if(command == minphiCmd)
845// {
846// CHECKPG(); fParticleGun->GetAngDist()->SetMinPhi(minphiCmd->GetNewDoubleValue(newValues));
847// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
848// << " The command is obsolete and will be removed soon." << G4endl
849// << " Please try to use the new structured commands!" << G4endl;
850// }
851// else if(command == maxthetaCmd)
852// {
853// CHECKPG(); fParticleGun->GetAngDist()->SetMaxTheta(maxthetaCmd->GetNewDoubleValue(newValues));
854// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
855// << " The command is obsolete and will be removed soon." << G4endl
856// << " Please try to use the new structured commands!" << G4endl;
857// }
858// else if(command == maxphiCmd)
859// {
860// CHECKPG(); fParticleGun->GetAngDist()->SetMaxPhi(maxphiCmd->GetNewDoubleValue(newValues));
861// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
862// << " The command is obsolete and will be removed soon." << G4endl
863// << " Please try to use the new structured commands!" << G4endl;
864// }
865// else if(command == angsigmarCmd)
866// {
867// CHECKPG(); fParticleGun->GetAngDist()->SetBeamSigmaInAngR(angsigmarCmd->GetNewDoubleValue(newValues));
868// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
869// << " The command is obsolete and will be removed soon." << G4endl
870// << " Please try to use the new structured commands!" << G4endl;
871// }
872// else if(command == angsigmaxCmd)
873// {
874// CHECKPG(); fParticleGun->GetAngDist()->SetBeamSigmaInAngX(angsigmaxCmd->GetNewDoubleValue(newValues));
875// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
876// << " The command is obsolete and will be removed soon." << G4endl
877// << " Please try to use the new structured commands!" << G4endl;
878// }
879// else if(command == angsigmayCmd)
880// {
881// CHECKPG(); fParticleGun->GetAngDist()->SetBeamSigmaInAngY(angsigmayCmd->GetNewDoubleValue(newValues));
882// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
883// << " The command is obsolete and will be removed soon." << G4endl
884// << " Please try to use the new structured commands!" << G4endl;
885// }
886// else if(command == useuserangaxisCmd)
887// {
888// CHECKPG(); fParticleGun->GetAngDist()->SetUseUserAngAxis(useuserangaxisCmd->GetNewBoolValue(newValues));
889// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
890// << " The command is obsolete and will be removed soon." << G4endl
891// << " Please try to use the new structured commands!" << G4endl;
892// }
893// else if(command == surfnormCmd)
894// {
895// CHECKPG(); fParticleGun->GetAngDist()->SetUserWRTSurface(surfnormCmd->GetNewBoolValue(newValues));
896// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
897// << " The command is obsolete and will be removed soon." << G4endl
898// << " Please try to use the new structured commands!" << G4endl;
899// }
900// else if(command == energytypeCmd)
901// {
902// CHECKPG(); fParticleGun->GetEneDist()->SetEnergyDisType(newValues);
903// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
904// << " The command is obsolete and will be removed soon." << G4endl
905// << " Please try to use the new structured commands!" << G4endl;
906// }
907// else if(command == eminCmd)
908// {
909// CHECKPG(); fParticleGun->GetEneDist()->SetEmin(eminCmd->GetNewDoubleValue(newValues));
910// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
911// << " The command is obsolete and will be removed soon." << G4endl
912// << " Please try to use the new structured commands!" << G4endl;
913// }
914// else if(command == emaxCmd)
915// {
916// CHECKPG(); fParticleGun->GetEneDist()->SetEmax(emaxCmd->GetNewDoubleValue(newValues));
917// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
918// << " The command is obsolete and will be removed soon." << G4endl
919// << " Please try to use the new structured commands!" << G4endl;
920// }
921// else if(command == monoenergyCmd)
922// {
923// CHECKPG(); fParticleGun->GetEneDist()->SetMonoEnergy(monoenergyCmd->GetNewDoubleValue(newValues));
924// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
925// << " The command is obsolete and will be removed soon." << G4endl
926// << " Please try to use the new structured commands!" << G4endl;
927// }
928// else if(command == engsigmaCmd)
929// {
930// CHECKPG(); fParticleGun->GetEneDist()->SetBeamSigmaInE(engsigmaCmd->GetNewDoubleValue(newValues));
931// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
932// << " The command is obsolete and will be removed soon." << G4endl
933// << " Please try to use the new structured commands!" << G4endl;
934// }
935// else if(command == alphaCmd)
936// {
937// CHECKPG(); fParticleGun->GetEneDist()->SetAlpha(alphaCmd->GetNewDoubleValue(newValues));
938// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
939// << " The command is obsolete and will be removed soon." << G4endl
940// << " Please try to use the new structured commands!" << G4endl;
941// }
942// else if(command == tempCmd)
943// {
944// CHECKPG(); fParticleGun->GetEneDist()->SetTemp(tempCmd->GetNewDoubleValue(newValues));
945// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
946// << " The command is obsolete and will be removed soon." << G4endl
947// << " Please try to use the new structured commands!" << G4endl;
948// }
949// else if(command == ezeroCmd)
950// {
951// CHECKPG(); fParticleGun->GetEneDist()->SetEzero(ezeroCmd->GetNewDoubleValue(newValues));
952// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
953// << " The command is obsolete and will be removed soon." << G4endl
954// << " Please try to use the new structured commands!" << G4endl;
955// }
956// else if(command == gradientCmd)
957// {
958// CHECKPG(); fParticleGun->GetEneDist()->SetGradient(gradientCmd->GetNewDoubleValue(newValues));
959// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
960// << " The command is obsolete and will be removed soon." << G4endl
961// << " Please try to use the new structured commands!" << G4endl;
962// }
963// else if(command == interceptCmd)
964// {
965// CHECKPG(); fParticleGun->GetEneDist()->SetInterCept(interceptCmd->GetNewDoubleValue(newValues));
966// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
967// << " The command is obsolete and will be removed soon." << G4endl
968// << " Please try to use the new structured commands!" << G4endl;
969// }
970// else if(command == calculateCmd)
971// {
972// CHECKPG(); fParticleGun->GetEneDist()->Calculate();
973// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
974// << " The command is obsolete and will be removed soon." << G4endl
975// << " Please try to use the new structured commands!" << G4endl;
976// }
977// else if(command == energyspecCmd)
978// {
979// CHECKPG(); fParticleGun->GetEneDist()->InputEnergySpectra(energyspecCmd->GetNewBoolValue(newValues));
980// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
981// << " The command is obsolete and will be removed soon." << G4endl
982// << " Please try to use the new structured commands!" << G4endl;
983// }
984// else if(command == diffspecCmd)
985// {
986// CHECKPG(); fParticleGun->GetEneDist()->InputDifferentialSpectra(diffspecCmd->GetNewBoolValue(newValues));
987// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
988// << " The command is obsolete and will be removed soon." << G4endl
989// << " Please try to use the new structured commands!" << G4endl;
990// }
991// else if(command == histnameCmd)
992// {
993// histtype = newValues;
994// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
995// << " The command is obsolete and will be removed soon." << G4endl
996// << " Please try to use the new structured commands!" << G4endl;
997// }
998// else
999// if(command == histpointCmd)
1000// {
1001// CHECKPG();
1002// if(histtype == "biasx")
1003// fParticleGun->GetBiasRndm()->SetXBias(histpointCmd->GetNew3VectorValue(newValues));
1004// if(histtype == "biasy")
1005// fParticleGun->GetBiasRndm()->SetYBias(histpointCmd->GetNew3VectorValue(newValues));
1006// if(histtype == "biasz")
1007// fParticleGun->GetBiasRndm()->SetZBias(histpointCmd->GetNew3VectorValue(newValues));
1008// if(histtype == "biast")
1009// fParticleGun->GetBiasRndm()->SetThetaBias(histpointCmd->GetNew3VectorValue(newValues));
1010// if(histtype == "biasp")
1011// fParticleGun->GetBiasRndm()->SetPhiBias(histpointCmd->GetNew3VectorValue(newValues));
1012// if(histtype == "biase")
1013// fParticleGun->GetBiasRndm()->SetEnergyBias(histpointCmd->GetNew3VectorValue(newValues));
1014// if(histtype == "theta")
1015// fParticleGun->GetAngDist()->UserDefAngTheta(histpointCmd->GetNew3VectorValue(newValues));
1016// if(histtype == "phi")
1017// fParticleGun->GetAngDist()->UserDefAngPhi(histpointCmd->GetNew3VectorValue(newValues));
1018// if(histtype == "energy")
1019// fParticleGun->GetEneDist()->UserEnergyHisto(histpointCmd->GetNew3VectorValue(newValues));
1020// if(histtype == "arb")
1021// fParticleGun->GetEneDist()->ArbEnergyHisto(histpointCmd->GetNew3VectorValue(newValues));
1022// if(histtype == "epn")
1023// fParticleGun->GetEneDist()->EpnEnergyHisto(histpointCmd->GetNew3VectorValue(newValues));
1024// G4cout << " G4GeneralParticleSourceMessenger - Warning: The command is obsolete and will be removed soon. Please try to use the new structured commands!" << G4endl;
1025// }
1026// else if(command == resethistCmd)
1027// {
1028// CHECKPG();
1029// if(newValues == "theta" || newValues == "phi") {
1030// fParticleGun->GetAngDist()->ReSetHist(newValues);
1031// } else if (newValues == "energy" || newValues == "arb" || newValues == "epn") {
1032// fParticleGun->GetEneDist()->ReSetHist(newValues);
1033// } else {
1034// fParticleGun->GetBiasRndm()->ReSetHist(newValues);
1035// }
1036// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1037// << " The command is obsolete and will be removed soon." << G4endl
1038// << " Please try to use the new structured commands!" << G4endl;
1039// }
1040// else if(command == arbintCmd)
1041// {
1042// CHECKPG();
1043// fParticleGun->GetEneDist()->ArbInterpolate(newValues);
1044// G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1045// << " The command is obsolete and will be removed soon." << G4endl
1046// << " Please try to use the new structured commands!" << G4endl;
1047// }
1048// else
1049 if( command==directionCmd )
1050 {
1051 CHECKPG();
1054 }
1055 else if( command==energyCmd )
1056 {
1057 CHECKPG();
1060 }
1061 else if( command==positionCmd )
1062 {
1063 CHECKPG();
1066 }
1067 else if(command == verbosityCmd)
1068 {
1070 // CHECKPG();
1071 // fParticleGun->SetVerbosity(verbosityCmd->GetNewIntValue(newValues));
1072 }
1073 else if( command==particleCmd )
1074 {
1075 if (newValues =="ion")
1076 {
1077 fShootIon = true;
1078 }
1079 else
1080 {
1081 fShootIon = false;
1083 if(pd != nullptr)
1084 {
1085 CHECKPG();
1087 }
1088 }
1089 }
1090 else if( command==timeCmd )
1091 {
1092 CHECKPG();
1094 }
1095 else if( command==polCmd )
1096 {
1097 CHECKPG();
1099 }
1100 else if( command==numberCmd )
1101 {
1102 CHECKPG();
1104 }
1105 else if( command==ionCmd )
1106 {
1107 IonCommand(newValues);
1108 }
1109 else if( command==ionLvlCmd )
1110 {
1111 IonLvlCommand(newValues);
1112 }
1113 else if( command==listCmd )
1114 {
1116 }
1117 else if( command==addsourceCmd )
1118 {
1120 }
1121 else if( command==listsourceCmd )
1122 {
1123 fGPS->ListSource();
1124 }
1125 else if( command==clearsourceCmd )
1126 {
1127 fGPS->ClearAll();
1128 fParticleGun = nullptr;
1129 }
1130 else if( command==getsourceCmd )
1131 {
1132 G4cout << " Current source index:" << fGPS->GetCurrentSourceIndex()
1133 << " ; Intensity:" << fGPS->GetCurrentSourceIntensity() << G4endl;
1134 }
1135 else if( command==setsourceCmd )
1136 {
1137 // NOTE: This will also sets fParticleGun to the courrent source
1138 // Not very clean, the GPS::SetCurrentSourceto will call:
1139 // SetParticleSource( G4ParticleSource* )
1140 // The point is that GPS has no public API to get a source by index
1141 // TODO: Can we add this API?
1142 const G4int sn = setsourceCmd->GetNewIntValue(newValues);
1143 if ( sn >= fGPS->GetNumberofSource() )
1144 {
1146 msg << "Using command " << setsourceCmd->GetCommandPath() << "/"
1147 << setsourceCmd->GetCommandName() << " " << sn;
1148 msg << " is invalid " << fGPS->GetNumberofSource()
1149 << " source(s) are defined.";
1150 G4Exception("G4GeneralParticleSourceMessenger::SetNewValue",
1151 "G4GPS005", FatalException, msg);
1152 }
1154 }
1155 else if( command==setintensityCmd )
1156 {
1158 }
1159 else if( command==deletesourceCmd )
1160 {
1162 }
1163 else if(command == multiplevertexCmd)
1164 {
1166 }
1167 else if(command == flatsamplingCmd)
1168 {
1170 }
1171 //
1172 // new implementations
1173 //
1174 else if(command == typeCmd1)
1175 {
1176 CHECKPG();
1177 fParticleGun->GetPosDist()->SetPosDisType(newValues);
1178 }
1179 else if(command == shapeCmd1)
1180 {
1181 CHECKPG();
1182 fParticleGun->GetPosDist()->SetPosDisShape(newValues);
1183 }
1184 else if(command == centreCmd1)
1185 {
1186 CHECKPG();
1188 }
1189 else if(command == posrot1Cmd1)
1190 {
1191 CHECKPG();
1193 }
1194 else if(command == posrot2Cmd1)
1195 {
1196 CHECKPG();
1198 }
1199 else if(command == halfxCmd1)
1200 {
1201 CHECKPG();
1203 }
1204 else if(command == halfyCmd1)
1205 {
1206 CHECKPG();
1208 }
1209 else if(command == halfzCmd1)
1210 {
1211 CHECKPG();
1213 }
1214 else if(command == radiusCmd1)
1215 {
1216 CHECKPG();
1218 }
1219 else if(command == radius0Cmd1)
1220 {
1221 CHECKPG();
1223 }
1224 else if(command == possigmarCmd1)
1225 {
1226 CHECKPG();
1228 }
1229 else if(command == possigmaxCmd1)
1230 {
1231 CHECKPG();
1233 }
1234 else if(command == possigmayCmd1)
1235 {
1236 CHECKPG();
1238 }
1239 else if(command == paralpCmd1)
1240 {
1241 CHECKPG();
1243 }
1244 else if(command == partheCmd1)
1245 {
1246 CHECKPG();
1248 }
1249 else if(command == parphiCmd1)
1250 {
1251 CHECKPG();
1253 }
1254 else if(command == confineCmd1)
1255 {
1256 CHECKPG();
1258 }
1259 else if(command == angtypeCmd1)
1260 {
1261 CHECKPG();
1262 fParticleGun->GetAngDist()->SetAngDistType(newValues);
1263 }
1264 else if(command == angrot1Cmd1)
1265 {
1266 CHECKPG();
1267 G4String a = "angref1";
1269 }
1270 else if(command == angrot2Cmd1)
1271 {
1272 CHECKPG();
1273 G4String a = "angref2";
1275 }
1276 else if(command == minthetaCmd1)
1277 {
1278 CHECKPG();
1280 }
1281 else if(command == minphiCmd1)
1282 {
1283 CHECKPG();
1285 }
1286 else if(command == maxthetaCmd1)
1287 {
1288 CHECKPG();
1290 }
1291 else if(command == maxphiCmd1)
1292 {
1293 CHECKPG();
1295 }
1296 else if(command == angsigmarCmd1)
1297 {
1298 CHECKPG();
1300 }
1301 else if(command == angsigmaxCmd1)
1302 {
1303 CHECKPG();
1305 }
1306 else if(command == angsigmayCmd1)
1307 {
1308 CHECKPG();
1310 }
1311 else if(command == angfocusCmd)
1312 {
1313 CHECKPG();
1315 }
1316 else if(command == useuserangaxisCmd1)
1317 {
1318 CHECKPG();
1320 }
1321 else if(command == surfnormCmd1)
1322 {
1323 CHECKPG();
1325 }
1326 else if(command == energytypeCmd1)
1327 {
1328 CHECKPG();
1329 if(newValues=="LW")
1330 {
1335 }
1336 else
1337 {
1340 }
1341 }
1342 else if(command == eminCmd1)
1343 {
1344 CHECKPG();
1346 }
1347 else if(command == emaxCmd1)
1348 {
1349 CHECKPG();
1351 }
1352 else if(command == monoenergyCmd1)
1353 {
1354 CHECKPG();
1356 }
1357 else if(command == engsigmaCmd1)
1358 {
1359 CHECKPG();
1361 }
1362 else if(command == alphaCmd1)
1363 {
1364 CHECKPG();
1366 }
1367 else if(command == tempCmd1)
1368 {
1369 CHECKPG();
1371 }
1372 else if(command == ezeroCmd1)
1373 {
1374 CHECKPG();
1376 }
1377 else if(command == gradientCmd1)
1378 {
1379 CHECKPG();
1381 }
1382 else if(command == interceptCmd1)
1383 {
1384 CHECKPG();
1386 }
1387 else if(command == arbeintCmd1)
1388 {
1389 CHECKPG();
1391 }
1392 else if(command == calculateCmd1)
1393 {
1394 CHECKPG();
1396 }
1397 else if(command == energyspecCmd1)
1398 {
1399 CHECKPG();
1401 }
1402 else if(command == diffspecCmd1)
1403 {
1404 CHECKPG();
1406 }
1407 else if(command == applyEnergyWeightCmd1)
1408 {
1409 CHECKPG();
1410 auto eDisType = fParticleGun->GetEneDist()->GetEnergyDisType();
1411 if(eDisType != "Lin")
1412 {
1414 ed << "Energy distribution is defined as " << eDisType << ". /gps/ene/applyEneWeight is available only for Linear distribution.";
1415 command->CommandFailed(ed);
1416 return;
1417 }
1419 }
1420 else if(command == histnameCmd1)
1421 {
1422 histtype = newValues;
1423 }
1424 else if(command == histfileCmd1)
1425 {
1426 histtype = "arb";
1427 CHECKPG();
1429 }
1430 else if(command == histpointCmd1)
1431 {
1432 CHECKPG();
1433 if(histtype == "biasx")
1435 if(histtype == "biasy")
1437 if(histtype == "biasz")
1439 if(histtype == "biast")
1441 if(histtype == "biasp")
1443 if(histtype == "biaspt")
1445 if(histtype == "biaspp")
1447 if(histtype == "biase")
1449 if(histtype == "theta")
1451 if(histtype == "phi")
1453 if(histtype == "energy")
1455 if(histtype == "arb")
1457 if(histtype == "epn")
1459 }
1460 else if(command == resethistCmd1)
1461 {
1462 CHECKPG();
1463 if(newValues == "theta" || newValues == "phi")
1464 {
1465 fParticleGun->GetAngDist()->ReSetHist(newValues);
1466 }
1467 else if (newValues == "energy" || newValues == "arb" || newValues == "epn")
1468 {
1469 fParticleGun->GetEneDist()->ReSetHist(newValues);
1470 }
1471 else
1472 {
1473 fParticleGun->GetBiasRndm()->ReSetHist(newValues);
1474 }
1475 }
1476 else if(command == arbintCmd1)
1477 {
1479 }
1480 else
1481 {
1482 G4cout << "Error entering command" << G4endl;
1483 }
1484}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
G4GLOB_DLL std::ostream G4cout
G4double GetCurrentSourceIntensity() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void DumpTable(const G4String &particle_name="ALL")
void SetBeamSigmaInAngX(G4double)
void SetBeamSigmaInAngR(G4double)
void UserDefAngTheta(const G4ThreeVector &)
void SetFocusPoint(const G4ThreeVector &)
void SetAngDistType(const G4String &)
void UserDefAngPhi(const G4ThreeVector &)
void SetParticleMomentumDirection(const G4ParticleMomentum &aMomDirection)
void SetBeamSigmaInAngY(G4double)
void ReSetHist(const G4String &)
void DefineAngRefAxes(const G4String &, const G4ThreeVector &)
void ArbInterpolate(const G4String &)
const G4String & GetEnergyDisType()
void SetEnergyDisType(const G4String &)
void EpnEnergyHisto(const G4ThreeVector &)
void ArbEnergyHistoFile(const G4String &)
void ReSetHist(const G4String &)
void InputDifferentialSpectra(G4bool)
void ApplyEnergyWeight(G4bool val)
void UserEnergyHisto(const G4ThreeVector &)
void ArbEnergyHisto(const G4ThreeVector &)
void SetPosRot2(const G4ThreeVector &)
void ConfineSourceToVolume(const G4String &)
void SetPosDisShape(const G4String &)
void SetCentreCoords(const G4ThreeVector &)
void SetPosRot1(const G4ThreeVector &)
void SetPosDisType(const G4String &)
void SetXBias(const G4ThreeVector &)
void SetEnergyBias(const G4ThreeVector &)
void SetPosPhiBias(const G4ThreeVector &)
void SetThetaBias(const G4ThreeVector &)
void SetYBias(const G4ThreeVector &)
void SetPosThetaBias(const G4ThreeVector &)
void SetPhiBias(const G4ThreeVector &)
void SetZBias(const G4ThreeVector &)
void ReSetHist(const G4String &)
void SetParticleTime(G4double aTime)
G4SPSAngDistribution * GetAngDist() const
G4SPSRandomGenerator * GetBiasRndm() const
G4SPSEneDistribution * GetEneDist() const
void SetParticlePolarization(const G4ThreeVector &aVal)
G4SPSPosDistribution * GetPosDist() const
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4int GetNewIntValue(const char *paramString)
const G4String & GetCommandName() const
Definition: G4UIcommand.hh:137

References G4GeneralParticleSource::AddaSource(), addsourceCmd, alphaCmd1, angfocusCmd, angrot1Cmd1, angrot2Cmd1, angsigmarCmd1, angsigmaxCmd1, angsigmayCmd1, angtypeCmd1, G4SPSEneDistribution::ApplyEnergyWeight(), applyEnergyWeightCmd1, arbeintCmd1, G4SPSEneDistribution::ArbEnergyHisto(), G4SPSEneDistribution::ArbEnergyHistoFile(), arbintCmd1, G4SPSEneDistribution::ArbInterpolate(), G4SPSEneDistribution::Calculate(), calculateCmd1, centreCmd1, CHECKPG, G4GeneralParticleSource::ClearAll(), clearsourceCmd, G4UIcommand::CommandFailed(), confineCmd1, G4SPSPosDistribution::ConfineSourceToVolume(), G4SPSAngDistribution::DefineAngRefAxes(), G4GeneralParticleSource::DeleteaSource(), deletesourceCmd, diffspecCmd1, directionCmd, G4ParticleTable::DumpTable(), emaxCmd1, eminCmd1, energyCmd, energyspecCmd1, energytypeCmd1, engsigmaCmd1, G4SPSEneDistribution::EpnEnergyHisto(), ezeroCmd1, FatalException, fGPS, G4ParticleTable::FindParticle(), flatsamplingCmd, fParticleGun, fShootIon, G4cout, G4endl, G4Exception(), G4SingleParticleSource::GetAngDist(), G4SingleParticleSource::GetBiasRndm(), G4UIcommand::GetCommandName(), G4UIcommand::GetCommandPath(), G4GeneralParticleSource::GetCurrentSourceIndex(), G4GeneralParticleSource::GetCurrentSourceIntensity(), G4SingleParticleSource::GetEneDist(), G4SPSEneDistribution::GetEnergyDisType(), G4UIcmdWith3Vector::GetNew3VectorValue(), G4UIcmdWith3VectorAndUnit::GetNew3VectorValue(), G4UIcmdWithABool::GetNewBoolValue(), G4UIcmdWithADouble::GetNewDoubleValue(), G4UIcmdWithADoubleAndUnit::GetNewDoubleValue(), G4UIcmdWithAnInteger::GetNewIntValue(), G4GeneralParticleSource::GetNumberofSource(), G4SingleParticleSource::GetPosDist(), getsourceCmd, gradientCmd1, halfxCmd1, halfyCmd1, halfzCmd1, histfileCmd1, histnameCmd1, histpointCmd1, histtype, G4SPSEneDistribution::InputDifferentialSpectra(), G4SPSEneDistribution::InputEnergySpectra(), interceptCmd1, ionCmd, IonCommand(), ionLvlCmd, IonLvlCommand(), listCmd, G4GeneralParticleSource::ListSource(), listsourceCmd, maxphiCmd1, maxthetaCmd1, minphiCmd1, minthetaCmd1, monoenergyCmd1, multiplevertexCmd, numberCmd, paralpCmd1, parphiCmd1, partheCmd1, particleCmd, particleTable, polCmd, positionCmd, posrot1Cmd1, posrot2Cmd1, possigmarCmd1, possigmaxCmd1, possigmayCmd1, radius0Cmd1, radiusCmd1, G4SPSAngDistribution::ReSetHist(), G4SPSEneDistribution::ReSetHist(), G4SPSRandomGenerator::ReSetHist(), resethistCmd1, G4SPSEneDistribution::SetAlpha(), G4SPSAngDistribution::SetAngDistType(), G4SPSAngDistribution::SetBeamSigmaInAngR(), G4SPSAngDistribution::SetBeamSigmaInAngX(), G4SPSAngDistribution::SetBeamSigmaInAngY(), G4SPSEneDistribution::SetBeamSigmaInE(), G4SPSPosDistribution::SetBeamSigmaInR(), G4SPSPosDistribution::SetBeamSigmaInX(), G4SPSPosDistribution::SetBeamSigmaInY(), G4SPSEneDistribution::SetBiasAlpha(), G4SPSPosDistribution::SetCentreCoords(), G4GeneralParticleSource::SetCurrentSourceIntensity(), G4GeneralParticleSource::SetCurrentSourceto(), G4SPSEneDistribution::SetEmax(), G4SPSEneDistribution::SetEmin(), G4SPSRandomGenerator::SetEnergyBias(), G4SPSEneDistribution::SetEnergyDisType(), G4SPSEneDistribution::SetEzero(), G4GeneralParticleSource::SetFlatSampling(), G4SPSAngDistribution::SetFocusPoint(), G4SPSEneDistribution::SetGradient(), G4SPSPosDistribution::SetHalfX(), G4SPSPosDistribution::SetHalfY(), G4SPSPosDistribution::SetHalfZ(), setintensityCmd, G4SPSEneDistribution::SetInterCept(), G4SPSAngDistribution::SetMaxPhi(), G4SPSAngDistribution::SetMaxTheta(), G4SPSAngDistribution::SetMinPhi(), G4SPSAngDistribution::SetMinTheta(), G4SPSEneDistribution::SetMonoEnergy(), G4GeneralParticleSource::SetMultipleVertex(), G4SingleParticleSource::SetNumberOfParticles(), G4SPSPosDistribution::SetParAlpha(), G4SPSPosDistribution::SetParPhi(), G4SPSPosDistribution::SetParTheta(), G4SingleParticleSource::SetParticleDefinition(), G4SPSAngDistribution::SetParticleMomentumDirection(), G4SingleParticleSource::SetParticlePolarization(), G4SingleParticleSource::SetParticleTime(), G4SPSRandomGenerator::SetPhiBias(), G4SPSPosDistribution::SetPosDisShape(), G4SPSPosDistribution::SetPosDisType(), G4SPSRandomGenerator::SetPosPhiBias(), G4SPSPosDistribution::SetPosRot1(), G4SPSPosDistribution::SetPosRot2(), G4SPSRandomGenerator::SetPosThetaBias(), G4SPSPosDistribution::SetRadius(), G4SPSPosDistribution::SetRadius0(), setsourceCmd, G4SPSEneDistribution::SetTemp(), G4SPSRandomGenerator::SetThetaBias(), G4SPSAngDistribution::SetUserWRTSurface(), G4SPSAngDistribution::SetUseUserAngAxis(), G4GeneralParticleSource::SetVerbosity(), G4SPSRandomGenerator::SetXBias(), G4SPSRandomGenerator::SetYBias(), G4SPSRandomGenerator::SetZBias(), shapeCmd1, surfnormCmd1, tempCmd1, timeCmd, typeCmd1, G4SPSAngDistribution::UserDefAngPhi(), G4SPSAngDistribution::UserDefAngTheta(), G4SPSEneDistribution::UserEnergyHisto(), useuserangaxisCmd1, and verbosityCmd.

◆ SetParticleGun()

void G4GeneralParticleSourceMessenger::SetParticleGun ( G4SingleParticleSource fpg)
inline

◆ StoB()

G4bool G4UImessenger::StoB ( G4String  s)
protectedinherited

Definition at line 137 of file G4UImessenger.cc.

138{
140 G4bool vl = false;
141 if(v == "Y" || v == "YES" || v == "1" || v == "T" || v == "TRUE")
142 {
143 vl = true;
144 }
145 return vl;
146}
G4String to_upper_copy(G4String str)
Return uppercase copy of string.

References G4StrUtil::to_upper_copy().

Referenced by G4LocalThreadCoutMessenger::SetNewValue(), G4CascadeParamMessenger::SetNewValue(), G4ScoreQuantityMessenger::SetNewValue(), and G4ScoringMessenger::SetNewValue().

◆ StoD()

G4double G4UImessenger::StoD ( G4String  s)
protectedinherited

◆ StoI()

G4int G4UImessenger::StoI ( G4String  s)
protectedinherited

◆ StoL()

G4long G4UImessenger::StoL ( G4String  s)
protectedinherited

Definition at line 117 of file G4UImessenger.cc.

118{
119 G4long vl;
120 const char* t = str;
121 std::istringstream is(t);
122 is >> vl;
123 return vl;
124}
long G4long
Definition: G4Types.hh:87

Referenced by G4RunMessenger::SetNewValue().

Field Documentation

◆ addsourceCmd

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::addsourceCmd
private

◆ alphaCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::alphaCmd1
private

◆ angfocusCmd

G4UIcmdWith3VectorAndUnit* G4GeneralParticleSourceMessenger::angfocusCmd
private

◆ angrot1Cmd1

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::angrot1Cmd1
private

◆ angrot2Cmd1

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::angrot2Cmd1
private

◆ angsigmarCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::angsigmarCmd1
private

◆ angsigmaxCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::angsigmaxCmd1
private

◆ angsigmayCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::angsigmayCmd1
private

◆ angtypeCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::angtypeCmd1
private

◆ angularDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::angularDirectory
private

◆ applyEnergyWeightCmd1

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::applyEnergyWeightCmd1
private

◆ arbeintCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::arbeintCmd1
private

◆ arbintCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::arbintCmd1
private

◆ baseDir

G4UIdirectory* G4UImessenger::baseDir = nullptr
protectedinherited

◆ baseDirName

G4String G4UImessenger::baseDirName = ""
protectedinherited

◆ calculateCmd1

G4UIcmdWithoutParameter* G4GeneralParticleSourceMessenger::calculateCmd1
private

◆ centreCmd1

G4UIcmdWith3VectorAndUnit* G4GeneralParticleSourceMessenger::centreCmd1
private

◆ clearsourceCmd

G4UIcmdWithoutParameter* G4GeneralParticleSourceMessenger::clearsourceCmd
private

◆ commandsShouldBeInMaster

G4bool G4UImessenger::commandsShouldBeInMaster = false
protectedinherited

◆ confineCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::confineCmd1
private

◆ deletesourceCmd

G4UIcmdWithAnInteger* G4GeneralParticleSourceMessenger::deletesourceCmd
private

◆ diffspecCmd1

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::diffspecCmd1
private

◆ directionCmd

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::directionCmd
private

◆ emaxCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::emaxCmd1
private

◆ eminCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::eminCmd1
private

◆ energyCmd

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::energyCmd
private

◆ energyDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::energyDirectory
private

◆ energyspecCmd1

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::energyspecCmd1
private

◆ energytypeCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::energytypeCmd1
private

◆ engsigmaCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::engsigmaCmd1
private

◆ ezeroCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::ezeroCmd1
private

◆ fAtomicMass

G4int G4GeneralParticleSourceMessenger::fAtomicMass = 0
private

Definition at line 212 of file G4GeneralParticleSourceMessenger.hh.

Referenced by IonCommand().

◆ fAtomicMassL

G4int G4GeneralParticleSourceMessenger::fAtomicMassL = 0
private

Definition at line 217 of file G4GeneralParticleSourceMessenger.hh.

Referenced by IonLvlCommand().

◆ fAtomicNumber

G4int G4GeneralParticleSourceMessenger::fAtomicNumber = 0
private

Definition at line 211 of file G4GeneralParticleSourceMessenger.hh.

Referenced by IonCommand().

◆ fAtomicNumberL

G4int G4GeneralParticleSourceMessenger::fAtomicNumberL = 0
private

Definition at line 216 of file G4GeneralParticleSourceMessenger.hh.

Referenced by IonLvlCommand().

◆ fGPS

G4GeneralParticleSource* G4GeneralParticleSourceMessenger::fGPS = nullptr
private

Definition at line 106 of file G4GeneralParticleSourceMessenger.hh.

Referenced by SetNewValue().

◆ fIonCharge

G4int G4GeneralParticleSourceMessenger::fIonCharge = 0
private

Definition at line 213 of file G4GeneralParticleSourceMessenger.hh.

Referenced by IonCommand().

◆ fIonChargeL

G4int G4GeneralParticleSourceMessenger::fIonChargeL = 0
private

Definition at line 218 of file G4GeneralParticleSourceMessenger.hh.

Referenced by IonLvlCommand().

◆ fIonEnergyLevel

G4int G4GeneralParticleSourceMessenger::fIonEnergyLevel = 0
private

Definition at line 219 of file G4GeneralParticleSourceMessenger.hh.

Referenced by IonLvlCommand().

◆ fIonExciteEnergy

G4double G4GeneralParticleSourceMessenger::fIonExciteEnergy = 0.0
private

Definition at line 214 of file G4GeneralParticleSourceMessenger.hh.

Referenced by IonCommand().

◆ flatsamplingCmd

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::flatsamplingCmd
private

◆ fParticleGun

G4SingleParticleSource* G4GeneralParticleSourceMessenger::fParticleGun = nullptr
private

◆ fShootIon

G4bool G4GeneralParticleSourceMessenger::fShootIon = false
private

Definition at line 209 of file G4GeneralParticleSourceMessenger.hh.

Referenced by IonCommand(), IonLvlCommand(), and SetNewValue().

◆ getsourceCmd

G4UIcmdWithoutParameter* G4GeneralParticleSourceMessenger::getsourceCmd
private

◆ gpsDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::gpsDirectory
private

◆ gradientCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::gradientCmd1
private

◆ halfxCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::halfxCmd1
private

◆ halfyCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::halfyCmd1
private

◆ halfzCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::halfzCmd1
private

◆ histDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::histDirectory
private

◆ histfileCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::histfileCmd1
private

◆ histnameCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::histnameCmd1
private

◆ histpointCmd1

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::histpointCmd1
private

◆ histtype

G4String G4GeneralParticleSourceMessenger::histtype
private

◆ interceptCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::interceptCmd1
private

◆ ionCmd

G4UIcommand* G4GeneralParticleSourceMessenger::ionCmd
private

◆ ionLvlCmd

G4UIcommand* G4GeneralParticleSourceMessenger::ionLvlCmd
private

◆ listCmd

G4UIcmdWithoutParameter* G4GeneralParticleSourceMessenger::listCmd
private

◆ listsourceCmd

G4UIcmdWithoutParameter* G4GeneralParticleSourceMessenger::listsourceCmd
private

◆ maxphiCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::maxphiCmd1
private

◆ maxthetaCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::maxthetaCmd1
private

◆ minphiCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::minphiCmd1
private

◆ minthetaCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::minthetaCmd1
private

◆ monoenergyCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::monoenergyCmd1
private

◆ multiplevertexCmd

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::multiplevertexCmd
private

◆ numberCmd

G4UIcmdWithAnInteger* G4GeneralParticleSourceMessenger::numberCmd
private

◆ paralpCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::paralpCmd1
private

◆ parphiCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::parphiCmd1
private

◆ partheCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::partheCmd1
private

◆ particleCmd

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::particleCmd
private

◆ particleTable

G4ParticleTable* G4GeneralParticleSourceMessenger::particleTable = nullptr
private

◆ polCmd

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::polCmd
private

◆ positionCmd

G4UIcmdWith3VectorAndUnit* G4GeneralParticleSourceMessenger::positionCmd
private

◆ positionDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::positionDirectory
private

◆ posrot1Cmd1

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::posrot1Cmd1
private

◆ posrot2Cmd1

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::posrot2Cmd1
private

◆ possigmarCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::possigmarCmd1
private

◆ possigmaxCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::possigmaxCmd1
private

◆ possigmayCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::possigmayCmd1
private

◆ radius0Cmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::radius0Cmd1
private

◆ radiusCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::radiusCmd1
private

◆ resethistCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::resethistCmd1
private

◆ setintensityCmd

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::setintensityCmd
private

◆ setsourceCmd

G4UIcmdWithAnInteger* G4GeneralParticleSourceMessenger::setsourceCmd
private

◆ shapeCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::shapeCmd1
private

◆ sourceDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::sourceDirectory
private

◆ surfnormCmd1

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::surfnormCmd1
private

◆ tempCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::tempCmd1
private

◆ timeCmd

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::timeCmd
private

◆ typeCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::typeCmd1
private

◆ useuserangaxisCmd1

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::useuserangaxisCmd1
private

◆ verbosityCmd

G4UIcmdWithAnInteger* G4GeneralParticleSourceMessenger::verbosityCmd
private

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