JelleAalbers / blueice

Build Likelihoods Using Efficient Interpolations and monte-Carlo generated Events
BSD 3-Clause "New" or "Revised" License
9 stars 9 forks source link

Move shape parameter grids, interpolation to be per source #31

Open kdund opened 4 years ago

kdund commented 4 years ago

Currently, blueice instantiates a model grid in the anchor point grid spanned by the shape parameter variations from all sources. This extends to the pdf interpolation.

The pdfs are cached, and only loaded into memory once, so that the second problem poses a larger challenge than the first.

Proposed steps: 1) Create a wrapper "interpolator" that contains (and passes relevant parameters to) per-source interpolators in only the relevant shape directions for each 2) Consider modifying or removing the model layer, possible solutions: 2.1) Remove model layer completely, letting the likelihood call a collection of sources (possibly with a source_collection class that provides access to the sources.(similar to 2.2) 2.2) Change the model to be per physical model-- instantiate one model for ER, one for NR etc. and change "source" to be anchor_source or model_point 2.3) maintain current structure, while moving most of the functionality (interpolation etc) to be per-source.

kdund commented 4 years ago

New development branch start at f6bb6abe2a7e6643076246aa31942dd88ade53d8

kdund commented 4 years ago

TODO:

  1. Add simulation functionality?
  2. Investigate functionality on nt projection tests
  3. investigate any performance bonuses had
  4. Tests?
  5. Remove Model remnants.
kdund commented 4 years ago

Currently, this approach breaks some functionality from Model:

  1. multi-CPU source computation (but fewer sources need to be computed)
  2. The model simulate functionality-- since there is no object except the likelihood that contains all the sources, I will make a simulate method under the likelihood.