← Back to research
LHCbFlavour physicsMachine learningStudent project

Hunting for a forbidden decay

A summer at IFJ PAN in Kraków, searching LHCb data for Λc+→p e−μ+\Lambda_c^+ \to p\,e^-\mu^+, a decay the Standard Model says should not happen.

Paolo Minhas with Timur Knyazev · supervised by Prof. Dr hab. Mariusz Witek · Summer Particle Physics School, July 2025

675 → 18
variables per candidate, then kept
1,727
simulated signal events
0.246
BDT cut chosen by Punzi
≈ 2.8 × 10⁻⁸
90% CL limit, final slides

01The question

Why is there more matter than antimatter? One ingredient is CP violation, a small asymmetry between matter and antimatter. Another idea is that the three charged leptons (electron, muon, tau) might not be strictly kept apart. If a muon could turn into an electron, that would be a new source of the imbalance, and a hint of physics beyond the Standard Model.

In the Standard Model, a decay that changes lepton flavour without neutrinos to carry it away is vanishingly rare: for μ→eγ\mu \to e\gamma the branching ratio is of order 10−5410^{-54}. But in the seesaw mechanism, which explains the tiny neutrino masses by adding very heavy right-handed neutrinos, these effects can be large enough to see. One place they could show up is the charmed-baryon decay Λc+→p e−μ+\Lambda_c^+ \to p\,e^-\mu^+.

Interactive

Which conservation laws does a decay break?

Pick a decay. The table adds up each quantity before and after. Everything is computed from a small particle table, nothing is typed in by hand.

This project's signal channel.

QuantityBeforeAfterKept?
Electric charge+1+1yes
Baryon number+1+1yes
Electron-flavour number0+1no
Muon-flavour number0-1no

This decay changes lepton flavour. Total lepton number (electron plus muon) still adds up: one flavour appears and the other disappears.

In plain English

Think of electron-ness and muon-ness as two separate tallies that, as far as we know, only change through neutrino oscillations. The decay we search for would move one point from the muon tally to the electron tally with no neutrino in sight. Seeing even a few such events would be new physics.

Lepton flavour is not a sacred law: neutrino oscillations already break it, and my notes record the answer I was given when Timur asked about it: the conservation of total lepton number is “almost a coincidence”, not a rule. The method here follows the 2023 PhD thesis of Dr Maciej Dudek (Kraków), who searched for Λc+→pμ+μ−\Lambda_c^+ \to p\mu^+\mu^-. Our decay swaps the muon pair for an electron and a muon. The previous limit on this channel, as quoted on our slides from the PDG, is 1.9×10−51.9\times10^{-5}.

02The data

LHCb sees collisions up to 40 million times a second, far more than can be stored. A trigger decides in real time what to keep, in three layers: one in hardware, two in software. By the time the data reaches an analyst it has already been thinned by orders of magnitude, and my notes record that cuts on top of that decide whether any signal is visible at all.

Interactive

How much data survives the trigger?

Bar lengths are on a log scale. Click a stage. The rates are the ones quoted in my notes.

Proton bunches cross at up to 40 million times a second. Far too much to write to disk.
This step keeps
everything
Cumulative
1 in 1
Rate left
up to 40 MHz

My meeting note says the trigger reduces the data by “about a factor of 1000”; the rates in the write-up multiply out to about 1 in 3,200. Both are rough.

What I worked with was ntuples: ROOT files in which each candidate (a proton, an electron and a muon that might have come from one Λc decay) has 675 measured variables attached. There are two samples. The signal is Monte Carlo, a simulation of the decay passing through the detector: 1,727 events. The background is real LHCb data, 214,977 candidates, almost all unrelated tracks that happen to look a little like the decay.

Interactive

From two files to a trained model

1,727 simulated signal
214,977 real-data candidates

The signal is Monte Carlo: a computer simulation of the decay passing through the detector. The background is real LHCb data, which is almost all unrelated tracks that happen to look a bit like a Λc decay. Each candidate comes with 675 variables.

Signal share of the training table2.1%

Numbers: the 1,727 / 214,977 / 675 come from the final slides; the 79,128, 80,855, 56,598 and 24,257 come from the final training log in the repo README. The notes do not say how many of the 214,977 the mass cut removes, so I have not drawn that step as a measured drop. The code comment says the cut is at 2300 but the code uses 2310.

03The plan

