An observable is an experimentally measurable and theoretically computable quantity that can optionally depend on one or more parameters (e.g. kinematic quantities like $q^2$). Defining a new observable in flavio requires
Observable
(naming the observable) and
Prediction
(linking the name to the funtion.)For illustration, imagine we want to define an observable that just coincides
with the $B^0$ meson mass (which is set by the parameter
m_B0
).
where m_B0-obs
is the string name we gave to the observable.
Note how the function always has at least two arguments: the first is an instance
of flavio.WilsonCoefficients
, the second a parameter dictionary. Of course
this example is not very meaningful.
In practice, the function will contain all the (possibly complicated)
physics and might be split to a separate file (or several files).
While the code will work without it, metadata like a TeX name and description should be added to ease documentation. Extending the toy example above, this could be done via
Note that when using TeX code in strings, you should enclose the string in
r"..."
, so backslashes and other characters are interpreted literally and
not as escape characters.
When the observable depends on arguments (rather than being just a single number),
these arguments must appear in the prediction function and they have to be
passed to the observable instance. A toy example with an observable depending
on the arguments a
and b
: