692{
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049 if( command==directionCmd )
1050 {
1054 }
1055 else if( command==energyCmd )
1056 {
1060 }
1061 else if( command==positionCmd )
1062 {
1066 }
1067 else if(command == verbosityCmd)
1068 {
1070
1071
1072 }
1073 else if( command==particleCmd )
1074 {
1075 if (newValues =="ion")
1076 {
1077 fShootIon = true;
1078 }
1079 else
1080 {
1081 fShootIon = false;
1083 if(pd != nullptr)
1084 {
1087 }
1088 }
1089 }
1090 else if( command==timeCmd )
1091 {
1094 }
1095 else if( command==polCmd )
1096 {
1099 }
1100 else if( command==numberCmd )
1101 {
1104 }
1105 else if( command==ionCmd )
1106 {
1107 IonCommand(newValues);
1108 }
1109 else if( command==ionLvlCmd )
1110 {
1111 IonLvlCommand(newValues);
1112 }
1113 else if( command==listCmd )
1114 {
1116 }
1117 else if( command==addsourceCmd )
1118 {
1120 }
1121 else if( command==listsourceCmd )
1122 {
1124 }
1125 else if( command==clearsourceCmd )
1126 {
1128 fParticleGun = nullptr;
1129 }
1130 else if( command==getsourceCmd )
1131 {
1134 }
1135 else if( command==setsourceCmd )
1136 {
1137
1138
1139
1140
1141
1144 {
1149 << " source(s) are defined.";
1150 G4Exception(
"G4GeneralParticleSourceMessenger::SetNewValue",
1152 }
1154 }
1155 else if( command==setintensityCmd )
1156 {
1158 }
1159 else if( command==deletesourceCmd )
1160 {
1162 }
1163 else if(command == multiplevertexCmd)
1164 {
1166 }
1167 else if(command == flatsamplingCmd)
1168 {
1170 }
1171
1172
1173
1174 else if(command == typeCmd1)
1175 {
1178 }
1179 else if(command == shapeCmd1)
1180 {
1183 }
1184 else if(command == centreCmd1)
1185 {
1188 }
1189 else if(command == posrot1Cmd1)
1190 {
1193 }
1194 else if(command == posrot2Cmd1)
1195 {
1198 }
1199 else if(command == halfxCmd1)
1200 {
1203 }
1204 else if(command == halfyCmd1)
1205 {
1208 }
1209 else if(command == halfzCmd1)
1210 {
1213 }
1214 else if(command == radiusCmd1)
1215 {
1218 }
1219 else if(command == radius0Cmd1)
1220 {
1223 }
1224 else if(command == possigmarCmd1)
1225 {
1228 }
1229 else if(command == possigmaxCmd1)
1230 {
1233 }
1234 else if(command == possigmayCmd1)
1235 {
1238 }
1239 else if(command == paralpCmd1)
1240 {
1243 }
1244 else if(command == partheCmd1)
1245 {
1248 }
1249 else if(command == parphiCmd1)
1250 {
1253 }
1254 else if(command == confineCmd1)
1255 {
1258 }
1259 else if(command == angtypeCmd1)
1260 {
1263 }
1264 else if(command == angrot1Cmd1)
1265 {
1269 }
1270 else if(command == angrot2Cmd1)
1271 {
1275 }
1276 else if(command == minthetaCmd1)
1277 {
1280 }
1281 else if(command == minphiCmd1)
1282 {
1285 }
1286 else if(command == maxthetaCmd1)
1287 {
1290 }
1291 else if(command == maxphiCmd1)
1292 {
1295 }
1296 else if(command == angsigmarCmd1)
1297 {
1300 }
1301 else if(command == angsigmaxCmd1)
1302 {
1305 }
1306 else if(command == angsigmayCmd1)
1307 {
1310 }
1311 else if(command == angfocusCmd)
1312 {
1315 }
1316 else if(command == useuserangaxisCmd1)
1317 {
1320 }
1321 else if(command == surfnormCmd1)
1322 {
1325 }
1326 else if(command == energytypeCmd1)
1327 {
1329 if(newValues=="LW")
1330 {
1335 }
1336 else
1337 {
1340 }
1341 }
1342 else if(command == eminCmd1)
1343 {
1346 }
1347 else if(command == emaxCmd1)
1348 {
1351 }
1352 else if(command == monoenergyCmd1)
1353 {
1356 }
1357 else if(command == engsigmaCmd1)
1358 {
1361 }
1362 else if(command == alphaCmd1)
1363 {
1366 }
1367 else if(command == tempCmd1)
1368 {
1371 }
1372 else if(command == ezeroCmd1)
1373 {
1376 }
1377 else if(command == gradientCmd1)
1378 {
1381 }
1382 else if(command == interceptCmd1)
1383 {
1386 }
1387 else if(command == arbeintCmd1)
1388 {
1391 }
1392 else if(command == calculateCmd1)
1393 {
1396 }
1397 else if(command == energyspecCmd1)
1398 {
1401 }
1402 else if(command == diffspecCmd1)
1403 {
1406 }
1407 else if(command == applyEnergyWeightCmd1)
1408 {
1411 if(eDisType != "Lin")
1412 {
1414 ed << "Energy distribution is defined as " << eDisType << ". /gps/ene/applyEneWeight is available only for Linear distribution.";
1416 return;
1417 }
1419 }
1420 else if(command == histnameCmd1)
1421 {
1422 histtype = newValues;
1423 }
1424 else if(command == histfileCmd1)
1425 {
1426 histtype = "arb";
1429 }
1430 else if(command == histpointCmd1)
1431 {
1433 if(histtype == "biasx")
1435 if(histtype == "biasy")
1437 if(histtype == "biasz")
1439 if(histtype == "biast")
1441 if(histtype == "biasp")
1443 if(histtype == "biaspt")
1445 if(histtype == "biaspp")
1447 if(histtype == "biase")
1449 if(histtype == "theta")
1451 if(histtype == "phi")
1453 if(histtype == "energy")
1455 if(histtype == "arb")
1457 if(histtype == "epn")
1459 }
1460 else if(command == resethistCmd1)
1461 {
1463 if(newValues == "theta" || newValues == "phi")
1464 {
1466 }
1467 else if (newValues == "energy" || newValues == "arb" || newValues == "epn")
1468 {
1470 }
1471 else
1472 {
1474 }
1475 }
1476 else if(command == arbintCmd1)
1477 {
1479 }
1480 else
1481 {
1483 }
1484}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
void SetFlatSampling(G4bool av)
void AddaSource(G4double)
G4int GetCurrentSourceIndex() const
G4double GetCurrentSourceIntensity() const
void SetCurrentSourceIntensity(G4double)
void SetVerbosity(G4int i)
void SetCurrentSourceto(G4int)
void DeleteaSource(G4int)
G4int GetNumberofSource()
void SetMultipleVertex(G4bool av)
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
void DumpTable(const G4String &particle_name="ALL")
void SetBeamSigmaInAngX(G4double)
void SetBeamSigmaInAngR(G4double)
void UserDefAngTheta(const G4ThreeVector &)
void SetFocusPoint(const G4ThreeVector &)
void SetAngDistType(const G4String &)
void UserDefAngPhi(const G4ThreeVector &)
void SetMaxTheta(G4double)
void SetUseUserAngAxis(G4bool)
void SetMinTheta(G4double)
void SetParticleMomentumDirection(const G4ParticleMomentum &aMomDirection)
void SetBeamSigmaInAngY(G4double)
void ReSetHist(const G4String &)
void DefineAngRefAxes(const G4String &, const G4ThreeVector &)
void SetUserWRTSurface(G4bool)
void InputEnergySpectra(G4bool)
void ArbInterpolate(const G4String &)
const G4String & GetEnergyDisType()
void SetBeamSigmaInE(G4double)
void SetBiasAlpha(G4double)
void SetEnergyDisType(const G4String &)
void EpnEnergyHisto(const G4ThreeVector &)
void ArbEnergyHistoFile(const G4String &)
void SetGradient(G4double)
void ReSetHist(const G4String &)
void InputDifferentialSpectra(G4bool)
void SetMonoEnergy(G4double)
void ApplyEnergyWeight(G4bool val)
void UserEnergyHisto(const G4ThreeVector &)
void SetInterCept(G4double)
void ArbEnergyHisto(const G4ThreeVector &)
void SetParAlpha(G4double)
void SetPosRot2(const G4ThreeVector &)
void SetBeamSigmaInX(G4double)
void ConfineSourceToVolume(const G4String &)
void SetPosDisShape(const G4String &)
void SetCentreCoords(const G4ThreeVector &)
void SetBeamSigmaInR(G4double)
void SetRadius0(G4double)
void SetParTheta(G4double)
void SetPosRot1(const G4ThreeVector &)
void SetPosDisType(const G4String &)
void SetBeamSigmaInY(G4double)
void SetXBias(const G4ThreeVector &)
void SetEnergyBias(const G4ThreeVector &)
void SetPosPhiBias(const G4ThreeVector &)
void SetThetaBias(const G4ThreeVector &)
void SetYBias(const G4ThreeVector &)
void SetPosThetaBias(const G4ThreeVector &)
void SetPhiBias(const G4ThreeVector &)
void SetZBias(const G4ThreeVector &)
void ReSetHist(const G4String &)
void SetNumberOfParticles(G4int i)
void SetParticleTime(G4double aTime)
void SetParticleDefinition(G4ParticleDefinition *aParticleDefinition)
G4SPSAngDistribution * GetAngDist() const
G4SPSRandomGenerator * GetBiasRndm() const
G4SPSEneDistribution * GetEneDist() const
void SetParticlePolarization(const G4ThreeVector &aVal)
G4SPSPosDistribution * GetPosDist() const
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
static G4bool GetNewBoolValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
static G4int GetNewIntValue(const char *paramString)
const G4String & GetCommandPath() const
void CommandFailed(G4int errCode, G4ExceptionDescription &ed)
const G4String & GetCommandName() const