File indexing completed on 2025-01-18 09:59:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 #ifndef G4SANDIATABLE_HH
0045 #define G4SANDIATABLE_HH
0046
0047 #include "G4OrderedTable.hh"
0048 #include "G4ios.hh"
0049 #include "globals.hh"
0050
0051 #include <CLHEP/Units/PhysicalConstants.h>
0052 #include <assert.h>
0053
0054 #include <vector>
0055
0056 class G4Material;
0057
0058 class G4SandiaTable
0059 {
0060 public:
0061 G4SandiaTable();
0062 G4SandiaTable(const G4Material*);
0063 G4SandiaTable(G4int matIndex);
0064 ~G4SandiaTable();
0065
0066 G4SandiaTable(G4SandiaTable&) = delete;
0067 G4SandiaTable& operator=(const G4SandiaTable& right) = delete;
0068
0069
0070 void GetSandiaCofPerAtom(G4int Z, G4double energy, std::vector<G4double>& coeff) const;
0071
0072 void GetSandiaCofWater(G4double energy, std::vector<G4double>& coeff) const;
0073
0074 G4double GetWaterEnergyLimit() const;
0075 G4double GetWaterCofForMaterial(G4int, G4int) const;
0076
0077 static G4double GetZtoA(G4int Z);
0078
0079
0080 G4int GetMatNbOfIntervals() const;
0081 G4double GetSandiaCofForMaterial(G4int, G4int) const;
0082 G4double GetSandiaMatTable(G4int, G4int) const;
0083 const G4double* GetSandiaCofForMaterial(G4double energy) const;
0084
0085 G4double GetSandiaMatTablePAI(G4int, G4int) const;
0086 const G4double* GetSandiaCofForMaterialPAI(G4double energy) const;
0087
0088 inline void SetVerbose(G4int ver) { fVerbose = ver; };
0089
0090
0091
0092
0093
0094
0095
0096 void Initialize(const G4Material*);
0097
0098 G4int SandiaIntervals(G4int Z[], G4int el);
0099
0100 G4int SandiaMixing(G4int Z[], const G4double* fractionW, G4int el, G4int mi);
0101
0102 G4double GetPhotoAbsorpCof(G4int i, G4int j) const;
0103
0104 G4int GetMaxInterval() const;
0105
0106 inline G4bool GetLowerI1() { return fLowerI1; };
0107 inline void SetLowerI1(G4bool flag) { fLowerI1 = flag; };
0108
0109
0110 G4bool operator==(const G4SandiaTable&) const = delete;
0111 G4bool operator!=(const G4SandiaTable&) const = delete;
0112
0113 private:
0114 void ComputeMatSandiaMatrix();
0115 void ComputeMatSandiaMatrixPAI();
0116
0117
0118 G4double GetSandiaPerAtom(G4int Z, G4int, G4int) const;
0119
0120 #ifdef G4VERBOSE
0121 static G4int PrintErrorZ(G4int Z, const G4String&);
0122 static void PrintErrorV(const G4String&);
0123 #endif
0124
0125 void ComputeMatTable();
0126
0127 void SandiaSwap(G4double** da, G4int i, G4int j);
0128
0129 void SandiaSort(G4double** da, G4int sz);
0130
0131 G4double** GetPointerToCof();
0132
0133
0134 static G4int fCumulInterval[101];
0135 static const G4double funitc[5];
0136
0137
0138 std::vector<G4double> fSandiaCofPerAtom;
0139
0140
0141 const G4Material* fMaterial;
0142 G4int fMatNbOfIntervals;
0143 G4OrderedTable* fMatSandiaMatrix;
0144 G4OrderedTable* fMatSandiaMatrixPAI;
0145
0146 static const G4double fSandiaTable[981][5];
0147 static const G4int fNumberOfElements;
0148 static const G4int fIntervalLimit;
0149 static const G4int fNumberOfIntervals;
0150 static const G4int fH2OlowerInt;
0151
0152
0153 G4double** fPhotoAbsorptionCof;
0154
0155 G4int fMaxInterval;
0156 G4int fVerbose;
0157 G4bool fLowerI1;
0158 };
0159
0160 #endif