#include <G4SandiaTable.hh>
|
| G4SandiaTable (G4Material *) |
|
| ~G4SandiaTable () |
|
void | GetSandiaCofPerAtom (G4int Z, G4double energy, std::vector< G4double > &coeff) |
|
G4int | GetMatNbOfIntervals () |
|
G4double | GetSandiaCofForMaterial (G4int, G4int) |
|
G4double | GetSandiaMatTable (G4int, G4int) |
|
const G4double * | GetSandiaCofForMaterial (G4double energy) |
|
G4double | GetSandiaCofForMaterialPAI (G4int, G4int) |
|
G4double | GetSandiaMatTablePAI (G4int, G4int) |
|
const G4double * | GetSandiaCofForMaterialPAI (G4double energy) |
|
G4OrderedTable * | GetSandiaMatrixPAI () |
|
void | SetVerbose (G4int ver) |
|
| G4SandiaTable (__void__ &) |
|
| G4SandiaTable (G4int) |
|
| G4SandiaTable () |
|
void | Initialize (G4Material *) |
|
void | Initialize (G4int) |
|
void | SandiaSwap (G4double **da, G4int i, G4int j) |
|
void | SandiaSort (G4double **da, G4int sz) |
|
G4int | SandiaIntervals (G4int Z[], G4int el) |
|
G4int | SandiaMixing (G4int Z[], const G4double *fractionW, G4int el, G4int mi) |
|
G4double | GetPhotoAbsorpCof (G4int i, G4int j) const |
|
G4int | GetMaxInterval () const |
|
G4double ** | GetPointerToCof () |
|
G4bool | GetLowerI1 () |
|
void | SetLowerI1 (G4bool flag) |
|
Definition at line 68 of file G4SandiaTable.hh.
G4SandiaTable::G4SandiaTable |
( |
G4Material * |
material | ) |
|
Definition at line 69 of file G4SandiaTable.cc.
73 fMatSandiaMatrixPAI = 0;
74 fPhotoAbsorptionCof = 0;
76 fMatNbOfIntervals = 0;
82 if(0 == fCumulInterval[0]) {
83 fCumulInterval[0] = 1;
85 for (
G4int Z=1; Z<101; ++Z) {
86 fCumulInterval[Z] = fCumulInterval[Z-1] + fNbOfIntervals[Z];
91 fSandiaCofPerAtom.resize(4,0.0);
94 ComputeMatSandiaMatrix();
G4SandiaTable::~G4SandiaTable |
( |
| ) |
|
Definition at line 115 of file G4SandiaTable.cc.
120 delete fMatSandiaMatrix;
122 if(fMatSandiaMatrixPAI)
125 delete fMatSandiaMatrixPAI;
127 if(fPhotoAbsorptionCof)
129 delete [] fPhotoAbsorptionCof;
G4SandiaTable::G4SandiaTable |
( |
__void__ & |
| ) |
|
Definition at line 102 of file G4SandiaTable.cc.
103 : fMaterial(0),fMatSandiaMatrix(0),
104 fMatSandiaMatrixPAI(0),fPhotoAbsorptionCof(0)
107 fMatNbOfIntervals = 0;
110 fSandiaCofPerAtom.resize(4,0.0);
G4SandiaTable::G4SandiaTable |
( |
G4int |
matIndex | ) |
|
Definition at line 578 of file G4SandiaTable.cc.
References FatalException, G4Exception(), G4Material::GetMaterialTable(), and G4Material::GetNumberOfMaterials().
581 fMatNbOfIntervals = 0;
582 fMatSandiaMatrix = 0;
583 fMatSandiaMatrixPAI = 0;
584 fPhotoAbsorptionCof = 0;
589 fSandiaCofPerAtom.resize(4,0.0);
594 if ( matIndex >= 0 && matIndex < numberOfMat)
596 fMaterial = (*theMaterialTable)[matIndex];
601 G4Exception(
"G4SandiaTable::G4SandiaTable(G4int matIndex)",
"mat401",
static G4MaterialTable * GetMaterialTable()
std::vector< G4Material * > G4MaterialTable
static size_t GetNumberOfMaterials()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4SandiaTable::G4SandiaTable |
( |
| ) |
|
Definition at line 608 of file G4SandiaTable.cc.
611 fMatNbOfIntervals = 0;
612 fMatSandiaMatrix = 0;
613 fMatSandiaMatrixPAI = 0;
614 fPhotoAbsorptionCof = 0;
620 fSandiaCofPerAtom.resize(4,0.0);
G4bool G4SandiaTable::GetLowerI1 |
( |
| ) |
|
|
inline |
G4int G4SandiaTable::GetMatNbOfIntervals |
( |
| ) |
|
G4int G4SandiaTable::GetMaxInterval |
( |
| ) |
const |
G4double ** G4SandiaTable::GetPointerToCof |
( |
| ) |
|
Definition at line 668 of file G4SandiaTable.cc.
670 if(!fPhotoAbsorptionCof) { ComputeMatTable(); }
671 return fPhotoAbsorptionCof;
Definition at line 934 of file G4SandiaTable.cc.
References test::x.
937 if (
energy >= (*(*fMatSandiaMatrix)[0])[0]) {
939 G4int interval = fMatNbOfIntervals - 1;
940 while ((interval>0)&&(
energy<(*(*fMatSandiaMatrix)[interval])[0]))
942 x = &((*(*fMatSandiaMatrix)[interval])[1]);
double precision function energy(A, Z)
Definition at line 959 of file G4SandiaTable.cc.
References assert.
961 assert (interval>=0 && interval<fMatNbOfIntervals && j>=0 && j<5);
962 if(!fMatSandiaMatrixPAI) ComputeMatSandiaMatrixPAI();
963 return ((*(*fMatSandiaMatrixPAI)[interval])[j]);
Definition at line 969 of file G4SandiaTable.cc.
References test::x.
971 if(!fMatSandiaMatrixPAI) ComputeMatSandiaMatrixPAI();
973 if (
energy >= (*(*fMatSandiaMatrixPAI)[0])[0]) {
975 G4int interval = fMatNbOfIntervals - 1;
976 while ((interval>0)&&(
energy<(*(*fMatSandiaMatrixPAI)[interval])[0]))
978 x = &((*(*fMatSandiaMatrixPAI)[interval])[1]);
double precision function energy(A, Z)
Definition at line 136 of file G4SandiaTable.cc.
References python.hepunit::amu, assert, python.hepunit::eV, and python.hepunit::keV.
Referenced by G4PEEffectFluoModel::ComputeCrossSectionPerAtom().
139 assert(4 <= coeff.size());
140 G4double Emin = fSandiaTable[fCumulInterval[Z-1]][0]*
keV;
142 if (Iopot > Emin) Emin = Iopot;
144 G4int interval = fNbOfIntervals[Z] - 1;
145 G4int row = fCumulInterval[Z-1] + interval;
146 while ((interval>0) && (
energy<fSandiaTable[row][0]*
keV)) {
148 row = fCumulInterval[Z-1] + interval;
154 coeff[0]=AoverAvo*funitc[1]*fSandiaTable[row][1];
155 coeff[1]=AoverAvo*funitc[2]*fSandiaTable[row][2];
156 coeff[2]=AoverAvo*funitc[3]*fSandiaTable[row][3];
157 coeff[3]=AoverAvo*funitc[4]*fSandiaTable[row][4];
161 coeff[0] = coeff[1] = coeff[2] = coeff[3] = 0.;
double precision function energy(A, Z)
Definition at line 1005 of file G4SandiaTable.cc.
1007 if(!fMatSandiaMatrixPAI) { ComputeMatSandiaMatrixPAI(); }
1008 return fMatSandiaMatrixPAI;
void G4SandiaTable::Initialize |
( |
G4int |
matIndex | ) |
|
Definition at line 714 of file G4SandiaTable.cc.
References test::c, plottest35::c1, G4cout, G4endl, python.hepunit::keV, and SandiaSort().
Referenced by G4PAIPhotonModel::ComputeSandiaPhotoAbsCof(), and G4PAIxSection::G4PAIxSection().
716 G4int c, i, flag = 0, n1 = 1;
721 for( i = 0; i < el; i++ ) fMaxInterval += fNbOfIntervals[ Z[i] ];
726 G4cout<<
"begin sanInt, fMaxInterval = "<<fMaxInterval<<
G4endl;
729 fPhotoAbsorptionCof =
new G4double* [fMaxInterval];
731 for( i = 0; i < fMaxInterval; i++ ) {
732 fPhotoAbsorptionCof[i] =
new G4double[5];
736 for( c = 0; c < fMaxInterval; c++ ) { fPhotoAbsorptionCof[
c][0] = 0.; }
740 for( i = 0; i < el; i++ )
742 I1 = fIonizationPotentials[ Z[i] ]*
keV;
745 for( j = 1; j < Z[i]; j++ ) n1 += fNbOfIntervals[j];
747 G4int n2 = n1 + fNbOfIntervals[Z[i]];
749 for( k1 = n1; k1 < n2; k1++ )
751 if( I1 > fSandiaTable[k1][0] )
759 for( c1 = 1; c1 <
c; c1++ )
761 if( fPhotoAbsorptionCof[c1][0] == I1 )
769 fPhotoAbsorptionCof[
c][0] = I1;
772 for( k2 = k1; k2 < n2; k2++ )
776 for( c1 = 1; c1 <
c; c1++ )
778 if( fPhotoAbsorptionCof[c1][0] == fSandiaTable[k2][0] )
786 fPhotoAbsorptionCof[
c][0] = fSandiaTable[k2][0];
788 G4cout<<
"sanInt, c = "<<c<<
", E_c = "<<fPhotoAbsorptionCof[
c][0]
799 G4cout<<
"end SanInt, fMaxInterval = "<<fMaxInterval<<
G4endl;
G4GLOB_DLL std::ostream G4cout
void SandiaSort(G4double **da, G4int sz)
Definition at line 810 of file G4SandiaTable.cc.
References test::c, G4cout, G4endl, and python.hepunit::keV.
Referenced by G4PAIPhotonModel::ComputeSandiaPhotoAbsCof(), and G4PAIxSection::G4PAIxSection().
815 G4int i, j, n1, k,
c=1, jj, kk;
818 for( i = 0; i < mi; i++ )
820 for( j = 1; j < 5; j++ ) fPhotoAbsorptionCof[i][j] = 0.;
822 for( i = 0; i < el; i++ )
825 I1 = fIonizationPotentials[Z[i]]*
keV;
827 for( j = 1; j < Z[i]; j++ ) n1 += fNbOfIntervals[j];
829 G4int n2 = n1 + fNbOfIntervals[Z[i]] - 1;
831 for( k = n1; k < n2; k++ )
833 B1 = fSandiaTable[k][0];
834 B2 = fSandiaTable[k+1][0];
836 for( c = 1; c < mi-1; c++ )
838 E1 = fPhotoAbsorptionCof[
c][0];
839 E2 = fPhotoAbsorptionCof[c+1][0];
841 if( B1 > E1 || B2 < E2 || E1 < I1 )
continue;
843 for( j = 1; j < 5; j++ )
845 fPhotoAbsorptionCof[
c][j] += fSandiaTable[k][j]*fractionW[i];
848 G4cout<<
"c="<<c<<
"; j="<<j<<
"; fST="<<fSandiaTable[k][j]
849 <<
"; frW="<<fractionW[i]<<
G4endl;
854 for( j = 1; j < 5; j++ )
856 fPhotoAbsorptionCof[mi-1][j] += fSandiaTable[k][j]*fractionW[i];
859 G4cout<<
"mi-1="<<mi-1<<
"; j="<<j<<
"; fST="<<fSandiaTable[k][j]
860 <<
"; frW="<<fractionW[i]<<
G4endl;
870 if( fPhotoAbsorptionCof[c][1] != 0.0 ||
871 fPhotoAbsorptionCof[c][2] != 0.0 ||
872 fPhotoAbsorptionCof[c][3] != 0.0 ||
873 fPhotoAbsorptionCof[c][4] != 0.0 )
continue;
875 for( jj = 2; jj < mi; jj++ )
877 for( kk = 0; kk < 5; kk++ ) {
878 fPhotoAbsorptionCof[jj-1][kk] = fPhotoAbsorptionCof[jj][kk];
886 if( fVerbose > 0 )
G4cout<<
"end SanMix, mi = "<<mi<<
G4endl;
G4GLOB_DLL std::ostream G4cout
The documentation for this class was generated from the following files: