Fortran Installation

To enable the comparison between the Fortran and C++ code.

First clone the Fortran version and change to the corresponding directory.

git clone --depth 1 --single-branch --branch FCC_release git@github.com:KrakowHEPSoft/KKMCee-dev.git path/to/KKMCee-fortran
cd path/to/KKMCee-fortran

Since we will be linking the Fortran version to the C++ one we need to compile the source code to shared libraries. This can be achieved by using the following patch file

git apply kkmc-fortran.patch

Now we can proceed with the installation

ln -s dizet-6.45 dizet 
cd ./ffbench
alias kmake='make -f KKMakefile'
kmake makflag
kmake makprod
kmake EWtables
kmake compile
cd ../KKsem
kmake


Depending on your system you may need to add -std=legacy -fPIC compiler flags to ffbench/KKMakefile

FFLAGS  = -O -g -fno-second-underscore -fno-automatic -ffixed-line-length-132 -fbackslash -std=legacy

Dependencies

Before installing the C++ version the following dependencies should be installed:

It is also recommended that you install the Rivet and Yoda packages which can be used to analyse events.

If you chose not to install the Cedar toolset you are still required to install HepMC3.

Photos Installation

git clone https://gitlab.cern.ch/photospp/photospp.git
cd photospp
./configure --prefix=path/to/build./.photos-build --without-hepmc --with-hepmc3=path/to/hepmc3 
make -j4
make install

C++ Installation

Next we checkout the C++ version. We enable the internal test by providing -DKKMC_ENABLE_TESTS=ON and the path to Fortran directory. Currently we have to do the build step twice

git clone git@github.com:KrakowHEPSoft/KKMCee-dev.git path/to/KKMCee-cpp
cd path/to/KKMCee-cpp
git checkout update-build-sys
cd path/to/KKMCee-cpp
cmake -S . -B path/to/build -DKKMC_ENABLE_TESTS=ON 
                            -DKKMC_PHOTOS_DIR=/path/to/photos/ 
                            -DKKMC_FORTRAN_DIR=path/to/KKMCee-fortran
                            -DKKMC_ENABLE_HEPMC3=ON
                            -DCMAKE_INSTALL_PREFIX=/path/to/install
cmake --build path/to/build # This will fail
cmake --build path/to/build

Now we can run the tests.

cd path/to/build
ctest -j 5

After the test have finished each test directory e.g path/to/build/ISRCheck will have a tex files which can be compiled to see cross-section tables.