Geant4  10.00.p03
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 75603 2013-11-04 13:15:47Z 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 // class G4MaterialCutsCouple;
65 
66 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... ....oooOO0OOooo....
67 
69 {
70 public: // with description
71 
73 
75 
76  //main computation per atom:
77  void GetSandiaCofPerAtom(G4int Z, G4double energy, std::vector<G4double>& coeff);
78  static G4double GetZtoA(G4int Z);
79 
80  //per volume of a material:
85 
90 
91  inline void SetVerbose(G4int ver) { fVerbose = ver; };
92 
93 public: // without description
94 
95  G4SandiaTable(__void__&);
96  // Fake default constructor for usage restricted to direct object
97  // persistency for clients requiring preallocation of memory for
98  // persistifiable objects.
99 
100 private:
101 
102  void ComputeMatSandiaMatrix();
104 
105  // methods per atom
109 
110  // static members of the class
111  static const G4int fNumberOfElements;
112  static const G4int fIntervalLimit;
113  static const G4int fNumberOfIntervals;
114  static const G4int fH2OlowerInt;
115 
116  static const G4double fSandiaTable[981][5];
117  static const G4double fH2OlowerI1[23][5];
118  static const G4int fNbOfIntervals[101];
119  static const G4double fZtoAratio[101];
120  static const G4double fIonizationPotentials[101];
121  static const G4double funitc[5];
122  static const G4double fnulcof[4];
123 
124  // computed once
125  static G4int fCumulInterval[101];
126 
127  // used at initialisation
128  std::vector<G4double> fSandiaCofPerAtom;
129 
130  // members of the class
135 
137 //
138 // Methods for implementation of PAI model
139 //
141 
142 public: // without description
143 
145 
146  G4SandiaTable();
147 
148  void Initialize(G4Material*);
149  // void Initialize(G4MaterialCutsCouple*);
150  void Initialize(G4int);
151 
152 
153  void SandiaSwap(G4double** da, G4int i, G4int j);
154 
155  void SandiaSort(G4double** da, G4int sz);
156 
157  G4int SandiaIntervals(G4int Z[], G4int el);
158 
159  G4int SandiaMixing(G4int Z[], const G4double* fractionW,
160  G4int el, G4int mi);
161 
162  G4double GetPhotoAbsorpCof(G4int i , G4int j) const;
163 
164  G4int GetMaxInterval() const;
165 
167 
169  void SetLowerI1(G4bool flag){fLowerI1=flag;};
170 
171 private:
172 
173  void ComputeMatTable();
174 
175  // copy constructor and hide assignment operator
178 
179  // data members for PAI model
180 
181  G4double** fPhotoAbsorptionCof; // SandiaTable for mixture
182 
186 };
187 
188 #endif
G4OrderedTable * fMatSandiaMatrixPAI
void SandiaSwap(G4double **da, G4int i, G4int j)
void ComputeMatSandiaMatrix()
G4double GetSandiaPerAtom(G4int Z, G4int, G4int)
void ComputeMatTable()
static const G4double funitc[5]
G4SandiaTable & operator=(const G4SandiaTable &right)
G4int GetMaxInterval() const
G4double ** fPhotoAbsorptionCof
G4double GetSandiaMatTablePAI(G4int, G4int)
static const G4double fH2OlowerI1[23][5]
int G4int
Definition: G4Types.hh:78
static const G4double fnulcof[4]
static G4int fCumulInterval[101]
G4int SandiaMixing(G4int Z[], const G4double *fractionW, G4int el, G4int mi)
G4double GetSandiaMatTable(G4int, G4int)
static const G4int fNumberOfElements
void SandiaSort(G4double **da, G4int sz)
G4double GetSandiaCofForMaterial(G4int, G4int)
G4int fMatNbOfIntervals
bool G4bool
Definition: G4Types.hh:79
G4bool GetLowerI1()
G4double GetIonizationPot(G4int Z)
static const G4int fNumberOfIntervals
G4int SandiaIntervals(G4int Z[], G4int el)
static const G4int fNbOfIntervals[101]
void ComputeMatSandiaMatrixPAI()
void GetSandiaCofPerAtom(G4int Z, G4double energy, std::vector< G4double > &coeff)
G4OrderedTable * GetSandiaMatrixPAI()
G4Material * fMaterial
void SetLowerI1(G4bool flag)
G4double energy(const ThreeVector &p, const G4double m)
G4int GetMatNbOfIntervals()
static G4double GetZtoA(G4int Z)
static const G4int fH2OlowerInt
G4double GetPhotoAbsorpCof(G4int i, G4int j) const
static const G4double fIonizationPotentials[101]
static const G4int fIntervalLimit
std::vector< G4double > fSandiaCofPerAtom
G4double GetSandiaCofForMaterialPAI(G4int, G4int)
double G4double
Definition: G4Types.hh:76
G4OrderedTable * fMatSandiaMatrix
G4double ** GetPointerToCof()
static const G4double fSandiaTable[981][5]
void SetVerbose(G4int ver)
static const G4double fZtoAratio[101]
void Initialize(G4Material *)
G4int GetNbOfIntervals(G4int Z)