80 twoln10(2.0*
G4Log(10.0)),
135 if(cutEnergy < tmax) {
142 G4double beta2 = tau*(tau + 2)/gamma2;
147 G4double gg = (2.0*gam - 1.0)/gamma2;
148 cross = ((xmax -
xmin)*(1.0 - gg + 1.0/(xmin*xmax)
149 + 1.0/((1.0-
xmin)*(1.0 - xmax)))
150 - gg*
G4Log( xmax*(1.0 - xmin)/(xmin*(1.0 - xmax)) ) ) / beta2;
164 cross = (xmax -
xmin)*(1.0/(beta2*xmin*xmax) + b2
165 - 0.5*b3*(xmin +
xmax)
166 + b4*(xmin*xmin + xmin*xmax + xmax*xmax)/3.0)
167 - b1*
G4Log(xmax/xmin);
233 dedx =
G4Log(2.0*(tau + 2.0)/eexc2) - 1.0 - beta2
234 +
G4Log((tau-d)*d) + tau/(tau-
d)
235 + (0.5*d*d + (2.0*tau + 1.)*
G4Log(1. - d/tau))/gamma2;
244 dedx =
G4Log(2.0*(tau + 2.0)/eexc2) +
G4Log(tau*d)
245 - beta2*(tau + 2.0*d - y*(3.0*d2
246 + y*(d - d3 + y*(d2 - tau*d3 + d4))))/tau;
255 if (dedx < 0.0) { dedx = 0.0; }
259 if (kineticEnergy < th) {
260 x = kineticEnergy/th;
261 if(x > 0.25) { dedx /= sqrt(x); }
262 else { dedx *= 1.4*sqrt(x)/(0.1 +
x); }
282 tmax = 0.5*kineticEnergy;
284 tmax = kineticEnergy;
286 if(maxEnergy < tmax) { tmax = maxEnergy; }
287 if(tmin >= tmax) {
return; }
302 G4double gg = (2.0*gam - 1.0)/gamma2;
304 grej = 1.0 - gg*xmax + xmax*xmax*(1.0 - gg + (1.0 - gg*
y)/(y*y));
308 x = xmin*xmax/(xmin*(1.0 - rndm[0]) + xmax*rndm[0]);
310 z = 1.0 - gg*x + x*x*(1.0 - gg + (1.0 - gg*
y)/(y*y));
321 }
while(grej * rndm[1] > z);
336 grej = 1.0 + (y*y*b4 - xmin*xmin*xmin*b3 + y*b2 - xmin*b1)*beta2;
339 x = xmin*xmax/(xmin*(1.0 - rndm[0]) + xmax*rndm[0]);
341 z = 1.0 + (y*y*b4 - x*y*b3 + y*b2 - x*b1)*beta2;
352 }
while(grej * rndm[1] > z);
355 G4double deltaKinEnergy = x * kineticEnergy;
369 sqrt(deltaKinEnergy * (deltaKinEnergy + 2.0*electron_mass_c2));
372 if(cost > 1.0) { cost = 1.0; }
373 G4double sint = sqrt((1.0 - cost)*(1.0 + cost));
377 deltaDirection.
set(sint*cos(phi),sint*sin(phi), cost) ;
384 vdp->push_back(delta);
387 kineticEnergy -= deltaKinEnergy;
389 finalP = finalP.
unit();