Native OpenLoops Fortran interface
OpenLoops offers an easy-to-use native interface which can be used in any Fortran90 or C/C++ program. In the following we illustrate the relevant routines and their arguments as used in a Fortran90 program. An explicit examples can be found below. A corresponding documentation for the C/C++ interface can be found here.In a Fortran90 program the OpenLoops interface is loaded via the module
Any parameter can be set via the routine
set_parameter(parameter, value, error)
Here, TYPE can either be integer, double or character(*) according to the parameter to be set.
Similiarly, the value of a parameter can be obtained via the routine
call get_parameter(parameter, value, error)
Before the first phase-space point is actually calculated OpenLoops has to be initialized via
At the beginning of a run all required amplitudes have to be registered via the function
Here, the process is given in the format "PDG(i1) PDG(i2) -> PDG(f1) PDG(f2) ...", with the respective PDG codes of the initial/final state particles. The type of the registered amplitude has to be specified via the argument TYPE: 1=Tree, 11=Loop, 12=LoopInduced. Note, that amplitudes of type 11 always also include the corresponding squared tree amplitudes and, as do amplitudes of type 1, also always the corresponding color- and spin-correlated amplitudes. The return value is a unique id for any registered amplitude. Amplitudes for different permutations of external particles should be registered independently.
When a process is registered the required coupling order should have been set before, specifying the coupling which is kept fixed, i.e. for a NLO QCD amplitude the EW coupling of the squared amplitude should be specified via
call set_parameter(order_ew, O(α))
For example the O(αs3α) one-loop matrix element and the corresponding O(αs2α) tree matix element for dd ➞ Zuu can be registered via
call set_parameter(order_ew, 1)
Note: currently only O(αs) NLO QCD corrections are available in OpenLoops. In the future also O(α) NLO EW corrections will become available and can be registered specifying the in this case fixed order_qcd.
For the calculation of amplitudes with N external particles phase-space points have to be passed in the format p_ex(4:N). The following routine yields a random phase-space point with the kinematics of process id using Rambo
phase_space_point(id , sqrt_s, p_ex)
An actual amplitude for a process registered as id can be calculated with one of the following routines. All results are summed (and averaged in the case of initial states) over external-particle helicities and colours.
evaluate_tree(id, p_ex, m2lo)
gives as result m2lo the corresponding squared tree amplitude.
call evaluate_cc(id, p_ex, m2tree, m2cc, m2ew)
gives as results m2tree, m2cc and m2ew the tree amplitude, the N*(N-1)/2 corresponding independent color-correlated squared tree amplitudes Cij = <M|TiTj|M> in the BLHA convention, i.e., the element at position i+j(j-1)/2+1 (counting external legs from zero) contains the result for Cij with 0 ≤ i < j ≤ N-1i; and the charge correlated tree amplitude.
call evaluate_sc(id, p_ex, emitter, polvect, m2sc)
gives as result m2sc(j) the corresponding spin-correlated squared tree amplitude for each spectator j and a given emitter with polarisation vector polvect.
evaluate_loop(id, p_ex, m2lo, m2l1, acc)
gives as result m2lo and m2l1 respectivly the squared tree and (UV renormalised) tree-one-loop interference amplitudes, where m2l1(0) yields the finite part and m2l1(1) and m2l1(2) the residues of the single and double poles in ε=(4-D)/2. By default the BLHA normalisation convention is used, i.e. an overall normalisation factor (4π)ε/Γ(1-ε) is implicitly understood. An accuracy measure of the corresponding amplitude is returned as acc if available, -1 otherwise.
call evaluate_ct(id, p_ex, m2lo, m2ct)
gives as result m2lo and m2ct respectively the squared tree and tree-one-loop interference UV counter-term amplitudes.
evaluate_loop2(id, p_ex, m2l2, acc)
gives as result m2l2 the squared one-loop amplitude for a loop-induced processes.
At the end of a run OpenLoops cleans up its memory and possibly writes log files via
Explicit Fortran90 example
The following example calculates the one-loop matrix element of the process dd ➞ Zuu for a random phase-space point. The required library has to be downloaded before via
./openloops libinstall ppzjj
This example can also be found inside the file ./examples/OL_interface.f90 of the OpenLoops installation and can be compiled via:
or with our SCons build system via