Logo

PARTONS: PARtonic Tomography Of Nucleon Software

This page:
about
instalation
usage
development
license
acknowledgements
contact

View GitHub repository:
link

View Docker repository:
link

View reference article:
doi   arXiv   inspire

Usage


Minumum working example

We start with a minimum working example demonstarting how to run PARTONS. We assume that a PARTONS installation is available to you, if not see this page.

Introduction

Here we explain how to use PARTONS in more detail. There are two main ways to use PARTONS:

For the purpose of this tutorial, we will use the partons-example project. project. By default, this project is configured to run XML scenarios (see the Minumum working example section). A collection of sample XML scenarios can be found in the data/examples directory.

The project also includes a main.cpp file, which demonstrates how to properly call and handle the PARTONS library in a standalone program. With a minor modification, clearly indicated in main.cpp, the partons-example project can also be used to run any C++ code based on the PARTONS library. A collection of sample C++ functions is provided in the examples.h (header) and example.cpp (source) files.

The executable that invokes the PARTONS library will look for two configuration files, where the main one (partons.properties) should be placed in the same directory as the executable. See the Configuration files section for more details.

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 and evaluated (or played) by PARTONS. This will be illustrated using an example that evaluates one of the Fourier moments of the DVCS beam charge asymmetry, \(A_{C}^{\cos 2\phi}\), at 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">

        <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 notes regarding the use of the PARTONS C++ interface. Due to the complexity of this topic, we recommend studying the examples provided in the partons-example project.

ElemUtils::LoggerManager::getInstance()->info(“SomeClass”, “someFunction”, ElemUtils::Formatter() « “We have: “ « a « ” “ « b « ” “ « c « ” “ « d);

which gives:
```shell
26-06-2017 02:20:28 [INFO] (SomeClass::someFunction) We have: 1.12 2 0 ddd

Here, we have demonstrated how to use the Logger outside of a class that inherits from BaseObject.

Configuration files

PARTONS uses two configuration files:

partons.properties

This is the main configuration file of PARTONS and should be placed in the same directory as the executable. All options are explained in the comments, which start with the hash symbol #:

# PATHS #

# Path to the configuration file of Logger 
log.file.path = /path/to/logger.properties

# Path to the environment configuration information
environment.configuration.file.path = /path/to/environment_configuration.dat

# Path to the directory containing PDF replicas 
grid.directory = ../partons/data/grid/

# Validation scheme used by XML parser  
xml.schema.file.path = ../partons/data/xmlSchema.xsd

# THREAD #

# Number of available processors to be used by threads
computation.nb.processor = 1

# Maximum size of batch for a given type (in one task several batches may be run in separate threads)
gpd.service.batch.size = 1000
ccf.service.batch.size = 1000
observable.service.batch.size = 1000

The file xmlSchema.xsd, used by the XML parser, is provided with the executable project partons-example in the data directory.

logger.properties

This is the configuration file for the Logger. Its path should be set in partons.properties using the log.file.path option. All options are explained in the comments, which begin with the hash symbol #:

# Enable Logger: 
# true   - Logger enabled
# false  - Logger disabled
enable = true

# Logger output policy:
# ERROR  - print errors only 
# WARN   - print warnings and errors only 
# INFO   - print info, warnings and errors only 
# DEBUG  - print all, i.e.: debug, info, warnings and errors
default.level = INFO

# Logger output policy may be also set locally, i.e. for a single PARTONS module. E.g.
# logger.DVCSCFFHeavyQuarkModel = DEBUG
# can be used to set the debugging mode for DVCSCFFHeavyQuarkModel module only

# Logger destination:
# COUT   - standard output only
# FILE   - text file only
# BOTH   - both standard output and text file
print.mode = BOTH

# Path to the directory containing Logger output text files 
log.folder.path = /path/to/output/folder