- Geant4 (optional, but required for typical purposes)
- Xerces C++ (optional, but required for full funcionality)
- LCIO: if
DD4HEP_USE_LCIOenabled in CMake, builds input and output plugins for LCIO files
- HEPMC3: if
DD4HEP_USE_HEPMC3enabled in CMake, build input plugins for hepmc3 files
The CMake build system is used for compilation and installation. The install directory can be specified by adding
-DCMAKE_INSTALL_PREFIX=<prefix> as argument to the CMake command below.
The dependencies need to be initialized for the build to succeed. Currently there are two methods to load these:
Prerequisites on CERN LXPLUS
$ source .dd4hep-ci.d/init_x86_64.sh
Prerequisites on a private machine
The dependencies listen above have to be satisfied. Both ROOT6 and Geant4 libraries and headers have to be in the path, this is usually achieved by sourcing the
geant4.sh scripts. After this, continue as described below.
To compile and install a default installation of DD4hep, run the following commands
$ mkdir build && cd build/ $ cmake -DDD4HEP_USE_GEANT4=ON -DBoost_NO_BOOST_CMAKE=ON -DDD4HEP_USE_LCIO=ON -DBUILD_TESTING=ON -DGeant4_DIR=$G4INSTALL/lib/Geant4-10.4.0 -DROOT_DIR=$ROOTSYS .. $ make -j4 $ make install
For more detailed installation instructions, please refer to the documentation.
If you have problem, please report it in our issue tracker and we will try to help you.
Issue report template
To facilitate faster and easier response to your issue please provide in addition to the description of the issue also the following information
- OS version: e.g. SLC6
- Compiler version: e.g GCC 6.2
- DD4hep version: tag or commit ID, or GitHub branch
- Reproduced by: exact steps to reproduce the problem: checkout, setup environment (Geant, ROOT versions…), cmake, build, run…
- Input: link to input files if applicable
- Output: full build and run log output
- Goal: A short description of what you are trying to achieve