nuisance is hosted by Hepforge, IPPP Durham
NUISANCE

Flat trees in NUISANCE

NUISANCE has the ability to convert generated events into useful input-agnostic flat-trees. Using this, you can generate events with GENIE, NuWro, NEUT and GiBUU and use the same simple TTree analysis with identical branches for the generators.

We also gave a tutorial on this at the Pittsburgh Tensions workshop in 2019, which you can find here.

You can generate your own flat-trees using the nuisflat executable, which takes -i GENERATOR:FILE as input, where GENERATOR is your generator in upper case (e.g. GENIE, NUWRO, NEUT, GIBUU). You provide the output file name by -o outputfile.root where outputfile.root is your output file.

Output branches in flat tree

To print the branches, simply do FlatTree_VARS->Print().

Most flat-tree branches are straightforwardly named, e.g. Mode follows the interaction mode convention here. The TTree is named FlatTree_VARS.

Event characteristics

Characterists such as Q2, W, Enu are all available in the trees.

Particle information

Particle information is also available in the E, px, py, pz, pdg branches. These are all final state particles. Depending on how your flat-trees were generated, they may also include vertex and initial state information in the _init branch for initial state particles, and the _vert branch for the vertex (primary, before final state interactions) particles.

Signal definitions

You can use signal definitions to draw events that would only pass certain selections. You can either make your own using the particle information provided in the flat-trees and outlined above, or you can use our pre-calculated ones.

The signal definition flags are all prepended by flag, for instance flagCC0pi is the CC0pi flag (charged current event with 0 pions in the final state).

Scaling to a cross-section

NUISANCE also provide the fScaleFactor which scales your flat-tree to a cross-section, enabling full comparisons for multiple generators and not just shape only comparisons.

Weighting the distribution

You can also evaluate the effect of systematics on the distributions by including reweighting engines in NUISANCE and load the parameters in a config file. You provide the config file by -c config.xml where config.xml is your config file.

The format of parameters is the usual in NUISANCE which you can find details of in a different tutorial. In a nutshell, you do

<nuisance> <parameter name="MaCCQE" nominal="1.5" type="genie_parameter"/> </nuisance>

where the nominal field contains the parameter value you want to reweight to. Be careful to consistently use units here! For instance, 1.5 probably does not mean MAQE=1.5 GeV/c2, but instead means a 1.5 sigma variation of MAQE, defined by GENIE's internal uncertainties. Here be dragons, so be careful and ask questions.

Source code for the curious hacker

The code used to make flat-trees is very simple, and just defines variables and methods to get them, as you might expect. All is done in the MCStudies/GenericFlux_Vectors.cpp which you can find here on our github. Feel free to add your own variables, and if you think they're extra useful just put in a pull request and we'll review it!