NOTE: there is a detailed description on how to do this in the user guide.
In order to set up a time-dependent CP asymmetry fit, you need to be able to use a conditional PDF for the resolution function, and to also perform a simultaneous fit, splitting the data according to the flavor tag category.
The example cpfit_tagging.cc is an illustration of how to make a 2 component fit (signal+background) for the Δt distribution (where the per event error σ(Δt) is taken into account by the resolution function). The configuration file for this example is cpfit_tagging.txt. The model is constructed in the usual way for a simultaneous PDF with
AFitMaster master("cpfit_tagging.txt"); RooAbsPdf * pdf = master.getSimPdf();
In the example, the prototype data for the conditional variable σ(Δt) is generated
according to a Landau distribution, and the flavour tag category informaiton is generated
with dummy tagging fractions (for simplicity). Using this a sample of 10K events is generated,
and an asymmetry plot is made.
The time-dependent CP asymmetry parameters are signal_deltatS and signal_deltatC (see the datacard).
Fig 1: An example of the asymmetry obtained from this time-dependent PDF example.