Page MenuHomeHEPForge

No OneTemporary

diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst
index d00f701..b8fab5b 100644
--- a/doc/sphinx/index.rst
+++ b/doc/sphinx/index.rst
@@ -1,23 +1,24 @@
.. reversed HEJ documentation master file, created by
sphinx-quickstart on Fri Sep 15 16:13:57 2017.
Welcome to reversed HEJ's documentation!
========================================
.. toctree::
:maxdepth: 2
:caption: Contents:
intro
installation
rHEJ
HEJFOG
analyses
+ scales
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
diff --git a/doc/sphinx/rHEJ.rst b/doc/sphinx/rHEJ.rst
index 8f6c8a9..e2aeb7d 100644
--- a/doc/sphinx/rHEJ.rst
+++ b/doc/sphinx/rHEJ.rst
@@ -1,261 +1,264 @@
.. _`Running reversed HEJ`:
Running reversed HEJ
====================
Quick start
-----------
In order to run reversed HEJ, you need a configuration file and a file
containing fixed-order events. A sample configuration is given by the
:file:`config.yml` file distributed together with reversed HEJ. Events
in the Les Houches Event File format can be generated with standard
Monte Carlo generators like `MadGraph5_aMC@NLO
<https://launchpad.net/mg5amcnlo>`_ or `Sherpa
<https://sherpa.hepforge.org/trac/wiki>`_. The processes supported by
reversed HEJ are
- Pure multijet production
- Production of a Higgs boson with jets
..
- *TODO* Production of a W boson with jets
- *TODO* Production of a Z boson or photon with jets
where at least two jets are required in each case. For the time being,
only leading-order events are supported.
After generating an event file :file:`events.lhe` adjust the parameters
under the `fixed order jets`_ setting in :file:`config.yml` to the
settings in the fixed-order generation. Resummation can then be added by
running::
rHEJ config.yml events.lhe
Using the default settings, this will produce an output event file
:file:`RHEJ.lhe` with events including high-energy resummation.
.. _`reversed HEJ settings`:
Settings
--------
Reversed HEJ configuration files follow the `YAML <http://yaml.org/>`_
format. The following configuration parameters are supported:
.. _`trials`:
**trials**
High-energy resummation is performed by generating a number of
resummation phase space configurations corresponding to the input
fixed-order event. This parameter specifies how many such
configurations reversed HEJ should try to generate for each input
event. Typical values vary between 10 and 100.
.. _`min extparton pt`:
**min extparton pt**
Specifies the minimum transverse momentum in GeV of the most forward
and the most backward parton. This setting is needed to regulate an
otherwise uncancelled divergence. Its value should be slightly below
the minimum transverse momentum of jets specified by `resummation
jets: min pt`_. See also the `max ext soft pt fraction`_ setting.
.. _`max ext soft pt fraction`:
**max ext soft pt fraction**
Specifies the maximum fraction that soft radiation can contribute to
the transverse momentum of each the most forward and the most backward
jet. Values between around 0.05 and 0.1 are recommended. See also the
`min extparton pt`_ setting.
.. _`fixed order jets`:
**fixed order jets**
This tag collects a number of settings specifying the jet definition
in the event input. The settings should correspond to the ones used in
the fixed-order Monte Carlo that generated the input events.
.. _`fixed order jets: min pt`:
**min pt**
Minimum transverse momentum in GeV of fixed-order jets.
.. _`fixed order jets: algorithm`:
**algorithm**
The algorithm used to define jets. Allowed settings are
:code:`kt`, :code:`cambridge`, :code:`antikt`, :code:`genkt`,
:code:`cambridge for passive`, :code:`genkt for passive`,
:code:`ee kt`, :code:`ee genkt`. See the `FastJet
<http://fastjet.fr/>`_ documentation for a description of these
algorithms.
.. _`fixed order jets: R`:
**R**
The R parameter used in the jet algorithm, roughly corresponding
to the jet radius in the plane spanned by the rapidity and the
azimuthal angle.
.. _`resummation jets`:
**resummation jets**
This tag collects a number of settings specifying the jet definition
in the observed, i.e. resummed events. These settings are optional, by
default the same values as for the `fixed order jets`_ are assumed.
.. _`resummation jets: min pt`:
**min pt**
Minimum transverse momentum in GeV of resummation jets. This
should be around 25% larger than the minimum transverse momentum
of fixed order jets set by `fixed order jets: min pt`_.
.. _`resummation jets: algorithm`:
**algorithm**
The algorithm used to define jets. The reversed HEJ approach to
resummation relies on properties of :code:`antikt` jets, so this
value is strongly recommended. For a list of possible other
values, see the `fixed order jets: algorithm`_ setting.
.. _`resummation jets: R`:
**R**
The R parameter used in the jet algorithm.
.. _`FKL`:
**FKL**
Specifies how to treat FKL events. The possible values are
:code:`reweight` to enable resummation, :code:`keep` to keep the
events as they are up to a possible change of renormalisation and
factorisation scale, and :code:`discard` to discard these events.
.. _`unordered`:
**unordered**
Specifies how to treat events with one emission that does not respect
FKL ordering. The possible values are the same as for the `FKL`_
setting, but :code:`reweight` may not be supported for all process
types.
.. TODO: rename to non-HEJ
.. _`non-FKL`:
**non-FKL**
Specifies how to treat events where no resummation is possible. The
allowed values are :code:`keep` to keep the events as they are up to
a possible change of renormalisation and factorisation scale and
:code:`discard` to discard these events.
.. _`scales`:
**scales**
Specifies the renormalisation and factorisation scales for the output
events. This can either be a single entry or a list :code:`[scale1,
scale2, ...]`. For the case of a list the first entry defines the
central scale. Possible values are fixed numbers to set the scale in
GeV or the following:
- - :code:`input`: The same scale as in the input events
- - :code:`Ht`: The sum of the scalar transverse momenta of all
+ - :code:`H_T`: The sum of the scalar transverse momenta of all
final-state particles
- :code:`max jet pperp`: The maximum transverse momentum of all jets
- :code:`jet invariant mass`: Sum of the invariant masses of all jets
- - :code:`m12`: Invariant mass between the two hardest jets.
+ - :code:`m_j1j2`: Invariant mass between the two hardest jets.
- Scales can be multiplied or divided by an overall factor, e.g. :code:`Ht/2`.
+ Scales can be multiplied or divided by an overall factor,
+ e.g. :code:`H_T/2`.
+
+ It is also possible to import scales from an external library, see
+ :ref:`Custom scales`
.. _`scale factors`:
**scale factors**
A list of numeric factors by which each of the `scales`_ should be
multiplied. Renormalisation and factorisation scales are varied
independently. For example, a list with entries :code:`[0.5, 2]`
would give the four scale choices (0.5μ\ :sub:`r`, 0.5μ\ :sub:`f`);
(0.5μ\ :sub:`r`, 2μ\ :sub:`f`); (2μ\ :sub:`r`, 0.5μ\ :sub:`f`); (2μ\
:sub:`r`, 2μ\ :sub:`f`) in this order. The ordering corresponds to
the order of the final event weights.
.. _`max scale ratio`:
**max scale ratio**
Specifies the maximum factor by which renormalisation and
factorisation scales may difer. For a value of :code:`2` and the
example given for the `scale factors`_ the scale choices
(0.5μ\ :sub:`r`, 2μ\ :sub:`f`) and (2μ\ :sub:`r`, 0.5μ\ :sub:`f`)
will be discarded.
.. _`log correction`:
**log correction**
Whether to include corrections due to the evolution of the strong
coupling constant in the virtual corrections. Allowed values are
:code:`true` and :code:`false`.
.. TODO: unweight
.. _`event output`:
**event output**
Specifies the name of a single event output file or a list of such
files. The file format is either specified explicitly or derived from
the suffix. For example, :code:`events.lhe` or, equivalently
:code:`Les Houches: events.lhe` generates an output event file
:code:`events.lhe` in the Les Houches format. The supported formats
are
- :code:`file.lhe` or :code:`Les Houches: file`: The Les Houches
event file format.
- :code:`file.hepmc` or :code:`HepMC: file`: The HepMC format.
.. _`RanLux init`:
**RanLux init**
Specifies a file to be loaded for the initialisation of the RanLux64
random number generation. See the `CLHEP documentation
<http://proj-clhep.web.cern.ch/proj-clhep/index.html#docu>`_ for
details.
.. _`analysis`:
**analysis**
Specifies the name and settings for a custom analysis library. The
:code:`plugin` sub-entry should be set to the analysis file path. All
further entries are passed on to the analysis. See
:ref:`Writing custom analyses` for details.
.. _`Higgs coupling`:
**Higgs coupling**
This collects a number of settings concerning the effective coupling
of the Higgs boson to gluons. This is only relevant for the
production process of a Higgs boson with jets and only supported if
reversed HEJ was compiled with `QCDloop
<https://github.com/scarrazza/qcdloop>`_ support.
.. _`Higgs coupling: use impact factors`:
**use impact factors**
Whether to use impact factors for the coupling to the most forward
and most backward partons. Impact factors imply the infinite
top-quark mass limit.
.. _`Higgs coupling: mt`:
**mt**
The value of the top-quark mass in GeV. If this is not specified,
the limit of an infinite mass is taken.
.. _`Higgs coupling: include bottom`:
**include bottom**
Whether to include the Higgs coupling to bottom quarks.
.. _`Higgs coupling: mb`:
**mb**
The value of the bottom-quark mass in GeV.
diff --git a/doc/sphinx/scales.rst b/doc/sphinx/scales.rst
new file mode 100644
index 0000000..ab1a2b1
--- /dev/null
+++ b/doc/sphinx/scales.rst
@@ -0,0 +1,80 @@
+.. _`Custom scales`:
+
+Custom scales
+=============
+
+Reversed HEJ comes with a small selection of built-in renormalisation
+and factorisation scales, as described in the :ref:`scales <scales>` setting. In
+addition to this, user-defined scales can be imported from custom
+libraries.
+
+Writing the library
+-------------------
+
+Custom scales are defined through C++ functions that take an event and
+compute the corresponding scale. As an example, let's consider the
+following function returning the transverse momentum of the softest jet
+in an event:
+
+.. code-block:: C++
+
+ #include "RHEJ/Event.hh"
+
+ double softest_jet_pt(RHEJ::Event const & ev){
+ const auto softest_jet = sorted_by_pt(ev.jets()).back();
+ return softest_jet.perp();
+ }
+
+To make this accessible from reversed HEJ, we have to prevent C++ name
+mangling with :code:`extern "C"`:
+
+.. code-block:: C++
+
+ #include "RHEJ/Event.hh"
+
+ extern "C"
+ double softest_jet_pt(RHEJ::Event const & ev){
+ const auto softest_jet = sorted_by_pt(ev.jets()).back();
+ return softest_jet.perp();
+ }
+
+After saving this code to some file :code:`myscales.cc`, we can compile
+it to a shared library. With the :code:`g++` compiler this can be done
+with the command
+
+.. code-block:: sh
+
+ g++ -fPIC -shared -Wl,-soname,libmyscales.so -o libmyscales.so myscales.cc
+
+If :code:`g++` is used and the library also contains other definitions,
+it is recommended to add :code:`-fvisibility=hidden` to the compiler
+flags and :code:`__attribute__((visibility("default")))` after
+:code:`extern "C"` for each exported function in order to avoid possible
+name clashes.
+
+
+Importing the scale into reversed HEJ
+-------------------------------------
+
+Our custom scale can now be imported into reversed HEJ by adding the
+lines
+
+.. code-block:: YAML
+
+ import scales:
+ /path/to/libmyscales.so: softest_jet_pt
+
+It is also possible to import several scales from one or more libraries:
+
+.. code-block:: YAML
+
+ import scales:
+ /path/to/libmyscales1.so: [first_scale, second_scale]
+ /path/to/libmyscales2.so: [another_scale, yet_another_scale]
+
+The custom scales can then be used as usual in the :ref:`scales <scales>`
+setting, for example
+
+.. code-block:: YAML
+
+ scales: [H_T, softest_jet_pt, 2*softest_jet_pt]

File Metadata

Mime Type
text/x-diff
Expires
Mon, Jan 20, 9:11 PM (23 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4242404
Default Alt Text
(12 KB)

Event Timeline