diff --git a/README.md b/README.md index 1ea0950377e408f1c01e23933bf0c19780aa9b4d..ef66fa7fd0f6c37e6cb18688777dffa13cf5b18f 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Note: the following instructions are given assuming you are using `bash` as your export PREFIX="/path/to/your/prefix"; mkdir -p $PREFIX ``` ## Install all necessary dependencies -Ensure you have `cmake`, a modern c++ compiler (gcc4.8+ or clang3.5+) and a `gfortran` installed +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. ```bash @@ -60,4 +60,46 @@ It requires the following arguments: - `--conf`: a configuration file, see `$PREFIX/src/pythia6m/program/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 \ No newline at end of file +- `--out`: the output directory. This is where the output files will be placed + +## 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++ +// event level +int32_t evnum; // the event index +int32_t evgen; // the total number of generated events sofar. + // this includes generated events that were somehow cut out +double xsec; // the total generated cross section + // the last stored value is the best estimate of the total + // cross section. + // To obtain the cross section for a subset of n events: + // xsec_n = n * xsec / evgen; +int32_t process; // PYTHIA process number +double s; // s for this event +// particle level +std::vector<int32_t> index; // The index of this track, equal to the fortran + // index, so the C-index is (index - 1) +std::vector<int32_t> status; // LUND track status (see pythia manual) +std::vector<int32_t> type; // LUND particle type +std::vector<int32_t> parent; // fortran index of the parent, 0 if initial +std::vector<int32_t> daughter1; // fortran index of first daughter, 0 if none +std::vector<int32_t> daughter2; // fortran index of last daughter, 0 if none +std::vector<int32_t> charge; // charge +std::vector<ROOT::Math::XYZTVector> vertex; // vertex 4-vector +std::vector<ROOT::Math::XYZTVector> mom; // momentum 4-vector +std::vector<double> mass; // mass +std::vector<bool> init; // is this an initial particle? +std::vector<bool> lund; // is this a final particle produced by PYTHIA? +``` + +The following additional variables are written when running with an electron beam: +```c++ +// event level +double Q2; // Generated Q2 +double nu; // Generated nu +double x; // Generated Bjorken-x +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