81 if(t0 >= tm)
return 0.0;
90 for (
size_t i=0; i<=
length; i++) {
100 <<
"; tMax(MeV)= " << tmax/
MeV
103 <<
"; xp[0]= " <<
xp[0]
128 if(t0 >= tm)
return 0.0;
138 for (
size_t i=0; i<=
length; i++) {
149 x += p[0]*(t0 - zmin - c*(std::atan(t0/c) - std::atan(zmin/c)));
155 <<
"; tMax(MeV)= " << tmax/
MeV
156 <<
"; e(MeV)= " << e/
MeV
182 if(t0 >= tm)
return 0.0;
189 for (
size_t i=0; i<=
length; i++) {
204 G4cout <<
"WARNING in G4RDeBremsstrahlungSpectrum::SampleEnergy:"
205 <<
" Majoranta " << amaj
230 sum += (1. - k*
xp[0])*std::log(x2/x1) + k*(x2 -
x1);
233 for (
size_t i=0; i<
length-1; i++) {
239 sum += z2 - z1 + std::log(x2/x1)*(z1*x2 - z2*
x1)/(x2 - x1);
242 if(sum < 0.0) sum = 0.0;
258 sum += (z2 -
z1)*(1. - k*
xp[0]);
261 sum += 0.5*k*(z2 -
z1);
264 for (
size_t i=0; i<
length-1; i++) {
270 sum += 0.5*(z2 -
z1)*(x2 + x1) + z1*x2 - z2*
x1;
273 if(sum < 0.0) sum = 0.0;
283 f = p[0] + (p[1] - p[0])*(x -
xp[0])/(
xp[1] -
xp[0]);
287 for (
size_t i=0; i<
length-1; i++) {
290 f = p[i] + (p[i+1] - p[i])*(x -
xp[i])/(
xp[i+1] -
xp[i]);
310 return kineticEnergy;