Foam: multi-dimensional general purpose Monte Carlo generator with self-adapting simplical grid. S. Jadach.

PROGRAM SUMMARY
Title of program: Foam, version 1.01
Catalogue identifier: ADMC
Ref. in CPC: 130(2000)244
Distribution format: tar gzip file
Operating system: UNIX AIX 4.x, HP-UX 10.x, Linux
High speed store required: 10MK words
Number of lines in distributed program, including test data, etc: 17325
Keywords: General purpose, Utility, Phase space, Monte Carlo (MC) simulation and generation, Elementary, Particle physics.
Programming language used: Fortran
Computer: IBM PowerPC M43P240 .

Nature of physical problem:
Monte Carlo (MC) simulation or generation of unweighted (weight equal one) events, is a standard exercise in the particle physics, and in many other areas of the research. It is often necessary to generate MC events according to a probability density with strong peaks (singularities) spanned along complicated hyperspaces of not a very well known shape. It is highly desirable to have in the program library a general-purpose numerical tool (program) with a MC generation algorithm featuring built-in capability of adjusting automatically the generation procedure to an arbitrary pattern of singularities in the probability distribution.

Method of solution
In the algorithm a simplical grid of vertices forming a "foam of cells" is built, which adapts automatically to the integrand in such a way that the resulting ratio of average weight to maximum weight, i.e. efficiency, is arbitrarily good. In the subsequent MC generation the foam of cells is used to generate one cell and a point within this cell. The above algorithm is not based on the factorizability assumption of the integrand function like VEGAS of P. Lepage [1]. It can therefore generate efficiently distributions with complicated patterns of the singularities like diagonal ridges, voids, spheres etc.

Restrictions on the complexity of the problem
The program is memory-hungry and therefore limited to small dimensions n < 10. The actual implementation is limited to n <= 5, but only because of the function calculating the determinant.

Typical running time
The CPU time necessary to build up the simplical grid depends strongly on the number of dimensions and the requested size of the grid. On the IBM PowerPC M43P240 installation (266 MHz, 65 CERN units) it takes about 30 secs to build a grid of 5000 vertices, for a simple 2-dimensional distribution.

References

 [1] G.P. Lepage, J. Comput. Phys. 27, 192 (1978).