Chapter 12
C++ matrix element interface
Since version 10.1, MCFM offers a dedicated C++ interface to access its analytic one-loop
amplitudes. Please cite ref. [69] in addition to the main MCFM references when using the
C++ interface.
12.1 Processes with C++ interface
The following Standard-Model processes are available:
Process | Order EW | Order QCD |
2 | 1 | |
2 | 2 | |
2 | 3 | |
2 | 1 | |
2 | 2 | |
2 | 3 | |
1 | 2 | |
1 | 3 | |
1 | 4 | |
2 | 2 | |
3 | 1 | |
3 | 2 | |
3 | 1 | |
3 | 2 | |
1 | 2 | |
1 | 3 | |
2 | 1 | |
2 | 1 | |
2 | 2 | |
3 | 1 | |
4 | 1 | |
3 | 1 | |
3 | 1 | |
3 | 1 | |
4 | 1 | |
4 | 1 | |
4 | 1 | |
4 | 1 | |
4 | 1 | |
4 | 1 | |
4 | 1 | |
4 | 1 | |
3 | 2 | |
3 | 2 | |
4 | 2 | |
4 | 2 | |
4 | 2 | |
4 | 2 | |
4 | 2 | |
4 | 2 | |
0 | 3 | |
0 | 3 | |
In addition, the following HEFT processes are available (requires model=heft):
Process | Order EW | Order QCD |
1 | 2 | |
1 | 3 | |
1 | 4 | |
All processes are crossing invariant.
Further processes may be implemented in the future. Please contact the authors if interested in a specific process.
12.2 Installation
To use the C++ interface, please enable compiling MCFM as a library by adding the following flag
cmake .. -DWITH_LIBRARY
This will create a shared library libMCFM.so
in the lib/
directory.
12.3 Usage
Examples showing the basic usage of the interface and how to fill the complete list of
parameters with default values are given in src/BLHA/text.cxx
and src/BLHA/params.cxx
,
respectively.
The MCFM C++ interface is constructed as a C++ class
CXX_Interface mcfm;
included in the header
#include "MCFM/CXX_Interface.h"
It must be initialized on a of , containing all (standard-model) parameters
bool CXX_Interface::Initialize(std::map<std::string,std::string>& parameters);
Prior to use, each process has to be initialized in the interface
int CXX_Interface::InitializeProcess(const Process_Info &pi);
which takes a Process_Info
object as input, which in turn contains the defining
parameters of a given process, i.e. the PDG IDs, number of incoming particles, and QCD and
EW coupling orders
Process_Info(const std::vector<int> &ids, const int nin,const int oqcd, const int oew);
Phase space points are defined using the FourVec
struct, which represents four-vectors in the
ordering
FourVec(double e, double px, double py, double pz);
Given a list of four-vectors in this format, one-loop matrix elements can be calculated
either using the process ID returned by the InitializeProcess
method
void CXX_Interface::Calc(int procID,const std::vector<FourVec> &p, int oqcd);
or using a Process_Info
struct:
void CXX_Interface::Calc(const Process_Info &pi,const std::vector<FourVec> &p,int oqcd);
In the same way, the result of this calculation can be accessed either via the process ID
const std::vector<double>& CXX_Interface::GetResult(int procID);
or using the Process_Info
struct:
const std::vector<double> &CXX_Interface::GetResult(const Process_Info &pi)
The result is returned as a list of Laurent series coefficients in the format
However, by default only the coefficient, i.e. the finite part, is returned.
The calculation of the pole terms and the Born can be enabled by setting the following
switch to 1
void CXX_Interface::SetPoleCheck(int check);
12.4 Tests
A set of programs to test MCFM’s amplitudes against OpenLoops, Recola, and MadLoop can
be compiled. For example to compile the OpenLoops test program an additional OpenLoops
directory -DOLDIR=$HOME/OpenLoops
must be specified that contains the header files in the
include
subdirectory. For Recola and MadLoops the variables RCLDIR
and MLDIR
must be
specified, respectively.