Geant4  10.02
G4SandiaTable.hh
Go to the documentation of this file.
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 79097 2014-02-14 16:08:35Z 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 <assert.h>
55 
56 #include "G4OrderedTable.hh"
57 #include "G4ios.hh"
58 #include "globals.hh"
59 #include <vector>
60 
61 #include <CLHEP/Units/PhysicalConstants.h>
62 
63 class G4Material;
64 
65 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
66 
68 {
69 public: // with description
70 
72 
74 
75  //main computation per atom:
77  std::vector<G4double>& coeff) const;
78 
79  void GetSandiaCofWater(G4double energy,
80  std::vector<G4double>& coeff) const;
81 
84 
85  static G4double GetZtoA(G4int Z);
86 
87  //per volume of a material:
88  G4int GetMatNbOfIntervals() const;
91  const G4double* GetSandiaCofForMaterial(G4double energy) const;
92 
95  const G4double* GetSandiaCofForMaterialPAI(G4double energy) const;
97 
98  inline void SetVerbose(G4int ver) { fVerbose = ver; };
99 
100 public: // without description
101 
102  G4SandiaTable(__void__&);
103  // Fake default constructor for usage restricted to direct object
104  // persistency for clients requiring preallocation of memory for
105  // persistifiable objects.
106 
107 private:
108 
109  void ComputeMatSandiaMatrix();
111 
112  // methods per atom
116 
117  // static members of the class
118  static const G4int fNumberOfElements;
119  static const G4int fIntervalLimit;
120  static const G4int fNumberOfIntervals;
121  static const G4int fH2OlowerInt;
122 
123  static const G4double fSandiaTable[981][5];
124  static const G4double fH2OlowerI1[23][5];
125  static const G4int fNbOfIntervals[101];
126  static const G4double fZtoAratio[101];
127  static const G4double fIonizationPotentials[101];
128  static const G4double funitc[5];
129  static const G4double fnulcof[4];
130 
131  // computed once
132  static G4int fCumulInterval[101];
133 
134  // used at initialisation
135  std::vector<G4double> fSandiaCofPerAtom;
136 
137  // members of the class
142 
144 //
145 // Methods for implementation of PAI model
146 //
148 
149 public: // without description
150 
152 
153  G4SandiaTable();
154 
155  void Initialize(G4Material*);
156  // void Initialize(G4MaterialCutsCouple*);
157  void Initialize(G4int);
158 
159 
160  void SandiaSwap(G4double** da, G4int i, G4int j);
161 
162  void SandiaSort(G4double** da, G4int sz);
163 
164  G4int SandiaIntervals(G4int Z[], G4int el);
165 
166  G4int SandiaMixing(G4int Z[], const G4double* fractionW,
167  G4int el, G4int mi);
168 
169  G4double GetPhotoAbsorpCof(G4int i , G4int j) const;
170 
171  G4int GetMaxInterval() const;
172 
174 
176  void SetLowerI1(G4bool flag){fLowerI1=flag;};
177 
178 private:
179 
180  void ComputeMatTable();
181 
182  // copy constructor and hide assignment operator
185 
186  // data members for PAI model
187 
188  G4double** fPhotoAbsorptionCof; // SandiaTable for mixture
189 
193 };
194 
195 #endif
G4OrderedTable * fMatSandiaMatrixPAI
void SandiaSwap(G4double **da, G4int i, G4int j)
void ComputeMatSandiaMatrix()
G4double GetSandiaPerAtom(G4int Z, G4int, G4int)
void ComputeMatTable()
G4double GetSandiaCofForMaterial(G4int, G4int) const
static const G4double funitc[5]
G4SandiaTable & operator=(const G4SandiaTable &right)
G4int GetMaxInterval() const
G4double GetSandiaMatTablePAI(G4int, G4int) const
G4double ** fPhotoAbsorptionCof
static const G4double fH2OlowerI1[23][5]
int G4int
Definition: G4Types.hh:78
G4double GetIonizationPot(G4int Z) const
static const G4double fnulcof[4]
static G4int fCumulInterval[101]
G4int SandiaMixing(G4int Z[], const G4double *fractionW, G4int el, G4int mi)
static const G4int fNumberOfElements
void SandiaSort(G4double **da, G4int sz)
G4double GetWaterCofForMaterial(G4int, G4int) const
G4int fMatNbOfIntervals
bool G4bool
Definition: G4Types.hh:79
G4bool GetLowerI1()
static const G4int fNumberOfIntervals
G4int GetMatNbOfIntervals() const
G4int SandiaIntervals(G4int Z[], G4int el)
static const G4int fNbOfIntervals[101]
void ComputeMatSandiaMatrixPAI()
G4OrderedTable * GetSandiaMatrixPAI()
G4Material * fMaterial
void SetLowerI1(G4bool flag)
G4double energy(const ThreeVector &p, const G4double m)
static G4double GetZtoA(G4int Z)
static const G4int fH2OlowerInt
G4double GetPhotoAbsorpCof(G4int i, G4int j) const
G4double GetSandiaCofForMaterialPAI(G4int, G4int) const
static const G4double fIonizationPotentials[101]
G4double GetSandiaMatTable(G4int, G4int) const
static const G4int fIntervalLimit
std::vector< G4double > fSandiaCofPerAtom
void GetSandiaCofWater(G4double energy, std::vector< G4double > &coeff) const
double G4double
Definition: G4Types.hh:76
G4OrderedTable * fMatSandiaMatrix
G4double ** GetPointerToCof()
static const G4double fSandiaTable[981][5]
void SetVerbose(G4int ver)
void GetSandiaCofPerAtom(G4int Z, G4double energy, std::vector< G4double > &coeff) const
static const G4double fZtoAratio[101]
G4double GetWaterEnergyLimit() const
void Initialize(G4Material *)
G4int GetNbOfIntervals(G4int Z)