Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4SandiaTable.hh
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4SandiaTable.hh 96794 2016-05-09 10:09:30Z gcosmo $
28 
29 // class description
30 //
31 // This class is an interface to G4StaticSandiaData.
32 // it provides - Sandia coeff for an element, given its Z
33 // - sandia coeff for a material, given a pointer to it
34 //
35 
36 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
37 //
38 // History:
39 //
40 // 10.06.97 created. V. Grichine
41 // 18.11.98 simplified public interface; new methods for materials. mma
42 // 30.01.01 major bug in the computation of AoverAvo and in the units (/g!)
43 // in GetSandiaCofPerAtom(). mma
44 // 03.04.01 fnulcof[4] added; returned if energy < emin
45 // 05.03.04 V.Grichine, new methods for old sorting algorithm for PAI model
46 // 21.21.13 V.Ivanchenko, changed signature of methods, reduced number of
47 // static variables, methods
48 //
49 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
50 
51 #ifndef G4SANDIATABLE_HH
52 #define G4SANDIATABLE_HH
53 
54 #include "G4OrderedTable.hh"
55 #include "G4ios.hh"
56 #include "globals.hh"
57 #include <assert.h>
58 #include <vector>
59 
61 
62 class G4Material;
63 
64 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
65 
67 {
68 public: // with description
69 
71 
73 
74  //main computation per atom:
76  std::vector<G4double>& coeff) const;
77 
78  void GetSandiaCofWater(G4double energy,
79  std::vector<G4double>& coeff) const;
80 
83 
84  static G4double GetZtoA(G4int Z);
85 
86  //per volume of a material:
87  G4int GetMatNbOfIntervals() const;
90  const G4double* GetSandiaCofForMaterial(G4double energy) const;
91 
93  const G4double* GetSandiaCofForMaterialPAI(G4double energy) const;
94 
95  inline void SetVerbose(G4int ver) { fVerbose = ver; };
96 
97 public: // without description
98 
99  G4SandiaTable(__void__&);
100  // Fake default constructor for usage restricted to direct object
101  // persistency for clients requiring preallocation of memory for
102  // persistifiable objects.
103 
104 private:
105 
106  void ComputeMatSandiaMatrix();
108 
109  // methods per atom
111 
112 #ifdef G4VERBOSE
113  static G4int PrintErrorZ(G4int Z, const G4String&);
114  static void PrintErrorV(const G4String&);
115 #endif
116 
117  // computed once
118  static G4int fCumulInterval[101];
119  static const G4double funitc[5];
120 
121  // used at initialisation
122  std::vector<G4double> fSandiaCofPerAtom;
123 
124  // members of the class
129 
131 //
132 // Methods for implementation of PAI model
133 //
135 
136 public: // without description
137 
138  G4SandiaTable(G4int matIndex);
139 
140  G4SandiaTable();
141 
142  void Initialize(G4Material*);
143 
144  G4int SandiaIntervals(G4int Z[], G4int el);
145 
146  G4int SandiaMixing(G4int Z[], const G4double* fractionW,
147  G4int el, G4int mi);
148 
149  G4double GetPhotoAbsorpCof(G4int i , G4int j) const;
150 
151  G4int GetMaxInterval() const;
152 
153  inline G4bool GetLowerI1() {return fLowerI1;};
154  inline void SetLowerI1(G4bool flag) {fLowerI1=flag;};
155 
156 private:
157 
158  void ComputeMatTable();
159 
160  void SandiaSwap(G4double** da, G4int i, G4int j);
161 
162  void SandiaSort(G4double** da, G4int sz);
163 
165 
166  // copy constructor and hide assignment operator
167  G4SandiaTable(G4SandiaTable &) = delete;
168  G4SandiaTable & operator=(const G4SandiaTable &right) = delete;
169 
170  static const G4double fSandiaTable[981][5];
171  static const G4int fNumberOfElements;
172  static const G4int fIntervalLimit;
173  static const G4int fNumberOfIntervals;
174  static const G4int fH2OlowerInt;
175 
176  // data members for PAI model
177  G4double** fPhotoAbsorptionCof; // SandiaTable for mixture
178 
182 };
183 
184 #endif
G4int SandiaMixing(G4int Z[], const G4double *fractionW, G4int el, G4int mi)
static const G4int fNumberOfElements
static const G4int fIntervalLimit
void SetLowerI1(G4bool flag)
G4double ** GetPointerToCof()
void SetVerbose(G4int ver)
std::vector< G4double > fSandiaCofPerAtom
void SandiaSwap(G4double **da, G4int i, G4int j)
void ComputeMatSandiaMatrix()
G4double GetSandiaPerAtom(G4int Z, G4int, G4int) const
G4int GetMaxInterval() const
void ComputeMatTable()
void SandiaSort(G4double **da, G4int sz)
G4int GetMatNbOfIntervals() const
G4bool GetLowerI1()
Float_t Z
void GetSandiaCofWater(G4double energy, std::vector< G4double > &coeff) const
static G4double GetZtoA(G4int Z)
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
void Initialize(G4Material *)
double energy
Definition: plottest35.C:25
G4double ** fPhotoAbsorptionCof
void GetSandiaCofPerAtom(G4int Z, G4double energy, std::vector< G4double > &coeff) const
G4int SandiaIntervals(G4int Z[], G4int el)
G4Material * fMaterial
static const G4int fH2OlowerInt
G4double GetSandiaMatTablePAI(G4int, G4int) const
G4double GetSandiaCofForMaterial(G4int, G4int) const
G4int fMatNbOfIntervals
G4double GetPhotoAbsorpCof(G4int i, G4int j) const
G4double GetWaterEnergyLimit() const
void ComputeMatSandiaMatrixPAI()
int G4int
Definition: G4Types.hh:78
G4OrderedTable * fMatSandiaMatrixPAI
static const G4double fSandiaTable[981][5]
G4SandiaTable & operator=(const G4SandiaTable &right)=delete
static G4int fCumulInterval[101]
const G4double * GetSandiaCofForMaterialPAI(G4double energy) const
G4OrderedTable * fMatSandiaMatrix
G4double GetSandiaMatTable(G4int, G4int) const
static const G4double funitc[5]
G4double GetWaterCofForMaterial(G4int, G4int) const
static const G4int fNumberOfIntervals