Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4empCrossSection Class Reference

#include <G4empCrossSection.hh>

Inheritance diagram for G4empCrossSection:
Collaboration 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)
 
const G4StringGetName () const
 

Detailed Description

Definition at line 53 of file G4empCrossSection.hh.

Constructor & Destructor Documentation

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

Definition at line 43 of file G4empCrossSection.cc.

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

Definition at line 64 of file G4empCrossSection.cc.

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

Member Function Documentation

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

Implements G4VhShellCrossSection.

Definition at line 106 of file G4empCrossSection.cc.

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

Here is the call graph for this function:

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

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 
97  else {
98  crossSections.push_back( 0. );
99  crossSections.push_back( 0. );
100  crossSections.push_back( 0. );
101  }
102  return crossSections;
103 
104 }
G4double CalculateKCrossSection(G4int zTarget, G4double massIncident, G4double energyIncident)
static G4Proton * Proton()
Definition: G4Proton.cc:93
G4double CalculateL3CrossSection(G4int zTarget, G4double energyIncident)
G4double GetPDGMass() const
G4double CalculateL2CrossSection(G4int zTarget, G4double energyIncident)
G4double CalculateL1CrossSection(G4int zTarget, G4double energyIncident)

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements G4VhShellCrossSection.

Definition at line 137 of file G4empCrossSection.cc.

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

Here is the call graph for this function:

void G4empCrossSection::SetTotalCS ( G4double  val)
virtual

Reimplemented from G4VhShellCrossSection.

Definition at line 159 of file G4empCrossSection.cc.

159  {
160 
161  totalCS = val;
162 
163 }

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