691{
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 if( command==directionCmd )
1049 {
1053 }
1054 else if( command==energyCmd )
1055 {
1059 }
1060 else if( command==positionCmd )
1061 {
1065 }
1066 else if(command == verbosityCmd)
1067 {
1069
1070
1071 }
1072 else if( command==particleCmd )
1073 {
1074 if (newValues =="ion")
1075 {
1076 fShootIon = true;
1077 }
1078 else
1079 {
1080 fShootIon = false;
1082 if(pd != nullptr)
1083 {
1086 }
1087 }
1088 }
1089 else if( command==timeCmd )
1090 {
1093 }
1094 else if( command==polCmd )
1095 {
1098 }
1099 else if( command==numberCmd )
1100 {
1103 }
1104 else if( command==ionCmd )
1105 {
1106 IonCommand(newValues);
1107 }
1108 else if( command==ionLvlCmd )
1109 {
1110 IonLvlCommand(newValues);
1111 }
1112 else if( command==listCmd )
1113 {
1115 }
1116 else if( command==addsourceCmd )
1117 {
1119 }
1120 else if( command==listsourceCmd )
1121 {
1123 }
1124 else if( command==clearsourceCmd )
1125 {
1127 fParticleGun = nullptr;
1128 }
1129 else if( command==getsourceCmd )
1130 {
1133 }
1134 else if( command==setsourceCmd )
1135 {
1136
1137
1138
1139
1140
1143 {
1148 << " source(s) are defined.";
1149 G4Exception(
"G4GeneralParticleSourceMessenger::SetNewValue",
1151 }
1153 }
1154 else if( command==setintensityCmd )
1155 {
1157 }
1158 else if( command==deletesourceCmd )
1159 {
1161 }
1162 else if(command == multiplevertexCmd)
1163 {
1165 }
1166 else if(command == flatsamplingCmd)
1167 {
1169 }
1170
1171
1172
1173 else if(command == typeCmd1)
1174 {
1177 }
1178 else if(command == shapeCmd1)
1179 {
1182 }
1183 else if(command == centreCmd1)
1184 {
1187 }
1188 else if(command == posrot1Cmd1)
1189 {
1192 }
1193 else if(command == posrot2Cmd1)
1194 {
1197 }
1198 else if(command == halfxCmd1)
1199 {
1202 }
1203 else if(command == halfyCmd1)
1204 {
1207 }
1208 else if(command == halfzCmd1)
1209 {
1212 }
1213 else if(command == radiusCmd1)
1214 {
1217 }
1218 else if(command == radius0Cmd1)
1219 {
1222 }
1223 else if(command == possigmarCmd1)
1224 {
1227 }
1228 else if(command == possigmaxCmd1)
1229 {
1232 }
1233 else if(command == possigmayCmd1)
1234 {
1237 }
1238 else if(command == paralpCmd1)
1239 {
1242 }
1243 else if(command == partheCmd1)
1244 {
1247 }
1248 else if(command == parphiCmd1)
1249 {
1252 }
1253 else if(command == confineCmd1)
1254 {
1257 }
1258 else if(command == angtypeCmd1)
1259 {
1262 }
1263 else if(command == angrot1Cmd1)
1264 {
1268 }
1269 else if(command == angrot2Cmd1)
1270 {
1274 }
1275 else if(command == minthetaCmd1)
1276 {
1279 }
1280 else if(command == minphiCmd1)
1281 {
1284 }
1285 else if(command == maxthetaCmd1)
1286 {
1289 }
1290 else if(command == maxphiCmd1)
1291 {
1294 }
1295 else if(command == angsigmarCmd1)
1296 {
1299 }
1300 else if(command == angsigmaxCmd1)
1301 {
1304 }
1305 else if(command == angsigmayCmd1)
1306 {
1309 }
1310 else if(command == angfocusCmd)
1311 {
1314 }
1315 else if(command == useuserangaxisCmd1)
1316 {
1319 }
1320 else if(command == surfnormCmd1)
1321 {
1324 }
1325 else if(command == energytypeCmd1)
1326 {
1328 if(newValues=="LW")
1329 {
1334 }
1335 else
1336 {
1339 }
1340 }
1341 else if(command == eminCmd1)
1342 {
1345 }
1346 else if(command == emaxCmd1)
1347 {
1350 }
1351 else if(command == monoenergyCmd1)
1352 {
1355 }
1356 else if(command == engsigmaCmd1)
1357 {
1360 }
1361 else if(command == alphaCmd1)
1362 {
1365 }
1366 else if(command == tempCmd1)
1367 {
1370 }
1371 else if(command == ezeroCmd1)
1372 {
1375 }
1376 else if(command == gradientCmd1)
1377 {
1380 }
1381 else if(command == interceptCmd1)
1382 {
1385 }
1386 else if(command == arbeintCmd1)
1387 {
1390 }
1391 else if(command == calculateCmd1)
1392 {
1395 }
1396 else if(command == energyspecCmd1)
1397 {
1400 }
1401 else if(command == diffspecCmd1)
1402 {
1405 }
1406 else if(command == applyEnergyWeightCmd1)
1407 {
1410 if(eDisType != "Lin")
1411 {
1413 ed << "Energy distribution is defined as " << eDisType << ". /gps/ene/applyEneWeight is available only for Linear distribution.";
1415 return;
1416 }
1418 }
1419 else if(command == histnameCmd1)
1420 {
1421 histtype = newValues;
1422 }
1423 else if(command == histfileCmd1)
1424 {
1425 histtype = "arb";
1428 }
1429 else if(command == histpointCmd1)
1430 {
1432 if(histtype == "biasx")
1434 if(histtype == "biasy")
1436 if(histtype == "biasz")
1438 if(histtype == "biast")
1440 if(histtype == "biasp")
1442 if(histtype == "biaspt")
1444 if(histtype == "biaspp")
1446 if(histtype == "biase")
1448 if(histtype == "theta")
1450 if(histtype == "phi")
1452 if(histtype == "energy")
1454 if(histtype == "arb")
1456 if(histtype == "epn")
1458 }
1459 else if(command == resethistCmd1)
1460 {
1462 if(newValues == "theta" || newValues == "phi")
1463 {
1465 }
1466 else if (newValues == "energy" || newValues == "arb" || newValues == "epn")
1467 {
1469 }
1470 else
1471 {
1473 }
1474 }
1475 else if(command == arbintCmd1)
1476 {
1478 }
1479 else
1480 {
1482 }
1483}
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