28.11.2014 Views

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

THE EGS5 CODE SYSTEM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

C.1 Introduction<br />

PEGS (Preprocessor for EGS) is a set of FORTRAN subprograms which generate material data<br />

for use with the <strong>EGS5</strong> Monte Carlo shower code and which also provide utilities for researchers<br />

studying electro-magnetic interactions. The active operations of PEGS are functionals; that is,<br />

they are operations whose arguments are functions (the functions related to physics interactions).<br />

Included among these operations are:<br />

• Fitting of functions by means of piecewise linear fits.<br />

• Production of printed plots of selected functions.<br />

• Evaluation of functions at selected points.<br />

• Comparison of functions with sampled spectra.<br />

Associated with these active functionals are other operations:<br />

• Selection of material to which the functions refer.<br />

• Selection of energy cutoffs for fits.<br />

• Printing of fitted data.<br />

This manual describes the full general functionality of PEGS. Users interested only in preparing<br />

data sets for <strong>EGS5</strong> can proceed directly to section C.3.<br />

C.2 Structural Organization of PEGS<br />

Beginning with version 5 of the EGS code system, MORTRAN is no longer supported, and PEGS<br />

is no longer a stand-alone program, but rather a subroutine to be called by EGS user code. The<br />

main PEGS subroutine (called P<strong>EGS5</strong>), however is essentially the same as the MAIN program in<br />

previous versions of PEGS, and EGS and PEGS are still quite distinct in <strong>EGS5</strong>.<br />

The full P<strong>EGS5</strong> system consists of almost 7000 of FORTRAN source code that make up over<br />

100 subprograms, plus an additional 610 lines of FORTRAN in 40 files containing COMMON blocks<br />

accessed by the various PEGS subprograms through include statements. New to version 5 of<br />

PEGS, all floating point variables are declared as double precision.<br />

Despite its size, PEGS has a simple structure. Figures C.1 and C.2 below contain a schematic<br />

flowchart of main subroutine (P<strong>EGS5</strong>) of PEGS. After the once-only initializations, an option loop<br />

354

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

Saved successfully!

Ooh no, something went wrong!