[[PageOutline(1-3,,pullout,unnumbered)]] = How to add a sample in NUISANCE = This is an informal step-by-step guide on how to add samples into the NUISANCE framework. For this tutorial I'll be adding the T2K CC1pi+ H2O data. The data comes from the [http://t2k-experiment.org/results/nd280data-numu-cc1pi-xs-on-h2o-2015/ T2K site] and [https://arxiv.org/abs/1605.07964 arxiv]. The data is supplied both in a ROOT file and a number of .csv files: I'll be using the ROOT file here. '''Versions:''' `NUISANCE v1r0`, `NEUT 5.3.6`, `arxiv 1605.07964v2.pdf` == Examining the data and choosing distributions == === Finding the neutrino flux and generating events === The first issue at hand is to find the flux for the experiment. If we don't have this (or its very difficult to find), we cant make a generator prediction---unless the measurement is a total cross-section without any phase space cuts. A quick search through the document finds it is documented in reference ![12]. It is also in our [wiki:ExperimentFlux flux list]. I then generate events in NEUT 5.3.6 with a suitable card-file, see our [wiki:HowToNeut NEUT guide] on how to do this. We need the correct target (water) and flux, and perform the model selections we want (e.g. Rein-Sehgal or Berger-Sehgal coherent model). The procedure is very similar for other generators too. Aim to generate around 1M events with all interaction modes turned on. This way we make sure to get all interaction modes into the topologically defined cross-section. We get a small amount of CCQE events which excite a pion from the outgoing nucleon interacting in the nucleus to kick out a pion, leading to a CCQE+1pi ~ CC1pi+ final state, which is signal for this particular sample. === Choosing a distribution === The T2K CC1pi+ H2O data release contains various distributions in FIG 4. In this tutorial I'll look at adding one kinematic distribution and one derived distribution: p_mu and E^{rec}_nu respectively. INSERT IMAGES In NUISANCE we try to add all available distributions from a publication. '''However''', some distributions will have detector effects "folded" into them (i.e. they will be raw detector-level data). We can only use these if there is some method which bring detector-level variables (e.g. p_mu seen in the detector) to truth-level variable (e.g. p_mu seen after correcting for the detector effects).