Geant4  10.02.p03
G4GeneralParticleSourceMessenger Class Reference

#include <G4GeneralParticleSourceMessenger.hh>

Inheritance diagram for G4GeneralParticleSourceMessenger:
Collaboration diagram for G4GeneralParticleSourceMessenger:

Public Member Functions

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

Static Public Member Functions

static G4GeneralParticleSourceMessengerGetInstance (G4GeneralParticleSource *)
 
static void Destroy ()
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

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

Detailed Description

Andrea Dotti Feb 2015 GPS messenger design requires some explanation for what distributions parameters are concerned : Each thread has its own GPS since primary generation is a user action. However to save memory the underlying structures that provide the GPS functionalities ( the G4SPS*Distribution classes and the G4SPSRandomGenerator class) are shared among threads. This implies that modifying parameters of sources requires some attention: 1- Only one thread should change source parameters. 2- Changing of parameters can happen only between runs, when is guaranteed that no thread is accessing them 2- UI commands require that even if messenger is instantiated in a thread the commands are executed in the master (this is possible since V10.1) The simplest solution is to use UI commands to change GPS parameters and avoid C++ APIs. If this is inevitable a simple solution is to instantiate an instance of G4GeneralParticleSource explicitly in the master thread (for example in G4VUserActionInitialization::BuildForMaster() and set the defaults parameter there).

Definition at line 130 of file G4GeneralParticleSourceMessenger.hh.

Constructor & Destructor Documentation

◆ G4GeneralParticleSourceMessenger()

G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger ( G4GeneralParticleSource fPtclGun)
private

Definition at line 103 of file G4GeneralParticleSourceMessenger.cc.

104  : fGPS(fPtclGun),fParticleGun(0),fShootIon(false),
107 
108 {
109  //A.Dotti - 10th October 2014
110  //This messenger is special: it is instantiated in a user action but (e.g. in
111  // a thread).
112  //the UI commands it defines should be executed by the *master* thread because
113  //they operate on shared resources and we want the UI commands to take
114  //effect BEFORE the threads do some work (so all data are properly initialized)
115  //To achieve this behavior we set to true a base calss protected
116  //data member. Since it makes no sense to have more than one instance
117  //of the messenger we check that we actually have only one.
118  //Note that the logic of implementing, in a given worker thread only one
119  //messenger is deletefated to the creator
121 
122 
123 
125  histtype = "biasx";
126 
127  //UI Commands only for master
128  G4bool broadcast = false;
129  gpsDirectory = new G4UIdirectory("/gps/",broadcast);
130 
131  gpsDirectory->SetGuidance("General Paricle Source control commands.");
132  // gpsDirectory->SetGuidance(" The first 9 commands are the same as in G4ParticleGun ");
133 
134  // now the commands for mutiple sources
135  sourceDirectory = new G4UIdirectory("/gps/source/");
136  sourceDirectory->SetGuidance("Multiple source control sub-directory");
137 
138  addsourceCmd = new G4UIcmdWithADouble("/gps/source/add",this);
139  addsourceCmd->SetGuidance("add a new source defintion to the particle gun with the specified intensity");
140  addsourceCmd->SetParameterName("addsource",false,false);
141  addsourceCmd->SetRange("addsource > 0.");
142 
143  listsourceCmd = new G4UIcmdWithoutParameter("/gps/source/list",this);
144  listsourceCmd->SetGuidance("List the defined particle sources");
145 
146  clearsourceCmd = new G4UIcmdWithoutParameter("/gps/source/clear",this);
147  clearsourceCmd->SetGuidance("Remove all the defined particle sources");
148 
149  getsourceCmd = new G4UIcmdWithoutParameter("/gps/source/show",this);
150  getsourceCmd->SetGuidance("Show the current source index and intensity");
151 
152  setsourceCmd = new G4UIcmdWithAnInteger("/gps/source/set",this);
153  setsourceCmd->SetGuidance("set the indexed source as the current one");
154  setsourceCmd->SetGuidance(" so one can change its source definition");
155  setsourceCmd->SetParameterName("setsource",false,false);
156  setsourceCmd->SetRange("setsource >= 0");
157 
158  deletesourceCmd = new G4UIcmdWithAnInteger("/gps/source/delete",this);
159  deletesourceCmd->SetGuidance("delete the indexed source from the list");
160  deletesourceCmd->SetParameterName("deletesource",false,false);
161  deletesourceCmd->SetRange("deletesource > 0");
162 
163  setintensityCmd = new G4UIcmdWithADouble("/gps/source/intensity",this);
164  setintensityCmd->SetGuidance("reset the current source to the specified intensity");
165  setintensityCmd->SetParameterName("setintensity",false,false);
166  setintensityCmd->SetRange("setintensity > 0.");
167 
168  multiplevertexCmd = new G4UIcmdWithABool("/gps/source/multiplevertex",this);
169  multiplevertexCmd->SetGuidance("true for simulaneous generation mutiple vertex");
170  multiplevertexCmd->SetGuidance("Default is false");
171  multiplevertexCmd->SetParameterName("multiplevertex",true);
173 
174  flatsamplingCmd = new G4UIcmdWithABool("/gps/source/flatsampling",this);
175  flatsamplingCmd->SetGuidance("true for applying flat (biased) sampling among the sources");
176  flatsamplingCmd->SetGuidance("Default is false");
177  flatsamplingCmd->SetParameterName("flatsampling",true);
179 
180  // below we reproduce commands awailable in G4Particle Gun
181 
182  listCmd = new G4UIcmdWithoutParameter("/gps/List",this);
183  listCmd->SetGuidance("List available particles.");
184  listCmd->SetGuidance(" Invoke G4ParticleTable.");
185 
186  particleCmd = new G4UIcmdWithAString("/gps/particle",this);
187  particleCmd->SetGuidance("Set particle to be generated.");
188  particleCmd->SetGuidance(" (geantino is default)");
189  particleCmd->SetGuidance(" (ion can be specified for shooting ions)");
190  particleCmd->SetParameterName("particleName",true);
191  particleCmd->SetDefaultValue("geantino");
192  G4String candidateList;
193  G4int nPtcl = particleTable->entries();
194  for(G4int i=0;i<nPtcl;i++)
195  {
196  candidateList += particleTable->GetParticleName(i);
197  candidateList += " ";
198  }
199  candidateList += "ion ";
200  particleCmd->SetCandidates(candidateList);
201 
202  directionCmd = new G4UIcmdWith3Vector("/gps/direction",this);
203  directionCmd->SetGuidance("Set momentum direction.");
204  directionCmd->SetGuidance("Direction needs not to be a unit vector.");
205  directionCmd->SetGuidance("Angular distribution type is set to planar.");
206  directionCmd->SetParameterName("Px","Py","Pz",false,false);
207  directionCmd->SetRange("Px != 0 || Py != 0 || Pz != 0");
208 
209  energyCmd = new G4UIcmdWithADoubleAndUnit("/gps/energy",this);
210  energyCmd->SetGuidance("Set kinetic energy.");
211  energyCmd->SetParameterName("Energy",false,false);
212  energyCmd->SetDefaultUnit("GeV");
213  //energyCmd->SetUnitCategory("Energy");
214  //energyCmd->SetUnitCandidates("eV keV MeV GeV TeV");
215 
216  positionCmd = new G4UIcmdWith3VectorAndUnit("/gps/position",this);
217  positionCmd->SetGuidance("Set starting position of the particle for a Point like source.");
218  positionCmd->SetGuidance("Same effect as the two /gps/pos/type Point /gps/pos/centre commands.");
219  positionCmd->SetParameterName("X","Y","Z",false,false);
221  //positionCmd->SetUnitCategory("Length");
222  //positionCmd->SetUnitCandidates("microm mm cm m km");
223 
224  ionCmd = new G4UIcommand("/gps/ion",this);
225  ionCmd->SetGuidance("Set properties of ion to be generated.");
226  ionCmd->SetGuidance("[usage] /gps/ion Z A Q E");
227  ionCmd->SetGuidance(" Z:(int) AtomicNumber");
228  ionCmd->SetGuidance(" A:(int) AtomicMass");
229  ionCmd->SetGuidance(" Q:(int) Charge of Ion (in unit of e)");
230  ionCmd->SetGuidance(" E:(double) Excitation energy (in keV)");
231 
232  G4UIparameter* param;
233  param = new G4UIparameter("Z",'i',false);
234  param->SetDefaultValue("1");
235  ionCmd->SetParameter(param);
236  param = new G4UIparameter("A",'i',false);
237  param->SetDefaultValue("1");
238  ionCmd->SetParameter(param);
239  param = new G4UIparameter("Q",'i',true);
240  param->SetDefaultValue("0");
241  ionCmd->SetParameter(param);
242  param = new G4UIparameter("E",'d',true);
243  param->SetDefaultValue("0.0");
244  ionCmd->SetParameter(param);
245 
246  ionLvlCmd = new G4UIcommand("/gps/ionLvl",this);
247  ionLvlCmd->SetGuidance("Set properties of ion to be generated.");
248  ionLvlCmd->SetGuidance("[usage] /gps/ion Z A Q Lvl");
249  ionLvlCmd->SetGuidance(" Z:(int) AtomicNumber");
250  ionLvlCmd->SetGuidance(" A:(int) AtomicMass");
251  ionLvlCmd->SetGuidance(" Q:(int) Charge of Ion (in unit of e)");
252  ionLvlCmd->SetGuidance(" Lvl:(int) Number of metastable state excitation level (0-9)");
253 
254  G4UIparameter* paramL;
255  paramL = new G4UIparameter("Z",'i',false);
256  paramL->SetDefaultValue("1");
257  ionLvlCmd->SetParameter(paramL);
258  paramL = new G4UIparameter("A",'i',false);
259  paramL->SetDefaultValue("1");
260  ionLvlCmd->SetParameter(paramL);
261  paramL = new G4UIparameter("Q",'i',true);
262  paramL->SetDefaultValue("0");
263  ionLvlCmd->SetParameter(paramL);
264  paramL = new G4UIparameter("Lvl",'i',true);
265  paramL->SetDefaultValue("0.0");
266  ionLvlCmd->SetParameter(paramL);
267 
268  timeCmd = new G4UIcmdWithADoubleAndUnit("/gps/time",this);
269  timeCmd->SetGuidance("Set initial time of the particle.");
270  timeCmd->SetParameterName("t0",false,false);
271  timeCmd->SetDefaultUnit("ns");
272  //timeCmd->SetUnitCategory("Time");
273  //timeCmd->SetUnitCandidates("ns ms s");
274 
275  polCmd = new G4UIcmdWith3Vector("/gps/polarization",this);
276  polCmd->SetGuidance("Set polarization.");
277  polCmd->SetParameterName("Px","Py","Pz",false,false);
278  polCmd->SetRange("Px>=-1.&&Px<=1.&&Py>=-1.&&Py<=1.&&Pz>=-1.&&Pz<=1.");
279 
280  numberCmd = new G4UIcmdWithAnInteger("/gps/number",this);
281  numberCmd->SetGuidance("Set number of particles to be generated per vertex.");
282  numberCmd->SetParameterName("N",false,false);
283  numberCmd->SetRange("N>0");
284 
285  // verbosity
286  verbosityCmd = new G4UIcmdWithAnInteger("/gps/verbose",this);
287  verbosityCmd->SetGuidance("Set Verbose level for GPS");
288  verbosityCmd->SetGuidance(" 0 : Silent");
289  verbosityCmd->SetGuidance(" 1 : Limited information");
290  verbosityCmd->SetGuidance(" 2 : Detailed information");
291  verbosityCmd->SetParameterName("level",false);
292  verbosityCmd->SetRange("level>=0 && level <=2");
293 
294  // now extended commands
295  // Positional ones:
296  positionDirectory = new G4UIdirectory("/gps/pos/");
297  positionDirectory->SetGuidance("Positional commands sub-directory");
298 
299  typeCmd1 = new G4UIcmdWithAString("/gps/pos/type",this);
300  typeCmd1->SetGuidance("Sets source distribution type.");
301  typeCmd1->SetGuidance("Either Point, Beam, Plane, Surface or Volume");
302  typeCmd1->SetParameterName("DisType",false,false);
303  typeCmd1->SetDefaultValue("Point");
304  typeCmd1->SetCandidates("Point Beam Plane Surface Volume");
305 
306  shapeCmd1 = new G4UIcmdWithAString("/gps/pos/shape",this);
307  shapeCmd1->SetGuidance("Sets source shape for Plan, Surface or Volume type source.");
308  shapeCmd1->SetParameterName("Shape",false,false);
309  shapeCmd1->SetDefaultValue("NULL");
310  shapeCmd1->SetCandidates("Circle Annulus Ellipse Square Rectangle Sphere Ellipsoid Cylinder Para");
311 
312  centreCmd1 = new G4UIcmdWith3VectorAndUnit("/gps/pos/centre",this);
313  centreCmd1->SetGuidance("Set centre coordinates of source.");
314  //centreCmd1->SetGuidance(" same effect as the /gps/position command");
315  centreCmd1->SetParameterName("X","Y","Z",false,false);
316  centreCmd1->SetDefaultUnit("cm");
317  // centreCmd1->SetUnitCandidates("micron mm cm m km");
318 
319  posrot1Cmd1 = new G4UIcmdWith3Vector("/gps/pos/rot1",this);
320  posrot1Cmd1->SetGuidance("Set the 1st vector defining the rotation matrix'.");
321  posrot1Cmd1->SetGuidance("It does not need to be a unit vector.");
322  posrot1Cmd1->SetParameterName("R1x","R1y","R1z",false,false);
323  posrot1Cmd1->SetRange("R1x != 0 || R1y != 0 || R1z != 0");
324 
325  posrot2Cmd1 = new G4UIcmdWith3Vector("/gps/pos/rot2",this);
326  posrot2Cmd1->SetGuidance("Set the 2nd vector defining the rotation matrix'.");
327  posrot2Cmd1->SetGuidance("It does not need to be a unit vector.");
328  posrot2Cmd1->SetParameterName("R2x","R2y","R2z",false,false);
329  posrot2Cmd1->SetRange("R2x != 0 || R2y != 0 || R2z != 0");
330 
331  halfxCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/halfx",this);
332  halfxCmd1->SetGuidance("Set x half length of source.");
333  halfxCmd1->SetParameterName("Halfx",false,false);
334  halfxCmd1->SetDefaultUnit("cm");
335  // halfxCmd1->SetUnitCandidates("micron mm cm m km");
336 
337  halfyCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/halfy",this);
338  halfyCmd1->SetGuidance("Set y half length of source.");
339  halfyCmd1->SetParameterName("Halfy",false,false);
340  halfyCmd1->SetDefaultUnit("cm");
341  // halfyCmd1->SetUnitCandidates("micron mm cm m km");
342 
343  halfzCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/halfz",this);
344  halfzCmd1->SetGuidance("Set z half length of source.");
345  halfzCmd1->SetParameterName("Halfz",false,false);
346  halfzCmd1->SetDefaultUnit("cm");
347  // halfzCmd1->SetUnitCandidates("micron mm cm m km");
348 
349  radiusCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/radius",this);
350  radiusCmd1->SetGuidance("Set radius of source.");
351  radiusCmd1->SetParameterName("Radius",false,false);
352  radiusCmd1->SetDefaultUnit("cm");
353  // radiusCmd1->SetUnitCandidates("micron mm cm m km");
354 
355  radius0Cmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/inner_radius",this);
356  radius0Cmd1->SetGuidance("Set inner radius of source when required.");
357  radius0Cmd1->SetParameterName("Radius0",false,false);
359  // radius0Cmd1->SetUnitCandidates("micron mm cm m km");
360 
361  possigmarCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/sigma_r",this);
362  possigmarCmd1->SetGuidance("Set standard deviation in radial of the beam positional profile");
363  possigmarCmd1->SetGuidance(" applicable to Beam type source only");
364  possigmarCmd1->SetParameterName("Sigmar",false,false);
366  // possigmarCmd1->SetUnitCandidates("micron mm cm m km");
367 
368  possigmaxCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/sigma_x",this);
369  possigmaxCmd1->SetGuidance("Set standard deviation of beam positional profile in x-dir");
370  possigmaxCmd1->SetGuidance(" applicable to Beam type source only");
371  possigmaxCmd1->SetParameterName("Sigmax",false,false);
373  // possigmaxCmd1->SetUnitCandidates("micron mm cm m km");
374 
375  possigmayCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/sigma_y",this);
376  possigmayCmd1->SetGuidance("Set standard deviation of beam positional profile in y-dir");
377  possigmayCmd1->SetGuidance(" applicable to Beam type source only");
378  possigmayCmd1->SetParameterName("Sigmay",false,false);
380  // possigmayCmd1->SetUnitCandidates("micron mm cm m km");
381 
382  paralpCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/paralp",this);
383  paralpCmd1->SetGuidance("Angle from y-axis of y' in Para");
384  paralpCmd1->SetParameterName("paralp",false,false);
385  paralpCmd1->SetDefaultUnit("rad");
386  // paralpCmd1->SetUnitCandidates("rad deg");
387 
388  partheCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/parthe",this);
389  partheCmd1->SetGuidance("Polar angle through centres of z faces");
390  partheCmd1->SetParameterName("parthe",false,false);
391  partheCmd1->SetDefaultUnit("rad");
392  // partheCmd1->SetUnitCandidates("rad deg");
393 
394  parphiCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/pos/parphi",this);
395  parphiCmd1->SetGuidance("Azimuth angle through centres of z faces");
396  parphiCmd1->SetParameterName("parphi",false,false);
397  parphiCmd1->SetDefaultUnit("rad");
398  // parphiCmd1->SetUnitCandidates("rad deg");
399 
400  confineCmd1 = new G4UIcmdWithAString("/gps/pos/confine",this);
401  confineCmd1->SetGuidance("Confine source to volume (NULL to unset).");
402  confineCmd1->SetGuidance("usage: confine VolName");
403  confineCmd1->SetParameterName("VolName",false,false);
404  confineCmd1->SetDefaultValue("NULL");
405 
406  // old implementations
407 // typeCmd = new G4UIcmdWithAString("/gps/type",this);
408 // typeCmd->SetGuidance("Sets source distribution type. (obsolete!)");
409 // typeCmd->SetGuidance("Either Point, Beam, Plane, Surface or Volume");
410 // typeCmd->SetParameterName("DisType",false,false);
411 // typeCmd->SetDefaultValue("Point");
412 // typeCmd->SetCandidates("Point Beam Plane Surface Volume");
413 
414 // shapeCmd = new G4UIcmdWithAString("/gps/shape",this);
415 // shapeCmd->SetGuidance("Sets source shape type.(obsolete!)");
416 // shapeCmd->SetParameterName("Shape",false,false);
417 // shapeCmd->SetDefaultValue("NULL");
418 // shapeCmd->SetCandidates("Circle Annulus Ellipse Square Rectangle Sphere Ellipsoid Cylinder Para");
419 
420 // centreCmd = new G4UIcmdWith3VectorAndUnit("/gps/centre",this);
421 // centreCmd->SetGuidance("Set centre coordinates of source.(obsolete!)");
422 // centreCmd->SetParameterName("X","Y","Z",false,false);
423 // centreCmd->SetDefaultUnit("cm");
424  // centreCmd->SetUnitCandidates("micron mm cm m km");
425 
426 // posrot1Cmd = new G4UIcmdWith3Vector("/gps/posrot1",this);
427 // posrot1Cmd->SetGuidance("Set rotation matrix of x'.(obsolete!)");
428 // posrot1Cmd->SetGuidance("Posrot1 does not need to be a unit vector.");
429 // posrot1Cmd->SetParameterName("R1x","R1y","R1z",false,false);
430 // posrot1Cmd->SetRange("R1x != 0 || R1y != 0 || R1z != 0");
431 //
432 // posrot2Cmd = new G4UIcmdWith3Vector("/gps/posrot2",this);
433 // posrot2Cmd->SetGuidance("Set rotation matrix of y'.(obsolete!)");
434 // posrot2Cmd->SetGuidance("Posrot2 does not need to be a unit vector.");
435 // posrot2Cmd->SetParameterName("R2x","R2y","R2z",false,false);
436 // posrot2Cmd->SetRange("R2x != 0 || R2y != 0 || R2z != 0");
437 
438 // halfxCmd = new G4UIcmdWithADoubleAndUnit("/gps/halfx",this);
439 // halfxCmd->SetGuidance("Set x half length of source.(obsolete!)");
440 // halfxCmd->SetParameterName("Halfx",false,false);
441 // halfxCmd->SetDefaultUnit("cm");
442  // halfxCmd->SetUnitCandidates("micron mm cm m km");
443 
444 // halfyCmd = new G4UIcmdWithADoubleAndUnit("/gps/halfy",this);
445 // halfyCmd->SetGuidance("Set y half length of source.(obsolete!)");
446 // halfyCmd->SetParameterName("Halfy",false,false);
447 // halfyCmd->SetDefaultUnit("cm");
448  // halfyCmd->SetUnitCandidates("micron mm cm m km");
449 
450 // halfzCmd = new G4UIcmdWithADoubleAndUnit("/gps/halfz",this);
451 // halfzCmd->SetGuidance("Set z half length of source.(obsolete!)");
452 // halfzCmd->SetParameterName("Halfz",false,false);
453 // halfzCmd->SetDefaultUnit("cm");
454  // halfzCmd->SetUnitCandidates("micron mm cm m km");
455 
456 // radiusCmd = new G4UIcmdWithADoubleAndUnit("/gps/radius",this);
457 // radiusCmd->SetGuidance("Set radius of source.(obsolete!)");
458 // radiusCmd->SetParameterName("Radius",false,false);
459 // radiusCmd->SetDefaultUnit("cm");
460  // radiusCmd->SetUnitCandidates("micron mm cm m km");
461 
462 // radius0Cmd = new G4UIcmdWithADoubleAndUnit("/gps/radius0",this);
463 // radius0Cmd->SetGuidance("Set inner radius of source.(obsolete!)");
464 // radius0Cmd->SetParameterName("Radius0",false,false);
465 // radius0Cmd->SetDefaultUnit("cm");
466  // radius0Cmd->SetUnitCandidates("micron mm cm m km");
467 
468 // possigmarCmd = new G4UIcmdWithADoubleAndUnit("/gps/sigmaposr",this);
469 // possigmarCmd->SetGuidance("Set standard deviation of beam position in radial(obsolete!)");
470 // possigmarCmd->SetParameterName("Sigmar",false,false);
471 // possigmarCmd->SetDefaultUnit("cm");
472  // possigmarCmd->SetUnitCandidates("micron mm cm m km");
473 
474 // possigmaxCmd = new G4UIcmdWithADoubleAndUnit("/gps/sigmaposx",this);
475 // possigmaxCmd->SetGuidance("Set standard deviation of beam position in x-dir(obsolete!)");
476 // possigmaxCmd->SetParameterName("Sigmax",false,false);
477 // possigmaxCmd->SetDefaultUnit("cm");
478  // possigmaxCmd->SetUnitCandidates("micron mm cm m km");
479 
480 // possigmayCmd = new G4UIcmdWithADoubleAndUnit("/gps/sigmaposy",this);
481 // possigmayCmd->SetGuidance("Set standard deviation of beam position in y-dir(obsolete!)");
482 // possigmayCmd->SetParameterName("Sigmay",false,false);
483 // possigmayCmd->SetDefaultUnit("cm");
484  // possigmayCmd->SetUnitCandidates("micron mm cm m km");
485 
486 // paralpCmd = new G4UIcmdWithADoubleAndUnit("/gps/paralp",this);
487 // paralpCmd->SetGuidance("Angle from y-axis of y' in Para(obsolete!)");
488 // paralpCmd->SetParameterName("paralp",false,false);
489 // paralpCmd->SetDefaultUnit("rad");
490  // paralpCmd->SetUnitCandidates("rad deg");
491 
492 // partheCmd = new G4UIcmdWithADoubleAndUnit("/gps/parthe",this);
493 // partheCmd->SetGuidance("Polar angle through centres of z faces(obsolete!)");
494 // partheCmd->SetParameterName("parthe",false,false);
495 // partheCmd->SetDefaultUnit("rad");
496  // partheCmd->SetUnitCandidates("rad deg");
497 
498 // parphiCmd = new G4UIcmdWithADoubleAndUnit("/gps/parphi",this);
499 // parphiCmd->SetGuidance("Azimuth angle through centres of z faces(obsolete!)");
500 // parphiCmd->SetParameterName("parphi",false,false);
501 // parphiCmd->SetDefaultUnit("rad");
502  // parphiCmd->SetUnitCandidates("rad deg");
503 
504 // confineCmd = new G4UIcmdWithAString("/gps/confine",this);
505 // confineCmd->SetGuidance("Confine source to volume (NULL to unset)(obsolete!) .");
506 // confineCmd->SetGuidance("usage: confine VolName");
507 // confineCmd->SetParameterName("VolName",false,false);
508 // confineCmd->SetDefaultValue("NULL");
509 
510  // Angular distribution commands
511  angularDirectory = new G4UIdirectory("/gps/ang/");
512  angularDirectory->SetGuidance("Angular commands sub-directory");
513 
514  angtypeCmd1 = new G4UIcmdWithAString("/gps/ang/type",this);
515  angtypeCmd1->SetGuidance("Sets angular source distribution type");
516  angtypeCmd1->SetGuidance("Possible variables are: iso, cos, planar, beam1d, beam2d, focused or user");
517  angtypeCmd1->SetParameterName("AngDis",false,false);
519  angtypeCmd1->SetCandidates("iso cos planar beam1d beam2d focused user");
520 
521  angrot1Cmd1 = new G4UIcmdWith3Vector("/gps/ang/rot1",this);
522  angrot1Cmd1->SetGuidance("Sets the 1st vector for angular distribution rotation matrix");
523  angrot1Cmd1->SetGuidance("Need not be a unit vector");
524  angrot1Cmd1->SetParameterName("AR1x","AR1y","AR1z",false,false);
525  angrot1Cmd1->SetRange("AR1x != 0 || AR1y != 0 || AR1z != 0");
526 
527  angrot2Cmd1 = new G4UIcmdWith3Vector("/gps/ang/rot2",this);
528  angrot2Cmd1->SetGuidance("Sets the 2nd vector for angular distribution rotation matrix");
529  angrot2Cmd1->SetGuidance("Need not be a unit vector");
530  angrot2Cmd1->SetParameterName("AR2x","AR2y","AR2z",false,false);
531  angrot2Cmd1->SetRange("AR2x != 0 || AR2y != 0 || AR2z != 0");
532 
533  minthetaCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/mintheta",this);
534  minthetaCmd1->SetGuidance("Set minimum theta");
535  minthetaCmd1->SetParameterName("MinTheta",false,false);
538  // minthetaCmd1->SetUnitCandidates("rad deg");
539 
540  maxthetaCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/maxtheta",this);
541  maxthetaCmd1->SetGuidance("Set maximum theta");
542  maxthetaCmd1->SetParameterName("MaxTheta",false,false);
545  // maxthetaCmd1->SetUnitCandidates("rad deg");
546 
547  minphiCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/minphi",this);
548  minphiCmd1->SetGuidance("Set minimum phi");
549  minphiCmd1->SetParameterName("MinPhi",false,false);
550  minphiCmd1->SetDefaultUnit("rad");
551  // minphiCmd1->SetUnitCandidates("rad deg");
552 
553  maxphiCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/maxphi",this);
554  maxphiCmd1->SetGuidance("Set maximum phi");
555  maxphiCmd1->SetParameterName("MaxPhi",false,false);
557  maxphiCmd1->SetDefaultUnit("rad");
558  // maxphiCmd1->SetUnitCandidates("rad deg");
559 
560  angsigmarCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/sigma_r",this);
561  angsigmarCmd1->SetGuidance("Set standard deviation in direction for 1D beam.");
562  angsigmarCmd1->SetParameterName("Sigmara",false,false);
564  // angsigmarCmd1->SetUnitCandidates("rad deg");
565 
566  angsigmaxCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/sigma_x",this);
567  angsigmaxCmd1->SetGuidance("Set standard deviation in direction in x-direc. for 2D beam");
568  angsigmaxCmd1->SetParameterName("Sigmaxa",false,false);
570  // angsigmaxCmd1->SetUnitCandidates("rad deg");
571 
572  angsigmayCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ang/sigma_y",this);
573  angsigmayCmd1->SetGuidance("Set standard deviation in direction in y-direc. for 2D beam");
574  angsigmayCmd1->SetParameterName("Sigmaya",false,false);
576  // angsigmayCmd1->SetUnitCandidates("rad deg");
577 
578  angfocusCmd = new G4UIcmdWith3VectorAndUnit("/gps/ang/focuspoint",this);
579  angfocusCmd->SetGuidance("Set the focusing point for the beam");
580  angfocusCmd->SetParameterName("x","y","z",false,false);
582  // angfocusCmd->SetUnitCandidates("micron mm cm m km");
583 
584  useuserangaxisCmd1 = new G4UIcmdWithABool("/gps/ang/user_coor",this);
585  useuserangaxisCmd1->SetGuidance("true for using user defined angular co-ordinates");
586  useuserangaxisCmd1->SetGuidance("Default is false");
587  useuserangaxisCmd1->SetParameterName("useuserangaxis",true);
589 
590  surfnormCmd1 = new G4UIcmdWithABool("/gps/ang/surfnorm",this);
591  surfnormCmd1->SetGuidance("Makes a user-defined distribution with respect to surface normals rather than x,y,z axes.");
592  surfnormCmd1->SetGuidance("Default is false");
593  surfnormCmd1->SetParameterName("surfnorm",true);
595 
596  // old ones
597 // angtypeCmd = new G4UIcmdWithAString("/gps/angtype",this);
598 // angtypeCmd->SetGuidance("Sets angular source distribution type (obsolete!)");
599 // angtypeCmd->SetGuidance("Possible variables are: iso, cos planar beam1d beam2d or user");
600 // angtypeCmd->SetParameterName("AngDis",false,false);
601 // angtypeCmd->SetDefaultValue("iso");
602 // angtypeCmd->SetCandidates("iso cos planar beam1d beam2d user");
603 
604 // angrot1Cmd = new G4UIcmdWith3Vector("/gps/angrot1",this);
605 // angrot1Cmd->SetGuidance("Sets the x' vector for angular distribution(obsolete!) ");
606 // angrot1Cmd->SetGuidance("Need not be a unit vector");
607 // angrot1Cmd->SetParameterName("AR1x","AR1y","AR1z",false,false);
608 // angrot1Cmd->SetRange("AR1x != 0 || AR1y != 0 || AR1z != 0");
609 
610 // angrot2Cmd = new G4UIcmdWith3Vector("/gps/angrot2",this);
611 // angrot2Cmd->SetGuidance("Sets the y' vector for angular distribution (obsolete!)");
612 // angrot2Cmd->SetGuidance("Need not be a unit vector");
613 // angrot2Cmd->SetParameterName("AR2x","AR2y","AR2z",false,false);
614 // angrot2Cmd->SetRange("AR2x != 0 || AR2y != 0 || AR2z != 0");
615 
616 // minthetaCmd = new G4UIcmdWithADoubleAndUnit("/gps/mintheta",this);
617 // minthetaCmd->SetGuidance("Set minimum theta (obsolete!)");
618 // minthetaCmd->SetParameterName("MinTheta",false,false);
619 // minthetaCmd->SetDefaultUnit("rad");
620  // minthetaCmd->SetUnitCandidates("rad deg");
621 
622 // maxthetaCmd = new G4UIcmdWithADoubleAndUnit("/gps/maxtheta",this);
623 // maxthetaCmd->SetGuidance("Set maximum theta (obsolete!)");
624 // maxthetaCmd->SetParameterName("MaxTheta",false,false);
625 // maxthetaCmd->SetDefaultValue(3.1416);
626 // maxthetaCmd->SetDefaultUnit("rad");
627  // maxthetaCmd->SetUnitCandidates("rad deg");
628 
629 // minphiCmd = new G4UIcmdWithADoubleAndUnit("/gps/minphi",this);
630 // minphiCmd->SetGuidance("Set minimum phi (obsolete!)");
631 // minphiCmd->SetParameterName("MinPhi",false,false);
632 // minphiCmd->SetDefaultUnit("rad");
633  // minphiCmd->SetUnitCandidates("rad deg");
634 
635 // maxphiCmd = new G4UIcmdWithADoubleAndUnit("/gps/maxphi",this);
636 // maxphiCmd->SetGuidance("Set maximum phi(obsolete!)");
637 // maxphiCmd->SetParameterName("MaxPhi",false,false);
638 // maxphiCmd->SetDefaultUnit("rad");
639  // maxphiCmd->SetUnitCandidates("rad deg");
640 
641 // angsigmarCmd = new G4UIcmdWithADoubleAndUnit("/gps/sigmaangr",this);
642 // angsigmarCmd->SetGuidance("Set standard deviation of beam direction in radial(obsolete!).");
643 // angsigmarCmd->SetParameterName("Sigmara",false,false);
644 // angsigmarCmd->SetDefaultUnit("rad");
645  // angsigmarCmd->SetUnitCandidates("rad deg");
646 
647 // angsigmaxCmd = new G4UIcmdWithADoubleAndUnit("/gps/sigmaangx",this);
648 // angsigmaxCmd->SetGuidance("Set standard deviation of beam direction in x-direc(obsolete!).");
649 // angsigmaxCmd->SetParameterName("Sigmaxa",false,false);
650 // angsigmaxCmd->SetDefaultUnit("rad");
651  // angsigmaxCmd->SetUnitCandidates("rad deg");
652 
653 // angsigmayCmd = new G4UIcmdWithADoubleAndUnit("/gps/sigmaangy",this);
654 // angsigmayCmd->SetGuidance("Set standard deviation of beam direction in y-direc.(obsolete!)");
655 // angsigmayCmd->SetParameterName("Sigmaya",false,false);
656 // angsigmayCmd->SetDefaultUnit("rad");
657  // angsigmayCmd->SetUnitCandidates("rad deg");
658 
659 // useuserangaxisCmd = new G4UIcmdWithABool("/gps/useuserangaxis",this);
660 // useuserangaxisCmd->SetGuidance("true for using user defined angular co-ordinates(obsolete!)");
661 // useuserangaxisCmd->SetGuidance("Default is false");
662 // useuserangaxisCmd->SetParameterName("useuserangaxis",true);
663 // useuserangaxisCmd->SetDefaultValue(false);
664 
665 // surfnormCmd = new G4UIcmdWithABool("/gps/surfnorm",this);
666 // surfnormCmd->SetGuidance("Makes a user-defined distribution with respect to surface normals rather than x,y,z axes (obsolete!).");
667 // surfnormCmd->SetGuidance("Default is false");
668 // surfnormCmd->SetParameterName("surfnorm",true);
669 // surfnormCmd->SetDefaultValue(false);
670 
671  // Energy commands
672 
673  energyDirectory = new G4UIdirectory("/gps/ene/");
674  energyDirectory->SetGuidance("Spectral commands sub-directory");
675 
676  energytypeCmd1 = new G4UIcmdWithAString("/gps/ene/type",this);
677  energytypeCmd1->SetGuidance("Sets energy distribution type");
678  energytypeCmd1->SetParameterName("EnergyDis",false,false);
680  energytypeCmd1->SetCandidates("Mono Lin Pow Exp Gauss Brem Bbody Cdg User Arb Epn");
681 
682  eminCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ene/min",this);
683  eminCmd1->SetGuidance("Sets minimum energy");
684  eminCmd1->SetParameterName("emin",false,false);
685  eminCmd1->SetDefaultUnit("keV");
686  // eminCmd1->SetUnitCandidates("eV keV MeV GeV TeV PeV");
687 
688  emaxCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ene/max",this);
689  emaxCmd1->SetGuidance("Sets maximum energy");
690  emaxCmd1->SetParameterName("emax",false,false);
691  emaxCmd1->SetDefaultUnit("keV");
692  // emaxCmd1->SetUnitCandidates("eV keV MeV GeV TeV PeV");
693 
694  monoenergyCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ene/mono",this);
695  monoenergyCmd1->SetGuidance("Sets a monocromatic energy (same as gps/energy)");
696  monoenergyCmd1->SetParameterName("monoenergy",false,false);
698  // monoenergyCmd1->SetUnitCandidates("eV keV MeV GeV TeV PeV");
699 
700  engsigmaCmd1 = new G4UIcmdWithADoubleAndUnit("/gps/ene/sigma",this);
701  engsigmaCmd1->SetGuidance("Sets the standard deviation for Gaussian energy dist.");
702  engsigmaCmd1->SetParameterName("Sigmae",false,false);
704  // engsigmaCmd1->SetUnitCandidates("eV keV MeV GeV TeV PeV");
705 
706  alphaCmd1 = new G4UIcmdWithADouble("/gps/ene/alpha",this);
707  alphaCmd1->SetGuidance("Sets Alpha (index) for power-law energy dist.");
708  alphaCmd1->SetParameterName("alpha",false,false);
709 
710  tempCmd1 = new G4UIcmdWithADouble("/gps/ene/temp",this);
711  tempCmd1->SetGuidance("Sets the temperature for Brem and BBody distributions (in Kelvin)");
712  tempCmd1->SetParameterName("temp",false,false);
713 
714  ezeroCmd1 = new G4UIcmdWithADouble("/gps/ene/ezero",this);
715  ezeroCmd1->SetGuidance("Sets E_0 for exponential distribution (in MeV)");
716  ezeroCmd1->SetParameterName("ezero",false,false);
717 
718  gradientCmd1 = new G4UIcmdWithADouble("/gps/ene/gradient",this);
719  gradientCmd1->SetGuidance("Sets the gradient for Lin distribution (in 1/MeV)");
720  gradientCmd1->SetParameterName("gradient",false,false);
721 
722  interceptCmd1 = new G4UIcmdWithADouble("/gps/ene/intercept",this);
723  interceptCmd1->SetGuidance("Sets the intercept for Lin distributions (in MeV)");
724  interceptCmd1->SetParameterName("intercept",false,false);
725 
726  arbeintCmd1 = new G4UIcmdWithADouble("/gps/ene/biasAlpha",this);
727  arbeintCmd1->SetGuidance("Set the power-law index for the energy sampling distri. )");
728  arbeintCmd1->SetParameterName("arbeint",false,false);
729 
730  calculateCmd1 = new G4UIcmdWithoutParameter("/gps/ene/calculate",this);
731  calculateCmd1->SetGuidance("Calculates the distributions for Cdg and BBody");
732 
733  energyspecCmd1 = new G4UIcmdWithABool("/gps/ene/emspec",this);
734  energyspecCmd1->SetGuidance("True for energy and false for momentum spectra");
735  energyspecCmd1->SetParameterName("energyspec",true);
737 
738  diffspecCmd1 = new G4UIcmdWithABool("/gps/ene/diffspec",this);
739  diffspecCmd1->SetGuidance("True for differential and flase for integral spectra");
740  diffspecCmd1->SetParameterName("diffspec",true);
742 
743  //old ones
744 // energytypeCmd = new G4UIcmdWithAString("/gps/energytype",this);
745 // energytypeCmd->SetGuidance("Sets energy distribution type (obsolete!)");
746 // energytypeCmd->SetParameterName("EnergyDis",false,false);
747 // energytypeCmd->SetDefaultValue("Mono");
748 // energytypeCmd->SetCandidates("Mono Lin Pow Exp Gauss Brem Bbody Cdg User Arb Epn");
749 
750 // eminCmd = new G4UIcmdWithADoubleAndUnit("/gps/emin",this);
751 // eminCmd->SetGuidance("Sets Emin (obsolete!)");
752 // eminCmd->SetParameterName("emin",false,false);
753 // eminCmd->SetDefaultUnit("keV");
754  // eminCmd->SetUnitCandidates("eV keV MeV GeV TeV PeV");
755 
756 // emaxCmd = new G4UIcmdWithADoubleAndUnit("/gps/emax",this);
757 // emaxCmd->SetGuidance("Sets Emax (obsolete!)");
758 // emaxCmd->SetParameterName("emax",false,false);
759 // emaxCmd->SetDefaultUnit("keV");
760  // emaxCmd->SetUnitCandidates("eV keV MeV GeV TeV PeV");
761 
762 // monoenergyCmd = new G4UIcmdWithADoubleAndUnit("/gps/monoenergy",this);
763 // monoenergyCmd->SetGuidance("Sets Monoenergy (obsolete, use gps/energy instead!)");
764 // monoenergyCmd->SetParameterName("monoenergy",false,false);
765 // monoenergyCmd->SetDefaultUnit("keV");
766  // monoenergyCmd->SetUnitCandidates("eV keV MeV GeV TeV PeV");
767 
768 // engsigmaCmd = new G4UIcmdWithADoubleAndUnit("/gps/sigmae",this);
769 // engsigmaCmd->SetGuidance("Sets the standard deviation for Gaussian energy dist.(obsolete!)");
770 // engsigmaCmd->SetParameterName("Sigmae",false,false);
771 // engsigmaCmd->SetDefaultUnit("keV");
772  // engsigmaCmd->SetUnitCandidates("eV keV MeV GeV TeV PeV");
773 
774 // alphaCmd = new G4UIcmdWithADouble("/gps/alpha",this);
775 // alphaCmd->SetGuidance("Sets Alpha (index) for power-law energy dist(obsolete!).");
776 // alphaCmd->SetParameterName("alpha",false,false);
777 
778 // tempCmd = new G4UIcmdWithADouble("/gps/temp",this);
779 // tempCmd->SetGuidance("Sets the temperature for Brem and BBody (in Kelvin)(obsolete!)");
780 // tempCmd->SetParameterName("temp",false,false);
781 
782 // ezeroCmd = new G4UIcmdWithADouble("/gps/ezero",this);
783 // ezeroCmd->SetGuidance("Sets ezero exponential distributions (in MeV)(obsolete!)");
784 // ezeroCmd->SetParameterName("ezero",false,false);
785 //
786 // gradientCmd = new G4UIcmdWithADouble("/gps/gradient",this);
787 // gradientCmd->SetGuidance("Sets the gradient for Lin distributions (in 1/MeV)(obsolete!)");
788 // gradientCmd->SetParameterName("gradient",false,false);
789 //
790 // interceptCmd = new G4UIcmdWithADouble("/gps/intercept",this);
791 // interceptCmd->SetGuidance("Sets the intercept for Lin distributions (in MeV)(obsolete!)");
792 // interceptCmd->SetParameterName("intercept",false,false);
793 //
794 // calculateCmd = new G4UIcmdWithoutParameter("/gps/calculate",this);
795 // calculateCmd->SetGuidance("Calculates distributions for Cdg and BBody(obsolete!)");
796 //
797 // energyspecCmd = new G4UIcmdWithABool("/gps/energyspec",this);
798 // energyspecCmd->SetGuidance("True for energy and false for momentum spectra(obsolete!)");
799 // energyspecCmd->SetParameterName("energyspec",true);
800 // energyspecCmd->SetDefaultValue(true);
801 //
802 // diffspecCmd = new G4UIcmdWithABool("/gps/diffspec",this);
803 // diffspecCmd->SetGuidance("True for differential and flase for integral spectra(obsolete!)");
804 // diffspecCmd->SetParameterName("diffspec",true);
805 // diffspecCmd->SetDefaultValue(true);
806 
807  // Biasing + histograms in general
808  histDirectory = new G4UIdirectory("/gps/hist/");
809  histDirectory->SetGuidance("Histogram, biasing commands sub-directory");
810 
811  histnameCmd1 = new G4UIcmdWithAString("/gps/hist/type",this);
812  histnameCmd1->SetGuidance("Sets histogram type");
813  histnameCmd1->SetParameterName("HistType",false,false);
814  histnameCmd1->SetDefaultValue("biasx");
815  histnameCmd1->SetCandidates("biasx biasy biasz biast biasp biase biaspt biaspp theta phi energy arb epn");
816 
817  resethistCmd1 = new G4UIcmdWithAString("/gps/hist/reset",this);
818  resethistCmd1->SetGuidance("Reset (clean) the histogram ");
819  resethistCmd1->SetParameterName("HistType",false,false);
820  resethistCmd1->SetDefaultValue("energy");
821  resethistCmd1->SetCandidates("biasx biasy biasz biast biasp biase biaspt biaspp theta phi energy arb epn");
822 
823  histpointCmd1 = new G4UIcmdWith3Vector("/gps/hist/point",this);
824  histpointCmd1->SetGuidance("Allows user to define a histogram");
825  histpointCmd1->SetGuidance("Enter: Ehi Weight");
826  histpointCmd1->SetParameterName("Ehi","Weight","Junk",true,true);
827  histpointCmd1->SetRange("Ehi >= 0. && Weight >= 0.");
828 
829  histfileCmd1 = new G4UIcmdWithAString("/gps/hist/file",this);
830  histfileCmd1->SetGuidance("import the arb energy hist in an ASCII file");
831  histfileCmd1->SetParameterName("HistFile",false,false);
832 
833  arbintCmd1 = new G4UIcmdWithAString("/gps/hist/inter",this);
834  arbintCmd1->SetGuidance("Sets the interpolation method for arbitrary distribution.");
835  arbintCmd1->SetParameterName("int",false,false);
836  arbintCmd1->SetDefaultValue("Lin");
837  arbintCmd1->SetCandidates("Lin Log Exp Spline");
838 
839  // old ones
840 // histnameCmd = new G4UIcmdWithAString("/gps/histname",this);
841 // histnameCmd->SetGuidance("Sets histogram type (obsolete!)");
842 // histnameCmd->SetParameterName("HistType",false,false);
843 // histnameCmd->SetDefaultValue("biasx");
844 // histnameCmd->SetCandidates("biasx biasy biasz biast biasp biase biaspt biaspp theta phi energy arb epn");
845 //
846 // // re-set the histograms
847 // resethistCmd = new G4UIcmdWithAString("/gps/resethist",this);
848 // resethistCmd->SetGuidance("Re-Set the histogram (obsolete!)");
849 // resethistCmd->SetParameterName("HistType",false,false);
850 // resethistCmd->SetDefaultValue("energy");
851 // resethistCmd->SetCandidates("biasx biasy biasz biast biasp biase biaspt biaspp theta phi energy arb epn");
852 //
853 // histpointCmd = new G4UIcmdWith3Vector("/gps/histpoint",this);
854 // histpointCmd->SetGuidance("Allows user to define a histogram (obsolete!)");
855 // histpointCmd->SetGuidance("Enter: Ehi Weight");
856 // histpointCmd->SetParameterName("Ehi","Weight","Junk",false,false);
857 // histpointCmd->SetRange("Ehi >= 0. && Weight >= 0.");
858 //
859 // arbintCmd = new G4UIcmdWithAString("/gps/arbint",this);
860 // arbintCmd->SetGuidance("Sets Arbitrary Interpolation type.(obsolete!) ");
861 // arbintCmd->SetParameterName("int",false,false);
862 // arbintCmd->SetDefaultValue("NULL");
863 // arbintCmd->SetCandidates("Lin Log Exp Spline");
864 
865 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameter(G4UIparameter *const newParameter)
Definition: G4UIcommand.hh:152
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultUnit(const char *defUnit)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *theDefaultValue)
int G4int
Definition: G4Types.hh:78
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
bool G4bool
Definition: G4Types.hh:79
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
static const double pi
Definition: G4SIunits.hh:74
static G4ParticleTable * GetParticleTable()
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultUnit(const char *defUnit)
const G4String & GetParticleName(G4int index) const
void SetCandidates(const char *candidateList)
G4bool commandsShouldBeInMaster
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4int entries() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~G4GeneralParticleSourceMessenger()

