Geant4 11.2.2
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) override
 
G4double CrossSection (G4int Z, G4AtomicShellEnumerator shell, G4double incidentEnergy, G4double mass, const G4Material *mat) override
 
std::vector< G4doubleProbabilities (G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat) override
 
void SetTotalCS (G4double) override
 
 G4empCrossSection (const G4empCrossSection &)=delete
 
G4empCrossSectionoperator= (const G4empCrossSection &right)=delete
 
- 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)
 
const G4StringGetName () const
 
 G4VhShellCrossSection (const G4VhShellCrossSection &)=delete
 
G4VhShellCrossSectionoperator= (const G4VhShellCrossSection &right)=delete
 

Detailed Description

Definition at line 49 of file G4empCrossSection.hh.

Constructor & Destructor Documentation

◆ G4empCrossSection() [1/2]

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

Definition at line 40 of file G4empCrossSection.cc.

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

◆ ~G4empCrossSection()

G4empCrossSection::~G4empCrossSection ( )
virtual

Definition at line 62 of file G4empCrossSection.cc.

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

◆ G4empCrossSection() [2/2]

G4empCrossSection::G4empCrossSection ( const G4empCrossSection & )
delete

Member Function Documentation

◆ CrossSection()

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

Implements G4VhShellCrossSection.

Definition at line 107 of file G4empCrossSection.cc.

111{
112 G4double res = 0.0;
114
115 if(fKShell == shell) {
116 res = paulShellK->CalculateKCrossSection(Z, mass, incidentEnergy);
117 }
118 // this check should be done in the Orlic class, that can handle only protons;
119 // however this would lead up tp three checks of the mass, while here we have only one
120 // moreover, at the present time,this class handles explicitly Paul and Orlic models,
121 // so it can hadle the responsibility of this check too
122
123 else if (mass == aProton->GetPDGMass()) {
124
125 if(fL1Shell == shell) {
126 if (flag==0) res = orlicShellLi->CalculateL1CrossSection(Z, incidentEnergy);
127 }
128 else if(fL2Shell == shell) {
129 if (flag==0) res = orlicShellLi->CalculateL2CrossSection(Z, incidentEnergy);
130 }
131 else if(fL3Shell == shell) {
132 if (flag==0) res = orlicShellLi->CalculateL3CrossSection(Z, incidentEnergy);
133 }
134 }
135 return res;
136}
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:90

◆ GetCrossSection()

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

Implements G4VhShellCrossSection.

Definition at line 70 of file G4empCrossSection.cc.

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

◆ operator=()

G4empCrossSection & G4empCrossSection::operator= ( const G4empCrossSection & right)
delete

◆ Probabilities()

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

Implements G4VhShellCrossSection.

Definition at line 140 of file G4empCrossSection.cc.

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

◆ SetTotalCS()

void G4empCrossSection::SetTotalCS ( G4double val)
overridevirtual

Reimplemented from G4VhShellCrossSection.

Definition at line 160 of file G4empCrossSection.cc.

160 {
161
162 totalCS = val;
163
164}

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