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
00039 #include "globals.hh"
00040 #include "G4teoCrossSection.hh"
00041 #include "G4Proton.hh"
00042
00043 #include "G4ecpssrBaseKxsModel.hh"
00044 #include "G4ecpssrBaseLixsModel.hh"
00045
00046 #include "G4ecpssrFormFactorKxsModel.hh"
00047 #include "G4ecpssrFormFactorLixsModel.hh"
00048 #include "G4ecpssrFormFactorMixsModel.hh"
00049
00050 G4teoCrossSection::G4teoCrossSection(const G4String& nam)
00051 :G4VhShellCrossSection(nam),totalCS(0.0),ecpssrShellK(0),ecpssrShellLi(0), ecpssrShellMi(0)
00052 {
00053
00054 if (nam == "Analytical")
00055 {
00056 ecpssrShellK = new G4ecpssrBaseKxsModel();
00057 ecpssrShellLi = new G4ecpssrBaseLixsModel();
00058 }
00059 else if (nam == "ECPSSR_FormFactor")
00060 {
00061 ecpssrShellK = new G4ecpssrFormFactorKxsModel();
00062 ecpssrShellLi = new G4ecpssrFormFactorLixsModel();
00063 ecpssrShellMi = new G4ecpssrFormFactorMixsModel();
00064 }
00065 else { G4cout << "ERROR" << G4endl;}
00066
00067
00068 }
00069
00070 G4teoCrossSection::~G4teoCrossSection()
00071 {
00072 delete ecpssrShellK;
00073 delete ecpssrShellLi;
00074 if (ecpssrShellMi) {delete ecpssrShellMi;}
00075 }
00076
00077 std::vector<G4double> G4teoCrossSection::GetCrossSection(G4int Z,
00078 G4double incidentEnergy,
00079 G4double mass,
00080 G4double,
00081 const G4Material*)
00082 {
00083 std::vector<G4double> crossSections;
00084
00085 crossSections.push_back( ecpssrShellK->CalculateCrossSection(Z, mass, incidentEnergy) );
00086
00087 crossSections.push_back( ecpssrShellLi->CalculateL1CrossSection(Z, mass, incidentEnergy) );
00088 crossSections.push_back( ecpssrShellLi->CalculateL2CrossSection(Z, mass, incidentEnergy) );
00089 crossSections.push_back( ecpssrShellLi->CalculateL3CrossSection(Z, mass, incidentEnergy) );
00090
00091 if (ecpssrShellMi) {
00092
00093 crossSections.push_back( ecpssrShellMi->CalculateM1CrossSection(Z, mass, incidentEnergy) );
00094 crossSections.push_back( ecpssrShellMi->CalculateM2CrossSection(Z, mass, incidentEnergy) );
00095 crossSections.push_back( ecpssrShellMi->CalculateM3CrossSection(Z, mass, incidentEnergy) );
00096 crossSections.push_back( ecpssrShellMi->CalculateM4CrossSection(Z, mass, incidentEnergy) );
00097 crossSections.push_back( ecpssrShellMi->CalculateM5CrossSection(Z, mass, incidentEnergy) );
00098
00099 }
00100
00101
00102 return crossSections;
00103 }
00104
00105 G4double G4teoCrossSection::CrossSection(G4int Z, G4AtomicShellEnumerator shell,
00106 G4double incidentEnergy,
00107 G4double mass,
00108 const G4Material*)
00109 {
00110 G4double res = 0.0;
00111 if(shell > 3 && !ecpssrShellMi) {
00112 return res;
00113 }
00114
00115 else if(shell > 8) {
00116 return res;
00117 }
00118
00119 else if(fKShell == shell)
00120 {
00121 res = ecpssrShellK->CalculateCrossSection(Z, mass, incidentEnergy);
00122 }
00123
00124 else if(fL1Shell == shell)
00125 {
00126 res = ecpssrShellLi->CalculateL1CrossSection(Z, mass, incidentEnergy);
00127 }
00128
00129 else if(fL2Shell == shell)
00130 {
00131 res = ecpssrShellLi->CalculateL2CrossSection(Z, mass, incidentEnergy);
00132 }
00133
00134 else if(fL3Shell == shell)
00135 {
00136 res = ecpssrShellLi->CalculateL3CrossSection(Z, mass, incidentEnergy);
00137 }
00138
00139 else if(fM1Shell == shell)
00140 {
00141 res = ecpssrShellLi->CalculateL3CrossSection(Z, mass, incidentEnergy);
00142 }
00143
00144 else if(fM2Shell == shell)
00145 {
00146 res = ecpssrShellLi->CalculateL3CrossSection(Z, mass, incidentEnergy);
00147 }
00148
00149 else if(fM3Shell == shell)
00150 {
00151 res = ecpssrShellLi->CalculateL3CrossSection(Z, mass, incidentEnergy);
00152 }
00153
00154 else if(fM4Shell == shell)
00155 {
00156 res = ecpssrShellLi->CalculateL3CrossSection(Z, mass, incidentEnergy);
00157 }
00158
00159 else if(fM5Shell == shell)
00160 {
00161 res = ecpssrShellLi->CalculateL3CrossSection(Z, mass, incidentEnergy);
00162 }
00163 return res;
00164 }
00165
00166 std::vector<G4double> G4teoCrossSection::Probabilities(G4int Z,
00167 G4double incidentEnergy,
00168 G4double mass,
00169 G4double deltaEnergy,
00170 const G4Material*)
00171 {
00172 std::vector<G4double> crossSections =
00173 GetCrossSection(Z, incidentEnergy, mass, deltaEnergy);
00174
00175 for (size_t i=0; i<crossSections.size(); i++ ) {
00176
00177 if (totalCS) {
00178 crossSections[i] = crossSections[i]/totalCS;
00179 }
00180
00181 }
00182 return crossSections;
00183 }
00184
00185 void G4teoCrossSection::SetTotalCS(G4double val){
00186
00187 totalCS = val;
00188
00189 }
00190
00191
00192