Election 2026 A Forecast of Every Senate, House & Governor Race See the Forecast

Muon Track Momentum Resolution Regression

Regression
Machine Learning
Research
Predicting muon track momentum resolution from five kinematic inputs. The final network scores R-squared of 0.854 on 41,797 held-out tracks, against 0.698 for linear regression.
Published

January 24, 2025

The Decision

Evaluate the model on a test set scored once, and compare it with two baselines on the same split.

Takeaways

  • The final network reaches R² of 0.854 on 41,797 unseen tracks, against 0.698 for linear regression.
  • With adequate training, additional model capacity is worth 0.105 of R², compared with roughly 0.015 in the original notebook.
  • Error peaks at 8 to 18 GeV/c, where a forward, low-momentum population overlaps the main band.

This project predicts the momentum resolution of muon tracks in a particle detector from five kinematic inputs: total momentum \(p\), track slopes \(t_x\) and \(t_y\), pseudorapidity \(\eta\) and azimuthal angle \(\phi\). The muons come from simulated \(\chi_{c1} \rightarrow J/\psi\,\gamma\) decays, with \(J/\psi \rightarrow \mu^+\mu^-\), giving 208,984 reconstructed tracks.

The final model reaches an \(R^2\) of 0.854 on a held-out test set of 41,797 tracks, scored once, compared with 0.698 for linear regression on the same split.

Animated schematic of six muon tracks leaving an interaction point, labelled 5 to 340 GeV/c. The 5 GeV/c track bends sharply upward. The 340 GeV/c track, highlighted, is almost straight.

Track Curvature Falls as Momentum Rises. A schematic, not measured data.

A charged particle in a magnetic field follows a path whose radius of curvature is proportional to its momentum. The highest-momentum tracks are therefore nearly straight, and the curvature from which momentum is inferred is weakest in precisely the regime where precision is most needed.

Source code: github.com/olivia-jackson-lambert/muon-momentum-regression-model

Data Exploration

Total momentum spans a wide range, while transverse momentum \(p_T\) is concentrated at low values.

Histogram of total momentum from 0 to 600 GeV/c on a log count scale. Counts fall steadily as momentum rises.

Total Momentum

Histogram of transverse momentum from 0 to 35 GeV/c on a log count scale. Counts peak below 1 GeV/c and fall steeply beyond 5 GeV/c.

Transverse Momentum

Scatter of momentum resolution against momentum from 0 to 400 GeV/c with a rising median line. A narrow spike of tracks below 25 GeV/c climbs to about 0.0095, well above the main band. At higher momentum the main band splits into two branches.

Momentum Resolution Against Momentum

As expected, resolution degrades steadily with momentum, since higher-momentum tracks bend less and their curvature is correspondingly harder to measure. The median line shows the trend through the dense region.

A less expected feature is a secondary cluster lying well above the main band between roughly 10 and 25 GeV/c, reaching resolutions near 0.0095 where the main band sits at around 0.0045. At higher momentum the main band also divides into two branches. The population is therefore not unimodal, which places a limit on what a single regression model can be expected to achieve.

The longitudinal component follows from \(p_Z = \sqrt{p^2 - p_T^2}\), which gives the target resolution ratio \(\Delta p_Z / p_Z\).

Scatter of longitudinal momentum resolution against longitudinal momentum, showing the same spike below 25 GeV/c and the same split into two branches at higher momentum.

Resolution Against Longitudinal Momentum

Selecting tracks between 8 and 25 GeV/c and dividing them at a resolution of 0.0070 isolates the upper cluster. It contains 1,410 tracks, 2.1 percent of the band, and two variables separate it almost completely:

Variable Upper cluster Main band Cohen’s \(d\)
\(\eta\) 4.48 3.54 +2.21
\(p_T\) 0.288 1.002 -1.31
\(t_x\), \(t_y\), \(z_V\), pol, \(\phi\) 0.06 or less

These are very forward tracks, with a mean \(\eta\) of 4.48 against a dataset median of 3.53, carrying very little transverse momentum. A track travelling almost parallel to the beam axis traverses less of the magnetic field, so its bending lever arm is short and its momentum is poorly measured even when the total momentum is unremarkable. No other variable in the feature set distinguishes these tracks.

Method

The evaluation is designed to estimate performance on tracks the model has not seen.

  • Three-way split of 60, 20 and 20 percent into train (125,390), validation (41,797) and test (41,797). Models are selected on validation, and the test split is scored once, at the end.
  • Scaling is fitted on the training split only, so that no statistics from the validation or test data leak into the scores.
  • Two reference models are scored on the same split: the training mean and linear regression. These provide the context needed to interpret an \(R^2\) of 0.85.
  • The target is standardised in addition to the features. Since \(\Delta p_Z / p_Z\) is of order \(10^{-3}\), the squared-error gradients in raw units are too small for the networks to converge.

Results

Model Validation \(R^2\) RMSE MAE
Mean baseline 0.000 1.046e-3 7.573e-4
Linear regression 0.698 5.751e-4 3.491e-4
MLP, 5 units 0.753 5.194e-4 2.694e-4
MLP, 5 and 3 units 0.785 4.848e-4 2.375e-4
MLP, 10 units 0.797 4.713e-4 2.281e-4
MLP, 40 and 5 units 0.858 3.947e-4 1.805e-4

