28.11.2014 Views

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

This agrees with formula (10) of Butcher and Messel[39] (except that they use Z AB = Z A + Z B and<br />

do not use Z F in their X 0 definition), since our Z A , Z B , Z P are the same as their a, b, p. Now<br />

ignoring the factor preceding the {} in Equation 2.98, noting that we require ˘k > A P (the photon<br />

energy cutoff) and also that energy conservation requires ˘k < Ĕ0 − m, we obtain the factorization<br />

(see Equation 2.64)<br />

⎛<br />

⎞<br />

α 1 = ln 2 ⎝ 4 3 + 1<br />

[<br />

] ⎠ , (2.100)<br />

9 ln 183 1 + (Z U if Ĕ 0 > 50, Z P )<br />

f 1 (E) = 1 ( ) 1 − E<br />

for E ∈ (0, 1) , (2.101)<br />

ln 2 E<br />

(<br />

g 1 (E) = A ( δ ′ (E) ) (<br />

) )<br />

if EĔ0 ∈ A P , Ĕ 0 − m , 0 , (2.102)<br />

α 2 = 1 2 , (2.103)<br />

f 2 (E) = 2E for E ∈ (0, 1) , (2.104)<br />

(<br />

g 2 (E) = B ( δ ′ (E) ) )<br />

if EĔ0 ∈ (A P , Ĕ0 − m), 0 . (2.105)<br />

We notice that f 2 (E) is properly normalized, but that ( f 1 (E) has ) infinite integral over (0,1). Instead<br />

we limit the range over which f 1 (E) is sampled to 2 −N Brem, 1 , where N Brem is chosen such that<br />

To sample f 1 (E) we further factor it to<br />

2 −N Brem<br />

≤ A P<br />

Ĕ 0<br />

< 2 −(N Brem−1)<br />

. (2.106)<br />

f 1 (E) =<br />

N∑<br />

Brem<br />

j=1<br />

α 1j f 1j (E) g 1j (E) (2.107)<br />

where<br />

f 1j (E) =<br />

( 1<br />

ln 2 2j−1 if E < 2 −j 1<br />

,<br />

ln 2<br />

The f 1j are properly normalized distributions.<br />

α 1j = 1 , (2.108)<br />

(1 − E2 j−1 )<br />

E<br />

if E ∈<br />

(<br />

2 −j , 2 −j+1) )<br />

, 0 , (2.109)<br />

g 1j (E) = 1 . (2.110)<br />

We sample f 2 (E) by selecting the larger of two uniform random variables (see Section 2.2);<br />

namely,<br />

E = max (ζ 1 , ζ 2 ) , (2.111)<br />

where ζ 1 and ζ 2 are two random numbers drawn uniformly on the interval (0, 1). To sample f 1 (E),<br />

we first select the sub-distribution index<br />

j = Integer Part (N Brem ζ 1 ) + 1 . (2.112)<br />

49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!