Skip to content

Run a Single Fit

bslater2 edited this page May 10, 2023 · 1 revision

Example script:

valor-run_fit \
   --config /sbnd/app/users/bslater/valor/VALOR-SBN/config/analysis/sbn_nue_prism_1_2020a1_1_universes_sbndonly_stat.xml \
   --physics-hypothesis eff_sterile_osc \
   --param-values-option prefit-errors \
   --osc-prior-file priors/void_priors.xml \
   --load-prior-from-file - \
   --fitter minuit+with_simplex_fallback \
   --mesg-thresholds verbosity.xml \
   --without-stat-fluct \
   --tag sbn_toy \
   --run 1 \
   --ntoymc 1 \
   --input-dm41sq         0.      \
   --fix-at-dm41sq        0.01    \
   --fix-dm41sq                   \
   --input-sinsq2thMuMu   0.      \
   --fix-at-sinsq2thMuMu  0.      \
   --fix-sinsq2thMuMu             \
   --input-sinsq2thMuE    0.      \
   --fix-at-sinsq2thMuE   0.00001 \
   --fix-sinsq2thMuE              \
   --input-sinsq2thEE     0.      \
   --fix-at-sinsq2thEE    0.      \

Using app VALOR-SDK/src/valor/Apps/run_fit.cxx

See https://github.com/VALOR-fit/VALOR-SBN/wiki/Produce-oscillation-sensitivity-plots for for running many fits on the grid

Argument Explanation

Arguments to note

--config: see below

--physics-hypothesis: oscillations (eff_sterile_osc) or not (void)

--tag: output file

--input-dm41sq, --fix-at-dm41sq, and --fix-dm41sq (and similar for other params): start value for fit, fit keeps value fixed at this value, and bool to tell fit to fix the value respectively.

--read-data: include if giving data in config/analysis file (default is generate)

Find argument options in .arg files, these are located in VALOR_SDK/config/apps/*.arg

Example

Line 105 of run_fit.cxx:

arg.Read(argc,argv,"$VALOR_FMWK/config/apps/run_fit.arg:$VALOR_FMWK/config/apps/seeds.arg:$VALOR_FMWK/config/apps/oscparams.arg");

There are 3 argument lists included here, run_fit.arg, seeds.arg, and oscparams.arg. Look at those for all options (or edit/add a new list to expand)

Configuration File Explanation

Load in --config argument

Each element is a different sample (eg different detector or PRISM bin)

Within each element there is:

  • General setup: detector name, beam name, chosen observable (Ereco), data and model classes (GSSFD and GSSFM in VALOR-SDK/src/valor/FitElements), and binning.
  • An associated config/mc file that points to the beam configuration, detector configuration, MC templates (dsts), modelist, binning (match to analysis/config), and splines (if including systematics).
  • When including data/mock data An associated config/data file that includes binning and the data dsts (and a bool to see what format data is in, currently will always be true for <using_dst_format>).
    • Currently updating GSSFD to include histograms (TH1Ds)/VALORArrays as input instead of just dsts, currently at testing stage.

Example

VALOR-SBN/config/analysis/sbn_numu_disapp_2020a1_1.xml for stat only

VALOR-SBN/config/analysis/sbn_numu_disapp_2020a1_03d1_1.xml for stat+syst

Systematics

<parameter_definitions>

Contains:

  • Names in different formats
  • Range the parameter is applied to (which part of Ereco spectrum)
  • Type (response, normalisation, ...) and Catagories (flux, interaction, modern, ...)
  • What configurations to apply to
  • Allowed variation away from nominal (in sigma)

Example

VALOR-SBN/config/params/sbn_pot_normalisation.xml or VALOR-SBN/config/params/sbn_interaction_parameters.xml

<systematics>

Different groups for each parameter matrix

Example

VALOR-SBN/config/parameter_matrices/SBNFluxResponseParams.xml

Clone this wiki locally