forked from markrosslonergan/whipping_star
-
Notifications
You must be signed in to change notification settings - Fork 4
Example 2 Calculating a simple chi^2
markrosslonergan edited this page Sep 7, 2018
·
3 revisions
In this example we will use the covariance matrix and central values as calculated in Example 1, to calculate a simple chi^2 with and without systematic uncertainties included. If you haven't ran Example 1 and produced the required output you can do so here.
The code for example2 can be found example_2.cxx
The start is the same simple command line nonsense and we will ignore that. In the main program we are doing a few simple things.
- Loading up the computed central value histograms into an SBNspec with the aid of the xml.
- Repeating this but setting the
nu_uboone_nue_leesignalsubchannel to 0 (this will be our background only spectra) - Loading up the covariance matrix as calculated in example 1
- Scale the lee signal by an order of magnitude in each direction, calculating the chi^2 between this central value and the bkg central value at each point
- Make quick plot of it
./example2 --xml example.xml
There should 1 plot produced, EXAMPLE2_simple_scaling.pdf. Recall that this is an arbitrary toy model!