Skip to content

Produce error envelopes for event rate spectra

Thomas Ham edited this page Jul 30, 2021 · 5 revisions

Produce event rate spectra with all systematic variations

Setup a configuration to point to your response functions and their corresponding parameter configurations along with any additional parameters in defined in covariance matrices.

Tweaking the nominal spectra according to the chosen parameters in VALOR

This is implemented on a detector-by-detector basis

valor-tweak_pdf_N \
  --config analysis/config.xml \ // This must include all systematic parameters you want to tweak
  --output tweaks_universes.root \
  --ntoys 1000 \
  --physics-hypothesis void

Calculating the variations of all parameters directly from the universes

Again, for each detector

valor_sbn-universe_variation_tweaks \
  --config analysis/config.xml \
  --input /path/to/universe/dst.root \
  --params all \ // See the application for the options
  --ntoys 1000 \
  --sample numuCCincl

Producing the envelope overlay

python $VALOR_SBN/macros/mock_data_challenge/draw_postfit_data_error_envelope.py \
  -c analysis/config.xml \
  -p universe_tweaks_file.root \
  -b valor_tweaks_file.root \
  -f root \
  -t tag \
  -e 1 \ // Experiment enum, SBND = 1 etc
  --plabel 'SBND universes #pm 1 #sigma' \
  --blabel "SBND VALOR #pm 1 #sigma"

Removing -b and --blabel arguments will allow you to plot only 1 envelope.

Producing ratio plots between universe and VALOR variations

Add the tweaks file paths to this macro and run

root -l -b -q $VALOR_SBN/macros/systematic_construction/plot_envelope_ratios.C

There are no arguments.

See here for some things to consider and/or try if your error coverage still leaves something to be desired.

Creating corresponding data products

Please see here for the creation of new dsts, universes or mock_data data products for distribution.

Clone this wiki locally