00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #include "globals.hh"
00039 #include "G4empCrossSection.hh"
00040 #include "G4Proton.hh"
00041
00042
00043 G4empCrossSection::G4empCrossSection(const G4String& nam)
00044 :G4VhShellCrossSection(nam),totalCS(0.0)
00045 {
00046
00047 paulShellK = new G4PaulKxsModel();
00048 orlicShellLi = new G4OrlicLiXsModel();
00049
00050 }
00051
00052 G4empCrossSection::~G4empCrossSection()
00053 {
00054
00055 delete paulShellK;
00056 delete orlicShellLi;
00057
00058 }
00059
00060 std::vector<G4double> G4empCrossSection::GetCrossSection(G4int Z,
00061 G4double incidentEnergy,
00062 G4double mass,
00063 G4double,
00064 const G4Material*)
00065 {
00066 std::vector<G4double> crossSections;
00067 G4ParticleDefinition* aProton = G4Proton::Proton();
00068
00069 crossSections.push_back( paulShellK->CalculateKCrossSection(Z, mass, incidentEnergy) );
00070
00071
00072
00073
00074
00075
00076 if (mass == aProton->GetPDGMass()) {
00077 crossSections.push_back( orlicShellLi->CalculateL1CrossSection(Z, incidentEnergy) );
00078 crossSections.push_back( orlicShellLi->CalculateL2CrossSection(Z, incidentEnergy) );
00079 crossSections.push_back( orlicShellLi->CalculateL3CrossSection(Z, incidentEnergy) );
00080 }
00081
00082 else {
00083 crossSections.push_back( 0. );
00084 crossSections.push_back( 0. );
00085 crossSections.push_back( 0. );
00086 }
00087 return crossSections;
00088
00089 }
00090
00091 G4double G4empCrossSection::CrossSection(G4int Z, G4AtomicShellEnumerator shell,
00092 G4double incidentEnergy,
00093 G4double mass,
00094 const G4Material*)
00095 {
00096
00097
00098
00099 G4double res = 0.0;
00100 G4ParticleDefinition* aProton = G4Proton::Proton();
00101 if(fKShell == shell) {
00102 res = paulShellK->CalculateKCrossSection(Z, mass, incidentEnergy);
00103 }
00104
00105
00106
00107
00108
00109
00110 else if (mass == aProton->GetPDGMass()) {
00111
00112 if(fL1Shell == shell) {
00113 res = orlicShellLi->CalculateL1CrossSection(Z, incidentEnergy);
00114 }
00115 else if(fL2Shell == shell) {
00116 res = orlicShellLi->CalculateL2CrossSection(Z, incidentEnergy);
00117 }
00118 else if(fL3Shell == shell) {
00119 res = orlicShellLi->CalculateL3CrossSection(Z, incidentEnergy);
00120 }
00121 }
00122 return res;
00123 }
00124
00125 std::vector<G4double> G4empCrossSection::Probabilities(G4int Z,
00126 G4double incidentEnergy,
00127 G4double mass,
00128 G4double deltaEnergy,
00129 const G4Material* mat)
00130 {
00131
00132 std::vector<G4double> crossSections = GetCrossSection(Z, incidentEnergy, mass, deltaEnergy,mat);
00133
00134 for (size_t i=0; i<crossSections.size(); i++ ) {
00135
00136 if (totalCS) {
00137 crossSections[i] = crossSections[i]/totalCS;
00138 }
00139
00140 }
00141
00142 return crossSections;
00143
00144 }
00145
00146
00147 void G4empCrossSection::SetTotalCS(G4double val){
00148
00149 totalCS = val;
00150
00151 }
00152
00153
00154