Demonstration of a ROOT-based preprocessing pipeline for TensorFlow/Keras
View the Project on GitHub matt-komm/ROOT-TF-pipeline
Linux and OSX:
This repository contains a demonstration of a preprocessing pipeline that includes a direct interface to ROOT TTrees, which was developed in the context of:
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
.
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
Files containing flat ROOT TTrees for testing the pipeline are available
in the Samples
directory. These have been produced from the following
open dataset:
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.
Copyright 2019 Matthias Komm, Vilius Cepaitis, Robert Bainbridge, Alex Tapper, Oliver Buchmüller.