On the held-out test set the selected model scores an \(R^2\) of 0.854, an RMSE of 3.938e-4 and an MAE of 1.783e-4. Validation and test \(R^2\) differ by 0.003, indicating that model selection did not overfit the validation split.

Linear regression already accounts for most of the variance, at 0.698, and the network adds 0.160 on validation. The improvement is worthwhile, but it should be understood as a refinement of a relationship that is largely linear.

Scatter of predicted against true longitudinal momentum resolution for 41,797 test tracks, with a diagonal line for perfect prediction. Points hug the line below 7 times 10 to the minus 3 and spread out above it, with a small group near 9 times 10 to the minus 3 predicted well below the line.

Predicted Against True Resolution on the Test Set

Predictions follow the diagonal closely through the dense region below 0.007, above which the scatter widens. A distinct tail of points lies well below the line, corresponding to tracks that are genuinely poorly measured but for which the model under-predicts the resolution.

Error by Momentum

To locate the regions of poorest performance, the test error was binned by momentum. The pattern that emerges does not follow the curvature argument alone.

Step chart of test RMSE and mean bias across eight equal-count momentum bins from 3 to 739 GeV/c. RMSE peaks at about 5.6 times 10 to the minus 4 between 8 and 18 GeV/c and is lowest at 2.0 times 10 to the minus 4 between 31 and 51 GeV/c. Bias stays close to zero throughout.

Test Error by Momentum
p range (GeV/c) n RMSE Mean bias
3.0 to 5.5 5,225 2.95e-4 +4.5e-5
5.5 to 8.0 5,224 3.88e-4 +3.9e-7
8.0 to 11.9 5,225 5.65e-4 +1.5e-5
11.9 to 18.5 5,224 5.56e-4 +3.4e-5
18.5 to 31.2 5,225 3.82e-4 +2.8e-5
31.2 to 51.1 5,224 2.02e-4 +2.1e-5
51.1 to 85.0 5,225 2.58e-4 +1.3e-5
85.0 to 739 5,225 3.49e-4 -8.1e-6

Error peaks at approximately 5.6e-4 between 8 and 18 GeV/c and is lowest, at 2.0e-4, between 31 and 51 GeV/c, almost a factor of three smaller. The high-momentum tail is not the worst region, contrary to what the curvature argument alone would predict.

The peak coincides with the momentum range of the high-\(\eta\) cluster identified above, where two populations with very different resolutions overlap. Although the model receives \(\eta\) and \(p_T\) as inputs, the minority population makes up only about 2 percent of the band, and the network appears to average across the boundary rather than separating the two regimes. This is a plausible explanation but has not yet been demonstrated; it can be tested directly by scoring the two clusters separately.

The bias remains small and positive across almost the entire range and becomes slightly negative only in the highest bin. The model thus mildly over-estimates the resolution at low and intermediate momenta and is slightly optimistic for the straightest tracks.

Comparison with the Original Analysis

The original analysis reported a cross-validated \(R^2\) of 0.734 and concluded that feature scaling mattered far more than architecture, since the model variants lay within about 0.015 of one another. Repeating the analysis alters that conclusion.

With target standardisation and early stopping in place, the architectures separate clearly, from 0.753 at five units to 0.858 at forty, so that capacity is worth roughly 0.105 of \(R^2\). The original analysis trained for a fixed 50 epochs without early stopping or target scaling; the larger networks therefore did not converge and performed no better than the small ones.

Input scaling remains the most important preprocessing step, but architecture also has a measurable effect.

The original notebook additionally imports tensorflow.keras.wrappers.scikit_learn.KerasRegressor, which was deprecated in TensorFlow 2.6 and removed in 2.13, so it no longer runs on current versions of TensorFlow. The pipeline was rebuilt in scikit-learn, which supports the same dense architectures without that dependency.

Limitations

The architecture search is shallow. Only four hand-chosen configurations were tested. The trend suggests that wider networks would continue to improve, but the point at which gains level off has not been established.

Only kinematic inputs are used. Detector geometry, hit multiplicity and track-fit quality are not included. The mid-momentum error peak appears to be at least partly a forward-track effect already encoded in \(\eta\) and \(p_T\), and a direct acceptance or reconstruction variable would probably separate the populations more cleanly.

The data are simulated. These are Monte Carlo tracks, so the model has learned the behaviour of a detector simulation, which may differ from that of real detector data.

Next Steps

Test the high-\(\eta\) explanation. Score the forward, low-\(p_T\) cluster separately from the main band. If it accounts for most of the error at 8 to 18 GeV/c, sample weighting or a dedicated model for forward tracks would be a more targeted remedy than adding capacity throughout.

Extend the architecture sweep. Continue beyond forty units to determine where the gains level off.

Predict the full distribution. Quantile regression would provide an uncertainty band for each track instead of a single point estimate, which is more informative for a quantity that is itself a measure of uncertainty.

Also covered
scikit-learnParticle PhysicsModel EvaluationFeature ScalingCross-ValidationPython