Feature #803

Updated by Knödlseder Jürgen about 11 years ago

The actual class interface is not really optimized for binned event analysis. The likelihood optimizer loops for example over all event bins, needing repeated evaluation of functions with the same data space values (e.g. energies, positions, etc.). Binned analysis generally benefits a lot from pre-computations, but the actual interfaces do not really help in doing pre-computations. At least, things are actually be overly complicated. The interface should thus be improved to easily support pre-computations.

One simple thing, that we may want to do in any case, is to move the likelihood computations from the @GObservations::optimizer@ class to the @GObservation@ class. For example, @GObservations::optimizer::poisson_unbinned@ should become the virtual method @GObservation::poisson_unbinned@. We should even develop a higher-level method @GObservation::loglikelihood@ (or similar) that computes for a given observation the log-likelihood. As each observations "knows" whether it is binned or unbinned, the method could then dispatch to the appropriate method.

This reorganization would have the advantage that instrument classes could implement their own likelihood computations, optimizing the computations for the specific data structure. There should always be virtual standard methods for Poisson and Gaussian statistics in @GObservation@, so that no additional implementation is needed. But the methods can be overloaded by more efficient instrument specific methods.

Back