Six steps, each handing a cleaner sample to the next:

  1. 1
    Train a classifier

    A boosted decision tree learns to score every candidate between 0 (looks like background) and 1 (looks like signal).

  2. 2
    Choose where to cut

    Punzi's figure of merit picks the score threshold with the best sensitivity.

  3. 3
    Fit the mass

    Fit the invariant-mass spectrum of what survives with a signal shape taken from simulation.

  4. 4
    Do the same on a known decay

    Repeat for Λc⁺ → p φ(→ μ⁺μ⁻), a well-measured reference channel.

  5. 5
    Set a limit with CLs

    With no clear excess, ask how large a signal the data can rule out at 90% confidence.

  6. 6
    Convert to a branching fraction

    Compare with the reference channel so most detector effects cancel.

04Teaching a classifier to spot the signal

A single cut on one variable throws away signal. A classifier combines many weak hints: a decay that flew a plausible distance, whose tracks fit one vertex, whose proton looks like a proton, and which sits alone rather than in a spray of other tracks. A boosted decision tree does this by building lots of small trees, each one trying to fix what the previous ones got wrong.

I came to it the long way round. The first attempt was a ROOT macro using TMVA, which needs non-finite values removed before it will run. The second was scikit-learn’s gradient boosting in Python: my first version scored a test AUC of 0.855, and after tuning it reached 0.894 (shown below). The third, which I kept, was XGBoost, with a preliminary model to cut the list of variables from 36 to 18.

Interactive

The 18 variables the model kept

Out of 36 candidate variables, a preliminary model kept the 18 whose importance was above the median. They fall into six families. The one-line meanings are my plain-English reading of the variable names, not definitions from the LHCb software.

Lc_IPCHI2_OWNPV

How badly the Λc's path misses the primary collision point (a χ² of its impact parameter).

How good is it? ROC curves and AUC

A ROC curve plots how much real signal you keep against how much background sneaks through, as you slide the cut. A model that guesses lies on the diagonal (AUC 0.5); a perfect one hugs the top left (AUC 1). The AUC is also the chance that a random signal event scores higher than a random background event.

scikit-learn gradient boosting: training AUC 0.922, test AUC 0.894. Notes, p. 12 (Mon 21 Jul).
XGBoost: training AUC 0.925, test AUC 0.892. Notes, p. 12 (Mon 21 Jul).

The two algorithms ended up close on AUC, but their scores look different: gradient boosting piled almost everything at 0 or 1, while XGBoost spread them out, which gives a more nuanced ranking to cut on.

The gradient-boosting scores pile up at 0 and 1: confident, and so not very nuanced. Notes, p. 12 (Mon 21 Jul).
XGBoost scores are spread more evenly, especially for background. Notes, p. 12 (Mon 21 Jul).

Overtraining, on a toy you can break

The enemy is overtraining: a model with enough trees and depth can memorise its training events perfectly and then fail on new ones. The sign is a gap between the AUC on the training half and on the held-out half. You can reproduce the effect below. The data is invented, but the behaviour is the same as in my real runs.

Interactive

Train a boosted decision tree yourself

A small gradient-boosted tree model, running in your browser on invented data with seven variables (three weakly informative, four noise). It is a toy: it does not reproduce the LHCb numbers, but it behaves the way my real model did.

Training the model…

05Choosing the cut

The classifier gives each candidate a score. Where to cut? Cut tight and you keep little signal but almost no background; cut loose and the opposite. A search needs a number that balances them without knowing the signal rate in advance, since that is what we are trying to find out. Punzi’s figure of merit (2003) does exactly that:

FoM(c)  =  εsig(c)nσ2+B(c)\mathrm{FoM}(c) \;=\; \frac{\varepsilon_{\text{sig}}(c)}{\tfrac{n_\sigma}{2} + \sqrt{B(c)}}

Here cc is the cut on the BDT score, εsig\varepsilon_{\text{sig}} is the fraction of signal that survives it, BB is the number of background events that survive, and nσn_\sigma is the significance you want (5 in my code). You compute the number at every possible cut and pick the maximum. A healthy plot has a gentle hill in the middle. A sharp spike at the far right is a warning.

Signal efficiency left after a cut at each BDT value. Repo results folder (eff_punzi.png).
Background left after a cut at each BDT value. Repo results folder (bkg_punzi.png).
The Punzi figure of merit from the ROOT macro, built from the two curves above. Repo results folder (fom_punzi.png).

The real plots

A week chasing a spike

These are the actual Punzi plots from my notes, in the order I made them. Step through to see what changed and why.

The first Punzi plot: a razor-sharp maximum at a BDT cut of 0.993. Notes, p. 14 (Wed 23 Jul).

A peak that is too good

The first Punzi plot rose steadily and then spiked at a cut of 0.993. Prof. Witek called the maximum extremely high and unrealistic. A healthy plot has a gentle peak in the middle, around 0.7 or 0.8. I tried changing the formula and checking the efficiencies, but the formula was not the problem.

