************************************************************************ Processing the private ntuple with a macro ************************************************************************ When the private ntuple is made and merged into a single root file, c++ macros, containing the variables of this root file, can be automatically generated using TSelector with the following commands. Setting up the root by: lsetup root root [0] TFile *f = TFile::Open("MYntuple.root") root [1] TTree *t = (TTree*) f->Get("tree") root [2] t->MakeSelector("MySelector") root [3] .!ls MySelector* MySelector.C MySelector.h more details can be found here. https://root.cern.ch/developing-tselector One important and final thing that needs to be manually set up in the header file is that 'TTreeReaderValue' with a specified type needs to be defined. An example is as below. TTreeReaderValue fSetNameOfVariable = {fReader, "VariableNameInNtuple"} see MySelector.h for more example. Then set up the outputfile name and define histograms in the header file that is generated. MySelector.C macros that you just generated and amended can be run with the following commands. It will make a root file as an output file containing the histograms. lsetup root root [0] TFile *f = TFile::Open("MYntuple.root") root [1] TTree *t = (TTree*) f->Get("tree") root [2] t->Process("MySelector.C") then the output root file of histograms is generated. ************************************************************************ Plotting histograms with python script ************************************************************************ After running the MySelector.C macros, to plot the histograms and save them in the format you want, such as eps format, python script can be useful. ROOT plotting functions are convertible in c++ and python (pyROOT). See py/template.py for an example.