OpenLoops is hosted by Hepforge, IPPP Durham

BLHA interface

OpenLoops offers an interface in the Binoth-Les-Houches-Accord in both versions BLHA1 and BLHA2.

For example within a C/C++ program a BLHA contract file is read by OpenLoops via

OLP_Start(char* CONTRACT_FILE_NAME, int* ERROR)

The answer file is either written to the very same file or in a file spefified in the contract file via

Extra AnswerFile OLE_ANSWER_FILE

Parameters are either set via the contract file or directly via the procedure

OLP_SetParameter(char* NAME, double* REAL_VALUE, double* IMAG_VALUE, int* ERROR)

Furthermore a list of the actual parameter settings is written to a file via

OLP_PrintParameter(char* FILE_NAME)

At runtime the tree and loop amplitudes for a phase-space point of N external particles with momenta P_EX(5^N), as specified in the BLHA1/BLHA2 standards, are obtained via

OLP_EvalSubProcess(int* ID, double* P_EX(5^N), double* MU, double* ALPHA_S, double* RESULT(4))

Here, ID is the id of the corresponding subprocess (specified in the answer file), MU the renormalization scale and ALPHA_S the strong coupling constant. The result is written into the array RESULT, where RESULT(4) gives the tree amplitude and RESULT(3) the finite part, RESULT(2) the single pole and RESULT(1) the double pole of the one-loop amplitude.

A corresponding routine of the BLHA2 standard is also implemented:

OLP_EvalSubProcess2(int* ID, double* P_EX(5^N), double* MU, double* RESULT(4), double* ACC )

Here, additionally an accuracy measure of the corresponding amplitude is returned as ACC.

For further details see the specification of the BLHA1 and BLHA2 standard.

Explicit example

As an example let us calculate the one-loop amplitude for the process dd ➞ e+e-uu (the library pplljj has to be loaded before) for a random phase-space point. To do this we use the following order file:


######################################################
# Sample order file for the OpenLoops BLHA interface #
######################################################
Model SMdiag
CorrectionType QCD
Extra AnswerFile OLE_answer.lh

mass(23) 98.188
Z_width 2.19

CouplingPower QCD 2
CouplingPower QED 2
1 -1 -> 11 -11 1 -1


together with the following example:

#include 

extern "C" {

  void OLP_Info(char* str);
  void OLP_Start(const char* contract_file_name, int* ierr);
  void OLP_SetParameter(const char* para, double* re, double* im, int* ierr);
  void OLP_EvalSubProcess2(int* id, double* pp, double* mu, double* rval, double* acc);

  void ol_phase_space_point(int id, double sqrt_s, double* pp);
  int ol_n_external(int id);
}

int main() {

  int ierr = 0;
  double sqrts = 1000.;
  double mu = 100.;
  double result[4];
  double acc;

  // OLP_Start: OpenLoops reads contract file, registers processes and writes answer file
  OLP_Start("OLE_order.lh", &ierr;);

  int id = 1;

  if (ierr == 1) {

    //obtain random phase-space point
    int n_ex = ol_n_external(id);
    double pp[5*n_ex];
    ol_phase_space_point(id, sqrts, pp);

    // evaluate process
    OLP_EvalSubProcess2(&id;, pp, μ, result, &acc;);

    std::cout.precision(15);
    std::cout << std::endl;
    std::cout << "Tree and loop matrix element of the process" << std::endl;
    std::cout << "d dbar -> Z u ubar" << std::endl;
    std::cout << "for the phase-space point" << std::endl;
    for (int k = 0; k < 5; k++) {
      std::cout << "P[" << k+1 << "] = " << pp[5*k] << "  " << pp[5*k+1]
                << "  " << pp[5*k+2] << "  " << pp[5*k+3] << std::endl;
    }
    std::cout << std::endl;
    std::cout << "Tree:      " << result[3] << std::endl;
    std::cout << "Loop e^0:  " << result[2] << std::endl;
    std::cout << "Loop e^-1: " << result[0] << std::endl;
    std::cout << "Loop e^-2: " << result[1] << std::endl;
    std::cout << "Accuracy:  " << acc << std::endl;
    std::cout << std::endl;

  }

  return 0;
}


This example can also be found as ./examples/OL_blha.cpp inside the OpenLoops installation together with the order file shown above. It can be compiled via

cd ./examples
g++ -o OL_blha.o -c OL_blha.cpp
g++ -o OL_blha -Wl,-rpath=../lib OL_blha.o -L../lib -lopenloops

or with our SCons build system via

cd ./examples
../scons OL_blha