Punzi significance against BDT cut, rising to a very sharp peak at 0.993

The overtraining behind it

Fixing the data was only part of it. On 24 Jul Prof. Witek listed the likely culprits: significant overtraining, an extra cut below 2300 in the mass, and the wrong data file. My script set far more options than his, which mostly used the library defaults with a depth of 3. On 28 Jul I compared the two line by line, moved to the simpler settings, then put my extras back one at a time: subsampling alone gave a broad maximum, but class weighting alone brought the spike straight back. The table shows the three versions:

SettingMy first modelProf. Witek’s (library defaults, depth 3)Final
Trees400default100
Max depth333
Learning rate0.1default0.1
Min child weight10defaultdefault (see note)
Subsample0.5defaultoff
Class weightingonnot usedoff
Overtrained model (400 trees, subsample 0.5, class weighting): training AUC 0.963, test AUC 0.870. Notes, p. 18 (Fri 25 Jul).
Final settings: training AUC 0.922, test AUC 0.864. A much smaller gap. Notes, p. 22 (Mon 28 Jul).

The final model gave an optimal cut of 0.2456 and a maximum Punzi value of 0.0203. The same pipeline run on the muon reference channel looked very different, with an optimum at 0.882 and test AUC of 0.985. The notes call those plots excessively overtrained and say they were taken to that day’s meeting; they do not record the outcome.

The same pipeline on the muon reference channel: a different shape again (optimum 0.882). Notes, p. 24 (Wed 30 Jul).
Reference-channel model: training AUC 0.988, test AUC 0.985. The notes read the reference-channel plots as overtrained. Repository results folder (roc-ref.png).
Final model: how the scores spread for background (class 0) and signal simulation (class 1), train vs test. Notes, p. 22 (Mon 28 Jul).

06Fitting the mass

Once the cut is applied, what is left is a list of candidates, each with a reconstructed invariant mass. A real Λc⁺ decay reconstructs at its mass, 2286.46 MeV/c², so a signal would appear as a small bump there on top of a smooth falling background. The fit has three ingredients.

  • Signal shape from simulation: a Crystal Ball (a Gaussian core with a long tail on one side, from energy lost in the detector) plus a wide Gaussian, fitted to the simulated signal after selection.
  • Smooth background: an exponential for the combinatorial background of unrelated tracks.
  • A fake peak: the macro includes a second component for Λc+→pπ+π−\Lambda_c^+ \to p\pi^+\pi^-, a real decay that can mimic the signal if the pions are mistaken for leptons.
The signal shape from simulation: a Crystal Ball plus a wide Gaussian, fitted to the Monte Carlo after selection. Repo results folder (SignalShapeCB_Gauss.png).
Crystal Ball shape fitted to the reference channel. Repo results folder (RefShapeCB.png).

The first RooFit run (22 Jul) was messy: some of the shape fits worked and some missed the data entirely. Getting zfit to run took three attempts across two days, each blocked by clashing Python packages, before I fell back on the C++ ROOT macro for the final plots.

First RooFit run on 22 Jul: the signal-shape fit to simulation works here. Notes, p. 13 (Tue 22 Jul).
...and here it does not: the fit curve misses the peak. The notes say some plots did not work as planned. Notes, p. 13 (Tue 22 Jul).

Interactive

How big must a signal be to show up?

A toy spectrum shaped like my fit: a smooth falling background plus a bump from Λc → pππ, which fakes a nearby peak. Dial in a signal at the Λc mass (2286.46 MeV/c²). The points are random numbers, not LHCb data.

22002250230023502400m(p e μ) [MeV/c²]640

Black: toy data. Solid blue: total. Dashed blue: background (exponential plus pππ). Orange dotted: signal. Shaded band: ±15 MeV/c² window around the Λc mass.

Signal in window
0
Background in window
256
Counting significance
0.0σ

Significance is below 3σ: no significant signal, so you quote an upper limit.

The repo’s results folder has the final mass fits. The README summarises them as a peak of around 2σ: enough to tighten the constraint on the branching fraction, nowhere near enough to claim new physics. By the notes’ own scheme (above 5σ is a signal, 3σ to 5σ is evidence, below 3σ you give an upper limit), that makes it an upper limit.

Invariant-mass fit of the p e μ candidates with signal, p π π and combinatorial components. Repo results folder (Lc2pemu_mass.png).
The reference channel: a clean Λc peak on a flat background. Repo results folder (Lc2pmumu_data.png).

07Turning “nothing clear” into a limit

