Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4PWATotalXsecTable.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 // $Id: $
27 //
28 // -----------------------------------------------------------------------------
29 //
30 // GEANT4 Class header file
31 //
32 // File name: G4PWATotalXsecTable
33 //
34 // Author: Mihaly Novak
35 //
36 // Creation date: 18.05.2015
37 //
38 // Class description:
39 // Class to load and handle elastic, first and second transport cross sections
40 // precomputed by using ELSEPA [1] in the 100 eV - 1 GeV kinetic and Z = 1-103
41 // energy range for electrons and positrons.G4PWATotalXsecZ is responsible to
42 // to handle cross sections by individual Z that are used in the current
43 // geometry and G4PWATotalXsecTable is a collection of G4PWATotalXsecZ objects.
44 //
45 // Modifications:
46 //
47 // References:
48 // [1] Francesc Salvat, Aleksander Jablonski, Cedric J Powell,
49 // ELSEPA—Dirac partial-wave calculation of elastic scattering of electrons
50 // and positrons by atoms, positive ions and molecules,
51 // Computer physics communications; 165, 2, (2005)
52 //
53 // -----------------------------------------------------------------------------
54 
55 
56 #ifndef G4PWATotalXsecTable_h
57 #define G4PWATotalXsecTable_h 1
58 
59 #include "G4Types.hh"
60 
62 // G4PWATotalXsecZ: sub-class for PWA xsec data that belong to a given Z number
65 {
66  friend class G4PWATotalXsecTable;
67 public:
68  //
69  // out of energy grid cases
70  G4int GetLowestEnergyBinIndex() const {return 0;}
71  G4int GetHighestEnergyBinIndex()const {return fgNumTotalXsecBins-1;}
72  G4double GetLowestEnergy() const {return fgPWATotalXsecEnergyGrid[0];}
73  G4double GetHighestEnergy()const {return fgPWATotalXsecEnergyGrid[fgNumTotalXsecBins-1];}
74 
75  // see below what is input parameter j
76  G4double GetLowestXsecValue(G4int j) const {return fPWAXsecs[j*fgNumTotalXsecBins];}
77  G4double GetHighestXsecValue(G4int j)const {return fPWAXsecs[(j+1)*fgNumTotalXsecBins-1];}
78 
79  //
80  // normal cases i.e. energy is within the grid
81  // kinetic energy in MeV ; returns with the index of the lower energy bin edge
83 
84  //------------------------------------------------------------------------------//
85  // The GetPWATotalXsecEnergyBinIndex(energy) will return with the lower energy //
86  // bin edge index = elowindx. Then the following formulas can be used to get the//
87  // elastic, first and second transport mean free path lower bin edge values: //
88  // index of the lower energy bin edge = j*fgNumTotalXsecBins + elowindex //
89  // where j is //
90  // -elastic cross section lower bin edge index: j = 1.5 + chrage*1.5 //
91  // -first transport cross section lower energy bin index: j = 2.5 + chrage*1.5 //
92  // -first transport cross section lower energy bin index: j = 3.5 + chrage*1.5 //
93  // With this, we can avoid to use an IF over particle types (e-/e+) //
94  // Additional note: it's probably a good idea to separate the elowindex comp- //
95  // utation because it depends only on the energy of the particle while the //
96  // cross sections depends on Z and particle type as well //
97  //------------------------------------------------------------------------------//
98  G4double GetInterpXsec(G4double energy, G4int elowindex, G4int j) const ;
100 
101  private:
102  // ctr and dtr can be called only by the G4PWATotalXsecTable friend
104  ~G4PWATotalXsecZ(){};
105 
106  // hide assignment operator and cpy ctr.
107  G4PWATotalXsecZ & operator=(const G4PWATotalXsecZ &right);
109 
110  void LoadPWATotalXsecZ(G4int Z);
111  private:
112 
113  //size of the common energy grid //
114  static const G4int fgNumTotalXsecBins = 106;
115 
116  // common energy grid in [1.e-4;1.e+3] MeV //
117  // size is fgNumTotalXsecBins
118  static const G4double fgPWATotalXsecEnergyGrid[fgNumTotalXsecBins];
119 
120  // elastic cross sections, first and second transport cross sections for e-/e+
121  // over the common energy grid fgPWATotalXsecEnergyGrid in Geant4 internal length^2
122  G4double fPWAXsecs[fgNumTotalXsecBins*6];
123  // interpolation parameters if log-log linear interpolation is used
124  G4double fInterpParamA[fgNumTotalXsecBins*6];
125  G4double fInterpParamB[fgNumTotalXsecBins*6];
126 };
127 
128 
130 // G4PWATotalXsecTable
133 {
134  public:
137 
138  void Initialise();
139 
141  Z = Z>fgNumZet ? fgNumZet : Z;
142  return fgPWATotalXsecTable[Z-1];
143  }
144 
145  private:
146  // hide assignment operator and cpy ctr.
147  G4PWATotalXsecTable & operator=(const G4PWATotalXsecTable &right);
149 
150  private:
151  // size of the table: Z=1-103 //
152  static const G4int fgNumZet = 103;
153 
154  // G4PWATotalXsecZ pointers for Z=1-103 //
155  static G4PWATotalXsecZ *fgPWATotalXsecTable[fgNumZet];
156 };
157 
158 #endif
159 
G4int GetHighestEnergyBinIndex() const
G4double GetHighestEnergy() const
G4double GetLowestEnergy() const
G4double GetInterpXsec(G4double energy, G4int elowindex, G4int j) const
G4int GetLowestEnergyBinIndex() const
int G4int
Definition: G4Types.hh:78
G4int GetPWATotalXsecEnergyBinIndex(G4double energy) const
const G4PWATotalXsecZ * GetPWATotalXsecForZet(G4int Z) const
G4double GetLowestXsecValue(G4int j) const
G4double energy(const ThreeVector &p, const G4double m)
G4double GetHighestXsecValue(G4int j) const
double G4double
Definition: G4Types.hh:76