PARTONS
|
PARtonic Tomography Of Nucleon Software
|
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.
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.
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:
Note the following:
path_to_scenario
as a function argument.try
-catch
mechanism in order to catch exceptions and display with the Logger the associated error messages. Without this mechanism the information on what has caused the termination of your program is lost.Ctrl
+Shift
+O
, assuming that it has been correctly configured as explained in this tutorial.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:
Let us analyze the structure of this scenario step-by-step:
<? ... ?>
tags. Keep it in each of your XML scenarios and do not modify it - the preamble is used exclusively by XML parsers.<scenario></scenario>
tags. For your convenience and for bookkeeping, set both date when the scenario was created and your own unique description.<task></task>
tags. The information in the opening tags defines the target Service (service = ""
) and the method (method = ""
) to be called. In our example, the first task is for the computation, while the second one prints out the result to the standard output. Available tasks for all Services are summarized in the following section.storeInDB = ""
, to store the result in the database. When this switch is active, both the scenario file and the result are stored in the database. You may refer to the stored data by a unique computation.id
value returned to the standard output by one of the involved database services: <kinematics></kinematics>
tags. See examples provided in the following section to learn how to define these objects. Note that they can be defined either via XML file (as in the analyzed example), or via external text files (for a more convenient handling of lists).<computation_configuration></computation_configuration>
tags. It is a nested structure that indicates PARTONS modules to be used. The structure corresponds to the following computation structure: The list of all available PARTONS modules is summarized in this section.<param/>
self-closing tags. It is the way of transferring parameters from XML files to specific PARTONS modules.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.
GPDGK11
we use: printf()
, std::cout
, etc. This will allow to create a consistent output and it is crucial to keep the continuity of the information stream - since the Logger uses a different thread than the computation (with the advantage of not slowing down the computation with parasitic printing), information sent by the Logger and by e.g. printf()
function will not be properly synchronized. To use the Logger, run one of the following functions: BaseObject
, which is true for e.g. all modules. Let us name this class MyClass
and the aforementioned method as someFunction()
. Then, the output returned by the Logger will be similar to that one: ElemUtils::Formatter
, is a stream buffer that allows to build sophisticated character strings out of simple types, e.g.: BaseObject
.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 |
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.