An example of a charged current (CC) inclusive cross section analysis using the MINERvA Analysis Toolkit (MAT). Starts from the official MINERvA data preservation "anaTuple" .root files, produced by MasterAnaDev (MAD), and produces all histograms needed to extract a cross section. The basic tutorial does not attempt to constrain backgrounds with sidebands. Based on Ben Messerly's examples of using the MINERvA Analysis Toolkit and work by Mehreen Sultana on her thesis analysis.
- Install dependencies
- Make a working directory. Mine is called
MINERvA101_2021/
- Download the complete source from MinervaExpt:
git clone https://github.com/MinervaExpt/MAT_IncPions.git src #Makes a src subdirectory for you
- Make a build directory:
mkdir opt && cd opt && mkdir build && cd build #opt for optimized build as opposed to debug build
- Run cmake to generate a build system:
cmake ../../src -DCMAKE_INSTALL_PREFIX=`pwd`/.. -DCMAKE_BUILD_TYPE=Release
- Compile and install:
make install
For debugging, produce a debug
build by creating a second build directory and replacing step 5 with: cmake ../../src -DCMAKE_INSTALL_PREFIX=`pwd`/.. -DCMAKE_BUILD_TYPE=Debug
. This will turn on assert()
s and include debug symbols that gdb
and valgrind
use to tell you line numbers of memory errors. You probably want to rebuild each dependency in debug mode too to maximize helpfulness of the debugger.
TODO
- git: version control system. You probably already have this
- CMake 2.8: build system generator for lots of operating systems. You probably already have this
- ROOT: object-oriented toolkit for high energy physics analysis. Make sure to enable at least xrootd, kerberos, and Minuit for this tutorial. Already installed on MINERvA GPVMs
- PlotUtils: the MINERvA Analysis Toolkit and associated systematics tools (TODO: via github)
- UnfoldUtils: MINERvA's fork of RooUnfold with a compatibility layer for embedding systematics in histograms and MINERvA-specific systematics tweaks (TODO: via github)
- MParamFiles: additional reweighting and calibration parameters for MINERvA systematics
TODO: Write an ExternalProject_add()
-based installer