Lifetimes and mixing

Lifetimes and mixing#

Besides four-momenta, the decay tree contains the information that is needed to simulate decays in flight: production vertices, sampled lifetimes, and the decay mode. Neutral \(B\) mesons also mix, which shows up as an extra node in the tree.

Hide code cell content

import matplotlib.pyplot as plt
import numpy as np
from matplotlib_inline.backend_inline import set_matplotlib_formats

set_matplotlib_formats("svg")

Creating a Generator reads the decay and particle tables and initializes Pythia8, which prints a lot of log output. That output is hidden on this page.

from pyevtgen import Generator

generator = Generator(seed=0)
events = generator.generate("B0", n=20_000)

Lifetimes#

Each unstable particle has a sampled proper decay time lifetime, given as \(c\tau\) in mm. Its distribution is exponential with the mean \(c\tau\) from the particle table:

ctau = np.array([event.lifetime for event in events])
expected = generator.properties("B0").ctau
print(f"sampled mean: {ctau.mean():.4f} mm, table: {expected:.4f} mm")
sampled mean: 0.4597 mm, table: 0.4572 mm

Hide code cell content

fig, ax = plt.subplots(figsize=(6, 3))
ax.hist(ctau, bins=60, density=True, label="generated")
x = np.linspace(0, ctau.max(), num=200)
ax.plot(x, np.exp(-x / expected) / expected, label="exponential")
ax.set_xlabel(r"$c\tau$ [mm]")
ax.set_yscale("log")
ax.legend()
plt.show()
../_images/1b39e8c01fb5311a791b6526afbab317f604fcbc79d3d049beccdc78b20e66f8.svg

Production vertices#

The position of a particle is its production four-position \((ct, x, y, z)\) in mm. The daughters of a parent that decays at rest are produced at the same point in space, but later in time:

event = events[1]
print("parent:  ", event.position)
print("daughter:", event.daughters[0].position)
parent:   (0.0, 0.0, 0.0, 0.0)
daughter: (1.2771975199972874, 0.0, 0.0, 0.0)

For a parent in flight, the decay vertex moves along the direction of flight:

mass = generator.properties("B0").mass
p4 = [10.0, 0.0, 0.0, np.sqrt(10.0**2 - mass**2)]
event = generator.decay("B0", p4=p4)
event.daughters[0].position
(0.6893819328762598, 0.0, 0.0, 0.5854691544739364)

For many decays in flight, the decay length \(L\) follows an exponential distribution with mean \(\beta\gamma c\tau\):

Hide code cell content

flight_events = generator.generate("B0", n=20_000, p4=p4)
decay_length = np.array([e.daughters[0].position[3] for e in flight_events])
beta_gamma = p4[3] / mass

fig, ax = plt.subplots(figsize=(6, 3.2))
ax.hist(decay_length, bins=60, density=True, label="generated")
x = np.linspace(0, decay_length.max(), num=200)
mean = beta_gamma * expected
ax.plot(x, np.exp(-x / mean) / mean, label=rf"$\beta\gamma c\tau$ = {mean:.2f} mm")
ax.set_xlabel("decay length $L$ [mm]")
ax.set_yscale("log")
ax.legend()
plt.show()
../_images/277d066d903eac2b9f20a20e231e759472f53735988e7ca9915afa08152a88c1.svg

Decay modes#

decay_mode is the index of the decay channel that EvtGen selected from the decay table of the particle. For a \(D^+\), each index corresponds to one set of daughters:

from collections import Counter, defaultdict

d_events = generator.generate("D+", n=20_000)
channels = defaultdict(set)
for event in d_events:
    channels[event.decay_mode].add(" ".join(d.name for d in event.daughters))
for mode, count in Counter(e.decay_mode for e in d_events).most_common(4):
    print(f"{mode:>3}: {count:>5} x {sorted(channels[mode])}")
 32:  1893 x ['K- pi+ pi+']
 12:  1848 x ['anti-K0 mu+ nu_mu']
  1:  1805 x ['anti-K0 e+ nu_e']
 34:  1364 x ['K_L0 pi+ pi0']

Caution

EvtGen delegates many inclusive \(B\) meson decays to Pythia8 through the PYTHIA decay model. Pythia8 resets the selected channel when it replaces the daughters, so all of those decays report decay_mode 0, whatever their daughters are:

b_channels = {
    " ".join(d.name for d in event.daughters)
    for event in events
    if event.decay_mode == 0 and event.daughters[0].name != "anti-B0"
}
len(b_channels)
4834

Mixing#

With the default incoherent mixing (mixing_type=1, see Generator), a neutral \(B^0\) that oscillates before it decays gets a single daughter: an \(\bar{B}^0\) that then decays. The fraction of such events gives the time-integrated mixing probability \(\chi_d\), which is about 0.19:

mixed = [event for event in events if event.daughters[0].name == "anti-B0"]
len(mixed) / len(events)
0.18515
print([daughter.name for daughter in mixed[0].daughters])
['anti-B0']

The probability that a \(B^0\) has mixed depends on its decay time as \(\frac{1}{2}\left(1 - \cos\Delta m_d\, t\right)\), with the oscillation frequency \(\Delta m_d \approx 0.5065\,\mathrm{ps}^{-1}\). The sampled lifetimes and the mixing flag of each event reproduce this oscillation:

Hide code cell content

t = ctau / 0.299792458  # c*tau in mm to t in ps
is_mixed = np.array([event.daughters[0].name == "anti-B0" for event in events])
bins = np.linspace(0, 8, num=17)
centers = (bins[:-1] + bins[1:]) / 2
index = np.digitize(t, bins) - 1
fraction = np.array([is_mixed[index == i].mean() for i in range(len(centers))])
n_entries = np.array([np.count_nonzero(index == i) for i in range(len(centers))])
error = np.sqrt(fraction * (1 - fraction) / np.maximum(n_entries, 1))

fig, ax = plt.subplots(figsize=(6, 3.2))
ax.errorbar(centers, fraction, yerr=error, fmt="o", label="generated")
x = np.linspace(0, 8, num=200)
ax.plot(x, (1 - np.cos(0.5065 * x)) / 2, label=r"$\frac{1}{2}(1-\cos\Delta m_d t)$")
ax.set_xlabel("decay time $t$ [ps]")
ax.set_ylabel("fraction mixed")
ax.legend()
plt.show()
../_images/bcee1b3696e83451d2bc91a211546e7118bf5eecafbc98a001a301dbccd0b2a5.svg

Coherent mixing (mixing_type=0) is meant for \(B\) meson pairs from \(\Upsilon(4S)\) decays. Because a process can hold only one Generator, the mixing type has to be chosen when the generator is created.