00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #ifndef G4SANDIATABLE_HH
00050 #define G4SANDIATABLE_HH
00051
00052 #include <assert.h>
00053
00054 #include "G4OrderedTable.hh"
00055 #include "G4ios.hh"
00056 #include "globals.hh"
00057
00058 #include <CLHEP/Units/PhysicalConstants.h>
00059
00060 class G4Material;
00061
00062
00063
00064 class G4SandiaTable
00065 {
00066 public:
00067
00068 G4SandiaTable(G4Material*);
00069
00070 ~G4SandiaTable();
00071
00072
00073 static G4double* GetSandiaCofPerAtom(G4int Z, G4double energy);
00074 static G4double GetZtoA(G4int Z);
00075
00076
00077 G4int GetMatNbOfIntervals();
00078 G4double GetSandiaCofForMaterial(G4int,G4int);
00079 G4double* GetSandiaCofForMaterial(G4double energy);
00080 G4double GetSandiaMatTable(G4int,G4int);
00081
00082 G4double GetSandiaCofForMaterialPAI(G4int,G4int);
00083 G4double* GetSandiaCofForMaterialPAI(G4double energy);
00084 G4double GetSandiaMatTablePAI(G4int,G4int);
00085 G4OrderedTable* GetSandiaMatrixPAI();
00086
00087 void SetVerbose(G4int ver){fVerbose = ver;};
00088
00089 public:
00090
00091 G4SandiaTable(__void__&);
00092
00093
00094
00095
00096 private:
00097
00098 void ComputeMatSandiaMatrix();
00099 void ComputeMatSandiaMatrixPAI();
00100
00101
00102 G4int GetNbOfIntervals (G4int Z);
00103 G4double GetSandiaCofPerAtom(G4int Z, G4int, G4int);
00104 G4double GetIonizationPot (G4int Z);
00105
00106
00107 static const G4int fNumberOfElements;
00108 static const G4int fIntervalLimit;
00109 static const G4int fNumberOfIntervals;
00110
00111 static const G4double fSandiaTable[981][5];
00112 static const G4int fNbOfIntervals[101];
00113 static const G4double fZtoAratio[101];
00114 static const G4double fIonizationPotentials[101];
00115 static const G4double funitc[5];
00116
00117 static G4int fCumulInterval[101];
00118 static G4double fSandiaCofPerAtom[4];
00119
00120
00121 G4Material* fMaterial;
00122 G4int fMatNbOfIntervals;
00123 G4OrderedTable* fMatSandiaMatrix;
00124 G4OrderedTable* fMatSandiaMatrixPAI;
00125
00126 G4double fnulcof[4];
00127
00129
00130
00131
00132
00133 public:
00134
00135 G4SandiaTable(G4int);
00136
00137 inline void SandiaSwap( G4double** da,
00138 G4int i,
00139 G4int j );
00140
00141 void SandiaSort( G4double** da,
00142 G4int sz );
00143
00144 G4int SandiaIntervals( G4int Z[],
00145 G4int el );
00146
00147 G4int SandiaMixing( G4int Z[],
00148 const G4double* fractionW,
00149 G4int el,
00150 G4int mi );
00151
00152 inline G4double GetPhotoAbsorpCof(G4int i , G4int j) const;
00153
00154 inline G4int GetMaxInterval() const;
00155
00156 inline G4double** GetPointerToCof();
00157
00158 private:
00159
00160 void ComputeMatTable();
00161
00162
00163 G4SandiaTable(G4SandiaTable &);
00164 G4SandiaTable & operator=(const G4SandiaTable &right);
00165
00167
00168
00169
00170 private:
00171
00172 G4double** fPhotoAbsorptionCof ;
00173
00174 G4int fMaxInterval ;
00175 G4int fVerbose;
00176
00177
00178
00179
00181
00182 };
00183
00185
00186
00187
00188 inline G4int
00189 G4SandiaTable::GetMaxInterval() const {
00190 return fMaxInterval;
00191 }
00192
00193 inline G4double**
00194 G4SandiaTable::GetPointerToCof()
00195 {
00196 if(!fPhotoAbsorptionCof) { ComputeMatTable(); }
00197 return fPhotoAbsorptionCof;
00198 }
00199
00200 inline void
00201 G4SandiaTable::SandiaSwap( G4double** da ,
00202 G4int i,
00203 G4int j )
00204 {
00205 G4double tmp = da[i][0] ;
00206 da[i][0] = da[j][0] ;
00207 da[j][0] = tmp ;
00208 }
00209
00210 inline
00211 G4double G4SandiaTable::GetPhotoAbsorpCof(G4int i, G4int j) const
00212 {
00213 return fPhotoAbsorptionCof[i][j]*funitc[j];
00214 }
00215
00216
00217
00219
00220
00221 #endif