G4GeneralParticleSourceMessenger::~G4GeneralParticleSourceMessenger ( )
private

Definition at line 867 of file G4GeneralParticleSourceMessenger.cc.

868 {
869  delete positionDirectory;
870 // delete typeCmd;
871 // delete shapeCmd;
872 // delete centreCmd;
873 // delete posrot1Cmd;
874 // delete posrot2Cmd;
875 // delete halfxCmd;
876 // delete halfyCmd;
877 // delete halfzCmd;
878 // delete radiusCmd;
879 // delete radius0Cmd;
880 // delete possigmarCmd;
881 // delete possigmaxCmd;
882 // delete possigmayCmd;
883 // delete paralpCmd;
884 // delete partheCmd;
885 // delete parphiCmd;
886 // delete confineCmd;
887  delete typeCmd1;
888  delete shapeCmd1;
889  delete centreCmd1;
890  delete posrot1Cmd1;
891  delete posrot2Cmd1;
892  delete halfxCmd1;
893  delete halfyCmd1;
894  delete halfzCmd1;
895  delete radiusCmd1;
896  delete radius0Cmd1;
897  delete possigmarCmd1;
898  delete possigmaxCmd1;
899  delete possigmayCmd1;
900  delete paralpCmd1;
901  delete partheCmd1;
902  delete parphiCmd1;
903  delete confineCmd1;
904 
905  delete angularDirectory;
906 // delete angtypeCmd;
907 // delete angrot1Cmd;
908 // delete angrot2Cmd;
909 // delete minthetaCmd;
910 // delete maxthetaCmd;
911 // delete minphiCmd;
912 // delete maxphiCmd;
913 // delete angsigmarCmd;
914 // delete angsigmaxCmd;
915 // delete angsigmayCmd;
916 // delete useuserangaxisCmd;
917 // delete surfnormCmd;
918  delete angtypeCmd1;
919  delete angrot1Cmd1;
920  delete angrot2Cmd1;
921  delete minthetaCmd1;
922  delete maxthetaCmd1;
923  delete minphiCmd1;
924  delete maxphiCmd1;
925  delete angsigmarCmd1;
926  delete angsigmaxCmd1;
927  delete angsigmayCmd1;
928  delete angfocusCmd;
929  delete useuserangaxisCmd1;
930  delete surfnormCmd1;
931 
932  delete energyDirectory;
933 // delete energytypeCmd;
934 // delete eminCmd;
935 // delete emaxCmd;
936 // delete monoenergyCmd;
937 // delete engsigmaCmd;
938 // delete alphaCmd;
939 // delete tempCmd;
940 // delete ezeroCmd;
941 // delete gradientCmd;
942 // delete interceptCmd;
943 // delete calculateCmd;
944 // delete energyspecCmd;
945 // delete diffspecCmd;
946  delete energytypeCmd1;
947  delete eminCmd1;
948  delete emaxCmd1;
949  delete monoenergyCmd1;
950  delete engsigmaCmd1;
951  delete alphaCmd1;
952  delete tempCmd1;
953  delete ezeroCmd1;
954  delete gradientCmd1;
955  delete interceptCmd1;
956  delete arbeintCmd1;
957  delete calculateCmd1;
958  delete energyspecCmd1;
959  delete diffspecCmd1;
960 
961  delete histDirectory;
962  //delete histnameCmd;
963  //delete resethistCmd;
964  //delete histpointCmd;
965  //delete arbintCmd;
966  delete histnameCmd1;
967  delete resethistCmd1;
968  delete histpointCmd1;
969  delete histfileCmd1;
970  delete arbintCmd1;
971 
972  delete verbosityCmd;
973  delete ionCmd;
974  delete ionLvlCmd;
975  delete particleCmd;
976  delete timeCmd;
977  delete polCmd;
978  delete numberCmd;
979  delete positionCmd;
980  delete directionCmd;
981  delete energyCmd;
982  delete listCmd;
983 
984  delete sourceDirectory;
985  delete addsourceCmd;
986  delete listsourceCmd;
987  delete clearsourceCmd;
988  delete getsourceCmd;
989  delete setsourceCmd;
990  delete setintensityCmd;
991  delete deletesourceCmd;
992  delete multiplevertexCmd;
993  delete flatsamplingCmd;
994 
995  delete gpsDirectory;
996  theInstance = 0;
997 }
Here is the caller graph for this function:

