Table of Contents
Fetching ...

Foam: A General-Purpose Cellular Monte Carlo Event Generator

S. Jadach

TL;DR

Foam introduces a general-purpose, self-adapting cellular Monte Carlo event generator that builds an adaptive foam of cells via binary splits to sample arbitrary $n$-dimensional distributions. By optimizing cell division to minimize $w_{\max}/\langle w\rangle$ or, optionally, the weight variance, Foam achieves efficient unweighting and integration without assuming factorization, supporting simplices and hyperrectangles and enabling multibranching and mappings. The approach yields notable gains in efficiency up to about 16 dimensions, with ROOT persistency for restarted generation, and demonstrates practical applicability to high-energy physics phase-space sampling, resonance structures, and beam spectra. The work provides a detailed description of the algorithm, memory-efficient implementations, and extensive numerical studies comparing Foam with VEGAS and Foam 1.x, highlighting its robustness and flexibility for complex, singular distributions.

Abstract

A general purpose, self-adapting, Monte Carlo (MC) event generator (simulator) is described. The high efficiency of the MC, that is small maximum weight or variance of the MC weight is achieved by means of dividing the integration domain into small cells. The cells can be $n$-dimensional simplices, hyperrectangles or Cartesian product of them. The grid of cells, called ``foam'', is produced in the process of the binary split of the cells. The choice of the next cell to be divided and the position/direction of the division hyper-plane is driven by the algorithm which optimizes the ratio of the maximum weight to the average weight or (optionally) the total variance. The algorithm is able to deal, in principle, with an arbitrary pattern of the singularities in the distribution. As any MC generator, it can also be used for the MC integration. With the typical personal computer CPU, the program is able to perform adaptive integration/simulation at relatively small number of dimensions ($\leq 16$). With the continuing progress in the CPU power, this limit will get inevitably shifted to ever higher dimensions. {\tt Foam} is aimed (and already tested) as a component in the MC event generators for the high energy physics experiments. A few simple examples of the related applications are presented. {\tt Foam} is written in fully object-oriented style, in the C++ language. Two other versions with a slightly limited functionality, are available in the Fortran77 language. The source codes are available from http://jadach.home.cern.ch/jadach/

Foam: A General-Purpose Cellular Monte Carlo Event Generator

TL;DR

Foam introduces a general-purpose, self-adapting cellular Monte Carlo event generator that builds an adaptive foam of cells via binary splits to sample arbitrary -dimensional distributions. By optimizing cell division to minimize or, optionally, the weight variance, Foam achieves efficient unweighting and integration without assuming factorization, supporting simplices and hyperrectangles and enabling multibranching and mappings. The approach yields notable gains in efficiency up to about 16 dimensions, with ROOT persistency for restarted generation, and demonstrates practical applicability to high-energy physics phase-space sampling, resonance structures, and beam spectra. The work provides a detailed description of the algorithm, memory-efficient implementations, and extensive numerical studies comparing Foam with VEGAS and Foam 1.x, highlighting its robustness and flexibility for complex, singular distributions.

Abstract

A general purpose, self-adapting, Monte Carlo (MC) event generator (simulator) is described. The high efficiency of the MC, that is small maximum weight or variance of the MC weight is achieved by means of dividing the integration domain into small cells. The cells can be -dimensional simplices, hyperrectangles or Cartesian product of them. The grid of cells, called ``foam'', is produced in the process of the binary split of the cells. The choice of the next cell to be divided and the position/direction of the division hyper-plane is driven by the algorithm which optimizes the ratio of the maximum weight to the average weight or (optionally) the total variance. The algorithm is able to deal, in principle, with an arbitrary pattern of the singularities in the distribution. As any MC generator, it can also be used for the MC integration. With the typical personal computer CPU, the program is able to perform adaptive integration/simulation at relatively small number of dimensions (). With the continuing progress in the CPU power, this limit will get inevitably shifted to ever higher dimensions. {\tt Foam} is aimed (and already tested) as a component in the MC event generators for the high energy physics experiments. A few simple examples of the related applications are presented. {\tt Foam} is written in fully object-oriented style, in the C++ language. Two other versions with a slightly limited functionality, are available in the Fortran77 language. The source codes are available from http://jadach.home.cern.ch/jadach/

Paper Structure

This paper contains 54 sections, 34 equations, 19 figures, 11 tables.

Figures (19)

  • Figure 1: Two stages in the cellular algorithm of Foam.
  • Figure 2: Weight distribution of the Foam for the default option with the maximum weight optimization (a-c) compared to analogous distributions obtained for an option with the variance optimization (d-f). Number of cells is 200, 2000 and 20000 for (a-c) and (d-f), correspondingly.
  • Figure 3: Inhibited cell division for first variable, that is for $x_1$ (right). Foam with 250 cells.
  • Figure 4: Predefined division points at $x_1=0.30,0.40,$ and $0.65$, for 2000 cells.
  • Figure 5: Geometry of the split of a 3-dimensional cell, simplex or hyperrectangle.
  • ...and 14 more figures