- ROOT (developed with 6.22)
- Awkward Array
- uproot
- Python 3
To use, clone repository.
git clone https://github.com/jsensenig/charge_exchange_ana.gitand initialize the pybind11 C++ to python bindings submodule
with
git submodule update --init build and install the python bindings with
cd extern && python setup.py install
The expected input is a flat ROOT
tree generated by the PDSP_Analyzer LArSoft module. These
file(s) can be specified in a text file with one file and
its path per line. The path to this file can be specified in
run_cex_selection.py with the variable files and the
associated tree name with tree_name. Then to run do,
python run_cex_selection.pyThe program will collect all cut classes in cex_analysis/
directory and build the selection steps, in order, as
specified in the main.json configuration file. The
selection results, efficiency and purity, for each step
will be printed to screen and histograms saved in
result_file.root.
run_cex_selection.py
- Main file to run analysis. Number of threads to use can
be set with
num_workers.
cex_analysis/*cut.py
- The classes which perform the cuts (selections) on the data. There should be one cut per class.
config/
- All the configurration for the cuts and plots. The general
configuration parameters are found in
config/main.json.
extern/
- It includes a submodule to
pybind11C++ to python binding header files. Inextern/src/are the C++ source files for the custom python bindings.
To add a cut follow the form in the existing cut classes.
The class inherits from the EventSelectionBase class which
outlines the form of the class and handles the configuration
parsing.