21.4.5. Flavor tagging¶
How can we distinguish between a B0 and a ˉB0? This is not as simple as the case where we have a B+ vs a B− and can just consider the charge of the particles. Yet determining this “flavor” of the B meson is crucial to look into CP violation.
This is where the Flavor Tagger comes in. Used in an analysis, where we have reconstructed a signal Bsig, the Flavor Tagger looks at the ROE of the Bsig (i.e. at the Btag) and applies machine learning techniques (also called multivariate analysis) to determine the flavor of the Btag. In this lesson we will not train this model ourselves, but rather use pre-computed weights. So where do we get them?
Luckily, such sets of weights are contained in the conditions database. That means that we only need to use a specific global tag (if you forgot what that is, consult this page again: Conditions Database Overview).
Exercise
Add a line to your previous steering file that adds the
analysis_tools_release-04-02
global tag. For this you need to call the
prepend_globaltag
method of the basf2.conditions
object (which is an
instance of the ConditionsConfiguration
class).
Solution
Good! Now we have the weights and we have already created the ROE, so we can start right away!
Exercise
Call the flavorTagger.flavorTagger
function (you need to specify your
path and your particle list).
Solution
Exercise
Add the the
flavorTagger.flavor_tagging
variable collection to your output
variables
Solution
Exercise
Run your steering file!
Solution
Good! Now let’s talk about the output of the flavor tagger. This is the value q⋅r, where q=−1 corresponds to a ˉB0 and q=+1 to B0. r is called the dilution factor. It’s 0 if the algorighm can’t decide between both options for q and 1 if the algorithm is certain about it’s decision.
The variable FBDT_qrCombined
is the q⋅r result of one of the
models of the Flavor Tagger (a fast boosted decision tree).
It can also be NaN
to signal that not a single charged
track in the ROE was found, so that the algorithm can’t work.
Note
In releases before release-05, a value of ±2 was used instead of
NaN
.
Part of the variables you just added was also qrMC
for the “true” (MC level) flavor of the Btag.
It can take the numbers
±1, as well as 0 (no flavor defined in the MC) and ±2
(some problems with MC matching in the ROE).
That means that we can check how well our flavor tagger performed by comparing
it to FBDT_qrCombined
!
Exercise (optional)
Plot a histogram of FBDT_qrCombined
and qrMC
.
Exercise
Only consider candidates with clearly defined MC level flavor tag.
Compare the output of qrMC
to that of FBDT_qrCombined
.
Hint
Solution
Key points
The flavor tagger is used to discriminate between B0tag and ˉB0tag
The output is of the form ±1 times the confidence between 0 and 1.
Stuck? We can help!
Improving things!
Quick feedback!
Authors of this lesson
Kilian Lieret