This converts ROOT files from the b-tagging optimization framework into HDF5 files for use with DL1 / IPRNN / whatever algorithm.
Assuming you have CVMFS, you can run the following to set up for the first time:
git clone git@github.com:dguest/btag2hdf5.git
cd btag2hdf5
. setup.sh
make
After building all the libraries should be permanently linked to
CVMFS (thanks to some -rpath
magic). There should be no need to
run the setup script next time you log in.
You'll need the following:
- ROOT: use
master
branch for 6,root5
branch for version 5 - boost: for
program_options
- HDF5: with the C++ bindings installed
The executables will be built as ./bin/btag-*
. For more "standard"
b-taggers, you can use btag-write-track-jets
. For studies with fat
jets, there's also btag-write-fat-jets
. Note that this is more
experimental.
There is some standard pt, eta, and JVT selection applied to jets. For
details look in src/select_jet.cxx
.
The output files should be easy to read with h5py:
from h5py import File
file = File('the-output.h5') # <- load file
jets = file['jets'] # <- get jets dataset
# you can read in slices
slice = jets[:1000] # <- get the first thousand jets
# or select variables
pt = jets['pt'] # <- select the pt array
This step doesn't depend on ROOT, so it should be easy to install
everything you need via pip
.