767{
769 static const G4double mNeut= QHaM(20);
770 static const G4double mProt= QHaM(21);
771 static const G4double mLamb= QHaM(22);
772 static const G4double mPiC = QHaM(15);
773 static const G4double mKZ = QHaM(17);
774 static const G4double mKM = QHaM(18);
775 static const G4double mSiM = QHaM(23);
776 static const G4double mSiP = QHaM(25);
777 static const G4double mKsZ = QHaM(27);
778 static const G4double mKsM = QHaM(26);
779 static const G4double mOmM = QHaM(44);
780 static const G4double mKZa = mKZ +anb;
781 static const G4double mKMa = mKM +anb;
782 static const G4double mSigM= mSiM+anb;
783 static const G4double mSigP= mSiP+anb;
784 static const G4double mKsiZ= mKsZ+anb;
785 static const G4double mKsiM= mKsM+anb;
786 static const G4double mOmeg= mOmM+anb;
787 static const G4double mDiPi= mPiC+mPiC+anb;
788 static const G4double mDiKZ= mKZa+mKZ;
789 static const G4double mDiKM= mKMa+mKM;
790 static const G4double mDiPr= mProt+mProt;
791 static const G4double mDiNt= mNeut+mNeut;
792 static const G4double mSmPi= mSiM+mDiPi;
793 static const G4double mSpPi= mSiP+mDiPi;
794 static const G4double mOmN = mOmeg+mNeut;
795 static const G4double mSpP = mSigP+mProt;
796 static const G4double mSpPP= mSpP +mProt;
797 static const G4double mSmN = mSigM+mNeut;
798 static const G4double mSmNN= mSmN +mNeut;
799
800 static const G4int iNR=76;
801 static const G4int nEl = 105;
802 static const G4int iNF[nEl]={0,0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
803 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
804 16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
805 31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55,
806 56 , 56, 57, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70,
807 71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
808 86 , 87, 88, 89, 91, 94, 98,103,109,115,122,128,134,140,146};
809#ifdef qdebug
810 static G4int iNmin[nEl]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
811 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
812 16 , 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
813 31 , 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 55,
814 56 , 56, 57, 57, 58, 60, 61, 63, 64, 65, 66, 67, 68, 69, 70,
815 71 , 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
816 86 , 87, 88, 89, 91, 94, 98,103,109,115,122,128,134,140,146};
817 static G4int iNmax=iNR;
818 static G4int iNran[nEl]={19,20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
819 34 , 35, 36, 37, 38, 39, 40, 48, 48, 48, 48, 50, 50, 50, 52,
820 53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
821 68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72,
822 73 , 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 76,
823 76 , 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 70, 69, 69, 69,
824 68 , 68, 68, 67, 63, 59, 55, 51, 47, 43, 39, 35, 31, 27, 23};
825#endif
826 static const G4int iNL[nEl]={19,20,21,22,23,24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
827 34 , 35, 36, 37, 38, 39, 40, 48, 48, 48, 48, 50, 50, 50, 52,
828 53 , 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
829 68 , 69, 70, 70, 70, 71, 71, 71, 71, 71, 72, 72, 72, 72, 72,
830 73 , 73, 73, 73, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75, 76,
831 76 , 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 70, 69, 69, 69,
832 68 , 68, 68, 67, 63, 59, 55, 51, 47, 43, 39, 35, 31, 27, 23};
833
834 static G4bool iNin6[nEl]={
false,
false,
false,
false,
false,
false,
false,
835 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
836 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
837 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
838 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
839 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
840 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
841 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
843
844 static G4bool iNin7[nEl]={
false,
false,
false,
false,
false,
false,
false,
845 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
846 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
847 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
848 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
849 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
850 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
851 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
853
854 static G4bool iNin8[nEl]={
false,
false,
false,
false,
false,
false,
false,
855 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
856 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
857 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
858 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
859 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
860 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
861 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
863
864 static G4bool iNin9[nEl]={
false,
false,
false,
false,
false,
false,
false,
865 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
866 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
867 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
868 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
869 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
870 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
871 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
873
874 static G4bool iNin0[nEl]={
false,
false,
false,
false,
false,
false,
false,
875 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
876 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
877 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
878 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
879 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
880 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
881 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
883
884 static G4bool iNin1[nEl]={
false,
false,
false,
false,
false,
false,
false,
885 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
886 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
887 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
888 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
889 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
890 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
891 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
893
894 static G4bool iNin2[nEl]={
false,
false,
false,
false,
false,
false,
false,
895 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
896 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
897 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
898 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
899 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
900 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
901 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
903
904 static G4bool iNin3[nEl]={
false,
false,
false,
false,
false,
false,
false,
905 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
906 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
907 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
908 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
909 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
910 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
911 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
913
914 static G4bool iNin4[nEl]={
false,
false,
false,
false,
false,
false,
false,
915 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
916 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
917 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
918 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
919 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
920 false,false,false,false,false,false,false,false,false,false,false,false,false,false,
921 false,false,false,false,false,false,false,false,false,false,false,false,false,false};
923
924#ifdef qdebug
925 static G4int Smin=-1;
926 static G4int Smax= 2;
927 static G4int NZmin= 0;
928 static G4int NNmin= 0;
929 static G4int NZS1max= 0;
930 static G4int NNS1max= 0;
931#endif
932
935 G4int zns=nz+s_value;
936 if(nz+s_value<0)
937 {
938 z=-z;
940 s_value=-s_value;
941 nz=-nz;
942 zns=-zns;
943 }
944 if(z<0)
945 {
946 if(z==-1)
947 {
948 if(!s_value)
949 {
950 if(n==1) return mPiC;
951 else return mPiC+(
n-1)*mNeut;
952 }
953 else if(s_value==1)
954 {
955 if(!n) return mKM;
956 else if(n==1) return mSiM;
957 else if(n==2) return mSmN ;
958 else if(n==3) return mSmNN;
959 else return mSigM+mNeut*(
n-1);
960 }
961 else if(s_value==2)
962 {
963 if(!n) return mKsM;
964 else if(n==1) return mKsiM+mNeut;
965 else if(n==2) return mKsiM+mNeut+mNeut;
966 else return mKsiM+mNeut*
n;
967 }
968 else if(s_value==-2)
969 {
970 if (nz==2) return mDiKZ+mPiC;
971 else return mDiKZ+mPiC+(nz-2)*mProt;
972 }
973 else if(s_value==3)
974 {
975 if (n==-1) return mOmM;
976 else if(!n ) return mOmN;
977 else if(n==-2) return mDiKZ+mKM;
978 else return mOmeg+mNeut*(
n+2);
979 }
980 else if(s_value==4)
981 {
982 if(n==-2) return mOmeg+mKM;
983 else if(n==-1) return mOmeg+mLamb;
984 else return mOmeg+mLamb+(
n+1)*mNeut;
985 }
986 else if(!n) return mOmeg+(s_value-2)*mLamb;
987 else
988 {
989#ifdef qdebug
990 if(s_value>NZS1max)
991 {
992 NZS1max=s_value;
993 G4cout<<
"-------->>G4QPDGCode::GetNucMass: Z=-1, S="<<s_value<<
">2 with N="<<
n<<
G4endl;
994 }
995#endif
996 return CalculateNuclMass(z,n,s_value);
997 }
998 }
999 else if(!s_value)
1000 {
1001 if(!nz)
1002 {
1003 if(n==2) return mDiPi;
1004 else return mDiPi+(
n-2)*mPiC;
1005 }
1006 else return mNeut*nz-z*mPiC+anb;
1007 }
1008 else if(!zns)
1009 {
1010 if(s_value>0)
return anb+s_value*mKM+
n*mPiC;
1011 else return anb-s_value*mKZ-z*mPiC;
1012 }
1013 else if(s_value==1)
1014 {
1015 if(!nz)
1016 {
1017 if(n==2) return mSmPi;
1018 else return mSmPi+(
n-2)*mPiC;
1019 }
1020 else return mSigM+nz*mNeut-(z+1)*mPiC;
1021 }
1022 else if(s_value==-1) return mKZa-z*mPiC+(nz-1)*mNeut;
1023 else if(s_value==2)
1024 {
1025 if (nz==-1)
return mKsiM+
n*mPiC;
1026 else if(!nz) return mKsiM+mNeut-(z+1)*mPiC;
1027 else return mKsiM+(nz+1)*mNeut-(z+1)*mPiC;
1028 }
1029 else if(s_value==-2) return mDiKZ-z*mPiC+(nz-2)*mNeut;
1030 else if(s_value==3)
1031 {
1032 if (nz==-2)
return mOmeg+(
n+1)*mPiC;
1033 else if(nz==-1)
return mOmeg+mNeut+
n*mPiC;
1034 else if(!nz)
return mOmeg+mDiNt+(
n-1)*mPiC;
1035 else return mOmeg+(nz+2)*mProt-(z+1)*mPiC;
1036 }
1037 else if(s_value<-2) return anb-s_value*mKZ-z*mPiC+(nz+s_value)*mNeut;
1038 else if(s_value==4)
1039 {
1040 if (nz==-3)
return mOmeg+mKM+(
n+1)*mPiC;
1041 else if(nz==-2)
return mOmeg+mSigM+
n*mPiC;
1042 else if(nz==-1)
return mOmeg+mSigM+mNeut+(
n-1)*mPiC;
1043 else if(!nz)
return mOmeg+mSigM+mDiNt+(
n-2)*mPiC;
1044 else return mOmeg+mSigM+(nz+2)*mDiNt-(z+2)*mPiC;
1045 }
1046
1047 else
1048 {
1049#ifdef qdebug
1050 if(z<NZmin)
1051 {
1052 NZmin=z;
1053 G4cout<<
"---->>G4QPDGCode::GetNucMass: Z="<<z<<
"<-1 with N="<<
n<<
", S="<<s_value<<
G4endl;
1054 }
1055#endif
1056 return CalculateNuclMass(z,n,s_value);
1057 }
1058 }
1059 else if(n<0)
1060 {
1061 if(n==-1)
1062 {
1063 if(!s_value)
1064 {
1065 if(z==1) return mPiC;
1066 else return mPiC+(z-1)*mProt;
1067 }
1068 else if(s_value==1)
1069 {
1070 if(!z) return mKZ;
1071 else if(z==1) return mSiP;
1072 else if(z==2) return mSpP ;
1073 else if(z==3) return mSpPP;
1074 else return mSigP+mProt*(z-1);
1075 }
1076 else if(s_value==2)
1077 {
1078 if(!z) return mKsZ;
1079 else if(z==1) return mKsiZ+mProt;
1080 else if(z==2) return mKsiZ+mProt+mProt;
1081 else return mKsiZ+mProt*z;
1082 }
1083 else if(s_value==-2)
1084 {
1085 if (nz==2) return mDiKM+mPiC;
1086 else return mDiKM+mPiC+(nz-2)*mProt;
1087 }
1088 else if(s_value==3)
1089 {
1090 if(z==1) return mOmeg+mDiPr;
1091 else return mOmeg+(z+1)*mProt;
1092 }
1093 else if(s_value==4) return mOmeg+mLamb+(z+1)*mProt;
1094 else if(!z) return mKZa+(s_value-1)*mLamb;
1095 else
1096 {
1097#ifdef qdebug
1098 if(s_value>NNS1max)
1099 {
1100 NNS1max=s_value;
1101 G4cout<<
"-------->>G4QPDGCode::GetNucMass: N=-1, S="<<s_value<<
">2 with Z="<<z<<
G4endl;
1102 }
1103#endif
1104 return CalculateNuclMass(z,n,s_value);
1105 }
1106 }
1107 else if(!s_value)
1108 {
1109 if(!nz)
1110 {
1111 if(z==2) return mDiPi;
1112 else return mDiPi+(z-2)*mPiC;
1113 }
1114 else return mProt*nz-
n*mPiC+anb;
1115 }
1116 else if(!zns)
1117 {
1118 if(s_value>0) return anb+s_value*mKZ+z*mPiC;
1119 else return anb-s_value*mKM-
n*mPiC;
1120 }
1121 else if(s_value==1)
1122 {
1123 if(!nz)
1124 {
1125 if(z==2) return mSpPi;
1126 else return mSpPi+(z-2)*mPiC;
1127 }
1128 else return mSigP+nz*mProt-(
n+1)*mPiC;
1129 }
1130 else if(s_value==-1)
return mKMa-
n*mPiC+(nz-1)*mProt;
1131 else if(s_value==2)
1132 {
1133 if (nz==-1) return mKsiZ+z*mPiC;
1134 else if(!nz)
return mKsiZ+mProt-(
n+1)*mPiC;
1135 else return mKsiZ+(nz+1)*mProt-(n+1)*mPiC;
1136 }
1137 else if(s_value==-2)
return mDiKM-
n*mPiC+(nz-2)*mProt;
1138 else if(s_value==3)
1139 {
1140 if (nz==-2) return mOmeg+(z+1)*mPiC;
1141 else if(nz==-1) return mOmeg+mProt+z*mPiC;
1142 else if(!nz) return mOmeg+mDiPr+(z-1)*mPiC;
1143 else return mOmeg+(nz+2)*mProt-(n+1)*mPiC;
1144 }
1145 else if(s_value<-2)
return anb-s_value*mKM-
n*mPiC+(nz+s_value)*mProt;
1146 else if(s_value==4)
1147 {
1148 if (nz==-3) return mOmeg+mKZ+(z+1)*mPiC;
1149 else if(nz==-2) return mOmeg+mSigP+z*mPiC;
1150 else if(nz==-1) return mOmeg+mSigP+mProt+(z-1)*mPiC;
1151 else if(!nz) return mOmeg+mSigP+mDiPr+(z-2)*mPiC;
1152 else return mOmeg+mSigP+(nz+2)*mProt-(n+2)*mPiC;
1153 }
1154
1155 else
1156 {
1157#ifdef qdebug
1158 if(n<NNmin)
1159 {
1161 G4cout<<
"---->>G4QPDGCode::GetNucMass: N="<<
n<<
"<-1 with Z="<<z<<
", S="<<s_value<<
G4endl;
1162 }
1163#endif
1164 return CalculateNuclMass(z,n,s_value);
1165 }
1166 }
1167
1168 if(nz >= 256 || z >= nEl) return 256000.;
1169 if(!s_value)
1170 {
1172 if(!iNin0[z])
1173 {
1174#ifdef idebug
1175 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=0 is initialized. F="<<iNin0[z]<<
G4endl;
1176#endif
1178 if(iNfin>iNR) iNfin=iNR;
1179 for (
G4int in=0; in<iNfin; in++) VZ0[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1180 iNin0[z]=true;
1181 }
1183 if(dNn<0)
1184 {
1185#ifdef qdebug
1186 if(n<iNmin[z])
1187 {
1188 G4cout<<
"-->>G4QPDGCode::GetNucM:Z="<<z<<
", S=0 with N="<<
n<<
"<"<<iNmin[z]<<
G4endl;
1190 }
1191#endif
1192 return CalculateNuclMass(z,n,s_value);
1193 }
1194 else if(dNn<iNL[z]) return VZ0[z][dNn];
1195 else
1196 {
1197#ifdef qdebug
1198 if(dNn>iNmax)
1199 {
1200 G4cout<<
"**>>G4QPDGCode::GetNucM:Z="<<z<<
", S=0 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1201 iNmax=dNn;
1202 }
1203 if(dNn>iNran[z])
1204 {
1205 G4cout<<
">G4QPDGCode::GetNucM:Z="<<z<<
", S=0 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1206 iNran[z]=dNn;
1207 }
1208#endif
1209 return CalculateNuclMass(z,n,s_value);
1210 }
1211 }
1212 else if(s_value==1)
1213 {
1215#ifdef pdebug
1217 if(pPrint)
1218 G4cout<<
"G4QPDGC::GetNucM:Nmin="<<Nmin<<
",iNin1="<<iNin1[0]<<
",iNL="<<iNL[0]<<
G4endl;
1219#endif
1220 if(!iNin1[z])
1221 {
1222#ifdef pdebug
1223 if(pPrint)
1224 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=1 is initialized. F="<<iNin1[z]<<
G4endl;
1225#endif
1227 if(iNfin>iNR) iNfin=iNR;
1228 for (
G4int in=0; in<iNfin; in++) VZ1[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1229 iNin1[z]=true;
1230 }
1232 if(dNn<0)
1233 {
1234#ifdef qdebug
1235 if(n<iNmin[z])
1236 {
1237 G4cout<<
"-->>G4QPDGCode::GetNucM:Z="<<z<<
", S=1 with N="<<
n<<
"<"<<iNmin[z]<<
G4endl;
1239 }
1240#endif
1241 return CalculateNuclMass(z,n,s_value);
1242 }
1243 else if(dNn<iNL[z]) return VZ1[z][dNn];
1244 else
1245 {
1246#ifdef qdebug
1247 if(dNn>iNmax)
1248 {
1249 G4cout<<
"**>>G4QPDGCode::GetNucM:Z="<<z<<
", S=1 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1250 iNmax=dNn;
1251 }
1252 if(dNn>iNran[z])
1253 {
1254 G4cout<<
">G4QPDGCode::GetNucM:Z="<<z<<
", S=1 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1255 iNran[z]=dNn;
1256 }
1257#endif
1258 return CalculateNuclMass(z,n,s_value);
1259 }
1260 }
1261 else if(s_value==-1)
1262 {
1264 if(!iNin9[z])
1265 {
1266#ifdef idebug
1267 G4cout<<
"*>G4QPDGCode::GetNucM:Z="<<z<<
", S=-1 is initialized. F="<<iNin9[z]<<
G4endl;
1268#endif
1270 if(iNfin>iNR) iNfin=iNR;
1271 for (
G4int in=0; in<iNfin; in++) VZ9[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1272 iNin9[z]=true;
1273 }
1275 if(dNn<0)
1276 {
1277#ifdef qdebug
1278 if(n<iNmin[z])
1279 {
1280 G4cout<<
"->>G4QPDGCode::GetNucM:Z="<<z<<
" ,S=-1 with N="<<
n<<
"<"<<iNmin[z]<<
G4endl;
1282 }
1283#endif
1284 return CalculateNuclMass(z,n,s_value);
1285 }
1286 else if(dNn<iNL[z]) return VZ9[z][dNn];
1287 else
1288 {
1289#ifdef qdebug
1290 if(dNn>iNmax)
1291 {
1292 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=-1 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1293 iNmax=dNn;
1294 }
1295 if(dNn>iNran[z])
1296 {
1297 G4cout<<
"G4QPDGCode::GetNucM:Z="<<z<<
", S=-1 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1298 iNran[z]=dNn;
1299 }
1300#endif
1301 return CalculateNuclMass(z,n,s_value);
1302 }
1303 }
1304 else if(s_value==2)
1305 {
1307 if(!iNin2[z])
1308 {
1309#ifdef idebug
1310 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=2 is initialized. F="<<iNin2[z]<<
G4endl;
1311#endif
1313 if(iNfin>iNR) iNfin=iNR;
1314 for (
G4int in=0; in<iNfin; in++) VZ2[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1315 iNin2[z]=true;
1316 }
1318 if(dNn<0)
1319 {
1320#ifdef qdebug
1321 if(n<iNmin[z])
1322 {
1323 G4cout<<
"-->>G4QPDGCode::GetNucM:Z="<<z<<
", S=2 with N="<<
n<<
"<"<<iNmin[z]<<
G4endl;
1325 }
1326#endif
1327 return CalculateNuclMass(z,n,s_value);
1328 }
1329 else if(dNn<iNL[z]) return VZ2[z][dNn];
1330 else
1331 {
1332#ifdef qdebug
1333 if(dNn>iNmax)
1334 {
1335 G4cout<<
"**>>G4QPDGCode::GetNucM:Z="<<z<<
", S=2 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1336 iNmax=dNn;
1337 }
1338 if(dNn>iNran[z])
1339 {
1340 G4cout<<
">G4QPDGCode::GetNucM:Z="<<z<<
", S=2 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1341 iNran[z]=dNn;
1342 }
1343#endif
1344 return CalculateNuclMass(z,n,s_value);
1345 }
1346 }
1347 else if(s_value==-2)
1348 {
1350 if(!iNin8[z])
1351 {
1352#ifdef idebug
1353 G4cout<<
"*>G4QPDGCode::GetNucM:Z="<<z<<
", S=-2 is initialized. F="<<iNin8[z]<<
G4endl;
1354#endif
1356 if(iNfin>iNR) iNfin=iNR;
1357 for (
G4int in=0; in<iNfin; in++) VZ8[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1358 iNin8[z]=true;
1359 }
1361 if(dNn<0)
1362 {
1363#ifdef qdebug
1364 if(n<iNmin[z])
1365 {
1366 G4cout<<
"->>G4QPDGCode::GetNucM:Z="<<z<<
", S=-2 with N="<<
n<<
"<"<<iNmin[z]<<
G4endl;
1368 }
1369#endif
1370 return CalculateNuclMass(z,n,s_value);
1371 }
1372 else if(dNn<iNL[z]) return VZ8[z][dNn];
1373 else
1374 {
1375#ifdef qdebug
1376 if(dNn>iNmax)
1377 {
1378 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=-2 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1379 iNmax=dNn;
1380 }
1381 if(dNn>iNran[z])
1382 {
1383 G4cout<<
"G4QPDGCode::GetNucM:Z="<<z<<
", S=-2 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1384 iNran[z]=dNn;
1385 }
1386#endif
1387 return CalculateNuclMass(z,n,s_value);
1388 }
1389 }
1390 else if(s_value==-3)
1391 {
1393 if(!iNin7[z])
1394 {
1395#ifdef idebug
1396 G4cout<<
"*>G4QPDGCode::GetNucM:Z="<<z<<
", S=-3 is initialized. F="<<iNin7[z]<<
G4endl;
1397#endif
1399 if(iNfin>iNR) iNfin=iNR;
1400 for (
G4int in=0; in<iNfin; in++) VZ7[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1401 iNin7[z]=true;
1402 }
1404 if(dNn<0)
1405 {
1406#ifdef qdebug
1407 if(n<iNmin[z])
1408 {
1409 G4cout<<
"->>G4QPDGCode::GetNucM:Z="<<z<<
", S=-3 with N="<<
n<<
"<"<<iNmin[z]<<
G4endl;
1411 }
1412#endif
1413 return CalculateNuclMass(z,n,s_value);
1414 }
1415 else if(dNn<iNL[z]) return VZ7[z][dNn];
1416 else
1417 {
1418#ifdef qdebug
1419 if(dNn>iNmax)
1420 {
1421 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=-3 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1422 iNmax=dNn;
1423 }
1424 if(dNn>iNran[z])
1425 {
1426 G4cout<<
"G4QPDGCode::GetNucM:Z="<<z<<
", S=-3 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1427 iNran[z]=dNn;
1428 }
1429#endif
1430 return CalculateNuclMass(z,n,s_value);
1431 }
1432 }
1433 else if(s_value==3)
1434 {
1436 if(!iNin3[z])
1437 {
1438#ifdef idebug
1439 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=3 is initialized. F="<<iNin3[z]<<
G4endl;
1440#endif
1442 if(iNfin>iNR) iNfin=iNR;
1443 for (
G4int in=0; in<iNfin; in++) VZ3[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1444 iNin3[z]=true;
1445 }
1447 if(dNn<0)
1448 {
1449#ifdef qdebug
1450 if(n<iNmin[z])
1451 {
1452 G4cout<<
"-->>G4QPDGCode::GetNucM:Z="<<z<<
", S=3 with N="<<
n<<
"<"<<iNmin[z]<<
G4endl;
1454 }
1455#endif
1456 return CalculateNuclMass(z,n,s_value);
1457 }
1458 else if(dNn<iNL[z]) return VZ3[z][dNn];
1459 else
1460 {
1461#ifdef qdebug
1462 if(dNn>iNmax)
1463 {
1464 G4cout<<
"**>>G4QPDGCode::GetNucM:Z="<<z<<
", S=3 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1465 iNmax=dNn;
1466 }
1467 if(dNn>iNran[z])
1468 {
1469 G4cout<<
">G4QPDGCode::GetNucM:Z="<<z<<
", S=3 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1470 iNran[z]=dNn;
1471 }
1472#endif
1473 return CalculateNuclMass(z,n,s_value);
1474 }
1475 }
1476 else if(s_value==-4)
1477 {
1479 if(!iNin6[z])
1480 {
1481#ifdef idebug
1482 G4cout<<
"*>G4QPDGCode::GetNucM:Z="<<z<<
", S=-4 is initialized. F="<<iNin6[z]<<
G4endl;
1483#endif
1485 if(iNfin>iNR) iNfin=iNR;
1486 for (
G4int in=0; in<iNfin; in++) VZ6[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1487 iNin6[z]=true;
1488 }
1490 if(dNn<0)
1491 {
1492#ifdef qdebug
1493 if(n<iNmin[z])
1494 {
1495 G4cout<<
"->>G4QPDGCode::GetNucM:Z="<<z<<
", S=-4 with N="<<
n<<
"<"<<iNmin[z]<<
G4endl;
1497 }
1498#endif
1499 return CalculateNuclMass(z,n,s_value);
1500 }
1501 else if(dNn<iNL[z]) return VZ6[z][dNn];
1502 else
1503 {
1504#ifdef qdebug
1505 if(dNn>iNmax)
1506 {
1507 G4cout<<
"**>G4QPDGCode::GetNucM:Z="<<z<<
", S=-4 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1508 iNmax=dNn;
1509 }
1510 if(dNn>iNran[z])
1511 {
1512 G4cout<<
"G4QPDGCode::GetNucM:Z="<<z<<
", S=-4 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1513 iNran[z]=dNn;
1514 }
1515#endif
1516 return CalculateNuclMass(z,n,s_value);
1517 }
1518 }
1519 else if(s_value==4)
1520 {
1522 if(!iNin4[z])
1523 {
1524#ifdef idebug
1525 G4cout<<
"*>G4QPDGCode::GetNucM:Z="<<z<<
", S=4 is initialized. F="<<iNin4[z]<<
G4endl;
1526#endif
1528 if(iNfin>iNR) iNfin=iNR;
1529 for (
G4int in=0; in<iNfin; in++) VZ4[z][in] = CalculateNuclMass(z,in+Nmin,s_value);
1530 iNin4[z]=true;
1531 }
1533 if(dNn<0)
1534 {
1535#ifdef qdebug
1536 if(n<iNmin[z])
1537 {
1538 G4cout<<
"-->>G4QPDGCode::GetNucM:Z="<<z<<
", S=4 with N="<<
n<<
"<"<<iNmin[z]<<
G4endl;
1540 }
1541#endif
1542 return CalculateNuclMass(z,n,s_value);
1543 }
1544 else if(dNn<iNL[z]) return VZ4[z][dNn];
1545 else
1546 {
1547#ifdef qdebug
1548 if(dNn>iNmax)
1549 {
1550 G4cout<<
"**>>G4QPDGCode::GetNucM:Z="<<z<<
", S=4 with dN="<<dNn<<
">"<<iNmax<<
G4endl;
1551 iNmax=dNn;
1552 }
1553 if(dNn>iNran[z])
1554 {
1555 G4cout<<
">G4QPDGCode::GetNucM:Z="<<z<<
", S=4 with dN="<<dNn<<
">"<<iNran[z]<<
G4endl;
1556 iNran[z]=dNn;
1557 }
1558#endif
1559 return CalculateNuclMass(z,n,s_value);
1560 }
1561 }
1562 else
1563 {
1564#ifdef qdebug
1565 if(s_value<Smin || s_value>Smax)
1566 {
1567 if(s_value<Smin) Smin=s_value;
1568 if(s_value>Smax) Smax=s_value;
1569 G4cout<<
">>G4QPDGCode::GetNucM:Z="<<z<<
" with S="<<s_value<<
",N="<<
n<<
" (Improve)"<<
G4endl;
1570 }
1571#endif
1572 rm=CalculateNuclMass(z,n,s_value);
1573 }
1574#ifdef debug
1575 G4cout<<
"G4QPDGCode::GetMass:GetNuclMass="<<rm<<
",Z="<<z<<
",N="<<
n<<
",S="<<s_value<<
G4endl;
1576#endif
1577 return rm;
1578}