Geant4 VMC requires the VMC core package, ROOT and Geant4 installed, and optionally, it can be built with VGM. See below tips for configuration and installation of these packages.
The vmc core package was separated from the ROOT source into a new stand-alone vmc package in the GitHub vmc-project organization. The motivation for this step was a gain in flexibility and faster workflow for new developments of multiple engine mode. The vmc
package in ROOT is deprecated since ROOT version 6.18 (its compilation is optional) and it is going to be removed in the next ROOT version, 6.26. The VMC stand-alone is supported since Geant4 VMC 5.0.
Geant4 VMC uses CMake to configure a build system for compiling and installing the headers, libraries and CMake configuration files. To install geant4_vmc:
/mypath/geant4_vmc
$ cd /mypath
$ mkdir geant4_vmc_build
$ ls
geant4_vmc geant4_vmc_build
$ cd /mypath/geant4_vmc_build
$ cmake -DCMAKE_INSTALL_PREFIX=/mypath/geant4_vmc_install /mypath/geant4_vmc
If ROOT and Geant4 environment was defined using thisroot.[c]sh
and geant4.[c]sh
scripts, there is no need to provide path to their installations. Otherwise, they can be provided using -DROOT_DIR
and -DGeant4_DIR
cmake options.
Since Geant4 VMC 5.4, the VMC stand-alone library has to be provided using -DVMC_DIR
cmake option. If the VMC stand-alone library is not found, the deprecated VMC library in ROOT (availble if ROOT was built with the vmc
option enabled) can still be used, a deprecation warning will be issued in this case.
Since Geant4 VMC 6.0, the deprecated VMC library in ROOT cannot be used and building against ROOT built with the vmc
option enabled will fail with CMake error.
$ make -jN
where N is the number of parallel jobs you require (e.g. if your machine has a dual core processor, you could set N to 2).
$ make -jN VERBOSE=1
$ make install
This will build geant4_vmc, g4root and examples packages. For VMC examples see VMC examples installation page.
The instructions above apply to the installation since the version 3.0 built against Geant4 10.00.p03. For the installation of the previous versions see