= !NuWro Inputs = This page aims to outline how to use !NuWro to create a sample of interactions on your favourite target. We'll also outline how to feed this generated sample through the NUISANCE framework and get good results. The latest version of the !NuWro generator is setup to automatically save the predicted event rate and flux distributions for the generated events. This is everything NUISANCE needs to make properly normalised cross-section predictions with the standard !NuWro output. The latest version of !NuWro with recently developed reweight engine can be obtained from here: Note: If you would like to use events generated with an older version of !NuWro this is still possible. Please see: {{{ #!div class="important" Contact: [mailto:p.stowell@sheffield.ac.uk Patrick Stowell] }}} [[PageOutline(1-3,Wiki content,inline,numbered)]] = Downloading and building !NuWro = = Building NUISANCE with !NuWro support = If you have setup !NuWro correctly following the steps in the previous sections then the environmental variables NUWRO and PYTHIA6 should already be setup. If these are not, then please point them to the following destinations: {{{ export NUWRO=/path/to/nuwro/top/directory/ export PYTHIA6=/path/to/pythia6/lib/directory/ }}} Once these variables are pointing to a valid destination, enabling support for !NuWro is as simple as specifying it during the cmake build procedure: {{{ $ cmake -DUSE_NUWRO=1 ../nuisance/ $ make $ make install }}} For more details of the cmake build steps see BuildingTheCode. = Generate !NuWro Events for NUISANCE = = Loading !NuWro v12+ events into NUISANCE = NUISANCE's input handlers are setup to automatically load in the standard output of !NuWro v12 onwards. Once you have generated events the MC sample can be loaded in by specifying the "NUWRO" type in the NUISANCE sample input field. An example of this is shown in the following card file. '''nuwro_v12_comparison.card:''' {{{ #sample sample_id type:input_file ########################################## sample MiniBooNE_CCQE_XSec_1DQ2_nu NUWRO:/path/to/nuwro/events.root }}} '''nuwro_v12_comparison.card(without comments):''' {{{ sample MiniBooNE_CCQE_XSec_1DQ2_nu NUWRO:/path/to/nuwro/events.root }}} This comparison can be ran with nuiscomp with the following command: {{{ $ nuiscomp -c nuwro_v12_comparison.card -o nuisance_comparison_nuwro_v12.root }}} The output file (specified with '-o') will be a ROOT file containing a series of useful histograms that compare the !NuWro predictions to the MiniBooNE CCQE data. {{{ $ root nuisance_comparison_nuwro_v12.root $ root[0]: _file0->ls(); }}} '''MiniBooNE_CCQE_XSec_1DQ2_data:''' '''MiniBooNE_CCQE_XSec_1DQ2_MC:''' '''MiniBooNE_CCQE_XSec_1DQ2_MC_PDG:''' = Loading !NuWro ls(); }}}