Geant3 with VMC requires the VMC core package and ROOT.
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 Geant3 3.0.
Geant3 with VMC uses CMake to configure a build system for compiling and installing the headers, libraries and Cmake configuration files.
To install geant3:
/mypath/geant3
$ cd /mypath
$ mkdir geant3_build
$ ls
geant3 geant3_build
$ cd /mypath/geant3_build
$ cmake -DCMAKE_INSTALL_PREFIX=/mypath/geant3_install /mypath/geant3
If ROOT environment was defined using thisroot.{c}sh
script, there is no need to provide the path to its installation. Otherwise, they can be provided using -DROOT_DIR
cmake option.
Since Geant3 3.9, 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 Geant3 4.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.
The Geant3 library is built by default in RelWithDebInfo
build mode (Optimized build with debugging symbols). This default can be changed via the standard CMake option CMAKE_BUILD_TYPE
. The other useful values are
Release
: Optimized build, no debugging symbols Debug
: Debugging symbols, no optimization $ 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
The instructions above apply to the installation since the version 2.0. For the installation of the previous versions (1.x) see Installing geant3 - Older Versions