48const G4double G4SandiaTable::funitc[5] = {CLHEP::keV, CLHEP::cm2* CLHEP::keV / CLHEP::g,
49 CLHEP::cm2* CLHEP::keV* CLHEP::keV / CLHEP::g,
50 CLHEP::cm2* CLHEP::keV* CLHEP::keV* CLHEP::keV / CLHEP::g,
51 CLHEP::cm2* CLHEP::keV* CLHEP::keV* CLHEP::keV* CLHEP::keV / CLHEP::g};
53G4int G4SandiaTable::fCumulInterval[] = {0};
59 fMatSandiaMatrix =
nullptr;
60 fMatSandiaMatrixPAI =
nullptr;
61 fPhotoAbsorptionCof =
nullptr;
63 fMatNbOfIntervals = 0;
69 if (0 == fCumulInterval[0]) {
70 fCumulInterval[0] = 1;
72 for (
G4int Z = 1; Z < 101; ++Z) {
73 fCumulInterval[Z] = fCumulInterval[Z - 1] + fNbOfIntervals[Z];
78 fSandiaCofPerAtom.resize(4, 0.0);
81 ComputeMatSandiaMatrix();
88 if (fMatSandiaMatrix !=
nullptr) {
90 delete fMatSandiaMatrix;
92 if (fMatSandiaMatrixPAI !=
nullptr) {
94 delete fMatSandiaMatrixPAI;
97 delete[] fPhotoAbsorptionCof;
103 G4int Z,
G4double energy, std::vector<G4double>& coeff)
const
106 if (Z < 1 || Z > 100) {
107 Z = PrintErrorZ(Z,
"GetSandiaCofPerAtom");
109 if (4 > coeff.size()) {
110 PrintErrorV(
"GetSandiaCofPerAtom(): input vector is resized");
114 G4double Emin = fSandiaTable[fCumulInterval[Z - 1]][0] * CLHEP::keV;
119 if (energy <= Emin) {
123 G4int interval = fNbOfIntervals[Z] - 1;
124 row = fCumulInterval[Z - 1] + interval;
126 while ((interval > 0) && (energy < fSandiaTable[row][0] * CLHEP::keV)) {
128 row = fCumulInterval[Z - 1] + interval;
132 G4double AoverAvo = Z * amu / fZtoAratio[Z];
134 coeff[0] = AoverAvo * funitc[1] * fSandiaTable[row][1];
135 coeff[1] = AoverAvo * funitc[2] * fSandiaTable[row][2];
136 coeff[2] = AoverAvo * funitc[3] * fSandiaTable[row][3];
137 coeff[3] = AoverAvo * funitc[4] * fSandiaTable[row][4];
145 if (4 > coeff.size()) {
146 PrintErrorV(
"GetSandiaCofWater: input vector is resized");
151 if (energy > fH2OlowerI1[0][0] * CLHEP::keV) {
152 i = fH2OlowerInt - 1;
154 if (energy >= fH2OlowerI1[i][0] * CLHEP::keV) {
159 coeff[0] = funitc[1] * fH2OlowerI1[i][1];
160 coeff[1] = funitc[2] * fH2OlowerI1[i][2];
161 coeff[2] = funitc[3] * fH2OlowerI1[i][3];
162 coeff[3] = funitc[4] * fH2OlowerI1[i][4];
169 return fH2OlowerI1[fH2OlowerInt - 1][0] * CLHEP::keV;
176 return fH2OlowerI1[i][j] * funitc[j];
184 if (Z < 1 || Z > 100) {
185 Z = PrintErrorZ(Z,
"GetSandiaCofPerAtom");
188 return fZtoAratio[Z];
197 G4String sss =
"G4SandiaTable::" + ss +
"()";
199 ed <<
"Atomic number out of range Z= " << Z <<
"; closest value is used";
201 return (Z > 100) ? 100 : 1;
206void G4SandiaTable::PrintErrorV(
const G4String& ss)
208 G4String sss =
"G4SandiaTable::" + ss;
216void G4SandiaTable::ComputeMatSandiaMatrix()
222 auto Z =
new G4int[NbElm];
225 G4int MaxIntervals = 0;
230 for (elm = 0; elm < NbElm; ++elm) {
231 z =
G4lrint((*ElementVector)[elm]->GetZ());
239 MaxIntervals += fNbOfIntervals[z];
244 auto tmp1 =
new G4double[MaxIntervals];
248 for (elm = 0; elm < NbElm; ++elm) {
250 IonizationPot = fIonizationPotentials[z] * CLHEP::eV;
251 for (
G4int row = fCumulInterval[z - 1]; row < fCumulInterval[z]; ++row) {
252 tmp1[interval1] = std::max(fSandiaTable[row][0] * CLHEP::keV, IonizationPot);
259 auto tmp2 =
new G4double[MaxIntervals];
266 for (
G4int i1 = 0; i1 < MaxIntervals; ++i1) {
267 Emin = std::min(Emin, tmp1[i1]);
270 tmp2[interval2] = Emin;
274 for (
G4int j1 = 0; j1 < MaxIntervals; ++j1) {
275 if (tmp1[j1] <= Emin) {
287 for (interval = 0; interval < interval2; ++interval) {
295 static const G4double prec = 1.e-03 * CLHEP::eV;
296 G4double coef, oldsum(0.), newsum(0.);
297 fMatNbOfIntervals = 0;
299 for (interval = 0; interval < interval2; ++interval) {
300 Emin = (*(*fMatSandiaMatrix)[fMatNbOfIntervals])[0] = tmp2[interval];
302 for (
G4int k = 1; k < 5; ++k) {
303 (*(*fMatSandiaMatrix)[fMatNbOfIntervals])[k] = 0.;
307 for (elm = 0; elm < NbElm; elm++) {
310 for (
G4int j = 1; j < 5; ++j) {
311 coef = NbOfAtomsPerVolume[elm] * fSandiaCofPerAtom[j - 1];
312 (*(*fMatSandiaMatrix)[fMatNbOfIntervals])[j] += coef;
313 newsum += std::abs(coef);
318 if (newsum != oldsum) {
328 G4cout <<
"G4SandiaTable::ComputeMatSandiaMatrix(), mat = " << fMaterial->
GetName() <<
G4endl;
330 for (
G4int i = 0; i < fMatNbOfIntervals; ++i) {
342void G4SandiaTable::ComputeMatSandiaMatrixPAI()
344 G4int MaxIntervals = 0;
345 G4int elm, c, i, j, jj, k, k1, k2, c1, n1, z;
350 std::vector<G4int> Z(noElm);
352 for (elm = 0; elm < noElm; ++elm) {
353 z =
G4lrint((*ElementVector)[elm]->GetZ());
361 MaxIntervals += fNbOfIntervals[Z[elm]];
363 fMaxInterval = MaxIntervals + 2;
366 G4cout <<
"G4SandiaTable::ComputeMatSandiaMatrixPAI: fMaxInterval = " << fMaxInterval <<
G4endl;
375 for (c = 0; c < fMaxInterval; ++c)
377 fPhotoAbsorptionCof0[c] = 0.;
378 fPhotoAbsorptionCof1[c] = 0.;
379 fPhotoAbsorptionCof2[c] = 0.;
380 fPhotoAbsorptionCof3[c] = 0.;
381 fPhotoAbsorptionCof4[c] = 0.;
385 for (i = 0; i < noElm; ++i) {
386 G4double I1 = fIonizationPotentials[Z[i]] * CLHEP::keV;
389 for (j = 1; j < Z[i]; ++j) {
390 n1 += fNbOfIntervals[j];
393 G4int n2 = n1 + fNbOfIntervals[Z[i]];
395 for (k1 = n1; k1 < n2; ++k1) {
396 if (I1 > fSandiaTable[k1][0]) {
403 for (c1 = 1; c1 < c; ++c1) {
404 if (fPhotoAbsorptionCof0[c1] == I1)
411 fPhotoAbsorptionCof0[c] = I1;
414 for (k2 = k1; k2 < n2; ++k2) {
417 for (c1 = 1; c1 < c; ++c1) {
418 if (fPhotoAbsorptionCof0[c1] == fSandiaTable[k2][0]) {
424 fPhotoAbsorptionCof0[c] = fSandiaTable[k2][0];
431 for (i = 1; i < c; ++i) {
432 for (j = i + 1; j < c; ++j) {
433 if (fPhotoAbsorptionCof0[i] > fPhotoAbsorptionCof0[j]) {
434 G4double tmp = fPhotoAbsorptionCof0[i];
435 fPhotoAbsorptionCof0[i] = fPhotoAbsorptionCof0[j];
436 fPhotoAbsorptionCof0[j] = tmp;
440 G4cout << i <<
"\t energy = " << fPhotoAbsorptionCof0[i] <<
G4endl;
448 for (i = 0; i < noElm; ++i) {
449 G4cout << i <<
" = elN, fraction = " << fractionW[i] <<
G4endl;
453 for (i = 0; i < noElm; ++i) {
455 G4double I1 = fIonizationPotentials[Z[i]] * keV;
457 for (j = 1; j < Z[i]; ++j) {
458 n1 += fNbOfIntervals[j];
461 G4int n2 = n1 + fNbOfIntervals[Z[i]] - 1;
463 for (k = n1; k < n2; ++k) {
465 G4double B2 = fSandiaTable[k + 1][0];
467 for (
G4int q = 1; q < fMaxInterval - 1; ++q) {
468 G4double E1 = fPhotoAbsorptionCof0[q];
469 G4double E2 = fPhotoAbsorptionCof0[q + 1];
472 G4cout <<
"k = " << k <<
", q = " << q <<
", B1 = " << B1 <<
", B2 = " << B2
473 <<
", E1 = " << E1 <<
", E2 = " << E2 <<
G4endl;
475 if (B1 > E1 || B2 < E2 || E1 < I1) {
477 G4cout <<
"continue for: B1 = " << B1 <<
", B2 = " << B2 <<
", E1 = " << E1
478 <<
", E2 = " << E2 <<
G4endl;
482 fPhotoAbsorptionCof1[q] += fSandiaTable[k][1] * fractionW[i];
483 fPhotoAbsorptionCof2[q] += fSandiaTable[k][2] * fractionW[i];
484 fPhotoAbsorptionCof3[q] += fSandiaTable[k][3] * fractionW[i];
485 fPhotoAbsorptionCof4[q] += fSandiaTable[k][4] * fractionW[i];
490 fPhotoAbsorptionCof1[fMaxInterval - 1] += fSandiaTable[k][1] * fractionW[i];
491 fPhotoAbsorptionCof2[fMaxInterval - 1] += fSandiaTable[k][2] * fractionW[i];
492 fPhotoAbsorptionCof3[fMaxInterval - 1] += fSandiaTable[k][3] * fractionW[i];
493 fPhotoAbsorptionCof4[fMaxInterval - 1] += fSandiaTable[k][4] * fractionW[i];
500 if (fPhotoAbsorptionCof1[c] != 0.0 || fPhotoAbsorptionCof2[c] != 0.0 ||
501 fPhotoAbsorptionCof3[c] != 0.0 || fPhotoAbsorptionCof4[c] != 0.0)
509 for (jj = 2; jj < fMaxInterval; ++jj) {
510 fPhotoAbsorptionCof0[jj - 1] = fPhotoAbsorptionCof0[jj];
511 fPhotoAbsorptionCof1[jj - 1] = fPhotoAbsorptionCof1[jj];
512 fPhotoAbsorptionCof2[jj - 1] = fPhotoAbsorptionCof2[jj];
513 fPhotoAbsorptionCof3[jj - 1] = fPhotoAbsorptionCof3[jj];
514 fPhotoAbsorptionCof4[jj - 1] = fPhotoAbsorptionCof4[jj];
520 while (c < fMaxInterval - 1);
522 if (fPhotoAbsorptionCof0[fMaxInterval - 1] == 0.0) {
532 for (i = 0; i < fMaxInterval; ++i)
534 fPhotoAbsorptionCof0[i + 1] *= funitc[0];
535 fPhotoAbsorptionCof1[i + 1] *= funitc[1] * density;
536 fPhotoAbsorptionCof2[i + 1] *= funitc[2] * density;
537 fPhotoAbsorptionCof3[i + 1] *= funitc[3] * density;
538 fPhotoAbsorptionCof4[i + 1] *= funitc[4] * density;
541 if (fMaterial->
GetName() ==
"G4_WATER") {
542 fMaxInterval += fH2OlowerInt;
544 for (i = 0; i < fMaxInterval; ++i)
546 fMatSandiaMatrixPAI->push_back(
new G4DataVector(5, 0.));
548 for (i = 0; i < fH2OlowerInt; ++i) {
549 (*(*fMatSandiaMatrixPAI)[i])[0] = fH2OlowerI1[i][0];
550 (*(*fMatSandiaMatrixPAI)[i])[1] = fH2OlowerI1[i][1];
551 (*(*fMatSandiaMatrixPAI)[i])[2] = fH2OlowerI1[i][2];
552 (*(*fMatSandiaMatrixPAI)[i])[3] = fH2OlowerI1[i][3];
553 (*(*fMatSandiaMatrixPAI)[i])[4] = fH2OlowerI1[i][4];
555 for (i = fH2OlowerInt; i < fMaxInterval; ++i) {
556 (*(*fMatSandiaMatrixPAI)[i])[0] = fPhotoAbsorptionCof0[i + 1 - fH2OlowerInt];
557 (*(*fMatSandiaMatrixPAI)[i])[1] = fPhotoAbsorptionCof1[i + 1 - fH2OlowerInt];
558 (*(*fMatSandiaMatrixPAI)[i])[2] = fPhotoAbsorptionCof2[i + 1 - fH2OlowerInt];
559 (*(*fMatSandiaMatrixPAI)[i])[3] = fPhotoAbsorptionCof3[i + 1 - fH2OlowerInt];
560 (*(*fMatSandiaMatrixPAI)[i])[4] = fPhotoAbsorptionCof4[i + 1 - fH2OlowerInt];
565 for (i = 0; i < fMaxInterval; ++i)
567 fMatSandiaMatrixPAI->push_back(
new G4DataVector(5, 0.));
569 for (i = 0; i < fMaxInterval; ++i) {
570 (*(*fMatSandiaMatrixPAI)[i])[0] = fPhotoAbsorptionCof0[i + 1];
571 (*(*fMatSandiaMatrixPAI)[i])[1] = fPhotoAbsorptionCof1[i + 1];
572 (*(*fMatSandiaMatrixPAI)[i])[2] = fPhotoAbsorptionCof2[i + 1];
573 (*(*fMatSandiaMatrixPAI)[i])[3] = fPhotoAbsorptionCof3[i + 1];
574 (*(*fMatSandiaMatrixPAI)[i])[4] = fPhotoAbsorptionCof4[i + 1];
581 G4cout <<
"G4SandiaTable::ComputeMatSandiaMatrixPAI(), mat = " << fMaterial->
GetName()
584 for (i = 0; i < fMaxInterval; ++i) {
600 fMatNbOfIntervals = 0;
601 fMatSandiaMatrix =
nullptr;
602 fMatSandiaMatrixPAI =
nullptr;
603 fPhotoAbsorptionCof =
nullptr;
609 fSandiaCofPerAtom.resize(4, 0.0);
614 if (matIndex >= 0 && matIndex < numberOfMat) {
615 fMaterial = (*theMaterialTable)[matIndex];
619 "G4SandiaTable::G4SandiaTable(G4int matIndex)",
"mat401",
FatalException,
"wrong matIndex");
628 fMatNbOfIntervals = 0;
629 fMatSandiaMatrix =
nullptr;
630 fMatSandiaMatrixPAI =
nullptr;
631 fPhotoAbsorptionCof =
nullptr;
637 fSandiaCofPerAtom.resize(4, 0.0);
645 ComputeMatSandiaMatrixPAI();
654G4double** G4SandiaTable::GetPointerToCof()
656 if (fPhotoAbsorptionCof ==
nullptr) {
659 return fPhotoAbsorptionCof;
675 return fPhotoAbsorptionCof[i][j] * funitc[j];
685 for (
G4int i = 1; i < sz; ++i) {
686 for (
G4int j = i + 1; j < sz; ++j) {
687 if (da[i][0] > da[j][0]) {
688 SandiaSwap(da, i, j);
701 G4int c, i, flag = 0, n1 = 1;
706 for (i = 0; i < el; ++i) {
707 fMaxInterval += fNbOfIntervals[Z[i]];
713 G4cout <<
"begin sanInt, fMaxInterval = " << fMaxInterval <<
G4endl;
716 fPhotoAbsorptionCof =
new G4double*[fMaxInterval];
718 for (i = 0; i < fMaxInterval; ++i) {
719 fPhotoAbsorptionCof[i] =
new G4double[5];
723 for (c = 0; c < fMaxInterval; ++c) {
724 fPhotoAbsorptionCof[c][0] = 0.;
729 for (i = 0; i < el; ++i) {
730 I1 = fIonizationPotentials[Z[i]] * keV;
733 for (j = 1; j < Z[i]; ++j) {
734 n1 += fNbOfIntervals[j];
737 G4int n2 = n1 + fNbOfIntervals[Z[i]];
739 for (k1 = n1; k1 < n2; k1++) {
740 if (I1 > fSandiaTable[k1][0]) {
747 for (c1 = 1; c1 < c; c1++) {
748 if (fPhotoAbsorptionCof[c1][0] == I1)
755 fPhotoAbsorptionCof[c][0] = I1;
758 for (k2 = k1; k2 < n2; k2++) {
761 for (c1 = 1; c1 < c; c1++) {
762 if (fPhotoAbsorptionCof[c1][0] == fSandiaTable[k2][0]) {
768 fPhotoAbsorptionCof[c][0] = fSandiaTable[k2][0];
770 G4cout <<
"sanInt, c = " << c <<
", E_c = " << fPhotoAbsorptionCof[c][0] <<
G4endl;
777 SandiaSort(fPhotoAbsorptionCof, c);
780 G4cout <<
"end SanInt, fMaxInterval = " << fMaxInterval <<
G4endl;
792 G4int i, j, n1, k, c = 1, jj, kk;
795 for (i = 0; i < mi; ++i) {
796 for (j = 1; j < 5; ++j) {
797 fPhotoAbsorptionCof[i][j] = 0.;
800 for (i = 0; i < el; ++i) {
802 I1 = fIonizationPotentials[Z[i]] * keV;
804 for (j = 1; j < Z[i]; ++j) {
805 n1 += fNbOfIntervals[j];
808 G4int n2 = n1 + fNbOfIntervals[Z[i]] - 1;
810 for (k = n1; k < n2; ++k) {
811 B1 = fSandiaTable[k][0];
812 B2 = fSandiaTable[k + 1][0];
814 for (c = 1; c < mi - 1; ++c) {
815 E1 = fPhotoAbsorptionCof[c][0];
816 E2 = fPhotoAbsorptionCof[c + 1][0];
818 if (B1 > E1 || B2 < E2 || E1 < I1) {
822 for (j = 1; j < 5; ++j) {
823 fPhotoAbsorptionCof[c][j] += fSandiaTable[k][j] * fractionW[i];
825 G4cout <<
"c=" << c <<
"; j=" << j <<
"; fST=" << fSandiaTable[k][j]
826 <<
"; frW=" << fractionW[i] <<
G4endl;
831 for (j = 1; j < 5; ++j)
833 fPhotoAbsorptionCof[mi - 1][j] += fSandiaTable[k][j] * fractionW[i];
835 G4cout <<
"mi-1=" << mi - 1 <<
"; j=" << j <<
"; fST=" << fSandiaTable[k][j]
836 <<
"; frW=" << fractionW[i] <<
G4endl;
845 if (fPhotoAbsorptionCof[c][1] != 0.0 || fPhotoAbsorptionCof[c][2] != 0.0 ||
846 fPhotoAbsorptionCof[c][3] != 0.0 || fPhotoAbsorptionCof[c][4] != 0.0)
851 for (jj = 2; jj < mi; ++jj) {
852 for (kk = 0; kk < 5; ++kk) {
853 fPhotoAbsorptionCof[jj - 1][kk] = fPhotoAbsorptionCof[jj][kk];
878 if (Z < 1 || Z > 100) {
879 Z = PrintErrorZ(Z,
"GetSandiaPerAtom");
881 if (interval < 0 || interval >= fNbOfIntervals[Z]) {
882 PrintErrorV(
"GetSandiaPerAtom");
883 interval = (interval < 0) ? 0 : fNbOfIntervals[Z] - 1;
885 if (j < 0 || j > 4) {
886 PrintErrorV(
"GetSandiaPerAtom");
890 G4int row = fCumulInterval[Z - 1] + interval;
891 G4double x = fSandiaTable[row][0] * CLHEP::keV;
893 x = Z * CLHEP::amu / fZtoAratio[Z] * fSandiaTable[row][j] * funitc[j];
903 if (interval < 0 || interval >= fMatNbOfIntervals) {
904 PrintErrorV(
"GetSandiaCofForMaterial");
905 interval = (interval < 0) ? 0 : fMatNbOfIntervals - 1;
907 if (j < 0 || j > 4) {
908 PrintErrorV(
"GetSandiaCofForMaterial");
912 return ((*(*fMatSandiaMatrix)[interval])[j]);
920 if (energy > (*(*fMatSandiaMatrix)[0])[0]) {
921 interval = fMatNbOfIntervals - 1;
923 while ((interval > 0) && (energy < (*(*fMatSandiaMatrix)[interval])[0])) {
927 return &((*(*fMatSandiaMatrix)[interval])[1]);
935 if (interval < 0 || interval >= fMatNbOfIntervals) {
936 PrintErrorV(
"GetSandiaCofForMaterial");
937 interval = (interval < 0) ? 0 : fMatNbOfIntervals - 1;
939 if (j < 0 || j > 4) {
940 PrintErrorV(
"GetSandiaCofForMaterial");
944 return ((*(*fMatSandiaMatrix)[interval])[j]) * funitc[j];
952 if (interval < 0 || interval >= fMaxInterval) {
953 PrintErrorV(
"GetSandiaCofForMaterialPAI");
954 interval = (interval < 0) ? 0 : fMaxInterval - 1;
956 if (j < 0 || j > 4) {
957 PrintErrorV(
"GetSandiaCofForMaterialPAI");
961 return ((*(*fMatSandiaMatrixPAI)[interval])[j]);
969void G4SandiaTable::ComputeMatTable()
971 G4int elm, c, i, j, jj, k, kk, k1, k2, c1, n1;
975 auto Z =
new G4int[noElm];
978 for (elm = 0; elm < noElm; ++elm) {
979 Z[elm] = (*ElementVector)[elm]->GetZasInt();
980 fMaxInterval += fNbOfIntervals[Z[elm]];
986 fPhotoAbsorptionCof =
new G4double*[fMaxInterval];
988 for (i = 0; i < fMaxInterval; ++i) {
989 fPhotoAbsorptionCof[i] =
new G4double[5];
994 for (c = 0; c < fMaxInterval; ++c)
996 fPhotoAbsorptionCof[c][0] = 0.;
1000 for (i = 0; i < noElm; ++i) {
1001 G4double I1 = fIonizationPotentials[Z[i]] * keV;
1004 for (j = 1; j < Z[i]; ++j) {
1005 n1 += fNbOfIntervals[j];
1007 G4int n2 = n1 + fNbOfIntervals[Z[i]];
1009 for (k1 = n1; k1 < n2; ++k1) {
1010 if (I1 > fSandiaTable[k1][0]) {
1017 for (c1 = 1; c1 < c; ++c1) {
1018 if (fPhotoAbsorptionCof[c1][0] == I1)
1025 fPhotoAbsorptionCof[c][0] = I1;
1028 for (k2 = k1; k2 < n2; ++k2) {
1031 for (c1 = 1; c1 < c; ++c1) {
1032 if (fPhotoAbsorptionCof[c1][0] == fSandiaTable[k2][0]) {
1038 fPhotoAbsorptionCof[c][0] = fSandiaTable[k2][0];
1044 SandiaSort(fPhotoAbsorptionCof, c);
1049 for (i = 0; i < fMaxInterval; ++i) {
1050 for (j = 1; j < 5; ++j) {
1051 fPhotoAbsorptionCof[i][j] = 0.;
1054 for (i = 0; i < noElm; ++i) {
1056 G4double I1 = fIonizationPotentials[Z[i]] * keV;
1058 for (j = 1; j < Z[i]; ++j) {
1059 n1 += fNbOfIntervals[j];
1061 G4int n2 = n1 + fNbOfIntervals[Z[i]] - 1;
1063 for (k = n1; k < n2; ++k) {
1065 G4double B2 = fSandiaTable[k + 1][0];
1066 for (
G4int q = 1; q < fMaxInterval - 1; q++) {
1067 G4double E1 = fPhotoAbsorptionCof[q][0];
1068 G4double E2 = fPhotoAbsorptionCof[q + 1][0];
1069 if (B1 > E1 || B2 < E2 || E1 < I1) {
1072 for (j = 1; j < 5; ++j) {
1073 fPhotoAbsorptionCof[q][j] += fSandiaTable[k][j] * fractionW[i];
1077 for (j = 1; j < 5; ++j)
1079 fPhotoAbsorptionCof[fMaxInterval - 1][j] += fSandiaTable[k][j] * fractionW[i];
1088 if (fPhotoAbsorptionCof[c][1] != 0.0 || fPhotoAbsorptionCof[c][2] != 0.0 ||
1089 fPhotoAbsorptionCof[c][3] != 0.0 || fPhotoAbsorptionCof[c][4] != 0.0)
1094 for (jj = 2; jj < fMaxInterval; ++jj) {
1095 for (kk = 0; kk < 5; ++kk) {
1096 fPhotoAbsorptionCof[jj - 1][kk] = fPhotoAbsorptionCof[jj][kk];
1103 while (c < fMaxInterval - 1);
1111 for (i = 0; i < fMaxInterval; ++i) {
1114 for (i = 0; i < fMaxInterval; ++i) {
1115 for (j = 0; j < 5; ++j) {
1116 (*(*fMatSandiaMatrix)[i])[j] = fPhotoAbsorptionCof[i + 1][j];
1119 fMatNbOfIntervals = fMaxInterval;
1122 G4cout <<
"vmg, G4SandiaTable::ComputeMatTable(), mat = " << fMaterial->
GetName() <<
G4endl;
1124 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
const G4double * GetFractionVector() const
static std::size_t GetNumberOfMaterials()
const G4double * GetVecNbOfAtomsPerVolume() const
static G4MaterialTable * GetMaterialTable()
std::size_t GetNumberOfElements() const
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