77 : fGPS(fPtclGun),fShootIon(false)
83 gpsDirectory->
SetGuidance(
"General Paricle Source control commands.");
88 sourceDirectory->
SetGuidance(
"Multiple source control sub-directory");
91 addsourceCmd->
SetGuidance(
"add a new source defintion to the particle gun with the specified intensity");
93 addsourceCmd->
SetRange(
"addsource > 0.");
96 listsourceCmd->
SetGuidance(
"List the defined particle sources");
99 clearsourceCmd->
SetGuidance(
"Remove all the defined particle sources");
102 getsourceCmd->
SetGuidance(
"Show the current source index and intensity");
105 setsourceCmd->
SetGuidance(
"set the indexed source as the current one");
106 setsourceCmd->
SetGuidance(
" so one can change its source definition");
108 setsourceCmd->
SetRange(
"setsource >= 0");
111 deletesourceCmd->
SetGuidance(
"delete the indexed source from the list");
113 deletesourceCmd->
SetRange(
"deletesource > 0");
116 setintensityCmd->
SetGuidance(
"reset the current source to the specified intensity");
118 setintensityCmd->
SetRange(
"setintensity > 0.");
120 multiplevertexCmd =
new G4UIcmdWithABool(
"/gps/source/multiplevertex",
this);
121 multiplevertexCmd->
SetGuidance(
"true for simulaneous generation mutiple vertex");
122 multiplevertexCmd->
SetGuidance(
"Default is false");
127 flatsamplingCmd->
SetGuidance(
"true for appling flat (biased) sampling among the sources");
139 particleCmd->
SetGuidance(
"Set particle to be generated.");
140 particleCmd->
SetGuidance(
" (geantino is default)");
141 particleCmd->
SetGuidance(
" (ion can be specified for shooting ions)");
146 for(
G4int i=0;i<nPtcl;i++)
149 candidateList +=
" ";
151 candidateList +=
"ion ";
155 directionCmd->
SetGuidance(
"Set momentum direction.");
156 directionCmd->
SetGuidance(
"Direction needs not to be a unit vector.");
158 directionCmd->
SetRange(
"Px != 0 || Py != 0 || Pz != 0");
168 positionCmd->
SetGuidance(
"Set starting position of the particle.");
175 ionCmd->
SetGuidance(
"Set properties of ion to be generated.");
179 ionCmd->
SetGuidance(
" Q:(int) Charge of Ion (in unit of e)");
180 ionCmd->
SetGuidance(
" E:(double) Excitation energy (in keV)");
198 timeCmd->
SetGuidance(
"Set initial time of the particle.");
207 polCmd->
SetRange(
"Px>=-1.&&Px<=1.&&Py>=-1.&&Py<=1.&&Pz>=-1.&&Pz<=1.");
210 numberCmd->
SetGuidance(
"Set number of particles to be generated per vertex.");
216 verbosityCmd->
SetGuidance(
"Set Verbose level for GPS");
218 verbosityCmd->
SetGuidance(
" 1 : Limited information");
219 verbosityCmd->
SetGuidance(
" 2 : Detailed information");
221 verbosityCmd->
SetRange(
"level>=0 && level <=2");
226 positionDirectory->
SetGuidance(
"Positional commands sub-directory");
229 typeCmd1->
SetGuidance(
"Sets source distribution type.");
230 typeCmd1->
SetGuidance(
"Either Point, Beam, Plane, Surface or Volume");
236 shapeCmd1->
SetGuidance(
"Sets source shape for Plan, Surface or Volume type source.");
239 shapeCmd1->
SetCandidates(
"Circle Annulus Ellipse Square Rectangle Sphere Ellipsoid Cylinder Para");
242 centreCmd1->
SetGuidance(
"Set centre coordinates of source.");
243 centreCmd1->
SetGuidance(
" same effect as the /gps/position command");
249 posrot1Cmd1->
SetGuidance(
"Set the 1st vector defining the rotation matrix'.");
250 posrot1Cmd1->
SetGuidance(
"It does not need to be a unit vector.");
252 posrot1Cmd1->
SetRange(
"R1x != 0 || R1y != 0 || R1z != 0");
255 posrot2Cmd1->
SetGuidance(
"Set the 2nd vector defining the rotation matrix'.");
256 posrot2Cmd1->
SetGuidance(
"It does not need to be a unit vector.");
258 posrot2Cmd1->
SetRange(
"R2x != 0 || R2y != 0 || R2z != 0");
261 halfxCmd1->
SetGuidance(
"Set x half length of source.");
267 halfyCmd1->
SetGuidance(
"Set y half length of source.");
273 halfzCmd1->
SetGuidance(
"Set z half length of source.");
285 radius0Cmd1->
SetGuidance(
"Set inner radius of source when required.");
291 possigmarCmd1->
SetGuidance(
"Set standard deviation in radial of the beam positional profile");
292 possigmarCmd1->
SetGuidance(
" applicable to Beam type source only");
298 possigmaxCmd1->
SetGuidance(
"Set standard deviation of beam positional profile in x-dir");
299 possigmaxCmd1->
SetGuidance(
" applicable to Beam type source only");
305 possigmayCmd1->
SetGuidance(
"Set standard deviation of beam positional profile in y-dir");
306 possigmayCmd1->
SetGuidance(
" applicable to Beam type source only");
312 paralpCmd1->
SetGuidance(
"Angle from y-axis of y' in Para");
318 partheCmd1->
SetGuidance(
"Polar angle through centres of z faces");
324 parphiCmd1->
SetGuidance(
"Azimuth angle through centres of z faces");
330 confineCmd1->
SetGuidance(
"Confine source to volume (NULL to unset).");
331 confineCmd1->
SetGuidance(
"usage: confine VolName");
337 typeCmd->
SetGuidance(
"Sets source distribution type. (obsolete!)");
338 typeCmd->
SetGuidance(
"Either Point, Beam, Plane, Surface or Volume");
344 shapeCmd->
SetGuidance(
"Sets source shape type.(obsolete!)");
347 shapeCmd->
SetCandidates(
"Circle Annulus Ellipse Square Rectangle Sphere Ellipsoid Cylinder Para");
350 centreCmd->
SetGuidance(
"Set centre coordinates of source.(obsolete!)");
356 posrot1Cmd->
SetGuidance(
"Set rotation matrix of x'.(obsolete!)");
357 posrot1Cmd->
SetGuidance(
"Posrot1 does not need to be a unit vector.");
359 posrot1Cmd->
SetRange(
"R1x != 0 || R1y != 0 || R1z != 0");
362 posrot2Cmd->
SetGuidance(
"Set rotation matrix of y'.(obsolete!)");
363 posrot2Cmd->
SetGuidance(
"Posrot2 does not need to be a unit vector.");
365 posrot2Cmd->
SetRange(
"R2x != 0 || R2y != 0 || R2z != 0");
368 halfxCmd->
SetGuidance(
"Set x half length of source.(obsolete!)");
374 halfyCmd->
SetGuidance(
"Set y half length of source.(obsolete!)");
380 halfzCmd->
SetGuidance(
"Set z half length of source.(obsolete!)");
386 radiusCmd->
SetGuidance(
"Set radius of source.(obsolete!)");
392 radius0Cmd->
SetGuidance(
"Set inner radius of source.(obsolete!)");
398 possigmarCmd->
SetGuidance(
"Set standard deviation of beam position in radial(obsolete!)");
404 possigmaxCmd->
SetGuidance(
"Set standard deviation of beam position in x-dir(obsolete!)");
410 possigmayCmd->
SetGuidance(
"Set standard deviation of beam position in y-dir(obsolete!)");
416 paralpCmd->
SetGuidance(
"Angle from y-axis of y' in Para(obsolete!)");
422 partheCmd->
SetGuidance(
"Polar angle through centres of z faces(obsolete!)");
428 parphiCmd->
SetGuidance(
"Azimuth angle through centres of z faces(obsolete!)");
434 confineCmd->
SetGuidance(
"Confine source to volume (NULL to unset)(obsolete!) .");
441 angularDirectory->
SetGuidance(
"Angular commands sub-directory");
444 angtypeCmd1->
SetGuidance(
"Sets angular source distribution type");
445 angtypeCmd1->
SetGuidance(
"Possible variables are: iso, cos, planar, beam1d, beam2d, focused or user");
448 angtypeCmd1->
SetCandidates(
"iso cos planar beam1d beam2d focused user");
451 angrot1Cmd1->
SetGuidance(
"Sets the 1st vector for angular distribution rotation matrix");
452 angrot1Cmd1->
SetGuidance(
"Need not be a unit vector");
454 angrot1Cmd1->
SetRange(
"AR1x != 0 || AR1y != 0 || AR1z != 0");
457 angrot2Cmd1->
SetGuidance(
"Sets the 2nd vector for angular distribution rotation matrix");
458 angrot2Cmd1->
SetGuidance(
"Need not be a unit vector");
460 angrot2Cmd1->
SetRange(
"AR2x != 0 || AR2y != 0 || AR2z != 0");
490 angsigmarCmd1->
SetGuidance(
"Set standard deviation in direction for 1D beam.");
496 angsigmaxCmd1->
SetGuidance(
"Set standard deviation in direction in x-direc. for 2D beam");
502 angsigmayCmd1->
SetGuidance(
"Set standard deviation in direction in y-direc. for 2D beam");
508 angfocusCmd->
SetGuidance(
"Set the focusing point for the beam");
514 useuserangaxisCmd1->
SetGuidance(
"true for using user defined angular co-ordinates");
515 useuserangaxisCmd1->
SetGuidance(
"Default is false");
520 surfnormCmd1->
SetGuidance(
"Makes a user-defined distribution with respect to surface normals rather than x,y,z axes.");
527 angtypeCmd->
SetGuidance(
"Sets angular source distribution type (obsolete!)");
528 angtypeCmd->
SetGuidance(
"Possible variables are: iso, cos planar beam1d beam2d or user");
531 angtypeCmd->
SetCandidates(
"iso cos planar beam1d beam2d user");
534 angrot1Cmd->
SetGuidance(
"Sets the x' vector for angular distribution(obsolete!) ");
535 angrot1Cmd->
SetGuidance(
"Need not be a unit vector");
537 angrot1Cmd->
SetRange(
"AR1x != 0 || AR1y != 0 || AR1z != 0");
540 angrot2Cmd->
SetGuidance(
"Sets the y' vector for angular distribution (obsolete!)");
541 angrot2Cmd->
SetGuidance(
"Need not be a unit vector");
543 angrot2Cmd->
SetRange(
"AR2x != 0 || AR2y != 0 || AR2z != 0");
546 minthetaCmd->
SetGuidance(
"Set minimum theta (obsolete!)");
552 maxthetaCmd->
SetGuidance(
"Set maximum theta (obsolete!)");
559 minphiCmd->
SetGuidance(
"Set minimum phi (obsolete!)");
565 maxphiCmd->
SetGuidance(
"Set maximum phi(obsolete!)");
571 angsigmarCmd->
SetGuidance(
"Set standard deviation of beam direction in radial(obsolete!).");
577 angsigmaxCmd->
SetGuidance(
"Set standard deviation of beam direction in x-direc(obsolete!).");
583 angsigmayCmd->
SetGuidance(
"Set standard deviation of beam direction in y-direc.(obsolete!)");
589 useuserangaxisCmd->
SetGuidance(
"true for using user defined angular co-ordinates(obsolete!)");
590 useuserangaxisCmd->
SetGuidance(
"Default is false");
595 surfnormCmd->
SetGuidance(
"Makes a user-defined distribution with respect to surface normals rather than x,y,z axes (obsolete!).");
603 energyDirectory->
SetGuidance(
"Spectral commands sub-directory");
606 energytypeCmd1->
SetGuidance(
"Sets energy distribution type");
609 energytypeCmd1->
SetCandidates(
"Mono Lin Pow Exp Gauss Brem Bbody Cdg User Arb Epn");
624 monoenergyCmd1->
SetGuidance(
"Sets a monocromatic energy (same as gps/energy)");
630 engsigmaCmd1->
SetGuidance(
"Sets the standard deviation for Gaussian energy dist.");
636 alphaCmd1->
SetGuidance(
"Sets Alpha (index) for power-law energy dist.");
640 tempCmd1->
SetGuidance(
"Sets the temperature for Brem and BBody distributions (in Kelvin)");
644 ezeroCmd1->
SetGuidance(
"Sets E_0 for exponential distribution (in MeV)");
648 gradientCmd1->
SetGuidance(
"Sets the gradient for Lin distribution (in 1/MeV)");
652 interceptCmd1->
SetGuidance(
"Sets the intercept for Lin distributions (in MeV)");
656 arbeintCmd1->
SetGuidance(
"Set the power-law index for the energy sampling distri. )");
660 calculateCmd1->
SetGuidance(
"Calculates the distributions for Cdg and BBody");
663 energyspecCmd1->
SetGuidance(
"True for energy and false for momentum spectra");
668 diffspecCmd1->
SetGuidance(
"True for differential and flase for integral spectra");
674 energytypeCmd->
SetGuidance(
"Sets energy distribution type (obsolete!)");
677 energytypeCmd->
SetCandidates(
"Mono Lin Pow Exp Gauss Brem Bbody Cdg User Arb Epn");
692 monoenergyCmd->
SetGuidance(
"Sets Monoenergy (obsolete, use gps/energy instead!)");
698 engsigmaCmd->
SetGuidance(
"Sets the standard deviation for Gaussian energy dist.(obsolete!)");
704 alphaCmd->
SetGuidance(
"Sets Alpha (index) for power-law energy dist(obsolete!).");
708 tempCmd->
SetGuidance(
"Sets the temperature for Brem and BBody (in Kelvin)(obsolete!)");
712 ezeroCmd->
SetGuidance(
"Sets ezero exponential distributions (in MeV)(obsolete!)");
716 gradientCmd->
SetGuidance(
"Sets the gradient for Lin distributions (in 1/MeV)(obsolete!)");
720 interceptCmd->
SetGuidance(
"Sets the intercept for Lin distributions (in MeV)(obsolete!)");
724 calculateCmd->
SetGuidance(
"Calculates distributions for Cdg and BBody(obsolete!)");
727 energyspecCmd->
SetGuidance(
"True for energy and false for momentum spectra(obsolete!)");
732 diffspecCmd->
SetGuidance(
"True for differential and flase for integral spectra(obsolete!)");
738 histDirectory->
SetGuidance(
"Histogram, biasing commands sub-directory");
744 histnameCmd1->
SetCandidates(
"biasx biasy biasz biast biasp biase biaspt biaspp theta phi energy arb epn");
747 resethistCmd1->
SetGuidance(
"Reset (clean) the histogram ");
750 resethistCmd1->
SetCandidates(
"biasx biasy biasz biast biasp biase biaspt biaspp theta phi energy arb epn");
753 histpointCmd1->
SetGuidance(
"Allows user to define a histogram");
756 histpointCmd1->
SetRange(
"Ehi >= 0. && Weight >= 0.");
759 histfileCmd1->
SetGuidance(
"import the arb energy hist in an ASCII file");
763 arbintCmd1->
SetGuidance(
"Sets the interpolation method for arbitrary distribution.");
770 histnameCmd->
SetGuidance(
"Sets histogram type (obsolete!)");
773 histnameCmd->
SetCandidates(
"biasx biasy biasz biast biasp biase biaspt biaspp theta phi energy arb epn");
777 resethistCmd->
SetGuidance(
"Re-Set the histogram (obsolete!)");
780 resethistCmd->
SetCandidates(
"biasx biasy biasz biast biasp biase biaspt biaspp theta phi energy arb epn");
783 histpointCmd->
SetGuidance(
"Allows user to define a histogram (obsolete!)");
786 histpointCmd->
SetRange(
"Ehi >= 0. && Weight >= 0.");
789 arbintCmd->
SetGuidance(
"Sets Arbitrary Interpolation type.(obsolete!) ");
798 delete positionDirectory;
826 delete possigmarCmd1;
827 delete possigmaxCmd1;
828 delete possigmayCmd1;
834 delete angularDirectory;
845 delete useuserangaxisCmd;
854 delete angsigmarCmd1;
855 delete angsigmaxCmd1;
857 delete useuserangaxisCmd1;
860 delete energyDirectory;
861 delete energytypeCmd;
864 delete monoenergyCmd;
872 delete energyspecCmd;
874 delete energytypeCmd1;
877 delete monoenergyCmd1;
883 delete interceptCmd1;
885 delete calculateCmd1;
886 delete energyspecCmd1;
889 delete histDirectory;
895 delete resethistCmd1;
896 delete histpointCmd1;
911 delete sourceDirectory;
913 delete listsourceCmd;
914 delete clearsourceCmd;
917 delete setintensityCmd;
918 delete deletesourceCmd;
919 delete multiplevertexCmd;
920 delete flatsamplingCmd;
928 if(command == typeCmd)
931 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
932 <<
" The command is obsolete and will be removed soon." <<
G4endl
933 <<
" Please try to use the new structured commands!" <<
G4endl;
935 else if(command == shapeCmd)
938 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
939 <<
" The command is obsolete and will be removed soon." <<
G4endl
940 <<
" Please try to use the new structured commands!" <<
G4endl;
942 else if(command == centreCmd)
945 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
946 <<
" The command is obsolete and will be removed soon." <<
G4endl
947 <<
" Please try to use the new structured commands!" <<
G4endl;
949 else if(command == posrot1Cmd)
952 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
953 <<
" The command is obsolete and will be removed soon." <<
G4endl
954 <<
" Please try to use the new structured commands!" <<
G4endl;
956 else if(command == posrot2Cmd)
959 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
960 <<
" The command is obsolete and will be removed soon." <<
G4endl
961 <<
" Please try to use the new structured commands!" <<
G4endl;
963 else if(command == halfxCmd)
966 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
967 <<
" The command is obsolete and will be removed soon." <<
G4endl
968 <<
" Please try to use the new structured commands!" <<
G4endl;
970 else if(command == halfyCmd)
973 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
974 <<
" The command is obsolete and will be removed soon." <<
G4endl
975 <<
" Please try to use the new structured commands!" <<
G4endl;
977 else if(command == halfzCmd)
980 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
981 <<
" The command is obsolete and will be removed soon." <<
G4endl
982 <<
" Please try to use the new structured commands!" <<
G4endl;
984 else if(command == radiusCmd)
987 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
988 <<
" The command is obsolete and will be removed soon." <<
G4endl
989 <<
" Please try to use the new structured commands!" <<
G4endl;
991 else if(command == radius0Cmd)
994 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
995 <<
" The command is obsolete and will be removed soon." <<
G4endl
996 <<
" Please try to use the new structured commands!" <<
G4endl;
998 else if(command == possigmarCmd)
1001 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1002 <<
" The command is obsolete and will be removed soon." <<
G4endl
1003 <<
" Please try to use the new structured commands!" <<
G4endl;
1005 else if(command == possigmaxCmd)
1008 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1009 <<
" The command is obsolete and will be removed soon." <<
G4endl
1010 <<
" Please try to use the new structured commands!" <<
G4endl;
1012 else if(command == possigmayCmd)
1015 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1016 <<
" The command is obsolete and will be removed soon." <<
G4endl
1017 <<
" Please try to use the new structured commands!" <<
G4endl;
1019 else if(command == paralpCmd)
1022 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1023 <<
" The command is obsolete and will be removed soon." <<
G4endl
1024 <<
" Please try to use the new structured commands!" <<
G4endl;
1026 else if(command == partheCmd)
1029 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1030 <<
" The command is obsolete and will be removed soon." <<
G4endl
1031 <<
" Please try to use the new structured commands!" <<
G4endl;
1033 else if(command == parphiCmd)
1036 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1037 <<
" The command is obsolete and will be removed soon." <<
G4endl
1038 <<
" Please try to use the new structured commands!" <<
G4endl;
1040 else if(command == confineCmd)
1043 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1044 <<
" The command is obsolete and will be removed soon." <<
G4endl
1045 <<
" Please try to use the new structured commands!" <<
G4endl;
1047 else if(command == angtypeCmd)
1050 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1051 <<
" The command is obsolete and will be removed soon." <<
G4endl
1052 <<
" Please try to use the new structured commands!" <<
G4endl;
1054 else if(command == angrot1Cmd)
1058 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1059 <<
" The command is obsolete and will be removed soon." <<
G4endl
1060 <<
" Please try to use the new structured commands!" <<
G4endl;
1062 else if(command == angrot2Cmd)
1066 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1067 <<
" The command is obsolete and will be removed soon." <<
G4endl
1068 <<
" Please try to use the new structured commands!" <<
G4endl;
1070 else if(command == minthetaCmd)
1073 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1074 <<
" The command is obsolete and will be removed soon." <<
G4endl
1075 <<
" Please try to use the new structured commands!" <<
G4endl;
1077 else if(command == minphiCmd)
1080 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1081 <<
" The command is obsolete and will be removed soon." <<
G4endl
1082 <<
" Please try to use the new structured commands!" <<
G4endl;
1084 else if(command == maxthetaCmd)
1087 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1088 <<
" The command is obsolete and will be removed soon." <<
G4endl
1089 <<
" Please try to use the new structured commands!" <<
G4endl;
1091 else if(command == maxphiCmd)
1094 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1095 <<
" The command is obsolete and will be removed soon." <<
G4endl
1096 <<
" Please try to use the new structured commands!" <<
G4endl;
1098 else if(command == angsigmarCmd)
1101 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1102 <<
" The command is obsolete and will be removed soon." <<
G4endl
1103 <<
" Please try to use the new structured commands!" <<
G4endl;
1105 else if(command == angsigmaxCmd)
1108 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1109 <<
" The command is obsolete and will be removed soon." <<
G4endl
1110 <<
" Please try to use the new structured commands!" <<
G4endl;
1112 else if(command == angsigmayCmd)
1115 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1116 <<
" The command is obsolete and will be removed soon." <<
G4endl
1117 <<
" Please try to use the new structured commands!" <<
G4endl;
1119 else if(command == useuserangaxisCmd)
1122 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1123 <<
" The command is obsolete and will be removed soon." <<
G4endl
1124 <<
" Please try to use the new structured commands!" <<
G4endl;
1126 else if(command == surfnormCmd)
1129 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1130 <<
" The command is obsolete and will be removed soon." <<
G4endl
1131 <<
" Please try to use the new structured commands!" <<
G4endl;
1133 else if(command == energytypeCmd)
1136 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1137 <<
" The command is obsolete and will be removed soon." <<
G4endl
1138 <<
" Please try to use the new structured commands!" <<
G4endl;
1140 else if(command == eminCmd)
1143 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1144 <<
" The command is obsolete and will be removed soon." <<
G4endl
1145 <<
" Please try to use the new structured commands!" <<
G4endl;
1147 else if(command == emaxCmd)
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;
1154 else if(command == monoenergyCmd)
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;
1161 else if(command == engsigmaCmd)
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;
1168 else if(command == alphaCmd)
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;
1175 else if(command == tempCmd)
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;
1182 else if(command == ezeroCmd)
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;
1189 else if(command == gradientCmd)
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;
1196 else if(command == interceptCmd)
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;
1203 else if(command == calculateCmd)
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;
1210 else if(command == energyspecCmd)
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;
1217 else if(command == diffspecCmd)
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;
1224 else if(command == histnameCmd)
1226 histtype = 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;
1231 else if(command == histpointCmd)
1233 if(histtype ==
"biasx")
1235 if(histtype ==
"biasy")
1237 if(histtype ==
"biasz")
1239 if(histtype ==
"biast")
1241 if(histtype ==
"biasp")
1243 if(histtype ==
"biase")
1245 if(histtype ==
"theta")
1247 if(histtype ==
"phi")
1249 if(histtype ==
"energy")
1251 if(histtype ==
"arb")
1253 if(histtype ==
"epn")
1255 G4cout <<
" G4GeneralParticleSourceMessenger - Warning: The command is obsolete and will be removed soon. Please try to use the new structured commands!" <<
G4endl;
1257 else if(command == resethistCmd)
1259 if(newValues ==
"theta" || newValues ==
"phi") {
1261 }
else if (newValues ==
"energy" || newValues ==
"arb" || newValues ==
"epn") {
1266 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1267 <<
" The command is obsolete and will be removed soon." <<
G4endl
1268 <<
" Please try to use the new structured commands!" <<
G4endl;
1270 else if(command == arbintCmd)
1273 G4cout <<
" G4GeneralParticleSourceMessenger - Warning:" <<
G4endl
1274 <<
" The command is obsolete and will be removed soon." <<
G4endl
1275 <<
" Please try to use the new structured commands!" <<
G4endl;
1277 else if( command==directionCmd )
1282 else if( command==energyCmd )
1287 else if( command==positionCmd )
1292 else if(command == verbosityCmd)
1296 else if( command==particleCmd )
1298 if (newValues ==
"ion") {
1307 else if( command==timeCmd )
1309 else if( command==polCmd )
1311 else if( command==numberCmd )
1313 else if( command==ionCmd )
1314 { IonCommand(newValues); }
1315 else if( command==listCmd ){
1318 else if( command==addsourceCmd )
1322 else if( command==listsourceCmd )
1326 else if( command==clearsourceCmd )
1330 else if( command==getsourceCmd )
1335 else if( command==setsourceCmd )
1339 else if( command==setintensityCmd )
1343 else if( command==deletesourceCmd )
1347 else if(command == multiplevertexCmd)
1351 else if(command == flatsamplingCmd)
1359 else if(command == typeCmd1)
1363 else if(command == shapeCmd1)
1367 else if(command == centreCmd1)
1371 else if(command == posrot1Cmd1)
1375 else if(command == posrot2Cmd1)
1379 else if(command == halfxCmd1)
1383 else if(command == halfyCmd1)
1387 else if(command == halfzCmd1)
1391 else if(command == radiusCmd1)
1395 else if(command == radius0Cmd1)
1399 else if(command == possigmarCmd1)
1403 else if(command == possigmaxCmd1)
1407 else if(command == possigmayCmd1)
1411 else if(command == paralpCmd1)
1415 else if(command == partheCmd1)
1419 else if(command == parphiCmd1)
1423 else if(command == confineCmd1)
1427 else if(command == angtypeCmd1)
1431 else if(command == angrot1Cmd1)
1436 else if(command == angrot2Cmd1)
1441 else if(command == minthetaCmd1)
1445 else if(command == minphiCmd1)
1449 else if(command == maxthetaCmd1)
1453 else if(command == maxphiCmd1)
1457 else if(command == angsigmarCmd1)
1461 else if(command == angsigmaxCmd1)
1465 else if(command == angsigmayCmd1)
1469 else if(command == angfocusCmd)
1473 else if(command == useuserangaxisCmd1)
1477 else if(command == surfnormCmd1)
1481 else if(command == energytypeCmd1)
1485 else if(command == eminCmd1)
1489 else if(command == emaxCmd1)
1493 else if(command == monoenergyCmd1)
1497 else if(command == engsigmaCmd1)
1501 else if(command == alphaCmd1)
1505 else if(command == tempCmd1)
1509 else if(command == ezeroCmd1)
1513 else if(command == gradientCmd1)
1517 else if(command == interceptCmd1)
1521 else if(command == arbeintCmd1)
1525 else if(command == calculateCmd1)
1529 else if(command == energyspecCmd1)
1533 else if(command == diffspecCmd1)
1537 else if(command == histnameCmd1)
1539 histtype = newValues;
1541 else if(command == histfileCmd1)
1546 else if(command == histpointCmd1)
1548 if(histtype ==
"biasx")
1550 if(histtype ==
"biasy")
1552 if(histtype ==
"biasz")
1554 if(histtype ==
"biast")
1556 if(histtype ==
"biasp")
1558 if(histtype ==
"biaspt")
1560 if(histtype ==
"biaspp")
1562 if(histtype ==
"biase")
1564 if(histtype ==
"theta")
1566 if(histtype ==
"phi")
1568 if(histtype ==
"energy")
1570 if(histtype ==
"arb")
1572 if(histtype ==
"epn")
1575 else if(command == resethistCmd1)
1577 if(newValues ==
"theta" || newValues ==
"phi") {
1579 }
else if (newValues ==
"energy" || newValues ==
"arb" || newValues ==
"epn") {
1585 else if(command == arbintCmd1)
1612 cv =
"Not implemented yet";
1617void G4GeneralParticleSourceMessenger::IonCommand(
G4String newValues)
1625 fAtomicNumber =
StoI(next());
1626 fAtomicMass =
StoI(next());
1630 fIonCharge = fAtomicNumber;
1634 fIonCharge =
StoI(sQ);
1638 fIonExciteEnergy = 0.0;
1642 fIonExciteEnergy =
StoD(sQ) * keV;
1646 ion = particleTable->
GetIon( fAtomicNumber, fAtomicMass, fIonExciteEnergy);
1649 G4cout <<
"Ion with Z=" << fAtomicNumber;
1650 G4cout <<
" A=" << fAtomicMass <<
"is not be defined" <<
G4endl;
1660 G4cout <<
"Set /gps/particle to ion before using /gps/ion command";
G4DLLIMPORT std::ostream G4cout
G4String GetCurrentValue(G4UIcommand *command)
~G4GeneralParticleSourceMessenger()
void SetNewValue(G4UIcommand *command, G4String newValues)
G4GeneralParticleSourceMessenger(G4GeneralParticleSource *)
void SetFlatSampling(G4bool av)
G4int GetCurrentSourceIndex()
void AddaSource(G4double)
void SetCurrentSourceIntensity(G4double)
void SetCurrentSourceto(G4int)
void DeleteaSource(G4int)
void SetMultipleVertex(G4bool av)
G4double GetCurrentSourceIntensity()
const G4String & GetParticleName(G4int index)
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
G4ParticleDefinition * GetIon(G4int atomicNumber, G4int atomicMass, G4double excitationEnergy)
void DumpTable(const G4String &particle_name="ALL")
void SetBeamSigmaInAngX(G4double)
void SetBeamSigmaInAngR(G4double)
void SetFocusPoint(G4ThreeVector)
void UserDefAngPhi(G4ThreeVector)
void SetMaxTheta(G4double)
void SetUseUserAngAxis(G4bool)
void SetMinTheta(G4double)
void SetBeamSigmaInAngY(G4double)
void SetParticleMomentumDirection(G4ParticleMomentum aMomentumDirection)
void SetAngDistType(G4String)
void UserDefAngTheta(G4ThreeVector)
void DefineAngRefAxes(G4String, G4ThreeVector)
void SetUserWRTSurface(G4bool)
void UserEnergyHisto(G4ThreeVector)
void ArbEnergyHisto(G4ThreeVector)
void InputEnergySpectra(G4bool)
void SetBeamSigmaInE(G4double)
void SetBiasAlpha(G4double)
void ArbInterpolate(G4String)
void SetGradient(G4double)
void InputDifferentialSpectra(G4bool)
void EpnEnergyHisto(G4ThreeVector)
void SetEnergyDisType(G4String)
void SetMonoEnergy(G4double)
void ArbEnergyHistoFile(G4String)
void SetInterCept(G4double)
void ConfineSourceToVolume(G4String)
void SetCentreCoords(G4ThreeVector)
void SetParAlpha(G4double)
void SetBeamSigmaInX(G4double)
void SetPosDisType(G4String)
void SetPosDisShape(G4String)
void SetPosRot2(G4ThreeVector)
void SetBeamSigmaInR(G4double)
void SetRadius0(G4double)
void SetPosRot1(G4ThreeVector)
void SetParTheta(G4double)
void SetBeamSigmaInY(G4double)
void SetThetaBias(G4ThreeVector)
void SetYBias(G4ThreeVector)
void SetEnergyBias(G4ThreeVector)
void SetPhiBias(G4ThreeVector)
void SetPosThetaBias(G4ThreeVector)
void SetZBias(G4ThreeVector)
void SetPosPhiBias(G4ThreeVector)
void SetXBias(G4ThreeVector)
G4SPSAngDistribution * GetAngDist()
void SetParticlePolarization(G4ThreeVector aVal)
void SetNumberOfParticles(G4int i)
void SetParticleTime(G4double aTime)
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4SPSPosDistribution * GetPosDist()
G4SPSRandomGenerator * GetBiasRndm()
void SetParticleCharge(G4double aCharge)
G4SPSEneDistribution * GetEneDist()
void SetDefaultUnit(const char *defUnit)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
static G4bool GetNewBoolValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetDefaultValue(G4double defVal)
void SetDefaultUnit(const char *defUnit)
static G4double GetNewDoubleValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4double GetNewDoubleValue(const char *paramString)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
G4double StoD(G4String s)
void SetDefaultValue(const char *theDefaultValue)