= Elegent = Elegent (Elastic Event GENeraTor) is a Monte-Carlo generator of (anti-)proton-proton elastic collisions, based on a number of theoretical/phenomenological models. The project is maintained by Jan Kašpar (contact info at the [[https://elegent.hepforge.org/|home page]]). == Physics == As typical values of four-momentum transfer squared, |t|, are smaller than 10 GeV^2^ in elastic nucleon-nucleon collisions (nucleon = proton or antiproton), the influence of the weak force is negligible. Therefore, only the electromagnetic (traditionally called Coulomb) and strong (traditionally hadronic) interactions are relevant for the elastic scattering. Their effects can be categorised in the following three groups. * Effects due to '''strong interaction alone''' (in terms of Feynman diagrams, these would correspond to QCD diagrams only). For more details see [[HadronicModels|models of hadronic (strong) interaction]]. * Effects due to '''electromagnetic interaction alone''' (these would be QED diagrams only). For more details see [[CoulombInteraction|description of Coulomb (electromagnetic) interaction]]. * Effects of the '''interference between the strong and electromagnetic interactions''' (diagrams containing both QED and QCD elements). For more details see [[CoulombHadronicInterference|models of Coulomb-hadronic interference]]. Further details can be found in the journal publication linked from the [[http://elegent.hepforge.org/|home page]]. == Elegent package == The package consists of the following components. * C++ implementation of the models described above. For more details, please refer to the [[API|API description]]. * Program `ElegentTDistributionSampler` to build a number of '''t-distributions''' of interest (t being four-momentum transfer squared), e.g. differential and cumulative cross-sections. The distributions are generated at a given collision energy and are saved as a ROOT file. For details please refer to the [[DistributionFileDescription|t-distribution file description]]). * Program `ElegentBDistributionSampler` to build a number of '''b-distributions''' of interest (b stands for impact parameter). At the moment, only profile functions are generated and saved as a ROOT file. * Program `ElegentSDistributionSampler` to build a number of '''s-distributions''' of interest (s stands for the square of interaction energy). * Class `Generator` that loads a specified cumulative distribution function from a t-distribution ROOT file and generates random events in the [[http://lcgapp.cern.ch/project/simu/HepMC|HepMC format]]. This class can easily be embedded in any program. As an example, you can have a look at the [[source:/trunk/src/ElegentTest.cc|ElegentTest program]]. == Users' guide == === Download and compilation === 1. Either download an [[http://www.hepforge.org/downloads/elegent|Elegent release]] or checkout the code from Subversion: {{{ svn co http://elegent.hepforge.org/svn/trunk }}} 1. Edit the `makefile` such that `ROOTDIR` and `HepMCDIR` point to your ROOT and HepMC installations. 1. Run {{{ make }}} Depending on your system, you might want to add * `lib` sub-directory to the `LD_LIBRARY_PATH` environment variable and * `bin` sub-directory to `PATH` before your run any of the programs below. === Sampling t-, b- and s-distributions === NB: you might want to skip this step as there are ready-made distribution files available for [[http://elegent.hepforge.org/distributions|download]] (naming scheme is described [[DistributionFileDescription|here]]). You can look at [[http://elegent.hepforge.org/plots|plots in PDF format]] as well. Run {{{ bin/ElegentTDistributionSampler -h bin/ElegentBDistributionSampler -h bin/ElegentSDistributionSampler -h }}} to get help on running these programs. Alternatively, look in [[source:/trunk/distributions/generate_t_distributions]], [[source:/trunk/distributions/generate_b_distributions]] or [[source:/trunk/distributions/generate_s_distributions]] for a usage example. In particular, all these programs accept `-model-list` option to print the list of available models. === Event generator example === The `Generator` class and a t-distribution ROOT file can be tested with program `bin/ElegentTest`, which would print the generated HepMC events on screen. Run {{{ bin/ElegentTest -h }}} for usage help. === Package test === The following script performs various tests of the package functionalities: {{{ test/package_test }}}