Skip to content
Chris Backhouse edited this page Nov 18, 2020 · 16 revisions

NB: this page currently discusses the feature/cafana_srslice branch. This will be merged into develop soon.

h1. Slice-based and spill-based analysis

CAFMaker produces one StandardRecord object per art::Event, i.e. one per beam spill / readout window.

However, most often you are interested in the properties of neutrino candidates, which are best represented as slices, of which there can be multiple per spill.

CAFAna provides SpillVar for when you want to fill one entry into your spectrum for each spill that passes certain cuts. It also provides SliceVar for when you want to fill your spectrum with a property of each slice that passes cuts. These are both, in fact, instances of the _Var template specialized over different parts of the StandardRecord structure, so they provide all the same functionality as each other.

Likewise, for selecting spills/slices there are SpillCut and SliceCut. Since many slice-based analyses need to also apply some quality cut on the spill, Spectrum provides several options as constructors:

  • SpillCut + SpillVar
  • SliceCut + SliceVar -- in this case SpectrumLoader loops through each slice, checks it against the cut, and then evaluates the var
  • SpillCut + SliceCut + SliceVar -- in this case SpectrumLoader checks each StandardRecord against the spill cut before looping through the slices as above

h1. MultiVar

On occasion you may need to fill multiple values into your spectrum per spill or slice. For example filling one entry per track, or one entry per CRT hit. Or perhaps you have some complex requirements that can't be factorized as SpillCut+SliceCut. In this case you can use MultiVar, which behaves like Var but enables returning multiple values per slice. Or SpillMultiVar which returns multiple values per spill.

Note that if you want to make a selection of a subset of tracks/hits etc that can't be expressed with Cuts in this case. You must put the logic in your MultiVar and either fill into the output vector or not as appropriate.

The special-casing of slices, where looping over them and cutting on them is a built-in feature of SpectrumLoader is a little clunky. Ideally one could have, say, TrackCuts. This is in the works.

h1. FlatCAFs

TODO

h1. Data samples

TODO

Clone this wiki locally