Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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//
27// Author: Luciano Pandola
28//
29// History:
30// -----------
31// 18 Mar 2010 L. Pandola 1st implementation.
32// 09 Mar 2012 L. Pandola Add public method (and machinery) to return
33// the absolute and the normalized shell cross
34// sections independently.
35//
36// -------------------------------------------------------------------
37//
38// Class description:
39// This class is a container for cross sections and transport momenta
40// calculated by Penelope models (ionisation, bremsstrahlung). It stores
41// PhysicsTables/PhysicsVectors of
42// a) the "hard quantities" (above the threshold), 0-th order (cross section)
43// 1-st order (= stopping XS), 2-nd order (= straggling XS)
44// b) the "soft quantities" (below threshold), 0-th order (cross section)
45// 1-st order (= stopping XS), 2-nd order (= straggling XS)
46// c) total hard cross sections for individual oscillators
47// vs. energy. Two versions are available, one with normalized values
48// (good for sampling) and one with absolute values.
49//
50// The interface *always* uses energy and cross sections, while internally
51// log(energy) and log(XS) are used.
52//
53// One instance per each cut-material couple should be created by the
54// calling class.
55//
56// Public method to retrieve hard cross section, soft stopping power,
57// total cross section and hard shell cross sections.
58//
59// Notice: all quantities stored here are *per molecule*
60//
61// -------------------------------------------------------------------
62
63#ifndef G4PENELOPECROSSSECTION_HH
64#define G4PENELOPECROSSSECTION_HH 1
65
66#include "globals.hh"
67
68class G4PhysicsTable;
69class G4DataVector;
70
72{
73
74public:
75 //constructor: one has to give the number of points in each PhysicsVector
76 //(= dimension of the energy grid) and the number of shells (0 is the
77 //default).
78 explicit G4PenelopeCrossSection(size_t nOfEnergyPoints,size_t nOfShells=0);
79 //
81
82 //! Returns total cross section at the given energy
84 //! Returns hard cross section at the given energy
86 //! Returns the total stopping power due to soft collisions
88 //! Returns the hard cross section for the given shell (per molecule)
89 G4double GetShellCrossSection(size_t shellID,G4double energy) const;
90 //! Returns the hard cross section for the given shell (normalized to 1)
91 G4double GetNormalizedShellCrossSection(size_t shellID,G4double energy) const;
92
93 size_t GetNumberOfShells() const {return fNumberOfShells;};
94
95 //!
96 //! Public interface for the master thread
97 //!
98 void AddCrossSectionPoint(size_t binNumber,
99 G4double energy,G4double XH0, G4double XH1,
100 G4double XH2,
101 G4double XS0, G4double XS1, G4double XS2);
102 void AddShellCrossSectionPoint(size_t binNumber,
103 size_t shellID,G4double energy,G4double xs);
105
108
109private:
110 //all tables are log. XS vs. log E
111
112 //XS0, XS1, XS2 in Penelope nomenclature
113 G4PhysicsTable* fSoftCrossSections;
114
115 //XH0, XH1, XH2 in Penelope nomenclature
116 G4PhysicsTable* fHardCrossSections;
117
118 //XS for individual shells
119 G4PhysicsTable* fShellCrossSections;
120 G4PhysicsTable* fShellNormalizedCrossSections;
121
122 size_t fNumberOfEnergyPoints;
123 size_t fNumberOfShells;
124 G4bool fIsNormalized;
125};
126
127#endif
128
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
void AddShellCrossSectionPoint(size_t binNumber, size_t shellID, G4double energy, G4double xs)
G4double GetTotalCrossSection(G4double energy) const
Returns total cross section at the given energy.
G4double GetSoftStoppingPower(G4double energy) const
Returns the total stopping power due to soft collisions.
G4double GetShellCrossSection(size_t shellID, G4double energy) const
Returns the hard cross section for the given shell (per molecule)
G4double GetHardCrossSection(G4double energy) const
Returns hard cross section at the given energy.
G4PenelopeCrossSection(const G4PenelopeCrossSection &)=delete
G4double GetNormalizedShellCrossSection(size_t shellID, G4double energy) const
Returns the hard cross section for the given shell (normalized to 1)
void AddCrossSectionPoint(size_t binNumber, G4double energy, G4double XH0, G4double XH1, G4double XH2, G4double XS0, G4double XS1, G4double XS2)
G4PenelopeCrossSection & operator=(const G4PenelopeCrossSection &right)=delete