diff --git a/README.md b/README.md index ef66fa7fd0f6c37e6cb18688777dffa13cf5b18f..4af25184685292092f3d7dcb367a1be18b3f93e3 100644 --- a/README.md +++ b/README.md @@ -17,24 +17,24 @@ Note: the following instructions are given assuming you are using `bash` as your ```bash export PREFIX="/path/to/your/prefix"; mkdir -p $PREFIX ``` -## Install all necessary dependencies -Ensure you have `cmake`, ROOT, a modern c++ compiler (gcc4.8+ or clang3.5+) and `gfortran` installed -### nanocernlib -You will need to install a the necessary cernlib routines through the `nanocernlib` library. +## Set the repository ```bash -mkdir -p ${PREFIX}/src && cd ${PREFIX}/src -git clone https://gitlab.com/tmdmc/nanocernlib.git -mkdir -p nanocernlib/BUILD && cd nanocernlib/BUILD -cmake .. -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_PREFIX_PATH=${PREFIX} -make -j4 -make install +export REPO="<enter the git repository here>" ``` +## Install all necessary dependencies +Ensure you have +- `cmake` +- ROOT +- the Boost C++ libraries +- a modern c++ compiler (gcc4.8+ or clang3.5+) +- `gfortran` + ## Build and install pythia6m Once you have all dependencies installed, you are ready to build pythia6m ```bash mkdir -p ${PREFIX}/src && cd ${PREFIX}/src -git clone https://gitlab.com/tmdmc/pythia6m.git +git clone ${REPO} mkdir -p pythia6m/BUILD && cd pythia6m/BUILD cmake .. -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_PREFIX_PATH=${PREFIX} make -j4 @@ -57,11 +57,16 @@ You can view the command line options by running pythia6m -h ``` It requires the following arguments: -- `--conf`: a configuration file, see `$PREFIX/src/pythia6m/program/example-config.json` for an example. +- `--conf`: a configuration file, see `$PREFIX/share/pythia6m/example-config.json` for an example. - `--run`: a run number. This is also used as the random seed for this run - `--events`: the number of events to be generated - `--out`: the output directory. This is where the output files will be placed +## Advanced +Instead of running the main executable, you can make your own program in C++ using program/pythia6m.cc as example. +If you do this, you can use `cmake` to directly link to the pythia librariers. +Alternatively, you could also modify the main program directly (located in the program/pythia6m.cc source file). This latter option is only recommended for quick studies. + ## Output The generated events are written to a ROOT TTree. The following variables are written to the tree for each of the generated events: ```c++ @@ -102,4 +107,4 @@ double y; // Generated y double W2; // Generated W2 int32_t scat_index; // the C-index of the scattered (NOT THE FORTRAN INDEX) // of the scattered lepton -``` \ No newline at end of file +```