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.
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
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
Tar files (pro versions)
Tar files (old versions)
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.
Install geant3:
- 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.
- geant3 requires Pythia6 library.
You can follow
Root installation instructions
(see Pythia Event Generators paragraph)
or directly the
Pythia site.
- Install geant3:
cd geant3
gmake
Install geant4_vmc:
- 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 \
- To install Geant4 - see the
Geant4 Web site how to do it.
-
Installation of Geant4 + Geant4 VMC requires
CLHEP shared library.
Note that for Geant4 VMC you will need:
- Geant4 shared libraries;
(set G4LIB_BUILD_SHARED environment variable to 1)
- All Geant4 header files in the include directory
- Build Geant4 with use G3toG4 tool
(set G4LIB_USE_G3TOG4 environment variable to 1)
These installation options are not set by default by the Configure
program.
-
Since the version 2.0, you can choose to run Geant4 with Geant4 native
geometry navigation or G4Root navigation.
- To run with Geant4 native geometry navigation
in case your geometry is defined via Root geometry package,
you will have to install the Virtual Geometry Model (VGM) package
See the
VGM Web site how to do it.
The VGM is used in Geant4 VMC for geometry in-memory conversion
from Root TGeo objects to Geant4 native geometry. More details
about this can be found at the
Geant4 VMC Web page
- To run with G4Root geometry navigation
you need to build Root with g4root option, which is not activated
by default, but required to compile Geant4 VMC libraries.
- 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
|
- Install geant4_vmc:
cd geant4_vmc/source
gmake
Install fluka_vmc:
- 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).
- To install FLUKA - see the
FLUKA Web site how to do it.
- 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
|
- Install fluka_vmc:
cd fluka_vmc/source
gmake
Install and run examples:
- 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.
- To run:
- First, make sure that you have included all libraries path
in your shared library path:
your_path/root/lib
your_path/geant4_vmc/lib/tgt_platform
For G3 only:
path to Pythia6 library
your_path/geant3/lib/tgt_platform
For G4 only:
your_path/CLHEP/lib/
your_path/geant4/lib/platform-compiler
your_path/geant4_vmc/lib/tgt_platform
optionally paths to external graphics libraries
For FLUKA only:
your_path/fluka_vmc/lib/tgt_platform
-
cd geant4_vmc/examples/E01 or E02 or E03
root.exe
root[0] .x run_g3.C or
.x run_g4.C or
.x run_fl.C
Presentations & Documents
|
-
Physics lists in Geant4 VMC
presentation at ALICE-FAIR Computing Meeting, 28-29 April 2008, GSI
-
The Geant4 Virtual Monte Carlo
presentation at CHEP 2007, 2-9th September 2007, Victoria, Canada
-
FLUKA and the Virtual Monte Carlo
presentation at CHEP 2006, 13-17th February 2006, Mumbai, India
-
Virtual MC
-
TFluka MC interface
presentations at
International Workshop on Computing for Heavy Ion Physics, EMN
26 - 29 April 2005, France
-
The Virtual MonteCarlo: status and applications
presentation at CHEP 2004, 27 September 2004 to 01 October 2004, Interlaken, Switzerland
-
Virtual Monte Carlo with Geant4: ALICE experience
presentation at Geant4 Workshop 2003, 2 - 6 September 2003, TRIUMF, Vancouver Canada
- The Virtual MonteCarlo (
presentation ,
paper )
presentation at CHEP 2003, 24 - 28 March 2003, La Jolla, California
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