PARTONS  
PARtonic Tomography Of Nucleon Software
Using PARTONS

Table of Contents

Introduction

This page explains how to use PARTONS. At this point you should have your own version of PARTONS available: either compiled on your own system (Linux or Mac), or accessible through our virtual machine . To run PARTONS properly, make sure to set up correctly the configuration files. Note also that some tasks described here require a MySQL server to be available and pre-configured to work with PARTONS.

To perform all kinds of tasks you should use Services, which have been developed in order to make your life easier with PARTONS. You may consider Services as a toolbox, which allows you to write a simple task and get back powerful C++ objects. You do not need to worry about how to use low level objects and functions - Services configure and use them for you.

We provide two ways of using Services (and therefore of using PARTONS):

One can distinguish three types of Services:

PARTONS benefits from a layered structure corresponding to the factorized nature of GPD-oriented computations. We distinguish three layers, each one coming with its own computation service(s). These are:

When a computation is performed, higher layers call lower ones automatically. The responsibility of a PARTONS user is to only set all required physical assumptions, such as GPD model, order of pQCD approximation, etc.


PARTONS_example project

It is useful for this tutorial to have our example project called partons-example set up and ready to be used. It can serve as an illustration of topics being discussed here and you can base your own program on it for a start. The project is set up to run any XML scenario. The collection of exemplary XML scenarios can be found in data/examples directory.

The project comes with main.cpp file, which illustrates how to call and handle properly PARTONS library in a stand alone program (see this section for more information). With a minor modification, which is clearly indicated in main.cpp, the project can also serve as a base to run any C++ code based on PARTONS library. The collection of exemplary C++ functions is included in examples.h (header) and example.cpp (source) files.

Read this short tutorial to learn how to evaluate (play) a demonstration XML scenario in partons-example. Note, that you can use this project to run any XML scenario that you will create during your work with PARTONS.


PARTONS executable

Here we demonstrate how to create the main function of an executable project, like main() of partons-example. That is, we show how to initialize and handle the PARTONS library and how to call its members properly.

If you wish to work with PARTONS by using only XML scenarios run through partons-example (see this section for more information) and you are not interested in details on how the main function of partons-example is built, you may skip this section of the tutorial.

This is the skeleton for the main function:

int main(int argc, char** argv) {
// Initialize Qt
QCoreApplication a(argc, argv);
PARTONS::Partons* pPartons = 0;
try {
// Initialize PARTONS application
pPartons->init(argc, argv);
// Your program goes here
// Organize your code as you wish by calling your own methods and classes making use of PARTONS.
}
// In a case of PARTONS exception
catch (const ElemUtils::CustomException &e) {
// Show why the exception has occurred
pPartons->getLoggerManager()->error(e);
}
// In a case of standard exception
catch (const std::exception &e) {
// Show why the exception has occurred
pPartons->getLoggerManager()->error("main", __func__, e.what());
}
// Close PARTONS application properly
if (pPartons) {
pPartons->close();
}
return 0;
}

Note the following:


Using XML interface

We refer to a set of physics assumptions as a scenario. In this section we demonstrate how a single scenario can be encoded in an input XML file to be evaluated (played) by PARTONS. This will be achieved with the help of this example, which is used to evaluate one of the Fourier moments of DVCS beam charge asymmetry, \(A_{C}^{\cos 2\phi}\), in a single kinematic point:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<scenario date="2017-06-15" description="How to compute an observable">
<task service="DVCSObservableService" method="computeSingleKinematic" storeInDB="0">
<kinematics type="DVCSObservableKinematic">
<param name="xB" value="0.1" />
<param name="t" value="-0.1" />
<param name="Q2" value="2." />
<param name="E" value="12." />
<param name="phi" value="20." />
</kinematics>
<computation_configuration>
<module type="DVCSObservableModule" name="DVCSAcCos2Phi">
<module type="DVCSProcessModule" name="DVCSProcessGV08">
<module type="DVCSScalesModule" name="DVCSScalesQ2Multiplier">
<param name="lambda" value="1." />
</module>
<module type="DVCSXiConverterModule" name="DVCSXiConverterXBToXi">
</module>
<module type="DVCSConvolCoeffFunctionModule" name="DVCSCFFStandard">
<param name="qcd_order_type" value="LO" />
<module type="GPDModule" name="GPDGK11">
</module>
</module>
</module>
</module>
</computation_configuration>
</task>
<task service="DVCSObservableService" method="printResults">
</task>
</scenario>

Let us analyze the structure of this scenario step-by-step:


Using C++ interface

These are the most important remarks on the usage of PARTONS' C++ interface. Due to the complexity of this subject, we recommend you to study examples provided in this section and in the partons-example project.


Services and available tasks

This table summarizes all tasks available in computation services. The serivces for particular production channel can be easly recognized with the used naming convention. The examples of usage can be found in partons-example project. For the online version, see this file and this folder.

Service Task Short description
GPDService computeSingleKinematic Evaluate GPD for single kinematic point
GPDService computeManyKinematic Evaluate GPD for many kinematic points
GPDService printResults Print out result to std output
GPDService generatePlotFile Generate plot file from data stored in database
DVCSConvolCoeffFunctionService computeSingleKinematic Evaluate CFF for single kinematic point
DVCSConvolCoeffFunctionService computeManyKinematic Evaluate CFF for many kinematic points
DVCSConvolCoeffFunctionService printResults Print out result to std output
DVCSConvolCoeffFunctionService generatePlotFile Generate plot file from data stored in database
DVCSObservableService computeSingleKinematic Evaluate observable for single kinematic point
DVCSObservableService computeManyKinematic Evaluate observable for many kinematic points
DVCSObservableService printResults Print out result to std output
DVCSObservableService generatePlotFile Generate plot file from data stored in database
TCSConvolCoeffFunctionService computeSingleKinematic Evaluate CFF for single kinematic point
TCSConvolCoeffFunctionService computeManyKinematic Evaluate CFF for many kinematic points
TCSConvolCoeffFunctionService printResults Print out result to std output
TCSConvolCoeffFunctionService generatePlotFile Generate plot file from data stored in database
TCSObservableService computeSingleKinematic Evaluate observable for single kinematic point
TCSObservableService computeManyKinematic Evaluate observable for many kinematic points
TCSObservableService printResults Print out result to std output
TCSObservableService generatePlotFile Generate plot file from data stored in database

Available modules

For the most up-to-date list of modules availible in PARTONS, see our GitLab repository. The linked page allows you to scan all availible modules. The names of modules correspond to the names of files: just drop .h extension.