ROOT-TF pipeline

Logo

Demonstration of a ROOT-based preprocessing pipeline for TensorFlow/Keras

View the Project on GitHub matt-komm/ROOT-TF-pipeline

Linux and OSX: build status

DOI

Description

This repository contains a demonstration of a preprocessing pipeline that includes a direct interface to ROOT TTrees, which was developed in the context of:

Dependencies

We recommend to use the provided miniconda environment, which can be installed with source Env/setupEnv.sh Env/environment.yml <install_directory>. After installation, the environment can be activated with source Env/env.sh.

Building the custom operations

The custom operations in Ops can be built using cmake as follows:

mkdir Ops/build
cd Ops/build
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/release
make install

Check if everything is working by running ctest from the build directory.

The following variables need to be set to use the created python package system-wide:

export PYTHONPATH=$PWD/release:$PYTHONPATH
export LD_LIBRARY_PATH=$PWD/release:$LD_LIBRARY_PATH

Samples of QCD events

Files containing flat ROOT TTrees for testing the pipeline are available in the Samples directory. These have been produced from the following open dataset:

Run the pipeline example

From the top-level directory of the repository run

python pipeline.py 

The pipeline will resample the jets to be uniformly in pT and |eta|. Additionally random proper lifetime values are generated for the SM jets. Since the QCD sample above does not contain true LLP jets, the lifetime is drawn instead from a uniform distribution. The script will produce the following plot, which shows the resulting pT and lifetime distributions per jet class.

pipeline

Authors

Copyright 2019 Matthias Komm, Vilius Cepaitis, Robert Bainbridge, Alex Tapper, Oliver Buchmüller.