Namespaces | |
namespace | rf613_global_observables |
This tutorial explains the concept of global observables in RooFit, and showcases how their values can be stored either in the model or in the dataset.
Note: in this tutorial, we are multiplying the likelihood with an additional likelihood to constrain the parameters with auxiliary measurements. This is different from the rf604_constraints
tutorial, where the likelihood is multiplied with a Bayesian prior to constrain the parameters.
With RooFit, you usually optimize some model parameters p
to maximize the likelihood L
given the per-event or per-bin ## observations x
:
\[ L( x | p ) \]
Often, the parameters are constrained with some prior likelihood C
, which doesn't depend on the observables x
:
\[ L'( x | p ) = L( x | p ) * C( p ) \]
Usually, these constraint terms depend on some auxiliary measurements of other observables g
. The constraint term is then the likelihood of the so-called global observables:
\[ L'( x | p ) = L( x | p ) * C( g | p ) \]
For example, think of a model where the true luminosity lumi
is a nuisance parameter that is constrained by an auxiliary measurement lumi_obs
with uncertainty lumi_obs_sigma
:
\[ L'(data | mu, lumi) = L(data | mu, lumi) * Gauss(lumi_obs | lumi, lumi_obs_sigma) \]
As a Gaussian is symmetric under exchange of the observable and the mean parameter, you can also sometimes find this equivalent but less conventional formulation for Gaussian constraints:
\[ L'(data | mu, lumi) = L(data | mu, lumi) * Gauss(lumi | lumi_obs, lumi_obs_sigma) \]
If you wanted to constrain a parameter that represents event counts, you would use a Poissonian constraint, e.g.:
\[ L'(data | mu, count) = L(data | mu, count) * Poisson(count_obs | count) \]
Unlike a Guassian, a Poissonian is not symmetric under exchange of the observable and the parameter, so here you need to be more careful to follow the global observable prescription correctly.
Definition in file rf613_global_observables.py.