When the data show no significant excess, you cannot just say “nothing there”. You ask a better question: how large could the signal be and still be compatible with what we see? The CLs method answers it. Scan a range of hypothetical signal strengths; for each, work out CLs; the largest strength for which CLs stays below 0.10 is the upper limit at 90% confidence.

CLs as a function of the signal to reference branching-fraction ratio, with observed and expected curves and the ±1σ and ±2σ bands, in the LHCb plotting style. Repo results folder (Fig8-S.png).

That gives a limit on a yield. To turn it into a branching fraction you compare with a well-measured decay of the same parent particle, so the production rate and most detector effects cancel. Our reference mode was Λc+→pϕ(→μ+μ−)\Lambda_c^+ \to p\phi(\to\mu^+\mu^-), with branching fractions from the PDG. Try the arithmetic yourself:

Interactive

From a yield to a branching-fraction limit

Bsig  =  nsignref×εrefεsig×Bref,Bref=B(Λc+ ⁣→pϕ) B(ϕ→μ+μ−)\mathcal{B}_{\text{sig}} \;=\; \frac{n_{\text{sig}}}{n_{\text{ref}}}\times\frac{\varepsilon_{\text{ref}}}{\varepsilon_{\text{sig}}}\times\mathcal{B}_{\text{ref}}, \qquad \mathcal{B}_{\text{ref}}=\mathcal{B}(\Lambda_c^+\!\to p\phi)\,\mathcal{B}(\phi\to\mu^+\mu^-)

The defaults are the numbers on the final slides. Change any of them and watch the answer move. Entries like 1.05e-3 work.

n_sig / n_ref
0.0791
ε_ref / ε_sig
1.1716
B_ref
3.003 × 10-7
Branching-fraction limit
B(Λc⁺ → p e μ) < 2.78 × 10-8
683 times smaller than the previous limit you entered.

The result on the final slides is a 90% confidence-level upper limit of about 2.8×10−82.8\times10^{-8} on the branching fraction, several hundred times below the previous limit of 1.9×10−51.9\times10^{-5}.

08Three weeks, day by day

That tidy chain hides how it actually went. This is the diary behind it: meetings, dead ends and the days spent on the wrong suspect.

From my notes

Three weeks, day by day

The notes are a diary: meetings, code, dead ends. Filter by theme to follow one thread.

  1. Mon 14 Jul

    First meeting with Prof. Witek

    We went through the whole project in outline. The data LHCb records is far too large to keep, so a trigger throws most of it away, and cuts on the rest will decide whether any signal is visible. The tools are split in two: ROOT (with its machine-learning package TMVA) for the ntuples, and Python. Getting at the ntuple on the server did not work at first.

    Physics and discussionSetup and tools
  2. Tue 15 Jul

    A TMVA macro, and non-finite values

    I wrote a C++ ROOT macro for TMVA that loads the signal and background trees, reads the list of variables and trains a boosted decision tree. TMVA cannot train on NaN or infinite values, so a cut to remove non-finite values was added. Getting the data meant a hard drive and AirDrop from Timur's laptop, then a newly built server reached over ssh. I also wrote down the difference between ssh (get a shell on a remote machine) and scp (copy files to or from it).

    Setup and toolsMachine learning
  3. Wed 16 Jul

    Four papers and a task list

    TMVA was overtraining unexpectedly. We discussed what confidence level means and I was given four papers and three jobs: reduce the number of input variables, tune the BDT hyperparameters, and choose the cut with the Punzi method. In the morning I started converting ROOT ntuples to pandas, and hit conflicting Python versions.

    Machine learningStatistics and fits
  4. Thu 17 Jul

    Same analysis in Python

    Switching to uproot sidestepped the Python clash. I rebuilt the TMVA analysis with scikit-learn's gradient boosting, with the same 70/30 train/test split. It gave a test AUC of 0.855, lower than the ROC Prof. Witek had shown with a different algorithm. A variable that was listed twice had to be removed. Timur was not well, and it rained a lot.

    Machine learningSetup and tools
  5. Fri 18 Jul

    No meeting

    Prof. Witek was on leave. I carried on with the same tasks.

    Physics and discussion
  6. Mon 21 Jul

    XGBoost, and the first suspicious plot

    The code was split into files for plotting and statistics, with a ROOT output holding the BDT score. I moved to XGBoost and used a preliminary model to cut 36 variables to 18. The ROC curves were fine, but the Punzi maximum sat at 0.993, 'extremely high and unrealistic'. Timur asked whether lepton number is conserved. It is not guaranteed: neutrino oscillations already break lepton flavour, and total lepton number being conserved is 'almost a coincidence'.

    Machine learningDebuggingPhysics and discussion
  7. Tue 22 Jul

    First RooFit plots

    Prof. Witek sent a new file and I ran the RooFit analysis on it. Some plots worked and some did not. I read three statistics papers: a practical guide to statistical techniques in particle physics, and two on the CLs method.

    Statistics and fits
  8. Wed 23 Jul

    The root cause

    A lecture and a tour of the IFJ facilities ran until 14:00. Then Prof. Witek explained the spike: a cut removed from the signal file's preselection made the simulation differ from data, so XGBoost learned to spot simulation. The signal file was replaced (the old one renamed Lc2pemu_MC_old.root).

    Debugging
  9. Thu 24 Jul

    CLs, and more input fixes

    We discussed applying the CLs method. The remaining Punzi problems were attributed to the hyperparameters, a missing cut on low masses and an incorrect data file. The new data file gave a cut of 0.862.

    Statistics and fitsDebugging
  10. Fri 25 Jul

    Comparing my code with the supervisor's

    I put the two training scripts side by side. Removing feature selection made things worse, and both scripts turned out to use a preliminary model, so it went back in. A zfit environment in conda did not work and was set aside.

    DebuggingMachine learning
  11. Mon 28 Jul

    Overtraining fixed

    The hyperparameters were the cause. With 100 trees and the simpler settings the Punzi plot looked right (cut 0.246). Adding settings back one at a time showed which one reintroduced the spike. A fresh conda environment for zfit took about ten minutes to build and ran with the same initial warning.

    DebuggingMachine learning
  12. Wed 30 Jul

    Finalising the chain

    The C++ macro produced the final graphs, but the Python code still had array-size errors, and the input files for the final plots were Prof. Witek's rather than mine. I downloaded the muon reference-channel data, ran it through my XGBoost processor and found it looked very different from the signal channel, with strong overtraining. That was left for the meeting. The slides needed figures and a lot less jargon.

    Statistics and fitsSetup and tools

