Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4empCrossSection Class Reference

#include <G4empCrossSection.hh>

+ Inheritance diagram for G4empCrossSection:

Public Member Functions

 G4empCrossSection (const G4String &nam="")
 
virtual ~G4empCrossSection ()
 
std::vector< G4doubleGetCrossSection (G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat)
 
G4double CrossSection (G4int Z, G4AtomicShellEnumerator shell, G4double incidentEnergy, G4double mass, const G4Material *mat)
 
std::vector< G4doubleProbabilities (G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat)
 
void SetTotalCS (G4double)
 
- Public Member Functions inherited from G4VhShellCrossSection
 G4VhShellCrossSection (const G4String &xname="")
 
virtual ~G4VhShellCrossSection ()
 
G4int SelectRandomShell (G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat)
 
virtual std::vector< G4doubleGetCrossSection (G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat)=0
 
virtual G4double CrossSection (G4int Z, G4AtomicShellEnumerator shell, G4double incidentEnergy, G4double mass, const G4Material *mat)=0
 
virtual std::vector< G4doubleProbabilities (G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat)=0
 
virtual void SetTotalCS (G4double)
 
const G4StringGetName () const
 

Detailed Description

Definition at line 52 of file G4empCrossSection.hh.

Constructor & Destructor Documentation

◆ G4empCrossSection()

G4empCrossSection::G4empCrossSection ( const G4String nam = "")

Definition at line 42 of file G4empCrossSection.cc.

43 :G4VhShellCrossSection(nam),totalCS(0.0)
44{
45 if (nam == "Empirical")
46 {
47 paulShellK = new G4PaulKxsModel();
48 orlicShellLi = new G4OrlicLiXsModel();
49 flag=0;
50 }
51 else
52 {
53 G4cout << "G4empCrossSection::G4empCrossSection: "
54 << "ERROR in G4empCrossSection name; Paul+Orlic is selected."
55 << G4endl;
56 paulShellK = new G4PaulKxsModel();
57 orlicShellLi = new G4OrlicLiXsModel();
58 flag=0;
59 }
60
61}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

◆ ~G4empCrossSection()

G4empCrossSection::~G4empCrossSection ( )
virtual

Definition at line 63 of file G4empCrossSection.cc.

64{
65 delete paulShellK;
66 delete orlicShellLi;
67}

Member Function Documentation

◆ CrossSection()

G4double G4empCrossSection::CrossSection ( G4int  Z,
G4AtomicShellEnumerator  shell,
G4double  incidentEnergy,
G4double  mass,
const G4Material mat 
)
virtual

Implements G4VhShellCrossSection.

Definition at line 105 of file G4empCrossSection.cc.

109{
110 G4double res = 0.0;
112
113 if(fKShell == shell) {
114 res = paulShellK->CalculateKCrossSection(Z, mass, incidentEnergy);
115 }
116 // this check should be done in the Orlic class, that can handle only protons;
117 // however this would lead up tp three checks of the mass, while here we have only one
118 // moreover, at the present time,this class handles explicitly Paul and Orlic models,
119 // so it can hadle the responsibility of this check too
120
121 else if (mass == aProton->GetPDGMass()) {
122
123 if(fL1Shell == shell) {
124 if (flag==0) res = orlicShellLi->CalculateL1CrossSection(Z, incidentEnergy);
125 }
126 else if(fL2Shell == shell) {
127 if (flag==0) res = orlicShellLi->CalculateL2CrossSection(Z, incidentEnergy);
128 }
129 else if(fL3Shell == shell) {
130 if (flag==0) res = orlicShellLi->CalculateL3CrossSection(Z, incidentEnergy);
131 }
132 }
133 return res;
134}
double G4double
Definition: G4Types.hh:83
G4double CalculateL2CrossSection(G4int zTarget, G4double energyIncident)
G4double CalculateL1CrossSection(G4int zTarget, G4double energyIncident)
G4double CalculateL3CrossSection(G4int zTarget, G4double energyIncident)
G4double CalculateKCrossSection(G4int zTarget, G4double massIncident, G4double energyIncident)
static G4Proton * Proton()
Definition: G4Proton.cc:92

◆ GetCrossSection()

std::vector< G4double > G4empCrossSection::GetCrossSection ( G4int  Z,
G4double  incidentEnergy,
G4double  mass,
G4double  deltaEnergy,
const G4Material mat 
)
virtual

Implements G4VhShellCrossSection.

Definition at line 69 of file G4empCrossSection.cc.

74{
75 std::vector<G4double> crossSections;
77
78 crossSections.push_back( paulShellK->CalculateKCrossSection(Z, mass, incidentEnergy) );
79
80 // this check should be done in the Orlic class, that can handle only protons;
81 // however this would lead up tp three checks of the mass, while here we have only one
82 // moreover, at the present time,this class handles explicitly Paul and Orlic models,
83 // so it can hadle the responsibility of this check too
84
85 if (mass == aProton->GetPDGMass()) {
86
87 if (flag==0)
88 {
89 crossSections.push_back( orlicShellLi->CalculateL1CrossSection(Z, incidentEnergy) );
90 crossSections.push_back( orlicShellLi->CalculateL2CrossSection(Z, incidentEnergy) );
91 crossSections.push_back( orlicShellLi->CalculateL3CrossSection(Z, incidentEnergy) );
92 }
93
94 }
95
96 else {
97 crossSections.push_back( 0. );
98 crossSections.push_back( 0. );
99 crossSections.push_back( 0. );
100 }
101 return crossSections;
102
103}

Referenced by Probabilities().

◆ Probabilities()

std::vector< G4double > G4empCrossSection::Probabilities ( G4int  Z,
G4double  incidentEnergy,
G4double  mass,
G4double  deltaEnergy,
const G4Material mat 
)
virtual

Implements G4VhShellCrossSection.

Definition at line 136 of file G4empCrossSection.cc.

141{
142
143 std::vector<G4double> crossSections = GetCrossSection(Z, incidentEnergy, mass, deltaEnergy,mat);
144
145 for (size_t i=0; i<crossSections.size(); i++ ) {
146
147 if (totalCS) {
148 crossSections[i] = crossSections[i]/totalCS;
149 }
150
151 }
152
153 return crossSections;
154
155}
std::vector< G4double > GetCrossSection(G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat)

◆ SetTotalCS()

void G4empCrossSection::SetTotalCS ( G4double  val)
virtual

Reimplemented from G4VhShellCrossSection.

Definition at line 158 of file G4empCrossSection.cc.

158 {
159
160 totalCS = val;
161
162}

The documentation for this class was generated from the following files: