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;
81 for (
G4int Z=1; Z<101; ++Z) {
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);
116 delete fMatSandiaMatrix;
118 if(fMatSandiaMatrixPAI)
121 delete fMatSandiaMatrixPAI;
123 if(fPhotoAbsorptionCof)
125 delete [] fPhotoAbsorptionCof;
133 std::vector<G4double>& coeff)
const
136 if(Z < 1 || Z > 100) {
137 Z = PrintErrorZ(Z,
"GetSandiaCofPerAtom");
139 if(4 > coeff.size()) {
140 PrintErrorV(
"GetSandiaCofPerAtom(): input vector is resized");
144 G4double Emin = fSandiaTable[fCumulInterval[Z-1]][0]*CLHEP::keV;
149 if (energy <= Emin) {
153 G4int interval = fNbOfIntervals[Z] - 1;
154 row = fCumulInterval[Z-1] + interval;
156 while ((interval>0) && (energy<fSandiaTable[row][0]*CLHEP::keV)) {
158 row = fCumulInterval[Z-1] + interval;
162 G4double AoverAvo = Z*amu/fZtoAratio[Z];
164 coeff[0]=AoverAvo*funitc[1]*fSandiaTable[row][1];
165 coeff[1]=AoverAvo*funitc[2]*fSandiaTable[row][2];
166 coeff[2]=AoverAvo*funitc[3]*fSandiaTable[row][3];
167 coeff[3]=AoverAvo*funitc[4]*fSandiaTable[row][4];
174 std::vector<G4double>& coeff)
const
177 if(4 > coeff.size()) {
178 PrintErrorV(
"GetSandiaCofWater: input vector is resized");
183 if(energy > fH2OlowerI1[0][0]*CLHEP::keV) {
184 i = fH2OlowerInt - 1;
186 if(energy >= fH2OlowerI1[i][0]*CLHEP::keV) {
break; }
189 coeff[0]=funitc[1]*fH2OlowerI1[i][1];
190 coeff[1]=funitc[2]*fH2OlowerI1[i][2];
191 coeff[2]=funitc[3]*fH2OlowerI1[i][3];
192 coeff[3]=funitc[4]*fH2OlowerI1[i][4];
199 return fH2OlowerI1[fH2OlowerInt - 1][0]*CLHEP::keV;
206 return fH2OlowerI1[i][j]*funitc[j];
214 if(Z < 1 || Z > 100) {
215 Z = PrintErrorZ(Z,
"GetSandiaCofPerAtom");
218 return fZtoAratio[Z];
227 G4String sss =
"G4SandiaTable::"+ss+
"()";
229 ed <<
"Atomic number out of range Z= " << Z <<
"; closest value is used";
231 return (Z > 100) ? 100 : 1;
236void G4SandiaTable::PrintErrorV(
const G4String& ss)
238 G4String sss =
"G4SandiaTable::"+ss;
246void G4SandiaTable::ComputeMatSandiaMatrix()
255 G4int MaxIntervals = 0;
260 for (elm = 0; elm < NbElm; ++elm)
262 z =
G4lrint((*ElementVector)[elm]->GetZ());
264 else if(z > 100) { z = 100; }
266 MaxIntervals += fNbOfIntervals[z];
275 for (elm = 0; elm < NbElm; ++elm)
278 IonizationPot = fIonizationPotentials[z]*CLHEP::eV;
279 for(
G4int row = fCumulInterval[z-1]; row<fCumulInterval[z]; ++row)
281 tmp1[interval1] = std::max(fSandiaTable[row][0]*CLHEP::keV,
297 for (
G4int i1 = 0; i1 < MaxIntervals; ++i1)
299 Emin = std::min(Emin, tmp1[i1]);
302 tmp2[interval2] = Emin;
306 for (
G4int j1 = 0; j1 < MaxIntervals; ++j1)
308 if (tmp1[j1] <= Emin) { tmp1[j1] =
DBL_MAX; }
318 for (interval = 0; interval < interval2; ++interval)
327 static const G4double prec = 1.e-03*CLHEP::eV;
328 G4double coef, oldsum(0.), newsum(0.);
329 fMatNbOfIntervals = 0;
331 for ( interval = 0; interval < interval2; ++interval)
333 Emin = (*(*fMatSandiaMatrix)[fMatNbOfIntervals])[0] = tmp2[interval];
335 for (
G4int k = 1; k < 5; ++k ) {
336 (*(*fMatSandiaMatrix)[fMatNbOfIntervals])[k] = 0.;
340 for ( elm = 0; elm < NbElm; elm++ )
344 for (
G4int j = 1; j < 5; ++j )
346 coef = NbOfAtomsPerVolume[elm]*fSandiaCofPerAtom[j-1];
347 (*(*fMatSandiaMatrix)[fMatNbOfIntervals])[j] += coef;
348 newsum += std::abs(coef);
353 if (newsum != oldsum) { oldsum = newsum; ++fMatNbOfIntervals;}
361 G4cout<<
"G4SandiaTable::ComputeMatSandiaMatrix(), mat = "
364 for(
G4int i = 0; i < fMatNbOfIntervals; ++i)
379void G4SandiaTable::ComputeMatSandiaMatrixPAI()
381 G4int MaxIntervals = 0;
382 G4int elm, c, i, j, jj, k, k1, k2, c1, n1, z;
387 std::vector<G4int> Z(noElm);
389 for ( elm = 0; elm < noElm; elm++ )
391 z =
G4lrint((*ElementVector)[elm]->GetZ());
393 else if(z > 100) { z = 100; }
395 MaxIntervals += fNbOfIntervals[Z[elm]];
397 fMaxInterval = MaxIntervals + 2;
401 G4cout<<
"G4SandiaTable::ComputeMatSandiaMatrixPAI: fMaxInterval = "
411 for( c = 0; c < fMaxInterval; ++c )
413 fPhotoAbsorptionCof0[c] = 0.;
414 fPhotoAbsorptionCof1[c] = 0.;
415 fPhotoAbsorptionCof2[c] = 0.;
416 fPhotoAbsorptionCof3[c] = 0.;
417 fPhotoAbsorptionCof4[c] = 0.;
421 for(i = 0; i < noElm; ++i)
423 G4double I1 = fIonizationPotentials[Z[i]]*CLHEP::keV;
426 for( j = 1; j < Z[i]; ++j ) n1 += fNbOfIntervals[j];
428 G4int n2 = n1 + fNbOfIntervals[Z[i]];
430 for( k1 = n1; k1 < n2; k1++ )
432 if( I1 > fSandiaTable[k1][0] )
440 for( c1 = 1; c1 < c; c1++ )
442 if( fPhotoAbsorptionCof0[c1] == I1 )
450 fPhotoAbsorptionCof0[c] = I1;
453 for( k2 = k1; k2 < n2; k2++ )
457 for( c1 = 1; c1 < c; c1++ )
459 if( fPhotoAbsorptionCof0[c1] == fSandiaTable[k2][0] )
467 fPhotoAbsorptionCof0[c] = fSandiaTable[k2][0];
474 for( i = 1; i < c; ++i )
476 for( j = i + 1; j < c; ++j )
478 if( fPhotoAbsorptionCof0[i] > fPhotoAbsorptionCof0[j] )
480 G4double tmp = fPhotoAbsorptionCof0[i];
481 fPhotoAbsorptionCof0[i] = fPhotoAbsorptionCof0[j];
482 fPhotoAbsorptionCof0[j] = tmp;
487 G4cout<<i<<
"\t energy = "<<fPhotoAbsorptionCof0[i]<<
G4endl;
496 for( i = 0; i < noElm; ++i )
500 for( i = 0; i < noElm; ++i )
503 G4double I1 = fIonizationPotentials[Z[i]]*keV;
505 for( j = 1; j < Z[i]; ++j ) n1 += fNbOfIntervals[j];
507 G4int n2 = n1 + fNbOfIntervals[Z[i]] - 1;
509 for(k = n1; k < n2; ++k)
514 for(
G4int q = 1; q < fMaxInterval-1; q++)
516 G4double E1 = fPhotoAbsorptionCof0[q];
517 G4double E2 = fPhotoAbsorptionCof0[q+1];
521 G4cout<<
"k = "<<k<<
", q = "<<q<<
", B1 = "<<B1<<
", B2 = "<<B2
522 <<
", E1 = "<<E1<<
", E2 = "<<E2<<
G4endl;
524 if( B1 > E1 || B2 < E2 || E1 < I1 )
528 G4cout<<
"continue for: B1 = "<<B1<<
", B2 = "<<B2<<
", E1 = "
529 <<E1<<
", E2 = "<<E2<<
G4endl;
533 fPhotoAbsorptionCof1[q] += fSandiaTable[k][1]*fractionW[i];
534 fPhotoAbsorptionCof2[q] += fSandiaTable[k][2]*fractionW[i];
535 fPhotoAbsorptionCof3[q] += fSandiaTable[k][3]*fractionW[i];
536 fPhotoAbsorptionCof4[q] += fSandiaTable[k][4]*fractionW[i];
541 fPhotoAbsorptionCof1[fMaxInterval-1] += fSandiaTable[k][1]*fractionW[i];
542 fPhotoAbsorptionCof2[fMaxInterval-1] += fSandiaTable[k][2]*fractionW[i];
543 fPhotoAbsorptionCof3[fMaxInterval-1] += fSandiaTable[k][3]*fractionW[i];
544 fPhotoAbsorptionCof4[fMaxInterval-1] += fSandiaTable[k][4]*fractionW[i];
552 if( fPhotoAbsorptionCof1[c] != 0.0 ||
553 fPhotoAbsorptionCof2[c] != 0.0 ||
554 fPhotoAbsorptionCof3[c] != 0.0 ||
555 fPhotoAbsorptionCof4[c] != 0.0 )
continue;
561 for( jj = 2; jj < fMaxInterval; ++jj )
563 fPhotoAbsorptionCof0[jj-1] = fPhotoAbsorptionCof0[jj];
564 fPhotoAbsorptionCof1[jj-1] = fPhotoAbsorptionCof1[jj];
565 fPhotoAbsorptionCof2[jj-1] = fPhotoAbsorptionCof2[jj];
566 fPhotoAbsorptionCof3[jj-1] = fPhotoAbsorptionCof3[jj];
567 fPhotoAbsorptionCof4[jj-1] = fPhotoAbsorptionCof4[jj];
573 while( c < fMaxInterval - 1 );
575 if( fPhotoAbsorptionCof0[fMaxInterval-1] == 0.0 ) fMaxInterval--;
583 for (i = 0; i < fMaxInterval; ++i)
585 fPhotoAbsorptionCof0[i+1] *= funitc[0];
586 fPhotoAbsorptionCof1[i+1] *= funitc[1]*density;
587 fPhotoAbsorptionCof2[i+1] *= funitc[2]*density;
588 fPhotoAbsorptionCof3[i+1] *= funitc[3]*density;
589 fPhotoAbsorptionCof4[i+1] *= funitc[4]*density;
593 if( fMaterial->
GetName() ==
"G4_WATER")
595 fMaxInterval += fH2OlowerInt;
597 for (i = 0; i < fMaxInterval; ++i)
599 fMatSandiaMatrixPAI->push_back(
new G4DataVector(5,0.) );
601 for (i = 0; i < fH2OlowerInt; ++i)
603 (*(*fMatSandiaMatrixPAI)[i])[0] = fH2OlowerI1[i][0];
604 (*(*fMatSandiaMatrixPAI)[i])[1] = fH2OlowerI1[i][1];
605 (*(*fMatSandiaMatrixPAI)[i])[2] = fH2OlowerI1[i][2];
606 (*(*fMatSandiaMatrixPAI)[i])[3] = fH2OlowerI1[i][3];
607 (*(*fMatSandiaMatrixPAI)[i])[4] = fH2OlowerI1[i][4];
609 for (i = fH2OlowerInt; i < fMaxInterval; ++i)
611 (*(*fMatSandiaMatrixPAI)[i])[0] = fPhotoAbsorptionCof0[i+1-fH2OlowerInt];
612 (*(*fMatSandiaMatrixPAI)[i])[1] = fPhotoAbsorptionCof1[i+1-fH2OlowerInt];
613 (*(*fMatSandiaMatrixPAI)[i])[2] = fPhotoAbsorptionCof2[i+1-fH2OlowerInt];
614 (*(*fMatSandiaMatrixPAI)[i])[3] = fPhotoAbsorptionCof3[i+1-fH2OlowerInt];
615 (*(*fMatSandiaMatrixPAI)[i])[4] = fPhotoAbsorptionCof4[i+1-fH2OlowerInt];
621 for (i = 0; i < fMaxInterval; ++i)
623 fMatSandiaMatrixPAI->push_back(
new G4DataVector(5,0.) );
625 for (i = 0; i < fMaxInterval; ++i)
627 (*(*fMatSandiaMatrixPAI)[i])[0] = fPhotoAbsorptionCof0[i+1];
628 (*(*fMatSandiaMatrixPAI)[i])[1] = fPhotoAbsorptionCof1[i+1];
629 (*(*fMatSandiaMatrixPAI)[i])[2] = fPhotoAbsorptionCof2[i+1];
630 (*(*fMatSandiaMatrixPAI)[i])[3] = fPhotoAbsorptionCof3[i+1];
631 (*(*fMatSandiaMatrixPAI)[i])[4] = fPhotoAbsorptionCof4[i+1];
639 G4cout<<
"G4SandiaTable::ComputeMatSandiaMatrixPAI(), mat = "
642 for( i = 0; i < fMaxInterval; ++i)
661 fMatNbOfIntervals = 0;
662 fMatSandiaMatrix = 0;
663 fMatSandiaMatrixPAI = 0;
664 fPhotoAbsorptionCof = 0;
670 fSandiaCofPerAtom.resize(4,0.0);
675 if ( matIndex >= 0 && matIndex < numberOfMat)
677 fMaterial = (*theMaterialTable)[matIndex];
681 G4Exception(
"G4SandiaTable::G4SandiaTable(G4int matIndex)",
"mat401",
691 fMatNbOfIntervals = 0;
692 fMatSandiaMatrix = 0;
693 fMatSandiaMatrixPAI = 0;
694 fPhotoAbsorptionCof = 0;
700 fSandiaCofPerAtom.resize(4,0.0);
708 ComputeMatSandiaMatrixPAI();
720G4double** G4SandiaTable::GetPointerToCof()
722 if(!fPhotoAbsorptionCof) { ComputeMatTable(); }
723 return fPhotoAbsorptionCof;
728void G4SandiaTable::SandiaSwap(
G4double** da ,
733 da[i][0] = da[j][0] ;
741 return fPhotoAbsorptionCof[i][j]*funitc[j];
752 for(
G4int i = 1;i < sz; ++i )
754 for(
G4int j = i + 1;j < sz; ++j )
756 if(da[i][0] > da[j][0]) SandiaSwap(da,i,j);
768 G4int c, i, flag = 0, n1 = 1;
773 for( i = 0; i < el; ++i ) fMaxInterval += fNbOfIntervals[ Z[i] ];
778 G4cout<<
"begin sanInt, fMaxInterval = "<<fMaxInterval<<
G4endl;
781 fPhotoAbsorptionCof =
new G4double* [fMaxInterval];
783 for( i = 0; i < fMaxInterval; ++i ) {
784 fPhotoAbsorptionCof[i] =
new G4double[5];
788 for( c = 0; c < fMaxInterval; ++c ) { fPhotoAbsorptionCof[c][0] = 0.; }
792 for( i = 0; i < el; ++i )
794 I1 = fIonizationPotentials[ Z[i] ]*keV;
797 for( j = 1; j < Z[i]; ++j ) n1 += fNbOfIntervals[j];
799 G4int n2 = n1 + fNbOfIntervals[Z[i]];
801 for( k1 = n1; k1 < n2; k1++ )
803 if( I1 > fSandiaTable[k1][0] )
811 for( c1 = 1; c1 < c; c1++ )
813 if( fPhotoAbsorptionCof[c1][0] == I1 )
821 fPhotoAbsorptionCof[c][0] = I1;
824 for( k2 = k1; k2 < n2; k2++ )
828 for( c1 = 1; c1 < c; c1++ )
830 if( fPhotoAbsorptionCof[c1][0] == fSandiaTable[k2][0] )
838 fPhotoAbsorptionCof[c][0] = fSandiaTable[k2][0];
840 G4cout<<
"sanInt, c = "<<c<<
", E_c = "<<fPhotoAbsorptionCof[c][0]
848 SandiaSort(fPhotoAbsorptionCof,c);
851 G4cout<<
"end SanInt, fMaxInterval = "<<fMaxInterval<<
G4endl;
867 G4int i, j, n1, k, c=1, jj, kk;
870 for( i = 0; i < mi; ++i )
872 for( j = 1; j < 5; ++j ) fPhotoAbsorptionCof[i][j] = 0.;
874 for( i = 0; i < el; ++i )
877 I1 = fIonizationPotentials[Z[i]]*keV;
879 for( j = 1; j < Z[i]; ++j ) n1 += fNbOfIntervals[j];
881 G4int n2 = n1 + fNbOfIntervals[Z[i]] - 1;
883 for( k = n1; k < n2; ++k )
885 B1 = fSandiaTable[k][0];
886 B2 = fSandiaTable[k+1][0];
888 for( c = 1; c < mi-1; ++c )
890 E1 = fPhotoAbsorptionCof[c][0];
891 E2 = fPhotoAbsorptionCof[c+1][0];
893 if( B1 > E1 || B2 < E2 || E1 < I1 )
continue;
895 for( j = 1; j < 5; ++j )
897 fPhotoAbsorptionCof[c][j] += fSandiaTable[k][j]*fractionW[i];
900 G4cout<<
"c="<<c<<
"; j="<<j<<
"; fST="<<fSandiaTable[k][j]
901 <<
"; frW="<<fractionW[i]<<
G4endl;
906 for( j = 1; j < 5; ++j )
908 fPhotoAbsorptionCof[mi-1][j] += fSandiaTable[k][j]*fractionW[i];
911 G4cout<<
"mi-1="<<mi-1<<
"; j="<<j<<
"; fST="<<fSandiaTable[k][j]
912 <<
"; frW="<<fractionW[i]<<
G4endl;
922 if( fPhotoAbsorptionCof[c][1] != 0.0 ||
923 fPhotoAbsorptionCof[c][2] != 0.0 ||
924 fPhotoAbsorptionCof[c][3] != 0.0 ||
925 fPhotoAbsorptionCof[c][4] != 0.0 )
continue;
927 for( jj = 2; jj < mi; ++jj )
929 for( kk = 0; kk < 5; ++kk ) {
930 fPhotoAbsorptionCof[jj-1][kk] = fPhotoAbsorptionCof[jj][kk];
939 if( fVerbose > 0 )
G4cout<<
"end SanMix, mi = "<<mi<<
G4endl;
948 return fMatNbOfIntervals;
957 if(Z < 1 || Z > 100) {
958 Z = PrintErrorZ(Z,
"GetSandiaPerAtom");
960 if(interval<0 || interval>=fNbOfIntervals[Z]) {
961 PrintErrorV(
"GetSandiaPerAtom");
962 interval = (interval<0) ? 0 : fNbOfIntervals[Z]-1;
965 PrintErrorV(
"GetSandiaPerAtom");
969 G4int row = fCumulInterval[Z-1] + interval;
970 G4double x = fSandiaTable[row][0]*CLHEP::keV;
972 x = Z*CLHEP::amu/fZtoAratio[Z]*fSandiaTable[row][j]*funitc[j];
983 if(interval<0 || interval>=fMatNbOfIntervals) {
984 PrintErrorV(
"GetSandiaCofForMaterial");
985 interval = (interval<0) ? 0 : fMatNbOfIntervals-1;
988 PrintErrorV(
"GetSandiaCofForMaterial");
992 return ((*(*fMatSandiaMatrix)[interval])[j]);
1001 if (energy > (*(*fMatSandiaMatrix)[0])[0]) {
1002 interval = fMatNbOfIntervals - 1;
1004 while ((interval>0)&&(energy<(*(*fMatSandiaMatrix)[interval])[0]))
1007 return &((*(*fMatSandiaMatrix)[interval])[1]);
1016 if(interval<0 || interval>=fMatNbOfIntervals) {
1017 PrintErrorV(
"GetSandiaCofForMaterial");
1018 interval = (interval<0) ? 0 : fMatNbOfIntervals-1;
1021 PrintErrorV(
"GetSandiaCofForMaterial");
1025 return ((*(*fMatSandiaMatrix)[interval])[j])*funitc[j];
1034 if(interval<0 || interval>=fMaxInterval) {
1035 PrintErrorV(
"GetSandiaCofForMaterialPAI");
1036 interval = (interval<0) ? 0 : fMaxInterval-1;
1039 PrintErrorV(
"GetSandiaCofForMaterialPAI");
1043 return ((*(*fMatSandiaMatrixPAI)[interval])[j]);
1051void G4SandiaTable::ComputeMatTable()
1053 G4int MaxIntervals = 0;
1054 G4int elm, c, i, j, jj, k, kk, k1, k2, c1, n1;
1060 for (elm = 0; elm<noElm; ++elm)
1062 Z[elm] = (
G4int)(*ElementVector)[elm]->GetZ();
1063 MaxIntervals += fNbOfIntervals[Z[elm]];
1067 for(i = 0; i < noElm; ++i) fMaxInterval += fNbOfIntervals[Z[i]];
1073 fPhotoAbsorptionCof =
new G4double* [fMaxInterval];
1075 for(i = 0; i < fMaxInterval; ++i)
1077 fPhotoAbsorptionCof[i] =
new G4double[5];
1082 for(c = 0; c < fMaxInterval; ++c)
1084 fPhotoAbsorptionCof[c][0] = 0.;
1088 for(i = 0; i < noElm; ++i)
1090 G4double I1 = fIonizationPotentials[Z[i]]*keV;
1093 for(j = 1; j < Z[i]; ++j)
1095 n1 += fNbOfIntervals[j];
1097 G4int n2 = n1 + fNbOfIntervals[Z[i]];
1099 for(k1 = n1; k1 < n2; ++k1)
1101 if(I1 > fSandiaTable[k1][0])
1109 for(c1 = 1; c1 < c; ++c1)
1111 if(fPhotoAbsorptionCof[c1][0] == I1)
1119 fPhotoAbsorptionCof[c][0] = I1;
1122 for(k2 = k1; k2 < n2; ++k2)
1126 for(c1 = 1; c1 < c; ++c1)
1128 if(fPhotoAbsorptionCof[c1][0] == fSandiaTable[k2][0])
1136 fPhotoAbsorptionCof[c][0] = fSandiaTable[k2][0];
1142 SandiaSort(fPhotoAbsorptionCof,c);
1147 for(i = 0; i < fMaxInterval; ++i)
1149 for(j = 1; j < 5; ++j) fPhotoAbsorptionCof[i][j] = 0.;
1151 for(i = 0; i < noElm; ++i)
1154 G4double I1 = fIonizationPotentials[Z[i]]*keV;
1156 for(j = 1; j < Z[i]; ++j)
1158 n1 += fNbOfIntervals[j];
1160 G4int n2 = n1 + fNbOfIntervals[Z[i]] - 1;
1162 for(k = n1; k < n2; ++k)
1165 G4double B2 = fSandiaTable[k+1][0];
1166 for(
G4int q = 1; q < fMaxInterval-1; q++)
1168 G4double E1 = fPhotoAbsorptionCof[q][0];
1169 G4double E2 = fPhotoAbsorptionCof[q+1][0];
1170 if(B1 > E1 || B2 < E2 || E1 < I1)
1174 for(j = 1; j < 5; ++j)
1176 fPhotoAbsorptionCof[q][j] += fSandiaTable[k][j]*fractionW[i];
1180 for(j = 1; j < 5; ++j)
1182 fPhotoAbsorptionCof[fMaxInterval-1][j] +=
1183 fSandiaTable[k][j]*fractionW[i];
1193 if( fPhotoAbsorptionCof[c][1] != 0.0 ||
1194 fPhotoAbsorptionCof[c][2] != 0.0 ||
1195 fPhotoAbsorptionCof[c][3] != 0.0 ||
1196 fPhotoAbsorptionCof[c][4] != 0.0 )
continue;
1198 for(jj = 2; jj < fMaxInterval; ++jj)
1200 for(kk = 0; kk < 5; ++kk)
1202 fPhotoAbsorptionCof[jj-1][kk]= fPhotoAbsorptionCof[jj][kk];
1209 while( c < fMaxInterval - 1 );
1217 for (i = 0; i < fMaxInterval; ++i)
1221 for ( i = 0; i < fMaxInterval; ++i )
1223 for( j = 0; j < 5; ++j )
1225 (*(*fMatSandiaMatrix)[i])[j] = fPhotoAbsorptionCof[i+1][j];
1228 fMatNbOfIntervals = fMaxInterval;
1232 G4cout<<
"vmg, G4SandiaTable::ComputeMatTable(), mat = "
1235 for ( i = 0; i < fMaxInterval; ++i )
std::vector< 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