Virtual Monte Carlo



Introduction

The Virtual Monte Carlo (VMC) allows to run different simulation Monte Carlo without changing the user code and therefore the input and output format as well as the geometry and detector response definition.

The core of the VMC is the category of classes vmc in Root . It provides a set of interfaces which completely decouple the dependencies between the user code and the concrete Monte Carlo:
Interface to the concrete Monte Carlo program
Interface to the user's Monte Carlo application
Interface to the particle stack
Interface to the external decayer

A user has to implement two mandatory classes: the MC application (derived from TVirtualMCApplication) and the MC stack (derived from TVirtualMCStack), optionally a user's external decayer (derived from TVirtualMCDecayer) can be introduced. The concrete Monte Carlo ( GEANT3 , Geant4 , FLUKA ) is selected at run time - when processing a ROOT macro where the concrete Monte Carlo is instantiated.

The relationships between the interfaces and their concrete realizations are illustrated in the class diagrams: User MC application , Virtual MC ,

At present time, VMC can be used with Geant3 and Geant4; the implementation for Fluka is under development.

Mailing list

The open list for discussing all aspects of the VMC project: vmc@root.cern.ch

You can join this list by sending a message to: majordomo@root.cern.ch with the body content:
subscribe vmc your_e-mail_address

Mailing list archive: VMC Digest

Available VMCs

For GEANT3 - geant3

Geant3 VMC (C++) is provided within a single package together with GEANT3 (Fortran) - geant3 .

For Geant4 - geant4_vmc

Geant4 VMC is provided within a package geant4_vmc , that, in difference from geant3, naturally does not include Geant4 itself and you will need the Geant4 installation to run your VMC application with Geant4 VMC.

For FLUKA - fluka_vmc

Fluka VMC is provided within a package fluka_vmc . It does not include FLUKA itself and you will need the FLUKA installation to run your VMC application with Fluka VMC.

Examples of VMC Applications

Examples

Several simple examples of usage of VMC are included in geant4_vmc. In spite of being provided within Geant4 VMC, they are built independently and do not require Geant4 installation in case you want to run them with GEANT3 or FLUKA only.
See more details on the new VMC Examples web page.

AliRoot

AliRoot, the ALICE software framework, can be given as a complex example of usage of VMC.
See more details at The ALICE Off-line Project

Download

Tar files (pro versions)

geant3: version 321+_vmc.1.9 geant321+_vmc.1.9.tar.gz Tested with Root 5.17/08
geant4_vmc: version 2.5 geant4_vmc.2.5.tar.gz Tested with Root 5.20/00,
Geant4 9.1.p02, CLHEP 2.0.3.2, VGM 3.01
fluka_vmc: version 0.3 fluka_vmc.0.3.tar.gz Tested with Root 5.21/04
FLUKA 2008.3.2

Tar files (old versions)

geant3: version 321+_vmc.1.8 geant321+_vmc.1.8.tar.gz Tested with Root 5.15/08

SVN

The sources are available from the Root SVN server (geant3, geant4_vmc) and the ALICE SVN server (fluka_vmc) and can be obtained in the similar way as the Root source (see ROOT Subversion HOWTO )

Download geant3:

Development version (svn trunk):
svn co https://root.cern.ch/svn/geant3/trunk geant3

Pro tagged version 1.9
svn co https://root.cern.ch/svn/geant3/tags/v1-9 geant3

Old tagged version 1.8 (for older versions see the correspondent tag and the required version of Root in the table ):
svn co https://root.cern.ch/svn/geant3/tags/v1-8 geant3

Download geant4_vmc:

Development version (svn trunk):
svn co https://root.cern.ch/svn/geant4_vmc/trunk geant4_vmc

Tagged version 2.5 (for older versions see the correspondent tag and the required versions of Root and Geant4 in the history file ):
svn co https://root.cern.ch/svn/geant4_vmc/tags/v2-5 geant4_vmc

Download Geant4 - from the Geant4 Web site

Download fluka_vmc:

Development version (svn trunk):
svn co https://alisoft.cern.ch/fluka_vmc/trunk fluka_vmc

Tagged version 0.3 (for older versions see the correspondent tag and the required versions of Root and Geant4 in the history file ):
svn co https://alisoft.cern.ch/fluka_vmc/tags/v0-3 fluka_vmc

Download FLUKA:
FLUKA is obtained from the FLUKA Web site via the standard licensing procedure described on this site. To be able to use Fluka VMC together with FLUKA, a special derogation must be asked to the FLUKA project. This procedure is not formalised, but it is a necessary step in using of the fluka_vmc package.

Installation

Install geant3:

  1. To install geant3 with Root v5.20/00, you have to specify your fortran compiler with the Root configure option:
    --with-f77=g77
    This setting will not be needed with newer Root versions.

  2. geant3 requires Pythia6 library. You can follow Root installation instructions (see Pythia Event Generators paragraph) or directly the Pythia site.

  3. Install geant3:
    cd geant3
    gmake

Install geant4_vmc:

  1. Root has to be configured with g4root package; for this you have to specify the following configure options:
    --enable-g4root \
    --with-g4-incdir=$G4INSTALL/include \
    --with-g4-libdir=$G4INSTALL/lib/Linux-g++ \
    --with-clhep-incdir=$CLHEP_BASE_DIR/include \


  2. To install Geant4 - see the Geant4 Web site how to do it.
    Note that for Geant4 VMC you will need: These installation options are not set by default by the Configure program.

  3. Since the version 2.0, you can choose to run Geant4 with Geant4 native geometry navigation or G4Root navigation.
  4. Set environment
    The following environment variables that defines the paths to used systems have to be set:
    ROOTSYS
    CLHEP_BASE_DIR
    G4INSTALL
    VGM_INSTALL
    USE_VGM
    Path to Root
    Path to CLHEP
    Path to Geant4
    Path to VGM (optional)
    Set to 1 to build VGM dependent code

  5. Install geant4_vmc:
    cd geant4_vmc/source
    gmake

Install fluka_vmc:

  1. Root has to be configured with this option:
    --with-f77=g77
    to make sure that fluka_vmc will be built with the Fortran compiler supported by Fluka (gcc/g77).

  2. To install FLUKA - see the FLUKA Web site how to do it.

  3. Set environment
    The following environment variables that defines the paths to used systems have to be set:
    ROOTSYS
    FLUPRO
    FLUVMC
    Path to Root
    Path to FLUKA
    Path to Fluka VMC

  4. Install fluka_vmc:
    cd fluka_vmc/source
    gmake

Install and run examples:

  1. To install:
    The examples are provided within geant4_vmc package; to build all available examples:
    cd geant4_vmc/examples
    gmake
    The new macros for running examples with FLUKA are available only in the geant4_vmc development version, in the SVN trunk.

  2. To run:

VMC Meetings



Presentations & Documents






The concept of Virtual MonteCarlo has been developed by the ALICE Software Project .
Authors: R.Brun, F.Carminati, I.Hrivnacova, A.Morsch.

Contact: vmc@root.cern.ch

Page maintained by: Ivana Hrivnacova
Last update: 20/01/2009