52const G4double G4SandiaTable::funitc[5] =
55 CLHEP::cm2*CLHEP::keV/CLHEP::g,
56 CLHEP::cm2*CLHEP::keV*CLHEP::keV/CLHEP::g,
57 CLHEP::cm2*CLHEP::keV*CLHEP::keV*CLHEP::keV/CLHEP::g,
58 CLHEP::cm2*CLHEP::keV*CLHEP::keV*CLHEP::keV*CLHEP::keV/CLHEP::g
61G4int G4SandiaTable::fCumulInterval[] = {0};
68 fMatSandiaMatrix =
nullptr;
69 fMatSandiaMatrixPAI =
nullptr;
70 fPhotoAbsorptionCof =
nullptr;
72 fMatNbOfIntervals = 0;
78 if(0 == fCumulInterval[0]) {
79 fCumulInterval[0] = 1;
82 fCumulInterval[
Z] = fCumulInterval[
Z-1] + fNbOfIntervals[
Z];
87 fSandiaCofPerAtom.resize(4,0.0);
90 ComputeMatSandiaMatrix();
99 : fMaterial(nullptr),fMatSandiaMatrix(nullptr),
100 fMatSandiaMatrixPAI(nullptr),fPhotoAbsorptionCof(nullptr)
103 fMatNbOfIntervals = 0;
106 fSandiaCofPerAtom.resize(4,0.0);
113 if(fMatSandiaMatrix !=
nullptr)
116 delete fMatSandiaMatrix;
118 if(fMatSandiaMatrixPAI !=
nullptr)
121 delete fMatSandiaMatrixPAI;
124 delete [] fPhotoAbsorptionCof;
131 std::vector<G4double>& coeff)
const
134 if(Z < 1 || Z > 100) {
135 Z = PrintErrorZ(
Z,
"GetSandiaCofPerAtom");
137 if(4 > coeff.size()) {
138 PrintErrorV(
"GetSandiaCofPerAtom(): input vector is resized");
142 G4double Emin = fSandiaTable[fCumulInterval[
Z-1]][0]*CLHEP::keV;
147 if (energy <= Emin) {
151 G4int interval = fNbOfIntervals[
Z] - 1;
152 row = fCumulInterval[
Z-1] + interval;
154 while ((interval>0) && (energy<fSandiaTable[row][0]*CLHEP::keV)) {
156 row = fCumulInterval[
Z-1] + interval;
162 coeff[0]=AoverAvo*funitc[1]*fSandiaTable[row][1];
163 coeff[1]=AoverAvo*funitc[2]*fSandiaTable[row][2];
164 coeff[2]=AoverAvo*funitc[3]*fSandiaTable[row][3];
165 coeff[3]=AoverAvo*funitc[4]*fSandiaTable[row][4];
172 std::vector<G4double>& coeff)
const
175 if(4 > coeff.size()) {
176 PrintErrorV(
"GetSandiaCofWater: input vector is resized");
181 if(energy > fH2OlowerI1[0][0]*CLHEP::keV) {
182 i = fH2OlowerInt - 1;
184 if(energy >= fH2OlowerI1[i][0]*CLHEP::keV) {
break; }
187 coeff[0]=funitc[1]*fH2OlowerI1[i][1];
188 coeff[1]=funitc[2]*fH2OlowerI1[i][2];
189 coeff[2]=funitc[3]*fH2OlowerI1[i][3];
190 coeff[3]=funitc[4]*fH2OlowerI1[i][4];
197 return fH2OlowerI1[fH2OlowerInt - 1][0]*CLHEP::keV;
204 return fH2OlowerI1[i][j]*funitc[j];
212 if(Z < 1 || Z > 100) {
213 Z = PrintErrorZ(
Z,
"GetSandiaCofPerAtom");
216 return fZtoAratio[
Z];
225 G4String sss =
"G4SandiaTable::"+ss+
"()";
227 ed <<
"Atomic number out of range Z= " <<
Z <<
"; closest value is used";
229 return (
Z > 100) ? 100 : 1;
234void G4SandiaTable::PrintErrorV(
const G4String& ss)
236 G4String sss =
"G4SandiaTable::"+ss;
244void G4SandiaTable::ComputeMatSandiaMatrix()
253 G4int MaxIntervals = 0;
258 for (elm = 0; elm < NbElm; ++elm)
260 z =
G4lrint((*ElementVector)[elm]->GetZ());
262 else if(z > 100) { z = 100; }
264 MaxIntervals += fNbOfIntervals[z];
273 for (elm = 0; elm < NbElm; ++elm)
276 IonizationPot = fIonizationPotentials[z]*CLHEP::eV;
277 for(
G4int row = fCumulInterval[z-1]; row<fCumulInterval[z]; ++row)
279 tmp1[interval1] = std::max(fSandiaTable[row][0]*CLHEP::keV,
295 for (
G4int i1 = 0; i1 < MaxIntervals; ++i1)
297 Emin = std::min(Emin, tmp1[i1]);
300 tmp2[interval2] = Emin;
304 for (
G4int j1 = 0; j1 < MaxIntervals; ++j1)
306 if (tmp1[j1] <= Emin) { tmp1[j1] =
DBL_MAX; }
316 for (interval = 0; interval < interval2; ++interval)
325 static const G4double prec = 1.e-03*CLHEP::eV;
326 G4double coef, oldsum(0.), newsum(0.);
327 fMatNbOfIntervals = 0;
329 for ( interval = 0; interval < interval2; ++interval)
331 Emin = (*(*fMatSandiaMatrix)[fMatNbOfIntervals])[0] = tmp2[interval];
333 for (
G4int k = 1; k < 5; ++k ) {
334 (*(*fMatSandiaMatrix)[fMatNbOfIntervals])[k] = 0.;
338 for ( elm = 0; elm < NbElm; elm++ )
342 for (
G4int j = 1; j < 5; ++j )
344 coef = NbOfAtomsPerVolume[elm]*fSandiaCofPerAtom[j-1];
345 (*(*fMatSandiaMatrix)[fMatNbOfIntervals])[j] += coef;
346 newsum += std::abs(coef);
351 if (newsum != oldsum) { oldsum = newsum; ++fMatNbOfIntervals;}
359 G4cout<<
"G4SandiaTable::ComputeMatSandiaMatrix(), mat = "
362 for(
G4int i = 0; i < fMatNbOfIntervals; ++i)
377void G4SandiaTable::ComputeMatSandiaMatrixPAI()
379 G4int MaxIntervals = 0;
380 G4int elm, c, i, j, jj, k, k1, k2, c1, n1, z;
385 std::vector<G4int>
Z(noElm);
387 for ( elm = 0; elm < noElm; ++elm )
389 z =
G4lrint((*ElementVector)[elm]->GetZ());
391 else if(z > 100) { z = 100; }
393 MaxIntervals += fNbOfIntervals[
Z[elm]];
395 fMaxInterval = MaxIntervals + 2;
399 G4cout<<
"G4SandiaTable::ComputeMatSandiaMatrixPAI: fMaxInterval = "
409 for( c = 0; c < fMaxInterval; ++c )
411 fPhotoAbsorptionCof0[c] = 0.;
412 fPhotoAbsorptionCof1[c] = 0.;
413 fPhotoAbsorptionCof2[c] = 0.;
414 fPhotoAbsorptionCof3[c] = 0.;
415 fPhotoAbsorptionCof4[c] = 0.;
419 for(i = 0; i < noElm; ++i)
421 G4double I1 = fIonizationPotentials[
Z[i]]*CLHEP::keV;
424 for(j = 1; j <
Z[i]; ++j)
426 n1 += fNbOfIntervals[j];
429 G4int n2 = n1 + fNbOfIntervals[
Z[i]];
431 for( k1 = n1; k1 < n2; ++k1 )
433 if( I1 > fSandiaTable[k1][0] )
441 for( c1 = 1; c1 < c; ++c1 )
443 if( fPhotoAbsorptionCof0[c1] == I1 )
451 fPhotoAbsorptionCof0[c] = I1;
454 for( k2 = k1; k2 < n2; ++k2 )
458 for( c1 = 1; c1 < c; ++c1 )
460 if( fPhotoAbsorptionCof0[c1] == fSandiaTable[k2][0] )
468 fPhotoAbsorptionCof0[c] = fSandiaTable[k2][0];
475 for( i = 1; i < c; ++i )
477 for( j = i + 1; j < c; ++j )
479 if( fPhotoAbsorptionCof0[i] > fPhotoAbsorptionCof0[j] )
481 G4double tmp = fPhotoAbsorptionCof0[i];
482 fPhotoAbsorptionCof0[i] = fPhotoAbsorptionCof0[j];
483 fPhotoAbsorptionCof0[j] = tmp;
488 G4cout<<i<<
"\t energy = "<<fPhotoAbsorptionCof0[i]<<
G4endl;
497 for(i = 0; i < noElm; ++i)
499 G4cout << i <<
" = elN, fraction = " << fractionW[i] <<
G4endl;
503 for( i = 0; i < noElm; ++i )
506 G4double I1 = fIonizationPotentials[
Z[i]]*keV;
508 for(j = 1; j <
Z[i]; ++j)
510 n1 += fNbOfIntervals[j];
513 G4int n2 = n1 + fNbOfIntervals[
Z[i]] - 1;
515 for(k = n1; k < n2; ++k)
520 for(
G4int q = 1; q < fMaxInterval-1; ++q)
522 G4double E1 = fPhotoAbsorptionCof0[q];
523 G4double E2 = fPhotoAbsorptionCof0[q+1];
527 G4cout<<
"k = "<<k<<
", q = "<<q<<
", B1 = "<<B1<<
", B2 = "<<B2
528 <<
", E1 = "<<E1<<
", E2 = "<<E2<<
G4endl;
530 if( B1 > E1 || B2 < E2 || E1 < I1 )
534 G4cout<<
"continue for: B1 = "<<B1<<
", B2 = "<<B2<<
", E1 = "
535 <<E1<<
", E2 = "<<E2<<
G4endl;
539 fPhotoAbsorptionCof1[q] += fSandiaTable[k][1]*fractionW[i];
540 fPhotoAbsorptionCof2[q] += fSandiaTable[k][2]*fractionW[i];
541 fPhotoAbsorptionCof3[q] += fSandiaTable[k][3]*fractionW[i];
542 fPhotoAbsorptionCof4[q] += fSandiaTable[k][4]*fractionW[i];
547 fPhotoAbsorptionCof1[fMaxInterval-1] += fSandiaTable[k][1]*fractionW[i];
548 fPhotoAbsorptionCof2[fMaxInterval-1] += fSandiaTable[k][2]*fractionW[i];
549 fPhotoAbsorptionCof3[fMaxInterval-1] += fSandiaTable[k][3]*fractionW[i];
550 fPhotoAbsorptionCof4[fMaxInterval-1] += fSandiaTable[k][4]*fractionW[i];
558 if(fPhotoAbsorptionCof1[c] != 0.0 || fPhotoAbsorptionCof2[c] != 0.0 ||
559 fPhotoAbsorptionCof3[c] != 0.0 || fPhotoAbsorptionCof4[c] != 0.0)
568 for( jj = 2; jj < fMaxInterval; ++jj )
570 fPhotoAbsorptionCof0[jj-1] = fPhotoAbsorptionCof0[jj];
571 fPhotoAbsorptionCof1[jj-1] = fPhotoAbsorptionCof1[jj];
572 fPhotoAbsorptionCof2[jj-1] = fPhotoAbsorptionCof2[jj];
573 fPhotoAbsorptionCof3[jj-1] = fPhotoAbsorptionCof3[jj];
574 fPhotoAbsorptionCof4[jj-1] = fPhotoAbsorptionCof4[jj];
580 while( c < fMaxInterval - 1 );
582 if(fPhotoAbsorptionCof0[fMaxInterval - 1] == 0.0)
593 for (i = 0; i < fMaxInterval; ++i)
595 fPhotoAbsorptionCof0[i+1] *= funitc[0];
596 fPhotoAbsorptionCof1[i+1] *= funitc[1]*density;
597 fPhotoAbsorptionCof2[i+1] *= funitc[2]*density;
598 fPhotoAbsorptionCof3[i+1] *= funitc[3]*density;
599 fPhotoAbsorptionCof4[i+1] *= funitc[4]*density;
603 if( fMaterial->
GetName() ==
"G4_WATER")
605 fMaxInterval += fH2OlowerInt;
607 for (i = 0; i < fMaxInterval; ++i)
609 fMatSandiaMatrixPAI->push_back(
new G4DataVector(5,0.) );
611 for (i = 0; i < fH2OlowerInt; ++i)
613 (*(*fMatSandiaMatrixPAI)[i])[0] = fH2OlowerI1[i][0];
614 (*(*fMatSandiaMatrixPAI)[i])[1] = fH2OlowerI1[i][1];
615 (*(*fMatSandiaMatrixPAI)[i])[2] = fH2OlowerI1[i][2];
616 (*(*fMatSandiaMatrixPAI)[i])[3] = fH2OlowerI1[i][3];
617 (*(*fMatSandiaMatrixPAI)[i])[4] = fH2OlowerI1[i][4];
619 for (i = fH2OlowerInt; i < fMaxInterval; ++i)
621 (*(*fMatSandiaMatrixPAI)[i])[0] = fPhotoAbsorptionCof0[i+1-fH2OlowerInt];
622 (*(*fMatSandiaMatrixPAI)[i])[1] = fPhotoAbsorptionCof1[i+1-fH2OlowerInt];
623 (*(*fMatSandiaMatrixPAI)[i])[2] = fPhotoAbsorptionCof2[i+1-fH2OlowerInt];
624 (*(*fMatSandiaMatrixPAI)[i])[3] = fPhotoAbsorptionCof3[i+1-fH2OlowerInt];
625 (*(*fMatSandiaMatrixPAI)[i])[4] = fPhotoAbsorptionCof4[i+1-fH2OlowerInt];
631 for (i = 0; i < fMaxInterval; ++i)
633 fMatSandiaMatrixPAI->push_back(
new G4DataVector(5,0.) );
635 for (i = 0; i < fMaxInterval; ++i)
637 (*(*fMatSandiaMatrixPAI)[i])[0] = fPhotoAbsorptionCof0[i+1];
638 (*(*fMatSandiaMatrixPAI)[i])[1] = fPhotoAbsorptionCof1[i+1];
639 (*(*fMatSandiaMatrixPAI)[i])[2] = fPhotoAbsorptionCof2[i+1];
640 (*(*fMatSandiaMatrixPAI)[i])[3] = fPhotoAbsorptionCof3[i+1];
641 (*(*fMatSandiaMatrixPAI)[i])[4] = fPhotoAbsorptionCof4[i+1];
649 G4cout<<
"G4SandiaTable::ComputeMatSandiaMatrixPAI(), mat = "
652 for( i = 0; i < fMaxInterval; ++i)
671 fMatNbOfIntervals = 0;
672 fMatSandiaMatrix =
nullptr;
673 fMatSandiaMatrixPAI =
nullptr;
674 fPhotoAbsorptionCof =
nullptr;
680 fSandiaCofPerAtom.resize(4,0.0);
685 if ( matIndex >= 0 && matIndex < numberOfMat)
687 fMaterial = (*theMaterialTable)[matIndex];
691 G4Exception(
"G4SandiaTable::G4SandiaTable(G4int matIndex)",
"mat401",
701 fMatNbOfIntervals = 0;
702 fMatSandiaMatrix =
nullptr;
703 fMatSandiaMatrixPAI =
nullptr;
704 fPhotoAbsorptionCof =
nullptr;
710 fSandiaCofPerAtom.resize(4,0.0);
718 ComputeMatSandiaMatrixPAI();
730G4double** G4SandiaTable::GetPointerToCof()
732 if(fPhotoAbsorptionCof ==
nullptr)
736 return fPhotoAbsorptionCof;
741void G4SandiaTable::SandiaSwap(
G4double** da ,
746 da[i][0] = da[j][0] ;
754 return fPhotoAbsorptionCof[i][j]*funitc[j];
765 for(
G4int i = 1;i < sz; ++i )
767 for(
G4int j = i + 1;j < sz; ++j )
769 if(da[i][0] > da[j][0])
771 SandiaSwap(da, i, j);
784 G4int c, i, flag = 0, n1 = 1;
789 for(i = 0; i < el; ++i)
791 fMaxInterval += fNbOfIntervals[
Z[i]];
797 G4cout<<
"begin sanInt, fMaxInterval = "<<fMaxInterval<<
G4endl;
800 fPhotoAbsorptionCof =
new G4double* [fMaxInterval];
802 for( i = 0; i < fMaxInterval; ++i ) {
803 fPhotoAbsorptionCof[i] =
new G4double[5];
807 for( c = 0; c < fMaxInterval; ++c ) { fPhotoAbsorptionCof[c][0] = 0.; }
811 for( i = 0; i < el; ++i )
813 I1 = fIonizationPotentials[
Z[i] ]*keV;
816 for(j = 1; j <
Z[i]; ++j)
818 n1 += fNbOfIntervals[j];
821 G4int n2 = n1 + fNbOfIntervals[
Z[i]];
823 for( k1 = n1; k1 < n2; k1++ )
825 if( I1 > fSandiaTable[k1][0] )
833 for( c1 = 1; c1 < c; c1++ )
835 if( fPhotoAbsorptionCof[c1][0] == I1 )
843 fPhotoAbsorptionCof[c][0] = I1;
846 for( k2 = k1; k2 < n2; k2++ )
850 for( c1 = 1; c1 < c; c1++ )
852 if( fPhotoAbsorptionCof[c1][0] == fSandiaTable[k2][0] )
860 fPhotoAbsorptionCof[c][0] = fSandiaTable[k2][0];
862 G4cout<<
"sanInt, c = "<<c<<
", E_c = "<<fPhotoAbsorptionCof[c][0]
870 SandiaSort(fPhotoAbsorptionCof,c);
873 G4cout<<
"end SanInt, fMaxInterval = "<<fMaxInterval<<
G4endl;
889 G4int i, j, n1, k, c=1, jj, kk;
892 for( i = 0; i < mi; ++i )
894 for(j = 1; j < 5; ++j)
896 fPhotoAbsorptionCof[i][j] = 0.;
899 for( i = 0; i < el; ++i )
902 I1 = fIonizationPotentials[
Z[i]]*keV;
904 for(j = 1; j <
Z[i]; ++j)
906 n1 += fNbOfIntervals[j];
909 G4int n2 = n1 + fNbOfIntervals[
Z[i]] - 1;
911 for( k = n1; k < n2; ++k )
913 B1 = fSandiaTable[k][0];
914 B2 = fSandiaTable[k+1][0];
916 for( c = 1; c < mi-1; ++c )
918 E1 = fPhotoAbsorptionCof[c][0];
919 E2 = fPhotoAbsorptionCof[c+1][0];
921 if(B1 > E1 || B2 < E2 || E1 < I1)
926 for( j = 1; j < 5; ++j )
928 fPhotoAbsorptionCof[c][j] += fSandiaTable[k][j]*fractionW[i];
931 G4cout<<
"c="<<c<<
"; j="<<j<<
"; fST="<<fSandiaTable[k][j]
932 <<
"; frW="<<fractionW[i]<<
G4endl;
937 for( j = 1; j < 5; ++j )
939 fPhotoAbsorptionCof[mi-1][j] += fSandiaTable[k][j]*fractionW[i];
942 G4cout<<
"mi-1="<<mi-1<<
"; j="<<j<<
"; fST="<<fSandiaTable[k][j]
943 <<
"; frW="<<fractionW[i]<<
G4endl;
953 if(fPhotoAbsorptionCof[c][1] != 0.0 || fPhotoAbsorptionCof[c][2] != 0.0 ||
954 fPhotoAbsorptionCof[c][3] != 0.0 || fPhotoAbsorptionCof[c][4] != 0.0)
959 for( jj = 2; jj < mi; ++jj )
961 for( kk = 0; kk < 5; ++kk ) {
962 fPhotoAbsorptionCof[jj-1][kk] = fPhotoAbsorptionCof[jj][kk];
983 return fMatNbOfIntervals;
992 if(Z < 1 || Z > 100) {
993 Z = PrintErrorZ(
Z,
"GetSandiaPerAtom");
995 if(interval<0 || interval>=fNbOfIntervals[
Z]) {
996 PrintErrorV(
"GetSandiaPerAtom");
997 interval = (interval<0) ? 0 : fNbOfIntervals[
Z]-1;
1000 PrintErrorV(
"GetSandiaPerAtom");
1004 G4int row = fCumulInterval[
Z-1] + interval;
1005 G4double x = fSandiaTable[row][0]*CLHEP::keV;
1007 x =
Z*CLHEP::amu/fZtoAratio[
Z]*fSandiaTable[row][j]*funitc[j];
1018 if(interval<0 || interval>=fMatNbOfIntervals) {
1019 PrintErrorV(
"GetSandiaCofForMaterial");
1020 interval = (interval<0) ? 0 : fMatNbOfIntervals-1;
1023 PrintErrorV(
"GetSandiaCofForMaterial");
1027 return ((*(*fMatSandiaMatrix)[interval])[j]);
1036 if (energy > (*(*fMatSandiaMatrix)[0])[0]) {
1037 interval = fMatNbOfIntervals - 1;
1039 while ((interval>0)&&(energy<(*(*fMatSandiaMatrix)[interval])[0]))
1042 return &((*(*fMatSandiaMatrix)[interval])[1]);
1051 if(interval<0 || interval>=fMatNbOfIntervals) {
1052 PrintErrorV(
"GetSandiaCofForMaterial");
1053 interval = (interval<0) ? 0 : fMatNbOfIntervals-1;
1056 PrintErrorV(
"GetSandiaCofForMaterial");
1060 return ((*(*fMatSandiaMatrix)[interval])[j])*funitc[j];
1069 if(interval<0 || interval>=fMaxInterval) {
1070 PrintErrorV(
"GetSandiaCofForMaterialPAI");
1071 interval = (interval<0) ? 0 : fMaxInterval-1;
1074 PrintErrorV(
"GetSandiaCofForMaterialPAI");
1078 return ((*(*fMatSandiaMatrixPAI)[interval])[j]);
1086void G4SandiaTable::ComputeMatTable()
1088 G4int elm, c, i, j, jj, k, kk, k1, k2, c1, n1;
1095 for (elm = 0; elm<noElm; ++elm)
1097 Z[elm] = (*ElementVector)[elm]->GetZasInt();
1098 fMaxInterval += fNbOfIntervals[
Z[elm]];
1104 fPhotoAbsorptionCof =
new G4double* [fMaxInterval];
1106 for(i = 0; i < fMaxInterval; ++i)
1108 fPhotoAbsorptionCof[i] =
new G4double[5];
1113 for(c = 0; c < fMaxInterval; ++c)
1115 fPhotoAbsorptionCof[c][0] = 0.;
1119 for(i = 0; i < noElm; ++i)
1121 G4double I1 = fIonizationPotentials[
Z[i]]*keV;
1124 for(j = 1; j <
Z[i]; ++j)
1126 n1 += fNbOfIntervals[j];
1128 G4int n2 = n1 + fNbOfIntervals[
Z[i]];
1130 for(k1 = n1; k1 < n2; ++k1)
1132 if(I1 > fSandiaTable[k1][0])
1140 for(c1 = 1; c1 < c; ++c1)
1142 if(fPhotoAbsorptionCof[c1][0] == I1)
1150 fPhotoAbsorptionCof[c][0] = I1;
1153 for(k2 = k1; k2 < n2; ++k2)
1157 for(c1 = 1; c1 < c; ++c1)
1159 if(fPhotoAbsorptionCof[c1][0] == fSandiaTable[k2][0])
1167 fPhotoAbsorptionCof[c][0] = fSandiaTable[k2][0];
1173 SandiaSort(fPhotoAbsorptionCof,c);
1178 for(i = 0; i < fMaxInterval; ++i)
1180 for(j = 1; j < 5; ++j)
1182 fPhotoAbsorptionCof[i][j] = 0.;
1185 for(i = 0; i < noElm; ++i)
1188 G4double I1 = fIonizationPotentials[
Z[i]]*keV;
1190 for(j = 1; j <
Z[i]; ++j)
1192 n1 += fNbOfIntervals[j];
1194 G4int n2 = n1 + fNbOfIntervals[
Z[i]] - 1;
1196 for(k = n1; k < n2; ++k)
1199 G4double B2 = fSandiaTable[k+1][0];
1200 for(
G4int q = 1; q < fMaxInterval-1; q++)
1202 G4double E1 = fPhotoAbsorptionCof[q][0];
1203 G4double E2 = fPhotoAbsorptionCof[q+1][0];
1204 if(B1 > E1 || B2 < E2 || E1 < I1)
1208 for(j = 1; j < 5; ++j)
1210 fPhotoAbsorptionCof[q][j] += fSandiaTable[k][j]*fractionW[i];
1214 for(j = 1; j < 5; ++j)
1216 fPhotoAbsorptionCof[fMaxInterval-1][j] +=
1217 fSandiaTable[k][j]*fractionW[i];
1227 if(fPhotoAbsorptionCof[c][1] != 0.0 || fPhotoAbsorptionCof[c][2] != 0.0 ||
1228 fPhotoAbsorptionCof[c][3] != 0.0 || fPhotoAbsorptionCof[c][4] != 0.0)
1233 for(jj = 2; jj < fMaxInterval; ++jj)
1235 for(kk = 0; kk < 5; ++kk)
1237 fPhotoAbsorptionCof[jj-1][kk]= fPhotoAbsorptionCof[jj][kk];
1244 while( c < fMaxInterval - 1 );
1252 for (i = 0; i < fMaxInterval; ++i)
1256 for ( i = 0; i < fMaxInterval; ++i )
1258 for( j = 0; j < 5; ++j )
1260 (*(*fMatSandiaMatrix)[i])[j] = fPhotoAbsorptionCof[i+1][j];
1263 fMatNbOfIntervals = fMaxInterval;
1267 G4cout<<
"vmg, G4SandiaTable::ComputeMatTable(), mat = "
1270 for ( i = 0; i < fMaxInterval; ++i )
std::vector< const G4Element * > G4ElementVector
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
std::vector< G4Material * > G4MaterialTable
G4GLOB_DLL std::ostream G4cout
G4double GetDensity() const
const G4ElementVector * GetElementVector() const
static size_t GetNumberOfMaterials()
const G4double * GetFractionVector() const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() const
static G4MaterialTable * GetMaterialTable()
const G4String & GetName() const
void Initialize(const G4Material *)
G4int GetMaxInterval() const
G4double GetWaterEnergyLimit() const
G4int GetMatNbOfIntervals() const
static G4double GetZtoA(G4int Z)
G4double GetWaterCofForMaterial(G4int, G4int) const
G4double GetSandiaCofForMaterial(G4int, G4int) const
void GetSandiaCofWater(G4double energy, std::vector< G4double > &coeff) const
G4double GetSandiaMatTablePAI(G4int, G4int) const
G4int SandiaMixing(G4int Z[], const G4double *fractionW, G4int el, G4int mi)
void GetSandiaCofPerAtom(G4int Z, G4double energy, std::vector< G4double > &coeff) const
G4int SandiaIntervals(G4int Z[], G4int el)
G4double GetSandiaMatTable(G4int, G4int) const
G4double GetPhotoAbsorpCof(G4int i, G4int j) const