Physics:PP/1/Software and Data Used in This Book

From HandWiki
Jump to: navigation, search
<< Back

Software used in this book

This book will use several software packages for the examples.

PyROOT/C++

Most of the examples in this book to illustrate the real-life algorithms used in particle physics will be based on the Python programming language interfaced with ROOT. Within the ROOT framework, it is called "PyROOT". It is typically installed by default when ROOT is installed. The Python programming language is an excellent choice for this book since the example codes are short and can easily fit to the pages of this book. In addition, Python is a modern programming language which is constantly gaining popularity among data scientists, and is easy to learn while being a very powerful.

When we discuss examples of this book, we often will mention PyROOT/C++ when Python examples call ROOT C++. The pyROOT code can be easily transformed to a C++ code, or CLING interpreter macros (CLING is an interactive C++ interpreter from the ROOT). Such examples are typically contain the following import statement:

import ROOT

or

from ROOT import *

Finally, when the code examples will be difficult to implement in the "Python" syntax, we will use the standard CLING interpretator from the ROOT.

Some examples will require external C++ libraries. We will use such libraries from the "first hands", i.e. from the original web sites and the authors, without any dedicated frameworks which are typically used by large PP experiments. We also show how to compile such examples.

Jython/Java

Another set of libraries to be used in this book come from the DataMelt project. The code examples will also use the Python syntax, so the "Pythonic" side of the code snippets will look almost exactly as in PyROOT, but they will employ a different set of libraries written in the Java programming language. This will open a large choice to use different high-level classes that are missing in ROOT. Another advantage for some may come from the fact that such code snippets can easily run on Windows without complex installation. When we discussions the examples based on DataMelt, we will referee them as Jython/Java. Jython is a Java implementation of the Python language. Jython code can easily be rewritten using Java language when using the DataMelt libraries. This is similar to PyROOT examples which can be converted to the C++ code when the code contains calls to ROOT C++ libraries.

Data used in this book

Some examples will require data. In many cases we will show how to create pseudo-data, i.e. representative data sets to illustrate the concept of computations, without using external source of data. However, some examples will require realistic data sets similar to what are used in experiments. We will provide the URL links to such data.