89 if(t0 >= tm)
return 0.0;
92 Shell(Z, shell)->BindingEnergy();
94 if(e <= bindingEnergy)
return 0.0;
101 if(
verbose > 1 || (Z==4 && e>= 1.0 && e<= 0.0)) {
102 G4cout <<
"G4RDeIonisationSpectrum::Probability: Z= " << Z
103 <<
"; shell= " << shell
104 <<
"; E(keV)= " << e/
keV
105 <<
"; Eb(keV)= " << bindingEnergy/
keV
122 if(p[3] > 0.5) p[3] = 0.5;
125 p.push_back((2.0*g - 1.0)/(g*g));
129 if(e >= 1. && e <= 0. && Z == 4) p.push_back(0.0);
136 if(
verbose > 1 || (Z==4 && e>= 1.0 && e<= 0.0)) {
137 G4cout <<
"tcut= " << tMin
138 <<
"; tMax= " << tMax
154 if(nor > 0.0) val /= nor;
175 if(t0 >= tm)
return 0.0;
178 Shell(Z, shell)->BindingEnergy();
180 if(e <= bindingEnergy)
return 0.0;
188 G4cout <<
"G4RDeIonisationSpectrum::AverageEnergy: Z= " << Z
189 <<
"; shell= " << shell
190 <<
"; E(keV)= " << e/
keV
191 <<
"; bindingE(keV)= " << bindingEnergy/
keV
207 if(p[3] > 0.5) p[3] = 0.5;
210 p.push_back((2.0*g - 1.0)/(g*g));
221 <<
"; tMax(MeV)= " << tMax/
MeV
236 if(nor > 0.0) val /= nor;
254 if(t0 > tm)
return tDelta;
257 Shell(Z, shell)->BindingEnergy();
259 if(e <= bindingEnergy)
return 0.0;
265 if(x1 >= x2)
return tDelta;
268 G4cout <<
"G4RDeIonisationSpectrum::SampleEnergy: Z= " << Z
269 <<
"; shell= " << shell
270 <<
"; E(keV)= " << e/
keV
285 if(p[3] > 0.5) p[3] = 0.5;
288 p.push_back((2.0*g - 1.0)/(g*g));
310 if(p[j] > amaj) amaj = p[j];
322 dx = (p[2] - p[1]) / 3.0;
323 dx1= std::exp(std::log(p[3]/p[2]) / 16.0);
324 for (i=4; i<iMax-1; i++) {
328 }
else if(iMax-2 == i) {
334 if(x >= z1 && x <= z2)
break;
337 fun = p[i] + (x -
z1) * (p[i+1] - p[i])/(z2 -
z1);
340 G4cout <<
"WARNING in G4RDeIonisationSpectrum::SampleEnergy:"
341 <<
" Majoranta " << amaj
343 <<
" in the first aria at x= " << x
365 G4cout <<
"WARNING in G4RDeIonisationSpectrum::SampleEnergy:"
366 <<
" Majoranta " << amaj
368 <<
" in the second aria at x= " << x
384 <<
"; tMax(MeV)= " << tMax/
MeV
390 <<
"; be= " << bindingEnergy
392 <<
"; tDelta= " << tDelta
407 if(xMin >= xMax)
return sum;
418 G4double dx1= std::exp(std::log(p[3]/p[2]) / 16.0);
420 for (
size_t i=0; i<19; i++) {
435 }
else if (xMin < x2) {
445 ys1 += (xs1 -
x1)*(y2 - y1)/(x2 -
x1);
449 ys2 += (xs2 -
x2)*(y1 - y2)/(x1 -
x2);
452 q = (ys1*xs2 - ys2*xs1)/(xs1*xs2)
453 + std::log(xs2/xs1)*(ys2 - ys1)/(xs2 - xs1);
455 if(p.size() == 26)
G4cout <<
"i= " << i <<
" q= " << q <<
" sum= " << sum <<
G4endl;
467 if(x1 >= xMax)
return sum;
472 q = (xs1 - xs2)*(1.0 - p[0])
473 - p[
iMax]*std::log(x2/x1)
474 + (1. - p[
iMax])*(x2 - x1)
475 + 1./(1. -
x2) - 1./(1. - x1)
476 + p[
iMax]*std::log((1. - x2)/(1. - x1))
477 + 0.25*p[0]*(xs1*xs1 - xs2*xs2);
479 if(p.size() == 26)
G4cout <<
"param... q= " << q <<
" sum= " << sum <<
G4endl;
490 if(xMin >= xMax)
return sum;
501 G4double dx1= std::exp(std::log(p[3]/p[2]) / 16.0);
503 for (
size_t i=0; i<19; i++) {
517 }
else if (xMin < x2) {
527 ys1 += (xs1 -
x1)*(y2 - y1)/(x2 -
x1);
531 ys2 += (xs2 -
x2)*(y1 - y2)/(x1 -
x2);
534 sum += std::log(xs2/xs1)*(ys1*xs2 - ys2*xs1)/(xs2 - xs1)
548 if(x1 >= xMax)
return sum;
554 sum += std::log(x2/x1)*(1.0 - p[0])
555 + 0.5*(1. - p[
iMax])*(x2*x2 - x1*
x1)
556 + 1./(1. - x2) - 1./(1. -
x1)
557 + (1. + p[iMax])*std::log((1. - x2)/(1. - x1))
558 + 0.5*p[0]*(xs1 - xs2);
573 return 0.5 * kineticEnergy;