09What this does and does not show

This was a three-week student project on a collaboration dataset. I would not want any number on this page quoted as a physics result.

  • It is preliminary. The README says the collaboration’s own analysis is expected to appear most likely in 2026. Anything here that disagrees with that analysis should be read as a student’s exercise.
  • No systematic uncertainties are estimated in my notes. A real limit needs them: efficiency uncertainties, the shape of the background, the uncertainty on the reference branching fractions, and more.
  • The repository is partial. The data files are too big to host, and the CLs scan code is not in it (the scan figure is in the LHCb plotting style), so I have shown that figure as the method’s output rather than as something you can rerun from the repo.
  • The slides have small inconsistencies. The limit is 2.8 on one slide and 2.9 on another, and the claimed improvement over the previous limit does not match the arithmetic (see the calculator).

What I would do differently

  • Inspect the inputs before tuning the model. Days of work on the Punzi formula would have been saved by checking that simulation and data differ only where they should.
  • Treat a spectacular score as a bug until proven otherwise.
  • Change one setting at a time and keep a record, as I eventually did on 28 Jul.
  • Judge a classifier on a rare-signal problem by its recall and the Punzi curve, not by accuracy.
  • Pin the Python environment from day one. Conflicting package versions cost me more hours than any physics.

10Sources and further reading

Thank you to Prof. Dr hab. Mariusz Witek for his guidance throughout, and to Timur Knyazev for the company, the shared hard drive and the final presentation.

Glossary
Baryon
A particle made of three quarks, such as a proton or a Λc⁺.
Branching fraction (BR)
The share of a particle's decays that go a particular way.
BDT (boosted decision tree)
A model made of many small decision trees added together, each one correcting the mistakes of the last.
CLs
A statistical method for turning “no clear signal” into an upper limit on how big a signal could be.
Hyperparameter
A setting chosen before training, such as how many trees to use.
Invariant mass
The mass of a parent particle worked out from the momenta of what it decayed into.
Lepton flavour
Which family a lepton belongs to: electron, muon or tau.
Monte Carlo (MC)
A computer simulation of the decay and the detector, used here as the signal sample.
Ntuple
A table of numbers, one row per candidate event and one column per measured variable.
Overtraining
When a model learns its training examples by heart and then does worse on new ones.
Punzi figure of merit
A score that picks the cut giving the best sensitivity for a search without knowing the signal size in advance.
ROC curve / AUC
How well a classifier trades catching signal against letting background through. The AUC is the area under that curve: 0.5 is guessing, 1 is perfect.
Sideband
A region of the mass spectrum away from the peak, used to study the background.
Trigger
The system that decides, within microseconds, which collisions are worth keeping.