Examples of user-defined scattering routines.

 

The CPO package includes two sets of examples, for 2D and 3D programs respectively. Each set contains four examples of user-supplied routines. These routines (in C++) provide a convenient starting point for further editing by the user. In brief:

 

Sct2grid.cpp and sct3grid.cpp

These deal with scattering of rays at a grid or mesh, for 2D and 3D systems respectively. Here the grid is simulated by a scattering plane which is situated at z=c. When a ray reaches this plane its direction is changed by a random amount. The value of c and the statistical distributions of the changes in the x and y directions are controlled by numbers that are read from the user-supplied data file sct2grid.dat or sct3grid.dat. Examples of grid scattering are given in xmpl2d39 and xmpl3d50.

Details of the scattering of grids are given in:

Defocusing of charged particle beams transmitted through meshes, by D J Williams, F H Read and N J Bowring, Nucl. Inst. and Methods. A363, 120-123 (1995).

Penetration of electrostatic fields and potentials through meshes, grids or gauzes, by F H Read, N J Bowring, P D Bullivant and R R A Ward, Rev. Sci. Instrum. 69, 2000-2006 (1998).

Short and long range penetration of fields and potentials through meshes, grids or gauzes, by F H Read, N J Bowring, P D Bullivant and R R A Ward Nucl. Instr. Meth. A427, 363-367 (1999).

 

 

Sct2lens.cpp and sct3lens.cpp

These deal with focusing by a series of artificial thin lens (in the 3D version) or a single lens (2D) situated along the z. axis. This can be useful for example in optimising complicated systems of lenses in which one or more of the lenses have already been carefully designed. These lenses can then sometimes be effectively replaced using the scattering option. In the present example the value of c and the focal length and spherical and chromatic aberration coefficients are read from a user-supplied data file sct2lens.dat or sct3lens.dat. Examples of user-supplied lens action are given in xmpl2d40 and xmpl3d51.

 

 

Sct2secd.cpp and sct3secd.cpp

These deal with the production of secondary electrons at an electrode situated at z=c. When a ray (perhaps representing an ion) reaches this plane it is converted to an electron. The statistical distribution of the energies and directions of the secondary electrons are controlled by numbers that are read from a user-supplied data file sct2secd.dat or sct3secd.dat. Examples of secondary electron production are given in xmpl2d37 and xmpl3d58.

 

 

Sct2back.cpp and sct3back.cpp

These deal with the scattering or loss of rays due to collisions with background gas molecules. Again the details are controlled by numbers that are read from a user-supplied data file sct2back.dat or sct3back.dat. Examples of user-supplied lens action are given in xmpl2d38 and xmpl3d59.

 

 

Return to general information on scattering.