Installation

Dependencies

  • CMake (at least version 3.18)
  • Boost (at least version 1.56)
  • ROOT (at least version 6.08.00)

Optional

  • Geant4 (optional, but required for typical purposes)
  • Xerces C++ (optional, but required for full funcionality)
  • LCIO: if DD4HEP_USE_LCIO enabled in CMake, builds input and output plugins for LCIO files
  • HEPMC3: if DD4HEP_USE_HEPMC3 enabled in CMake, build input plugins for hepmc3 files
  • EDM4hep: if DD4HEP_USE_EDM4HEP enabled in CMake, build output plugins for EDM4hep files

Optional Dependencies for Building the Documentation

To build the documentation you need

  • Doxygen
  • Latex
  • Biber

And possible other packages such as ImageMagick.

The documentation is enabled by default but only build if Doxygen or Latex are actually found. You can disable the building of the documentation with the cmake flag -DBUILD_DOCS=OFF.

Installation

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

In order to install DD4hep on CERN LXPLUS or any other machine running CentOS7 with CVMFS

$ source /cvmfs/sft.cern.ch/lcg/views/LCG_102b/x86_64-centos7-gcc11-opt/setup.sh
Then, continue as described under the compilation section.

Please note that the LCG stacks themselves have the requirement to install the HEP_OSlibs package, as described the documentation of the LCG Stacks.

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 thisroot.sh or geant4.sh scripts. After this, continue as described below.

Compilation

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 -DROOT_DIR=$ROOTSYS -D CMAKE_BUILD_TYPE=Release ..
$ make -j4
$ make install

For more detailed installation instructions, please refer to the documentation.

Issues

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. CentOS7
  • Compiler version: e.g GCC 11.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