Member Function Documentation

◆ Destroy()

void G4GeneralParticleSourceMessenger::Destroy ( void  )
static

Definition at line 93 of file G4GeneralParticleSourceMessenger.cc.

93  {
94  G4AutoLock l(&creationM);
95  if ( theInstance != 0 ) {
96  delete theInstance;
97  theInstance = 0;
98  }
99 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCurrentValue()

G4String G4GeneralParticleSourceMessenger::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 1723 of file G4GeneralParticleSourceMessenger.cc.

1724 {
1725  G4String cv;
1726 
1727  // if( command==directionCmd )
1728  // { cv = directionCmd->ConvertToString(fParticleGun->GetParticleMomentumDirection()); }
1729  // else if( command==energyCmd )
1730  // { cv = energyCmd->ConvertToString(fParticleGun->GetParticleEnergy(),"GeV"); }
1731  // else if( command==positionCmd )
1732  // { cv = positionCmd->ConvertToString(fParticleGun->GetParticlePosition(),"cm"); }
1733  // else if( command==timeCmd )
1734  // { cv = timeCmd->ConvertToString(fParticleGun->GetParticleTime(),"ns"); }
1735  // else if( command==polCmd )
1736  // { cv = polCmd->ConvertToString(fParticleGun->GetParticlePolarization()); }
1737  // else if( command==numberCmd )
1738  // { cv = numberCmd->ConvertToString(fParticleGun->GetNumberOfParticles()); }
1739 
1740  cv = "Not implemented yet";
1741 
1742  return cv;
1743 }
Here is the caller graph for this function:

◆ GetInstance()

G4GeneralParticleSourceMessenger * G4GeneralParticleSourceMessenger::GetInstance ( G4GeneralParticleSource psc)
static

Definition at line 86 of file G4GeneralParticleSourceMessenger.cc.

87 {
88  G4AutoLock l(&creationM);
89  if ( theInstance == 0 ) theInstance = new G4GeneralParticleSourceMessenger(psc);
90  return theInstance;
91 }
G4GeneralParticleSourceMessenger(G4GeneralParticleSource *)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IonCommand()

void G4GeneralParticleSourceMessenger::IonCommand ( G4String  newValues)
private

Definition at line 1745 of file G4GeneralParticleSourceMessenger.cc.

1746 {
1747  fShootIon = true;
1748 
1749  if (fShootIon)
1750  {
1751  G4Tokenizer next( newValues );
1752  // check argument
1753  fAtomicNumber = StoI(next());
1754  fAtomicMass = StoI(next());
1755  G4String sQ = next();
1756  if (sQ.isNull())
1757  {
1759  }
1760  else
1761  {
1762  fIonCharge = StoI(sQ);
1763  sQ = next();
1764  if (sQ.isNull())
1765  {
1766  fIonExciteEnergy = 0.0;
1767  }
1768  else
1769  {
1770  fIonExciteEnergy = StoD(sQ) * keV;
1771  }
1772  }
1775  if (ion==0)
1776  {
1777  G4cout << "Ion with Z=" << fAtomicNumber;
1778  G4cout << " A=" << fAtomicMass << " is not defined" << G4endl;
1779  }
1780  else
1781  {
1784  }
1785  }
1786  else
1787  {
1788  G4cout << "Set /gps/particle to ion before using /gps/ion command";
1789  G4cout << G4endl;
1790  }
1791 }
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:491
G4GLOB_DLL std::ostream G4cout
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4int StoI(G4String s)
static G4IonTable * GetIonTable()
Definition: G4IonTable.hh:78
G4double StoD(G4String s)
#define G4endl
Definition: G4ios.hh:61
static const double keV
Definition: G4SIunits.hh:213
void SetParticleCharge(G4double aCharge)
static const double eplus
Definition: G4SIunits.hh:196
G4bool isNull() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IonLvlCommand()

void G4GeneralParticleSourceMessenger::IonLvlCommand ( G4String  newValues)
private

Definition at line 1793 of file G4GeneralParticleSourceMessenger.cc.

1794 {
1795  fShootIonL = true;
1796 
1797  if (fShootIonL) {
1798  G4Tokenizer next(newValues);
1799  // check argument
1800  fAtomicNumberL = StoI(next());
1801  fAtomicMassL = StoI(next());
1802  G4String sQ = next();
1803  if (sQ.isNull()) {
1805  } else {
1806  fIonChargeL = StoI(sQ);
1807  sQ = next();
1808  if (sQ.isNull()) {
1809  fIonEnergyLevel = 0;
1810  } else {
1811  fIonEnergyLevel = StoI(sQ);
1812  }
1813  }
1814 
1817  if (ion == 0) {
1818  G4cout << "Ion with Z=" << fAtomicNumberL;
1819  G4cout << " A=" << fAtomicMassL << " is not defined" << G4endl;
1820  } else {
1823  }
1824 
1825  } else {
1826  G4cout << "Set /gps/particle to ion before using /gps/ionLvl command";
1827  G4cout << G4endl;
1828  }
1829 }
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:491
G4GLOB_DLL std::ostream G4cout
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4int StoI(G4String s)
static G4IonTable * GetIonTable()
Definition: G4IonTable.hh:78
#define G4endl
Definition: G4ios.hh:61
void SetParticleCharge(G4double aCharge)
static const double eplus
Definition: G4SIunits.hh:196
G4bool isNull() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetNewValue()

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

Reimplemented from G4UImessenger.

Definition at line 1008 of file G4GeneralParticleSourceMessenger.cc.

1009 {
1010 // if(command == typeCmd)
1011 // {
1012 // CHECKPG(); fParticleGun->GetPosDist()->SetPosDisType(newValues);
1013 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1014 // << " The command is obsolete and will be removed soon." << G4endl
1015 // << " Please try to use the new structured commands!" << G4endl;
1016 // }
1017 // else if(command == shapeCmd)
1018 // {
1019 // CHECKPG(); fParticleGun->GetPosDist()->SetPosDisShape(newValues);
1020 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1021 // << " The command is obsolete and will be removed soon." << G4endl
1022 // << " Please try to use the new structured commands!" << G4endl;
1023 // }
1024 // else if(command == centreCmd)
1025 // {
1026 // CHECKPG(); fParticleGun->GetPosDist()->SetCentreCoords(centreCmd->GetNew3VectorValue(newValues));
1027 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1028 // << " The command is obsolete and will be removed soon." << G4endl
1029 // << " Please try to use the new structured commands!" << G4endl;
1030 // }
1031 // else if(command == posrot1Cmd)
1032 // {
1033 // CHECKPG(); fParticleGun->GetPosDist()->SetPosRot1(posrot1Cmd->GetNew3VectorValue(newValues));
1034 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1035 // << " The command is obsolete and will be removed soon." << G4endl
1036 // << " Please try to use the new structured commands!" << G4endl;
1037 // }
1038 // else if(command == posrot2Cmd)
1039 // {
1040 // CHECKPG(); fParticleGun->GetPosDist()->SetPosRot2(posrot2Cmd->GetNew3VectorValue(newValues));
1041 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1042 // << " The command is obsolete and will be removed soon." << G4endl
1043 // << " Please try to use the new structured commands!" << G4endl;
1044 // }
1045 // else if(command == halfxCmd)
1046 // {
1047 // CHECKPG(); fParticleGun->GetPosDist()->SetHalfX(halfxCmd->GetNewDoubleValue(newValues));
1048 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1049 // << " The command is obsolete and will be removed soon." << G4endl
1050 // << " Please try to use the new structured commands!" << G4endl;
1051 // }
1052 // else if(command == halfyCmd)
1053 // {
1054 // CHECKPG(); fParticleGun->GetPosDist()->SetHalfY(halfyCmd->GetNewDoubleValue(newValues));
1055 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1056 // << " The command is obsolete and will be removed soon." << G4endl
1057 // << " Please try to use the new structured commands!" << G4endl;
1058 // }
1059 // else if(command == halfzCmd)
1060 // {
1061 // CHECKPG(); fParticleGun->GetPosDist()->SetHalfZ(halfzCmd->GetNewDoubleValue(newValues));
1062 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1063 // << " The command is obsolete and will be removed soon." << G4endl
1064 // << " Please try to use the new structured commands!" << G4endl;
1065 // }
1066 // else if(command == radiusCmd)
1067 // {
1068 // CHECKPG(); fParticleGun->GetPosDist()->SetRadius(radiusCmd->GetNewDoubleValue(newValues));
1069 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1070 // << " The command is obsolete and will be removed soon." << G4endl
1071 // << " Please try to use the new structured commands!" << G4endl;
1072 // }
1073 // else if(command == radius0Cmd)
1074 // {
1075 // CHECKPG(); fParticleGun->GetPosDist()->SetRadius0(radius0Cmd->GetNewDoubleValue(newValues));
1076 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1077 // << " The command is obsolete and will be removed soon." << G4endl
1078 // << " Please try to use the new structured commands!" << G4endl;
1079 // }
1080 // else if(command == possigmarCmd)
1081 // {
1082 // CHECKPG(); fParticleGun->GetPosDist()->SetBeamSigmaInR(possigmarCmd->GetNewDoubleValue(newValues));
1083 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1084 // << " The command is obsolete and will be removed soon." << G4endl
1085 // << " Please try to use the new structured commands!" << G4endl;
1086 // }
1087 // else if(command == possigmaxCmd)
1088 // {
1089 // CHECKPG(); fParticleGun->GetPosDist()->SetBeamSigmaInX(possigmaxCmd->GetNewDoubleValue(newValues));
1090 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1091 // << " The command is obsolete and will be removed soon." << G4endl
1092 // << " Please try to use the new structured commands!" << G4endl;
1093 // }
1094 // else if(command == possigmayCmd)
1095 // {
1096 // CHECKPG(); fParticleGun->GetPosDist()->SetBeamSigmaInY(possigmayCmd->GetNewDoubleValue(newValues));
1097 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1098 // << " The command is obsolete and will be removed soon." << G4endl
1099 // << " Please try to use the new structured commands!" << G4endl;
1100 // }
1101 // else if(command == paralpCmd)
1102 // {
1103 // CHECKPG(); fParticleGun->GetPosDist()->SetParAlpha(paralpCmd->GetNewDoubleValue(newValues));
1104 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1105 // << " The command is obsolete and will be removed soon." << G4endl
1106 // << " Please try to use the new structured commands!" << G4endl;
1107 // }
1108 // else if(command == partheCmd)
1109 // {
1110 // CHECKPG(); fParticleGun->GetPosDist()->SetParTheta(partheCmd->GetNewDoubleValue(newValues));
1111 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1112 // << " The command is obsolete and will be removed soon." << G4endl
1113 // << " Please try to use the new structured commands!" << G4endl;
1114 // }
1115 // else if(command == parphiCmd)
1116 // {
1117 // CHECKPG(); fParticleGun->GetPosDist()->SetParPhi(parphiCmd->GetNewDoubleValue(newValues));
1118 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1119 // << " The command is obsolete and will be removed soon." << G4endl
1120 // << " Please try to use the new structured commands!" << G4endl;
1121 // }
1122 // else if(command == confineCmd)
1123 // {
1124 // CHECKPG(); fParticleGun->GetPosDist()->ConfineSourceToVolume(newValues);
1125 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1126 // << " The command is obsolete and will be removed soon." << G4endl
1127 // << " Please try to use the new structured commands!" << G4endl;
1128 // }
1129 // else if(command == angtypeCmd)
1130 // {
1131 // CHECKPG(); fParticleGun->GetAngDist()->SetAngDistType(newValues);
1132 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1133 // << " The command is obsolete and will be removed soon." << G4endl
1134 // << " Please try to use the new structured commands!" << G4endl;
1135 // }
1136 // else if(command == angrot1Cmd)
1137 // {
1138 // CHECKPG();
1139 // G4String a = "angref1";
1140 // fParticleGun->GetAngDist()->DefineAngRefAxes(a,angrot1Cmd->GetNew3VectorValue(newValues));
1141 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1142 // << " The command is obsolete and will be removed soon." << G4endl
1143 // << " Please try to use the new structured commands!" << G4endl;
1144 // }
1145 // else if(command == angrot2Cmd)
1146 // {
1147 // CHECKPG();
1148 // G4String a = "angref2";
1149 // fParticleGun->GetAngDist()->DefineAngRefAxes(a,angrot2Cmd->GetNew3VectorValue(newValues));
1150 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1151 // << " The command is obsolete and will be removed soon." << G4endl
1152 // << " Please try to use the new structured commands!" << G4endl;
1153 // }
1154 // else if(command == minthetaCmd)
1155 // {
1156 // CHECKPG(); fParticleGun->GetAngDist()->SetMinTheta(minthetaCmd->GetNewDoubleValue(newValues));
1157 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1158 // << " The command is obsolete and will be removed soon." << G4endl
1159 // << " Please try to use the new structured commands!" << G4endl;
1160 // }
1161 // else if(command == minphiCmd)
1162 // {
1163 // CHECKPG(); fParticleGun->GetAngDist()->SetMinPhi(minphiCmd->GetNewDoubleValue(newValues));
1164 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1165 // << " The command is obsolete and will be removed soon." << G4endl
1166 // << " Please try to use the new structured commands!" << G4endl;
1167 // }
1168 // else if(command == maxthetaCmd)
1169 // {
1170 // CHECKPG(); fParticleGun->GetAngDist()->SetMaxTheta(maxthetaCmd->GetNewDoubleValue(newValues));
1171 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1172 // << " The command is obsolete and will be removed soon." << G4endl
1173 // << " Please try to use the new structured commands!" << G4endl;
1174 // }
1175 // else if(command == maxphiCmd)
1176 // {
1177 // CHECKPG(); fParticleGun->GetAngDist()->SetMaxPhi(maxphiCmd->GetNewDoubleValue(newValues));
1178 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1179 // << " The command is obsolete and will be removed soon." << G4endl
1180 // << " Please try to use the new structured commands!" << G4endl;
1181 // }
1182 // else if(command == angsigmarCmd)
1183 // {
1184 // CHECKPG(); fParticleGun->GetAngDist()->SetBeamSigmaInAngR(angsigmarCmd->GetNewDoubleValue(newValues));
1185 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1186 // << " The command is obsolete and will be removed soon." << G4endl
1187 // << " Please try to use the new structured commands!" << G4endl;
1188 // }
1189 // else if(command == angsigmaxCmd)
1190 // {
1191 // CHECKPG(); fParticleGun->GetAngDist()->SetBeamSigmaInAngX(angsigmaxCmd->GetNewDoubleValue(newValues));
1192 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1193 // << " The command is obsolete and will be removed soon." << G4endl
1194 // << " Please try to use the new structured commands!" << G4endl;
1195 // }
1196 // else if(command == angsigmayCmd)
1197 // {
1198 // CHECKPG(); fParticleGun->GetAngDist()->SetBeamSigmaInAngY(angsigmayCmd->GetNewDoubleValue(newValues));
1199 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1200 // << " The command is obsolete and will be removed soon." << G4endl
1201 // << " Please try to use the new structured commands!" << G4endl;
1202 // }
1203 // else if(command == useuserangaxisCmd)
1204 // {
1205 // CHECKPG(); fParticleGun->GetAngDist()->SetUseUserAngAxis(useuserangaxisCmd->GetNewBoolValue(newValues));
1206 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1207 // << " The command is obsolete and will be removed soon." << G4endl
1208 // << " Please try to use the new structured commands!" << G4endl;
1209 // }
1210 // else if(command == surfnormCmd)
1211 // {
1212 // CHECKPG(); fParticleGun->GetAngDist()->SetUserWRTSurface(surfnormCmd->GetNewBoolValue(newValues));
1213 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1214 // << " The command is obsolete and will be removed soon." << G4endl
1215 // << " Please try to use the new structured commands!" << G4endl;
1216 // }
1217 // else if(command == energytypeCmd)
1218 // {
1219 // CHECKPG(); fParticleGun->GetEneDist()->SetEnergyDisType(newValues);
1220 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1221 // << " The command is obsolete and will be removed soon." << G4endl
1222 // << " Please try to use the new structured commands!" << G4endl;
1223 // }
1224 // else if(command == eminCmd)
1225 // {
1226 // CHECKPG(); fParticleGun->GetEneDist()->SetEmin(eminCmd->GetNewDoubleValue(newValues));
1227 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1228 // << " The command is obsolete and will be removed soon." << G4endl
1229 // << " Please try to use the new structured commands!" << G4endl;
1230 // }
1231 // else if(command == emaxCmd)
1232 // {
1233 // CHECKPG(); fParticleGun->GetEneDist()->SetEmax(emaxCmd->GetNewDoubleValue(newValues));
1234 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1235 // << " The command is obsolete and will be removed soon." << G4endl
1236 // << " Please try to use the new structured commands!" << G4endl;
1237 // }
1238 // else if(command == monoenergyCmd)
1239 // {
1240 // CHECKPG(); fParticleGun->GetEneDist()->SetMonoEnergy(monoenergyCmd->GetNewDoubleValue(newValues));
1241 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1242 // << " The command is obsolete and will be removed soon." << G4endl
1243 // << " Please try to use the new structured commands!" << G4endl;
1244 // }
1245 // else if(command == engsigmaCmd)
1246 // {
1247 // CHECKPG(); fParticleGun->GetEneDist()->SetBeamSigmaInE(engsigmaCmd->GetNewDoubleValue(newValues));
1248 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1249 // << " The command is obsolete and will be removed soon." << G4endl
1250 // << " Please try to use the new structured commands!" << G4endl;
1251 // }
1252 // else if(command == alphaCmd)
1253 // {
1254 // CHECKPG(); fParticleGun->GetEneDist()->SetAlpha(alphaCmd->GetNewDoubleValue(newValues));
1255 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1256 // << " The command is obsolete and will be removed soon." << G4endl
1257 // << " Please try to use the new structured commands!" << G4endl;
1258 // }
1259 // else if(command == tempCmd)
1260 // {
1261 // CHECKPG(); fParticleGun->GetEneDist()->SetTemp(tempCmd->GetNewDoubleValue(newValues));
1262 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1263 // << " The command is obsolete and will be removed soon." << G4endl
1264 // << " Please try to use the new structured commands!" << G4endl;
1265 // }
1266 // else if(command == ezeroCmd)
1267 // {
1268 // CHECKPG(); fParticleGun->GetEneDist()->SetEzero(ezeroCmd->GetNewDoubleValue(newValues));
1269 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1270 // << " The command is obsolete and will be removed soon." << G4endl
1271 // << " Please try to use the new structured commands!" << G4endl;
1272 // }
1273 // else if(command == gradientCmd)
1274 // {
1275 // CHECKPG(); fParticleGun->GetEneDist()->SetGradient(gradientCmd->GetNewDoubleValue(newValues));
1276 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1277 // << " The command is obsolete and will be removed soon." << G4endl
1278 // << " Please try to use the new structured commands!" << G4endl;
1279 // }
1280 // else if(command == interceptCmd)
1281 // {
1282 // CHECKPG(); fParticleGun->GetEneDist()->SetInterCept(interceptCmd->GetNewDoubleValue(newValues));
1283 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1284 // << " The command is obsolete and will be removed soon." << G4endl
1285 // << " Please try to use the new structured commands!" << G4endl;
1286 // }
1287 // else if(command == calculateCmd)
1288 // {
1289 // CHECKPG(); fParticleGun->GetEneDist()->Calculate();
1290 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1291 // << " The command is obsolete and will be removed soon." << G4endl
1292 // << " Please try to use the new structured commands!" << G4endl;
1293 // }
1294 // else if(command == energyspecCmd)
1295 // {
1296 // CHECKPG(); fParticleGun->GetEneDist()->InputEnergySpectra(energyspecCmd->GetNewBoolValue(newValues));
1297 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1298 // << " The command is obsolete and will be removed soon." << G4endl
1299 // << " Please try to use the new structured commands!" << G4endl;
1300 // }
1301 // else if(command == diffspecCmd)
1302 // {
1303 // CHECKPG(); fParticleGun->GetEneDist()->InputDifferentialSpectra(diffspecCmd->GetNewBoolValue(newValues));
1304 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1305 // << " The command is obsolete and will be removed soon." << G4endl
1306 // << " Please try to use the new structured commands!" << G4endl;
1307 // }
1308 // else if(command == histnameCmd)
1309 // {
1310 // histtype = newValues;
1311 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1312 // << " The command is obsolete and will be removed soon." << G4endl
1313 // << " Please try to use the new structured commands!" << G4endl;
1314 // }
1315 // else
1316 // if(command == histpointCmd)
1317 // {
1318 // CHECKPG();
1319 // if(histtype == "biasx")
1320 // fParticleGun->GetBiasRndm()->SetXBias(histpointCmd->GetNew3VectorValue(newValues));
1321 // if(histtype == "biasy")
1322 // fParticleGun->GetBiasRndm()->SetYBias(histpointCmd->GetNew3VectorValue(newValues));
1323 // if(histtype == "biasz")
1324 // fParticleGun->GetBiasRndm()->SetZBias(histpointCmd->GetNew3VectorValue(newValues));
1325 // if(histtype == "biast")
1326 // fParticleGun->GetBiasRndm()->SetThetaBias(histpointCmd->GetNew3VectorValue(newValues));
1327 // if(histtype == "biasp")
1328 // fParticleGun->GetBiasRndm()->SetPhiBias(histpointCmd->GetNew3VectorValue(newValues));
1329 // if(histtype == "biase")
1330 // fParticleGun->GetBiasRndm()->SetEnergyBias(histpointCmd->GetNew3VectorValue(newValues));
1331 // if(histtype == "theta")
1332 // fParticleGun->GetAngDist()->UserDefAngTheta(histpointCmd->GetNew3VectorValue(newValues));
1333 // if(histtype == "phi")
1334 // fParticleGun->GetAngDist()->UserDefAngPhi(histpointCmd->GetNew3VectorValue(newValues));
1335 // if(histtype == "energy")
1336 // fParticleGun->GetEneDist()->UserEnergyHisto(histpointCmd->GetNew3VectorValue(newValues));
1337 // if(histtype == "arb")
1338 // fParticleGun->GetEneDist()->ArbEnergyHisto(histpointCmd->GetNew3VectorValue(newValues));
1339 // if(histtype == "epn")
1340 // fParticleGun->GetEneDist()->EpnEnergyHisto(histpointCmd->GetNew3VectorValue(newValues));
1341 // G4cout << " G4GeneralParticleSourceMessenger - Warning: The command is obsolete and will be removed soon. Please try to use the new structured commands!" << G4endl;
1342 // }
1343 // else if(command == resethistCmd)
1344 // {
1345 // CHECKPG();
1346 // if(newValues == "theta" || newValues == "phi") {
1347 // fParticleGun->GetAngDist()->ReSetHist(newValues);
1348 // } else if (newValues == "energy" || newValues == "arb" || newValues == "epn") {
1349 // fParticleGun->GetEneDist()->ReSetHist(newValues);
1350 // } else {
1351 // fParticleGun->GetBiasRndm()->ReSetHist(newValues);
1352 // }
1353 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1354 // << " The command is obsolete and will be removed soon." << G4endl
1355 // << " Please try to use the new structured commands!" << G4endl;
1356 // }
1357 // else if(command == arbintCmd)
1358 // {
1359 // CHECKPG();
1360 // fParticleGun->GetEneDist()->ArbInterpolate(newValues);
1361 // G4cout << " G4GeneralParticleSourceMessenger - Warning:" << G4endl
1362 // << " The command is obsolete and will be removed soon." << G4endl
1363 // << " Please try to use the new structured commands!" << G4endl;
1364 // }
1365 // else
1366  if( command==directionCmd )
1367  {
1368  CHECKPG();
1369  fParticleGun->GetAngDist()->SetAngDistType("planar");
1371  }
1372  else if( command==energyCmd )
1373  {
1374  CHECKPG();
1377  }
1378  else if( command==positionCmd )
1379  {
1380  CHECKPG();
1381  fParticleGun->GetPosDist()->SetPosDisType("Point");
1383  }
1384  else if(command == verbosityCmd)
1385  {
1387  //CHECKPG();
1388  //fParticleGun->SetVerbosity(verbosityCmd->GetNewIntValue(newValues));
1389  }
1390  else if( command==particleCmd )
1391  {
1392  if (newValues =="ion") {
1393  fShootIon = true;
1394  } else {
1395  fShootIon = false;
1397  if(pd != NULL)
1399  }
1400  }
1401  else if( command==timeCmd )
1403  else if( command==polCmd )
1405  else if( command==numberCmd )
1407  else if( command==ionCmd )
1408  { IonCommand(newValues); }
1409  else if( command==ionLvlCmd )
1410  { IonLvlCommand(newValues); }
1411  else if( command==listCmd ){
1413  }
1414  else if( command==addsourceCmd )
1415  {
1417  }
1418  else if( command==listsourceCmd )
1419  {
1420  fGPS->ListSource();
1421  }
1422  else if( command==clearsourceCmd )
1423  {
1424  fGPS->ClearAll();
1425  fParticleGun = 0;
1426  }
1427  else if( command==getsourceCmd )
1428  {
1429  G4cout << " Current source index:" << fGPS->GetCurrentSourceIndex()
1430  << " ; Intensity:" << fGPS->GetCurrentSourceIntensity() << G4endl;
1431  }
1432  else if( command==setsourceCmd )
1433  {
1434  //NOTE: This will also sets fParticleGun to the courrent source
1435  // Not very clean, the GPS::SetCurrentSourceto will call:
1436  // this::SetParticleSource( G4ParticleSource* )
1437  // The point is that GPS has no public API to get a source by
1438  // index
1439  //TODO: Can we add this API?
1440  const G4int sn = setsourceCmd->GetNewIntValue(newValues);
1441  if ( sn >= fGPS->GetNumberofSource() )
1442  {
1444  msg << "Using command "<<setsourceCmd->GetCommandPath()<<"/"<<setsourceCmd->GetCommandName()<<" "<<sn;
1445  msg << " is invalid "<<fGPS->GetNumberofSource()<<" source(s) are defined.";
1446  G4Exception("G4GeneralParticleSourceMessenger::SetNewValue","G4GPS005",FatalException,msg);
1447  }
1449 
1450  }
1451  else if( command==setintensityCmd )
1452  {
1454  }
1455  else if( command==deletesourceCmd )
1456  {
1458  }
1459  else if(command == multiplevertexCmd)
1460  {
1462  }
1463  else if(command == flatsamplingCmd)
1464  {
1466  }
1467  //
1468  // new implementations
1469  //
1470  //
1471  else if(command == typeCmd1)
1472  {
1473  CHECKPG();
1474  fParticleGun->GetPosDist()->SetPosDisType(newValues);
1475  }
1476  else if(command == shapeCmd1)
1477  {
1478  CHECKPG();
1479  fParticleGun->GetPosDist()->SetPosDisShape(newValues);
1480  }
1481  else if(command == centreCmd1)
1482  {
1483  CHECKPG();
1485  }
1486  else if(command == posrot1Cmd1)
1487  {
1488  CHECKPG();
1490  }
1491  else if(command == posrot2Cmd1)
1492  {
1493  CHECKPG();
1495  }
1496  else if(command == halfxCmd1)
1497  {
1498  CHECKPG();
1500  }
1501  else if(command == halfyCmd1)
1502  {
1503  CHECKPG();
1505  }
1506  else if(command == halfzCmd1)
1507  {
1508  CHECKPG();
1510  }
1511  else if(command == radiusCmd1)
1512  {
1513  CHECKPG();
1515  }
1516  else if(command == radius0Cmd1)
1517  {
1518  CHECKPG();
1520  }
1521  else if(command == possigmarCmd1)
1522  {
1523  CHECKPG();
1525  }
1526  else if(command == possigmaxCmd1)
1527  {
1529  }
1530  else if(command == possigmayCmd1)
1531  {
1533  }
1534  else if(command == paralpCmd1)
1535  {
1537  }
1538  else if(command == partheCmd1)
1539  {
1541  }
1542  else if(command == parphiCmd1)
1543  {
1545  }
1546  else if(command == confineCmd1)
1547  {
1549  }
1550  else if(command == angtypeCmd1)
1551  {
1552  CHECKPG(); fParticleGun->GetAngDist()->SetAngDistType(newValues);
1553  }
1554  else if(command == angrot1Cmd1)
1555  {
1556  CHECKPG();
1557  G4String a = "angref1";
1559  }
1560  else if(command == angrot2Cmd1)
1561  {
1562  CHECKPG();
1563  G4String a = "angref2";
1565  }
1566  else if(command == minthetaCmd1)
1567  {
1568  CHECKPG();
1570  }
1571  else if(command == minphiCmd1)
1572  {
1574  }
1575  else if(command == maxthetaCmd1)
1576  {
1578  }
1579  else if(command == maxphiCmd1)
1580  {
1582  }
1583  else if(command == angsigmarCmd1)
1584  {
1586  }
1587  else if(command == angsigmaxCmd1)
1588  {
1590  }
1591  else if(command == angsigmayCmd1)
1592  {
1594  }
1595  else if(command == angfocusCmd)
1596  {
1598  }
1599  else if(command == useuserangaxisCmd1)
1600  {
1602  }
1603  else if(command == surfnormCmd1)
1604  {
1606  }
1607  else if(command == energytypeCmd1)
1608  {
1609  CHECKPG(); fParticleGun->GetEneDist()->SetEnergyDisType(newValues);
1610  }
1611  else if(command == eminCmd1)
1612  {
1614  }
1615  else if(command == emaxCmd1)
1616  {
1618  }
1619  else if(command == monoenergyCmd1)
1620  {
1622  }
1623  else if(command == engsigmaCmd1)
1624  {
1626  }
1627  else if(command == alphaCmd1)
1628  {
1630  }
1631  else if(command == tempCmd1)
1632  {
1634  }
1635  else if(command == ezeroCmd1)
1636  {
1638  }
1639  else if(command == gradientCmd1)
1640  {
1642  }
1643  else if(command == interceptCmd1)
1644  {
1646  }
1647  else if(command == arbeintCmd1)
1648  {
1650  }
1651  else if(command == calculateCmd1)
1652  {
1654  }
1655  else if(command == energyspecCmd1)
1656  {
1658  }
1659  else if(command == diffspecCmd1)
1660  {
1662  }
1663  else if(command == histnameCmd1)
1664  {
1665  histtype = newValues;
1666  }
1667  else if(command == histfileCmd1)
1668  {
1669  histtype = "arb";
1671  }
1672  else if(command == histpointCmd1)
1673  {
1674  CHECKPG();
1675  if(histtype == "biasx")
1677  if(histtype == "biasy")
1679  if(histtype == "biasz")
1681  if(histtype == "biast")
1683  if(histtype == "biasp")
1685  if(histtype == "biaspt")
1687  if(histtype == "biaspp")
1689  if(histtype == "biase")
1691  if(histtype == "theta")
1693  if(histtype == "phi")
1695  if(histtype == "energy")
1697  if(histtype == "arb")
1699  if(histtype == "epn")
1701  }
1702  else if(command == resethistCmd1)
1703  {
1704  CHECKPG();
1705  if(newValues == "theta" || newValues == "phi") {
1706  fParticleGun->GetAngDist()->ReSetHist(newValues);
1707  } else if (newValues == "energy" || newValues == "arb" || newValues == "epn") {
1708  fParticleGun->GetEneDist()->ReSetHist(newValues);
1709  } else {
1710  fParticleGun->GetBiasRndm()->ReSetHist(newValues);
1711  }
1712  }
1713  else if(command == arbintCmd1)
1714  {
1715  CHECKPG(); fParticleGun->GetEneDist()->ArbInterpolate(newValues);
1716  }
1717  else
1718  {
1719  G4cout << "Error entering command" << G4endl;
1720  }
1721 }
G4SPSPosDistribution * GetPosDist() const
G4SPSRandomGenerator * GetBiasRndm() const
void SetParticleTime(G4double aTime)
const G4String & GetCommandName() const
Definition: G4UIcommand.hh:141
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void DumpTable(const G4String &particle_name="ALL")
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void ArbEnergyHisto(G4ThreeVector)
static G4int GetNewIntValue(const char *paramString)
void SetBeamSigmaInAngR(G4double)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
G4double GetCurrentSourceIntensity() const
void SetBeamSigmaInAngY(G4double)
void SetEnergyBias(G4ThreeVector)
void SetYBias(G4ThreeVector)
G4SPSEneDistribution * GetEneDist() const
static G4double GetNewDoubleValue(const char *paramString)
int G4int
Definition: G4Types.hh:78
void SetPosThetaBias(G4ThreeVector)
static G4bool GetNewBoolValue(const char *paramString)
void SetThetaBias(G4ThreeVector)
void SetZBias(G4ThreeVector)
void SetXBias(G4ThreeVector)
void UserDefAngPhi(G4ThreeVector)
void UserDefAngTheta(G4ThreeVector)
G4GLOB_DLL std::ostream G4cout
void SetCentreCoords(G4ThreeVector)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
G4SPSAngDistribution * GetAngDist() const
static G4double GetNewDoubleValue(const char *paramString)
void DefineAngRefAxes(G4String, G4ThreeVector)
void SetParticlePolarization(G4ThreeVector aVal)
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
void SetPosRot1(G4ThreeVector)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
void EpnEnergyHisto(G4ThreeVector)
void SetPhiBias(G4ThreeVector)
void UserEnergyHisto(G4ThreeVector)
void SetPosRot2(G4ThreeVector)
void InputDifferentialSpectra(G4bool)
void SetFocusPoint(G4ThreeVector)
const G4String & GetCommandPath() const
Definition: G4UIcommand.hh:139
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
#define G4endl
Definition: G4ios.hh:61
void ArbEnergyHistoFile(G4String)
void ConfineSourceToVolume(G4String)
void SetPosPhiBias(G4ThreeVector)
void SetBeamSigmaInAngX(G4double)
Here is the caller graph for this function:

◆ SetParticleGun()

void G4GeneralParticleSourceMessenger::SetParticleGun ( G4SingleParticleSource fpg)
inline

Definition at line 134 of file G4GeneralParticleSourceMessenger.hh.

134 { fParticleGun = fpg; } ;
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ addsourceCmd

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::addsourceCmd
private

Definition at line 164 of file G4GeneralParticleSourceMessenger.hh.

◆ alphaCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::alphaCmd1
private

Definition at line 250 of file G4GeneralParticleSourceMessenger.hh.

◆ angfocusCmd

G4UIcmdWith3VectorAndUnit* G4GeneralParticleSourceMessenger::angfocusCmd
private

Definition at line 225 of file G4GeneralParticleSourceMessenger.hh.

◆ angrot1Cmd1

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::angrot1Cmd1
private

Definition at line 216 of file G4GeneralParticleSourceMessenger.hh.

◆ angrot2Cmd1

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::angrot2Cmd1
private

Definition at line 217 of file G4GeneralParticleSourceMessenger.hh.

◆ angsigmarCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::angsigmarCmd1
private

Definition at line 222 of file G4GeneralParticleSourceMessenger.hh.

◆ angsigmaxCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::angsigmaxCmd1
private

Definition at line 223 of file G4GeneralParticleSourceMessenger.hh.

◆ angsigmayCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::angsigmayCmd1
private

Definition at line 224 of file G4GeneralParticleSourceMessenger.hh.

◆ angtypeCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::angtypeCmd1
private

Definition at line 215 of file G4GeneralParticleSourceMessenger.hh.

◆ angularDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::angularDirectory
private

Definition at line 214 of file G4GeneralParticleSourceMessenger.hh.

◆ arbeintCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::arbeintCmd1
private

Definition at line 255 of file G4GeneralParticleSourceMessenger.hh.

◆ arbintCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::arbintCmd1
private

Definition at line 285 of file G4GeneralParticleSourceMessenger.hh.

◆ calculateCmd1

G4UIcmdWithoutParameter* G4GeneralParticleSourceMessenger::calculateCmd1
private

Definition at line 256 of file G4GeneralParticleSourceMessenger.hh.

◆ centreCmd1

G4UIcmdWith3VectorAndUnit* G4GeneralParticleSourceMessenger::centreCmd1
private

Definition at line 178 of file G4GeneralParticleSourceMessenger.hh.

◆ clearsourceCmd

G4UIcmdWithoutParameter* G4GeneralParticleSourceMessenger::clearsourceCmd
private

Definition at line 166 of file G4GeneralParticleSourceMessenger.hh.

◆ confineCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::confineCmd1
private

Definition at line 192 of file G4GeneralParticleSourceMessenger.hh.

◆ deletesourceCmd

G4UIcmdWithAnInteger* G4GeneralParticleSourceMessenger::deletesourceCmd
private

Definition at line 170 of file G4GeneralParticleSourceMessenger.hh.

◆ diffspecCmd1

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::diffspecCmd1
private

Definition at line 258 of file G4GeneralParticleSourceMessenger.hh.

◆ directionCmd

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::directionCmd
private

Definition at line 298 of file G4GeneralParticleSourceMessenger.hh.

◆ emaxCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::emaxCmd1
private

Definition at line 247 of file G4GeneralParticleSourceMessenger.hh.

◆ eminCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::eminCmd1
private

Definition at line 246 of file G4GeneralParticleSourceMessenger.hh.

◆ energyCmd

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::energyCmd
private

Definition at line 299 of file G4GeneralParticleSourceMessenger.hh.

◆ energyDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::energyDirectory
private

Definition at line 244 of file G4GeneralParticleSourceMessenger.hh.

◆ energyspecCmd1

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::energyspecCmd1
private

Definition at line 257 of file G4GeneralParticleSourceMessenger.hh.

◆ energytypeCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::energytypeCmd1
private

Definition at line 245 of file G4GeneralParticleSourceMessenger.hh.

◆ engsigmaCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::engsigmaCmd1
private

Definition at line 249 of file G4GeneralParticleSourceMessenger.hh.

◆ ezeroCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::ezeroCmd1
private

Definition at line 252 of file G4GeneralParticleSourceMessenger.hh.

◆ fAtomicMass

G4int G4GeneralParticleSourceMessenger::fAtomicMass
private

Definition at line 305 of file G4GeneralParticleSourceMessenger.hh.

◆ fAtomicMassL

G4int G4GeneralParticleSourceMessenger::fAtomicMassL
private

Definition at line 311 of file G4GeneralParticleSourceMessenger.hh.

◆ fAtomicNumber

G4int G4GeneralParticleSourceMessenger::fAtomicNumber
private

Definition at line 304 of file G4GeneralParticleSourceMessenger.hh.

◆ fAtomicNumberL

G4int G4GeneralParticleSourceMessenger::fAtomicNumberL
private

Definition at line 310 of file G4GeneralParticleSourceMessenger.hh.

◆ fGPS

G4GeneralParticleSource* G4GeneralParticleSourceMessenger::fGPS
private

Definition at line 154 of file G4GeneralParticleSourceMessenger.hh.

◆ fIonCharge

G4int G4GeneralParticleSourceMessenger::fIonCharge
private

Definition at line 306 of file G4GeneralParticleSourceMessenger.hh.

◆ fIonChargeL

G4int G4GeneralParticleSourceMessenger::fIonChargeL
private

Definition at line 312 of file G4GeneralParticleSourceMessenger.hh.

◆ fIonEnergyLevel

G4int G4GeneralParticleSourceMessenger::fIonEnergyLevel
private

Definition at line 313 of file G4GeneralParticleSourceMessenger.hh.

◆ fIonExciteEnergy

G4double G4GeneralParticleSourceMessenger::fIonExciteEnergy
private

Definition at line 307 of file G4GeneralParticleSourceMessenger.hh.

◆ flatsamplingCmd

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::flatsamplingCmd
private

Definition at line 172 of file G4GeneralParticleSourceMessenger.hh.

◆ fParticleGun

G4SingleParticleSource* G4GeneralParticleSourceMessenger::fParticleGun
private

Definition at line 155 of file G4GeneralParticleSourceMessenger.hh.

◆ fShootIon

G4bool G4GeneralParticleSourceMessenger::fShootIon
private

Definition at line 303 of file G4GeneralParticleSourceMessenger.hh.

◆ fShootIonL

G4bool G4GeneralParticleSourceMessenger::fShootIonL
private

Definition at line 309 of file G4GeneralParticleSourceMessenger.hh.

◆ getsourceCmd

G4UIcmdWithoutParameter* G4GeneralParticleSourceMessenger::getsourceCmd
private

Definition at line 167 of file G4GeneralParticleSourceMessenger.hh.

◆ gpsDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::gpsDirectory
private

Definition at line 160 of file G4GeneralParticleSourceMessenger.hh.

◆ gradientCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::gradientCmd1
private

Definition at line 253 of file G4GeneralParticleSourceMessenger.hh.

◆ halfxCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::halfxCmd1
private

Definition at line 181 of file G4GeneralParticleSourceMessenger.hh.

◆ halfyCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::halfyCmd1
private

Definition at line 182 of file G4GeneralParticleSourceMessenger.hh.

◆ halfzCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::halfzCmd1
private

Definition at line 183 of file G4GeneralParticleSourceMessenger.hh.

◆ histDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::histDirectory
private

Definition at line 276 of file G4GeneralParticleSourceMessenger.hh.

◆ histfileCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::histfileCmd1
private

Definition at line 283 of file G4GeneralParticleSourceMessenger.hh.

◆ histnameCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::histnameCmd1
private

Definition at line 284 of file G4GeneralParticleSourceMessenger.hh.

◆ histpointCmd1

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::histpointCmd1
private

Definition at line 282 of file G4GeneralParticleSourceMessenger.hh.

◆ histtype

G4String G4GeneralParticleSourceMessenger::histtype
private

Definition at line 157 of file G4GeneralParticleSourceMessenger.hh.

◆ interceptCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::interceptCmd1
private

Definition at line 254 of file G4GeneralParticleSourceMessenger.hh.

◆ ionCmd

G4UIcommand* G4GeneralParticleSourceMessenger::ionCmd
private

Definition at line 291 of file G4GeneralParticleSourceMessenger.hh.

◆ ionLvlCmd

G4UIcommand* G4GeneralParticleSourceMessenger::ionLvlCmd
private

Definition at line 292 of file G4GeneralParticleSourceMessenger.hh.

◆ listCmd

G4UIcmdWithoutParameter* G4GeneralParticleSourceMessenger::listCmd
private

Definition at line 300 of file G4GeneralParticleSourceMessenger.hh.

◆ listsourceCmd

G4UIcmdWithoutParameter* G4GeneralParticleSourceMessenger::listsourceCmd
private

Definition at line 165 of file G4GeneralParticleSourceMessenger.hh.

◆ maxphiCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::maxphiCmd1
private

Definition at line 221 of file G4GeneralParticleSourceMessenger.hh.

◆ maxthetaCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::maxthetaCmd1
private

Definition at line 219 of file G4GeneralParticleSourceMessenger.hh.

◆ minphiCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::minphiCmd1
private

Definition at line 220 of file G4GeneralParticleSourceMessenger.hh.

◆ minthetaCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::minthetaCmd1
private

Definition at line 218 of file G4GeneralParticleSourceMessenger.hh.

◆ monoenergyCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::monoenergyCmd1
private

Definition at line 248 of file G4GeneralParticleSourceMessenger.hh.

◆ multiplevertexCmd

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::multiplevertexCmd
private

Definition at line 171 of file G4GeneralParticleSourceMessenger.hh.

◆ numberCmd

G4UIcmdWithAnInteger* G4GeneralParticleSourceMessenger::numberCmd
private

Definition at line 296 of file G4GeneralParticleSourceMessenger.hh.

◆ paralpCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::paralpCmd1
private

Definition at line 189 of file G4GeneralParticleSourceMessenger.hh.

◆ parphiCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::parphiCmd1
private

Definition at line 191 of file G4GeneralParticleSourceMessenger.hh.

◆ partheCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::partheCmd1
private

Definition at line 190 of file G4GeneralParticleSourceMessenger.hh.

◆ particleCmd

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::particleCmd
private

Definition at line 293 of file G4GeneralParticleSourceMessenger.hh.

◆ particleTable

G4ParticleTable* G4GeneralParticleSourceMessenger::particleTable
private

Definition at line 156 of file G4GeneralParticleSourceMessenger.hh.

◆ polCmd

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::polCmd
private

Definition at line 295 of file G4GeneralParticleSourceMessenger.hh.

◆ positionCmd

G4UIcmdWith3VectorAndUnit* G4GeneralParticleSourceMessenger::positionCmd
private

Definition at line 297 of file G4GeneralParticleSourceMessenger.hh.

◆ positionDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::positionDirectory
private

Definition at line 175 of file G4GeneralParticleSourceMessenger.hh.

◆ posrot1Cmd1

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::posrot1Cmd1
private

Definition at line 179 of file G4GeneralParticleSourceMessenger.hh.

◆ posrot2Cmd1

G4UIcmdWith3Vector* G4GeneralParticleSourceMessenger::posrot2Cmd1
private

Definition at line 180 of file G4GeneralParticleSourceMessenger.hh.

◆ possigmarCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::possigmarCmd1
private

Definition at line 186 of file G4GeneralParticleSourceMessenger.hh.

◆ possigmaxCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::possigmaxCmd1
private

Definition at line 187 of file G4GeneralParticleSourceMessenger.hh.

◆ possigmayCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::possigmayCmd1
private

Definition at line 188 of file G4GeneralParticleSourceMessenger.hh.

◆ radius0Cmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::radius0Cmd1
private

Definition at line 185 of file G4GeneralParticleSourceMessenger.hh.

◆ radiusCmd1

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::radiusCmd1
private

Definition at line 184 of file G4GeneralParticleSourceMessenger.hh.

◆ resethistCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::resethistCmd1
private

Definition at line 286 of file G4GeneralParticleSourceMessenger.hh.

◆ setintensityCmd

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::setintensityCmd
private

Definition at line 169 of file G4GeneralParticleSourceMessenger.hh.

◆ setsourceCmd

G4UIcmdWithAnInteger* G4GeneralParticleSourceMessenger::setsourceCmd
private

Definition at line 168 of file G4GeneralParticleSourceMessenger.hh.

◆ shapeCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::shapeCmd1
private

Definition at line 177 of file G4GeneralParticleSourceMessenger.hh.

◆ sourceDirectory

G4UIdirectory* G4GeneralParticleSourceMessenger::sourceDirectory
private

Definition at line 163 of file G4GeneralParticleSourceMessenger.hh.

◆ surfnormCmd1

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::surfnormCmd1
private

Definition at line 227 of file G4GeneralParticleSourceMessenger.hh.

◆ tempCmd1

G4UIcmdWithADouble* G4GeneralParticleSourceMessenger::tempCmd1
private

Definition at line 251 of file G4GeneralParticleSourceMessenger.hh.

◆ timeCmd

G4UIcmdWithADoubleAndUnit* G4GeneralParticleSourceMessenger::timeCmd
private

Definition at line 294 of file G4GeneralParticleSourceMessenger.hh.

◆ typeCmd1

G4UIcmdWithAString* G4GeneralParticleSourceMessenger::typeCmd1
private

Definition at line 176 of file G4GeneralParticleSourceMessenger.hh.

◆ useuserangaxisCmd1

G4UIcmdWithABool* G4GeneralParticleSourceMessenger::useuserangaxisCmd1
private

Definition at line 226 of file G4GeneralParticleSourceMessenger.hh.

◆ verbosityCmd

G4UIcmdWithAnInteger* G4GeneralParticleSourceMessenger::verbosityCmd
private

Definition at line 288 of file G4GeneralParticleSourceMessenger.hh.


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