61 path = std::getenv(
"G4LEDATA");
64 G4Exception(
"G4ecpssrBaseKxsModel::G4ecpssrBaseKxsModel()",
"em0006",
FatalException,
"G4LEDATA environment variable not set" );
68 std::ostringstream fileName;
69 fileName << path <<
"/pixe/uf/FK.dat";
70 std::ifstream FK(fileName.str().c_str());
137 const G4int maxit= 100;
141 if (
n<0 || x<0.0 || (x==0.0 && (
n==0 ||
n==1))) {
142 G4cout <<
"*** WARNING in G4ecpssrBaseKxsModel::ExpIntFunction: bad arguments in ExpIntFunction" <<
G4endl;
146 if (
n==0) ans=
G4Exp(-x)/x;
148 if (x==0.0) ans=1.0/nm1;
155 for (i=1;i<=maxit;i++) {
162 if (std::fabs(del-1.0) <
eps) {
168 ans = (nm1!=0 ? 1.0/nm1 : -std::log(x)-euler);
170 for (i=1;i<=maxit;i++) {
172 if (i !=nm1) del = -fact/(i-nm1);
175 for (ii=1;ii<=nm1;ii++) psi +=1.0/ii;
176 del=fact*(-std::log(x)+psi);
179 if (std::fabs(del) < std::fabs(ans)*
eps)
return ans;
214 G4cout <<
"*** WARNING in G4ecpssrBaseKxsModel::CalculateCrossSection : we can treat only Proton or Alpha incident particles " <<
G4endl;
236 G4double screenedzTarget = zTarget-zkshell;
239 constexpr G4double rydbergMeV= 13.6056923e-6;
241 G4double tetaK = kBindingEnergy/((screenedzTarget*screenedzTarget)*rydbergMeV);
246 G4double velocity =(2./(tetaK*screenedzTarget))*std::pow(((energyIncident*
electron_mass_c2)/(massIncident*rydbergMeV)),0.5);
257 G4double sigma0 = 8.*
pi*(zIncident*zIncident)*bohrPow2Barn*std::pow(screenedzTarget,-4.);
263 const G4double kAnalyticalApproximation= 1.5;
264 G4double x = kAnalyticalApproximation/velocity;
275 if ((0.< x) && (x <= 0.035))
277 electrIonizationEnergy= 0.75*
pi*(std::log(1./(x*x))-1.);
281 if ( (0.035 < x) && (x <=3.))
283 electrIonizationEnergy =
G4Exp(-2.*x)/(0.031+(0.213*std::pow(x,0.5))+(0.005*x)-(0.069*std::pow(x,3./2.))+(0.324*x*x));
288 if ( (3.< x) && (x<=11.))
290 electrIonizationEnergy =2.*
G4Exp(-2.*x)/std::pow(x,1.6);
293 else electrIonizationEnergy =0.;
299 G4double hFunction =(electrIonizationEnergy*2.)/(tetaK*std::pow(velocity,3));
304 G4double gFunction = (1.+(9.*velocity)+(31.*velocity*velocity)+(98.*std::pow(velocity,3.))+(12.*std::pow(velocity,4.))+(25.*std::pow(velocity,5.))
305 +(4.2*std::pow(velocity,6.))+(0.515*std::pow(velocity,7.)))/std::pow(1.+velocity,9.);
312 G4double sigmaPSS = 1.+(((2.*zIncident)/(screenedzTarget*tetaK))*(gFunction-hFunction));
327 G4double ykFormula=0.4*(screenedzTarget/cNaturalUnit)*(screenedzTarget/cNaturalUnit)/(velocity/sigmaPSS);
334 G4double relativityCorrection = std::pow((1.+(1.1*ykFormula*ykFormula)),0.5)+ykFormula;
340 G4double reducedVelocity = velocity*std::pow(relativityCorrection,0.5);
347 G4double etaOverTheta2 = (energyIncident*
electron_mass_c2)/(massIncident*rydbergMeV*screenedzTarget*screenedzTarget)
348 /(sigmaPSS*tetaK)/(sigmaPSS*tetaK);
367 universalFunction = (std::pow(2.,9.)/45.)*std::pow(reducedVelocity/sigmaPSS,8.)*std::pow((1.+(1.72*(reducedVelocity/sigmaPSS)*(reducedVelocity/sigmaPSS))),-4.);
376 if ( etaOverTheta2 > 86.6 && (sigmaPSS*tetaK) > 0.4 && (sigmaPSS*tetaK) < 2.9996 )
397 G4double etaT = (sigmaPSS*tetaK)*(sigmaPSS*tetaK)*(86.6);
408 "*** WARNING in G4ecpssrBaseKxsModel::CalculateCrossSection : unable to interpolate FK function in high velocity region ! ***" <<
G4endl;
432 G4double universalFunction3= fKK/(etaK/tetaK);
437 universalFunction=universalFunction3;
440 else if ( etaOverTheta2 >= 1.e-3 && etaOverTheta2 <= 86.6 && (sigmaPSS*tetaK) >= 0.4 && (sigmaPSS*tetaK) <= 2.9996 )
448 if (universalFunction2<=0)
451 "*** WARNING : G4ecpssrBaseKxsModel::CalculateCrossSection is unable to interpolate FK function in medium velocity region ! ***" <<
G4endl;
455 if (
verboseLevel>0)
G4cout <<
" universalFunction2=" << universalFunction2 <<
" for theta=" << sigmaPSS*tetaK <<
" and etaOverTheta2=" << etaOverTheta2 <<
G4endl;
457 universalFunction=universalFunction2;
464 G4double sigmaPSSR = (sigma0/(sigmaPSS*tetaK))*universalFunction;
471 G4double pssDeltaK = (4./(systemMass*sigmaPSS*tetaK))*(sigmaPSS/velocity)*(sigmaPSS/velocity);
477 if (pssDeltaK>1)
return 0.;
479 G4double energyLoss = std::pow(1-pssDeltaK,0.5);
485 G4double energyLossFunction = (std::pow(2.,-9)/8.)*((((9.*energyLoss)-1.)*std::pow(1.+energyLoss,9.))+(((9.*energyLoss)+1.)*std::pow(1.-energyLoss,9.)));
493 G4double coulombDeflection = (4.*
pi*zIncident/systemMass)*std::pow(tetaK*sigmaPSS,-2.)*std::pow(velocity/sigmaPSS,-3.)*(zTarget/screenedzTarget);
498 G4double cParameter = 2.*coulombDeflection/(energyLoss*(energyLoss+1.));
514 crossSection = energyLossFunction* coulombDeflectionFunction*sigmaPSSR;
520 if (crossSection >= 0) {
521 return crossSection *
barn;
568 auto e12 = std::upper_bound(
aVecMap[(*t1)].begin(),
aVecMap[(*t1)].end(), theta);
571 auto e22 = std::upper_bound(
aVecMap[(*t2)].begin(),
aVecMap[(*t2)].end(), theta);
581 xs11 =
FKData[valueT1][valueE11];
582 xs12 =
FKData[valueT1][valueE12];
583 xs21 =
FKData[valueT2][valueE21];
584 xs22 =
FKData[valueT2][valueE22];
586 G4double xsProduct = xs11 * xs12 * xs21 * xs22;
588 if (xs11==0 || xs12==0 ||xs21==0 ||xs22==0)
return (0.);
625 G4double a = (std::log10(xs2)-std::log10(xs1)) / (std::log10(
e2)-std::log10(
e1));
626 G4double b = std::log10(xs2) - a*std::log10(
e2);
627 G4double sigma = a*std::log10(e) + b;
628 G4double value = (std::pow(10.,sigma));
static const G4double e1[44]
static const G4double e2[44]
static const G4double eps
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
static constexpr double barn
static constexpr double eplus
static constexpr double eV
static constexpr double pi
void print(G4double elem)
G4GLOB_DLL std::ostream G4cout
G4double BindingEnergy() const
G4AtomicShell * Shell(G4int Z, size_t shellIndex) const
static G4AtomicTransitionManager * Instance()
virtual G4bool LoadData(const G4String &argFileName)
virtual G4double FindValue(G4double e, G4int componentId=0) const
static G4NistManager * Instance()
G4double GetAtomicMassAmu(const G4String &symb) const
G4double GetPDGMass() const
G4double GetPDGCharge() const
static G4Proton * Proton()
G4double CalculateCrossSection(G4int, G4double, G4double) override
std::vector< G4double > dummyVec
G4CrossSectionDataSet * tableC2
G4double FunctionFK(G4double k, G4double theta)
G4CrossSectionDataSet * tableC1
G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
G4CrossSectionDataSet * tableC3
G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22, G4double x11, G4double x12, G4double x21, G4double x22, G4double t1, G4double t2, G4double t, G4double e)
G4double ExpIntFunction(G4int n, G4double x)