Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4PenelopeCrossSection.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: G4PenelopeCrossSection.hh 74626 2013-10-17 07:00:59Z gcosmo $
27 //
28 // Author: Luciano Pandola
29 //
30 // History:
31 // -----------
32 // 18 Mar 2010 L. Pandola 1st implementation.
33 // 09 Mar 2012 L. Pandola Add public method (and machinery) to return
34 // the absolute and the normalized shell cross
35 // sections independently.
36 //
37 // -------------------------------------------------------------------
38 //
39 // Class description:
40 // This class is a container for cross sections and transport momenta
41 // calculated by Penelope models (ionisation, bremsstrahlung). It stores
42 // PhysicsTables/PhysicsVectors of
43 // a) the "hard quantities" (above the threshold), 0-th order (cross section)
44 // 1-st order (= stopping XS), 2-nd order (= straggling XS)
45 // b) the "soft quantities" (below threshold), 0-th order (cross section)
46 // 1-st order (= stopping XS), 2-nd order (= straggling XS)
47 // c) total hard cross sections for individual oscillators
48 // vs. energy. Two versions are available, one with normalized values
49 // (good for sampling) and one with absolute values.
50 //
51 // The interface *always* uses energy and cross sections, while internally
52 // log(energy) and log(XS) are used.
53 //
54 // One instance per each cut-material couple should be created by the
55 // calling class.
56 //
57 // Public method to retrieve hard cross section, soft stopping power,
58 // total cross section and hard shell cross sections.
59 //
60 // Notice: all quantities stored here are *per molecule*
61 //
62 // -------------------------------------------------------------------
63 
64 #ifndef G4PENELOPECROSSSECTION_HH
65 #define G4PENELOPECROSSSECTION_HH 1
66 
67 #include "globals.hh"
68 
69 class G4PhysicsTable;
70 class G4DataVector;
71 
73 {
74 
75 public:
76  //constructor: one has to give the number of points in each PhysicsVector
77  //(= dimension of the energy grid) and the number of shells (0 is the
78  //default).
79  G4PenelopeCrossSection(size_t nOfEnergyPoints,size_t nOfShells=0);
80  //
82 
90  G4double GetShellCrossSection(size_t shellID,G4double energy) const;
92  G4double GetNormalizedShellCrossSection(size_t shellID,G4double energy) const;
93 
94  size_t GetNumberOfShells() const {return numberOfShells;};
95 
99  void AddCrossSectionPoint(size_t binNumber,
100  G4double energy,G4double XH0, G4double XH1,
101  G4double XH2,
102  G4double XS0, G4double XS1, G4double XS2);
103  void AddShellCrossSectionPoint(size_t binNumber,
104  size_t shellID,G4double energy,G4double xs);
106 
107 private:
108  G4PenelopeCrossSection & operator=(const G4PenelopeCrossSection &right);
110 
111  G4bool isNormalized;
112 
113  size_t numberOfEnergyPoints;
114  size_t numberOfShells;
115 
116  //all tables are log. XS vs. log E
117 
118  //XS0, XS1, XS2 in Penelope nomenclature
119  G4PhysicsTable* softCrossSections;
120 
121  //XH0, XH1, XH2 in Penelope nomenclature
122  G4PhysicsTable* hardCrossSections;
123 
124  //XS for individual shells
125  G4PhysicsTable* shellCrossSections;
126  G4PhysicsTable* shellNormalizedCrossSections;
127 
128 };
129 
130 #endif
131 
G4double GetSoftStoppingPower(G4double energy) const
Returns the total stopping power due to soft collisions.
void AddShellCrossSectionPoint(size_t binNumber, size_t shellID, G4double energy, G4double xs)
G4double GetHardCrossSection(G4double energy) const
Returns hard cross section at the given energy.
void AddCrossSectionPoint(size_t binNumber, G4double energy, G4double XH0, G4double XH1, G4double XH2, G4double XS0, G4double XS1, G4double XS2)
bool G4bool
Definition: G4Types.hh:79
G4double GetTotalCrossSection(G4double energy) const
Returns total cross section at the given energy.
G4PenelopeCrossSection(size_t nOfEnergyPoints, size_t nOfShells=0)
G4double energy(const ThreeVector &p, const G4double m)
double G4double
Definition: G4Types.hh:76
G4double GetNormalizedShellCrossSection(size_t shellID, G4double energy) const
Returns the hard cross section for the given shell (normalized to 1)
G4double GetShellCrossSection(size_t shellID, G4double energy) const
Returns the hard cross section for the given shell (per molecule)