tbjcATTPCroot Installation Instructions

Finally, I think I should write a instruction of using my code.

The code is basically divided into two parts. The C++ convertor, which is inherited from Yassid’s ATTPCroot and python analysis code. Between those two, there is also a python script converting the root tree data files into SQLite.

The convertor and all other pyhton code needs to be installed differently.

Convertor :

The C++ part of the convertor converts a Raw binary data file to a Root tree file; then you need the python convertor to convert the Root tree file to a SQLite database.

Installation Requirements:  Root>6.xx, Boost, CMake, Linux environment, Python (Anaconda 2.x is recommended)

Installation steps:

### C++ part ###

to build:
mkdir build
cd build
cmake ..

### python part ###

### download the Anaconda 2.x https://www.anaconda.com/download/#linux
bash Anaconda-2.x.x-Linux-x86[_64].sh

How to run:

There are two ways of running the program.

  • single process: in the main folder, (the build/example will only run in the main folder)
./build/example <root file name> <Binary file name>  ## this convert binary data to root tree file
python tbjcConvertor/Convertor_sqlite.py <root file name> <SQLite database name> ## this convert the root tree file to SQLite database
  • multi process:
python mult.py


Tested System:

Ubuntu 16.04.1 LTS
Red Hat Enterprise Linux Server release 7.4 (Maipo)


The C++ code is a single thread and process program, which can be paralleled (multiprocess) through the multi.py

In multi.py, there are three variables need to be changed, all of the variables are RELATIVE DIRECTORY

parentPath: the relative directory of the parent folder of the DATA FOLDERS of the raw binary

SQLpath: where you want to store all your converted SQLite databases

paths: all the data folders you want to convert

Analysis Part:

Ideally, the analysis part of the C++ code should be working, including ATHoughTask, ATPSATask, ATAnalysisTask and ATPhiRecoTask. However, it is not commonly used in my analysis work.

What’s different?

As mentioned in the ReadMe file, the FairRoot part and the Root TCloneArray, is completely faked. The fake classes only provide basic functions of iterating tasks and storing temporary variables. However, from my observation, all the analysis tasks should be functioning.

Analysis program :

Though most of the programs are unfinished works, but they should give good insights of what the data look like.

The most complete program is the VertexAnalyzer, which reconstruct the


besides built-in Anaconda packages, you will also need opencv2 and seaborn (mainly for visualizing, when debug option is on)

conda install -c menpo opencv
conda install seaborn

Tested System:

Ubuntu 16.04.1 LTS
Red Hat Enterprise Linux Server release 7.4 (Maipo)


under the main folder, run for the multi-process mode

python Multi.py

or run the jupyter notebook interactive mode

jupyter notebook

the Multi.py will produce a text file contains a list of ranges for reaction length.


Comments are closed.