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.

Figure 4.4: UCBEND simulation at 8.5 MeV (B=0 kG).<br />

programs have been developed to assist in the construction of problem geometries by defining<br />

regions to be the unions and/or intersections of sets of basic volume elements of varying sizes. In<br />

Monte Carlo applications, this method for creating geometries through the combining of smaller<br />

volumes has come to be referred to as “combinatorial geometry,”, or CG. Note that this usage is not<br />

exact, as the term combinatorial geometry actually denotes a much more extensive mathematical<br />

field (see, for example, the book by Pach and Agarwal[129]).<br />

In this section we describe the advanced <strong>EGS5</strong> user code UCSAMPCG, which exploits the<br />

features of combinatorial geometry. The CG package invoked by UCSAMPCG is included in the<br />

<strong>EGS5</strong> distribution in the auxiliary source code file cg_related.f, and is based on the well-known<br />

MORSE-CG[168] combinatorial geometry Monte Carlo program. The MORSE-CG package was<br />

originally adapted to EGS4-PRESTA by Torii and Sugita [171], and Sugita and Torii have further<br />

modified it for <strong>EGS5</strong> [169]. The subprograms of cg_related.f have retained the MORSE-CG<br />

methodology for constructing and evaluating geometry, and the <strong>EGS5</strong> implementation is compatible<br />

with MORSE-CG input files. Five elemental volume shapes can be modeled: rectangular<br />

parallelepipeds (RPP), spheres (SPH), right circular cylinders (RCC), truncated right angle cones<br />

(TRC), and tori (TOR). As mentioned above, more complicated volumes can be specified by appropriately<br />

intersecting these five basic bodies. The reader is referred to the MORSE-CG manual [168]<br />

and the Torii and Sugita citations [171, 169] for detailed descriptions of the CG adaptation and<br />

implementation, as well as for instructions on creating input files.<br />

User code UCSAMPCG uses combinatorial geometry to simulate the same problem which the<br />

sample user code UCSAMPL5, presented in great detail in the <strong>EGS5</strong> User Manual (see Appendix B<br />

of this report), treats with a simple geometry model. The coupling of the CG package to <strong>EGS5</strong> is<br />

accomplished entirely within subroutine HOWFAR, which performs the actual boundary and region<br />

checks. A once-only initialization is done by calling the CG routine GEOMGT, which reads in the<br />

198

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

Saved successfully!

Ooh no, something went wrong!