Geant4-11
Public Member Functions | Private Attributes
G4empCrossSection Class Reference

#include <G4empCrossSection.hh>

Inheritance diagram for G4empCrossSection:
G4VhShellCrossSection

Public Member Functions

G4double CrossSection (G4int Z, G4AtomicShellEnumerator shell, G4double incidentEnergy, G4double mass, const G4Material *mat) override
 
 G4empCrossSection (const G4empCrossSection &)=delete
 
 G4empCrossSection (const G4String &nam="")
 
std::vector< G4doubleGetCrossSection (G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat) override
 
const G4StringGetName () const
 
G4empCrossSectionoperator= (const G4empCrossSection &right)=delete
 
std::vector< G4doubleProbabilities (G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat) override
 
G4int SelectRandomShell (G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat)
 
void SetTotalCS (G4double) override
 
virtual ~G4empCrossSection ()
 

Private Attributes

G4int flag
 
G4String name
 
G4OrlicLiXsModelorlicShellLi
 
G4PaulKxsModelpaulShellK
 
G4double totalCS
 

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.

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

References flag, G4cout, G4endl, orlicShellLi, and paulShellK.

◆ ~G4empCrossSection()

G4empCrossSection::~G4empCrossSection ( )
virtual

Definition at line 62 of file G4empCrossSection.cc.

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

References orlicShellLi, and paulShellK.

◆ 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
const G4int Z[17]
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

References G4PaulKxsModel::CalculateKCrossSection(), G4OrlicLiXsModel::CalculateL1CrossSection(), G4OrlicLiXsModel::CalculateL2CrossSection(), G4OrlicLiXsModel::CalculateL3CrossSection(), fKShell, fL1Shell, fL2Shell, fL3Shell, flag, G4ParticleDefinition::GetPDGMass(), orlicShellLi, paulShellK, G4Proton::Proton(), and Z.

◆ 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}

References G4PaulKxsModel::CalculateKCrossSection(), G4OrlicLiXsModel::CalculateL1CrossSection(), G4OrlicLiXsModel::CalculateL2CrossSection(), G4OrlicLiXsModel::CalculateL3CrossSection(), flag, G4ParticleDefinition::GetPDGMass(), orlicShellLi, paulShellK, G4Proton::Proton(), and Z.

Referenced by Probabilities().

◆ GetName()

const G4String & G4VhShellCrossSection::GetName ( ) const
inlineinherited

Definition at line 102 of file G4VhShellCrossSection.hh.

103{
104 return name;
105}

References G4VhShellCrossSection::name.

Referenced by G4UAtomicDeexcitation::InitialiseForNewRun().

◆ 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

References GetCrossSection(), totalCS, and Z.

◆ SelectRandomShell()

G4int G4VhShellCrossSection::SelectRandomShell ( G4int  Z,
G4double  incidentEnergy,
G4double  mass,
G4double  deltaEnergy,
const G4Material mat 
)
inherited

Definition at line 63 of file G4VhShellCrossSection.cc.

70{
71 std::vector<G4double> p =
72 Probabilities(Z,incidentEnergy,mass,deltaEnergy,mat);
73 G4int shell = -1;
74 size_t nShells = p.size();
76 for (size_t i=0; i<nShells; i++) {
77
78 if (p[i] >= q) {
79 shell = i;
80 break;
81 }
82 q -= p[i];
83 }
84 return shell;
85}
int G4int
Definition: G4Types.hh:85
#define G4UniformRand()
Definition: Randomize.hh:52
virtual std::vector< G4double > Probabilities(G4int Z, G4double incidentEnergy, G4double mass, G4double deltaEnergy, const G4Material *mat)=0

References G4UniformRand, G4VhShellCrossSection::Probabilities(), and Z.

◆ 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}

References totalCS.

Field Documentation

◆ flag

G4int G4empCrossSection::flag
private

Definition at line 82 of file G4empCrossSection.hh.

Referenced by CrossSection(), G4empCrossSection(), and GetCrossSection().

◆ name

G4String G4VhShellCrossSection::name
privateinherited

◆ orlicShellLi

G4OrlicLiXsModel* G4empCrossSection::orlicShellLi
private

◆ paulShellK

G4PaulKxsModel* G4empCrossSection::paulShellK
private

◆ totalCS

G4double G4empCrossSection::totalCS
private

Definition at line 81 of file G4empCrossSection.hh.

Referenced by Probabilities(), and SetTotalCS().


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