Reproducing nus Ana01 results » History » Version 9

« Previous - Version 9/18 (diff) - Next » - Current version
Gareth Kafka, 08/18/2016 10:54 AM

Reproducing nus Ana01 results

Work in progress

Set up the appropriate release

Setup the second analysis tag (that nue and numu also use - unfortunate naming scheme!). Note this is Ana01 for nus but SecondAna for nue/numu...

setup_nova -r R16-07-15-secondana.a -b maxopt

Producing ND spectra

There ND spectra results were all data/MC comparisons, either with or without systematics included.
The basic data/MC comparisons just take a Spectrum object for the data and CheatDecomp for the MC.
The scripts DataMCLoad.C and DataMCAna.C make all of these comparisons, for each level of the analysis cut flow.
As a result, they require the full CAFs and take many hours to complete. DataMCLoad.C should be run first;
this makes and saves the CAFAna objects to the file $NOVA_ANA/steriles/Ana01/DataMC.root and takes nearly all of the running time.
DataMCAna.C is run next and creates and saves the stylized plots to $NOVA_ANA/steriles/Ana01/DataMCAna.root.

The plots with systematics included are made in the scripts NDDataMCSystBandLoad.C and NDDataMCSystBandAna.C.
The basic idea is to create two vectors of Spectrum objects, one that shifts a given systematic up 1 sigma, the other down 1 sigma.
The systematic band adds in quadrature all of the differences from nominal (and looks for tricky corner cases like when both +/-1 sigma shifts shift a bin the same direction).
Before running NDDataMCSystBandLoad.C, there is a line in CAFAna/Systs/NusSysts.cxx that must be commented out (this requires a make CAFAna.all).
The specific line is mentioned in a comment at the top of the macro. The macro itself takes about an hour to run,
creating and saving the Spectrum objects to $NOVA_ANA/steriles/Ana01/NDDataMCSystBand.root.
NDDataMCSystBandAna.C is run next and creates and saves the stylized plots to $NOVA_ANA/steriles/Ana01/NDDataMCSystBandAna.root.
Don't forget to recomment the line in CAFAna/Systs/NusSysts.cxx, and rebuild CAFAna!

Producing the FD Prediction objects

The NC prediction object is PredictionSterile, compatible with sterile neutrino oscillations.
It requires one to decompose the ND spectra. We use ProportionalDecomp to do that making a separate one for numu components that applies the kNumuND cut. Otherwise we apply the kNusND cut.
One then needs to extrapolate using ModularExtrapSterile and in particular the member NCDisappearance to extrapolate for the NC analysis. This is all done by period; period 1, period 2 and epoch 3b as one prediction and epoch3c as a second. Subsequently the two separate PredictionSterile objects are combined (scaled appropriately by POT) into a PredictionCombinePeriods object.
The prediction objects are saved in the file $NOVA_ANA/steriles/Ana01/nus_ana01_prediction.root.

In order to recreate this file just run:

cafe -bq $SRT_PUBLIC_CONTEXT/CAFAna/nus/BlessedPlotsLoadByPeriod.C <output_filename>.root

and wait a few hours (specify your <output_filename> with the extension .root as indicated).

If you want to make the Prediction object with systematics included then that differs slightly by using PredictionInterp and saving the individual predictions.
These predictions are what we used for the final systematics-included contours.

To create that prediction run:

cafe -bq $SRT_PUBLIC_CONTEXT/CAFAna/nus/MakeNusPredictionSystsAna01.C <output_filename>.root

The prediction objects for the final nus results are saved in the file $NOVA_ANA/steriles/Ana01/nus_ana01_prediction.root.
This contains the predictions for the two periods, nus_pred_p1p2e3b and nus_pred_e3c.

Producing the FD cosmic and data spectra

The FD cosmic and data spectra are just Spectrum objects. To make the cosmic prediction, use either the blind NuMI dataset,
fnameblind_concat, found in NuSLoadMacroDefs.h, or the unblind NuMI dataset, fnamefardata_unblind, found in Ana01/Ana01Data.h.
Apply the cut kInTimingSideband with any other cuts (i.e., kNusFD) to only select out of time data (still necessary even with the blind dataset!),
and apply the weight kTimingSidebandWeight to automatically scale the timing sideband to the in spill livetime.

To make the in time data prediction, apply the cut kInBeamSpill with any other cuts to only select in time data. No weight is needed.

nus_ana01_box_opening_macro.C makes in-time and out-of-time spectra for box opening. ETA 5 min

cafe -bq $SRT_PUBLIC_CONTEXT/CAFAna/nus/nus_ana01_box_opening.C 

The output file, fout_nus_ana01_box_opening_restricted.root, contains a series of spectra named spec_nus_{cvn,time,slctime,cale}_{numi,cosmic}. Of special interest for the next steps in the analysis are spec_nus_cale_numi and spec_nus_cale_cosmic. This macro will also produce 2 text files (numi or cosmic selected events) with the values of &kRun, &kSubrun, &kEvt, &kSlice, &kSliceMeanTime, &kCVNnc, &kCaloE for the selected events.

TODO: Caveat is that there's a tweak to MakeText{Event}ListFile functions in CAFAna/Core that I needed for a vector<std::string> wildcard input. Need to commit!

You can find copies of these outputs in /nova/ana/steriles/Ana01/evds/.

Producing variable distributions of FD data

Data/MC distributions are made for each variable used in the cut flow. These are made in two sets of scripts.
Ana01/AnaResultsLoad.C and Ana01/AnaResultsSpectra.C make distributions with the full cut flow.
Ana01/AnaResultsLoad.C is run first and creates and saves the necessary Prediction and cosmic and data Spectrum objects.
It takes about an hour to run and takes a root filename as an input argument:

cafe -bq $SRT_PUBLIC_CONTEXT/CAFAna/nus/Ana01/AnaResultsLoad.C+ <filename>.root

where <filename>.root is the file that holds the CAFAna objects.
Ana01/AnaResultsSpectra.C is run next and make the stylized plots. The path coded in this macro should match the path to <filename>.root

Ana01/ExtendedAxesLoad.h and Ana01/ExtendedAxesAna.h make distributions of the same variables as N-1 plots.
That is, the CVN NC classifier distribution does not apply a cut on CVN, and similar for each other variable.
Running these macros is exactly the same as above, but replacing AnaResultsLoad.C with ExtendedAxesLoad.C,
and then replacing AnaResultsSpectra.C with ExtendedAxesAna.C.

Plots that show the vertex distributions of data events inside the detector are made in Ana01/DataVtxDistributionLoad.C and Ana01/DataVtxDistributionLoad.C
These are run the same was as above (replacing the macro name as appropriate), but only have to load data files, so takes a much shorter time of 15 minutes to run.

Producing the final 1D and 2D contours

Taking the FD cosmic and data spectra and the prediction file, the 1D/2D fits are produced by running:

cafe -bq $SRT_PUBLIC_CONTEXT/CAFAna/nus/PlotNusSensAna01.C <input_filename>.root

where <input_filename>.root is the file that holds the prediction objects.
The macro is already set up to read in the cosmic and numi data spectra.
It will produce an output file called nus_ana01_results_final.root with stats-only and systs 1D Slices for the sterile mixing angles as well as 2D contours.

Producing final 2D contour w/ MINOS comparison

Run the following:

cafe -bq NusContoursPlusMINOS.C true

Passing value true includes the MINOS 2011 2D contour for t24 vs. t34.
This will then produce the 2D contour for the analysis plus the 2D sensitivity and compare to MINOS contour.

Event list and event displays