Lai Gui

Physics meets Finance.
Precision at every level.
LOADING
. . .
Completed
0
All Research

Summer Internship · 2025  ★ Best Poster Prize

Refining the Simulation of LHCb SciFi Detectors in Geant4

Period July – August 2025
Affiliation LPHE, EPFL, Switzerland
Supervisor Dr Ismet Siral
Repository gitlab.cern.ch/lphe-lab-tools/SciFiMatG4
Geant4 C++ Monte Carlo Simulation Optical Photon Transport Mie Scattering Python uproot / ROOT Landau Fitting Huber Estimation SLURM

Overview

The LHCb SciFi tracker is built from 2.4-metre-long scintillating fibres that guide photons to Silicon Photomultiplier (SiPM) arrays at one end. To understand detector response and optimise mat design for future upgrades, an accurate Geant4 Monte Carlo simulation of the full optical photon transport chain is essential. Photons must traverse not only the fibre cores and claddings, but also the lab-made TiO₂-loaded epoxy embedding the fibres and polyimide film wrapping the mat — materials whose optical properties are complex and not well characterised out of the box.

This project extended an existing Geant4 simulation (SciFiMatG4) with four major improvements: Mie scattering for the TiO₂-epoxy matrix, a SiPM photon detection efficiency (PDE) table, a fully configurable flexible mat geometry supporting RIGID, FLEX, and Double_FLEX designs, and polyimide black film material properties. Simulations of 0.9 MeV electrons were then run in parallel across 24 SLURM jobs spanning the full 2.35-metre fibre length, and compared against bench-top measurements using a custom Python analysis pipeline.

The simulation reproduces the experimental cluster intensity profile — including the characteristic dips at the air gap locations — with good qualitative agreement across all mat designs. This work won the Best Poster Prize at the EPFL Summer Research Programme 2025 poster session.


The LHCb SciFi Detector

LHCb is one of four main experiments at the Large Hadron Collider at CERN. It specialises in flavour physics — precision measurements of B-meson decays and CP violation — using a forward spectrometer optimised for particles produced at small angles to the beam.

The Scintillating Fibre (SciFi) tracker forms three tracking stations downstream of the dipole magnet. Each station consists of mats of scintillating fibres (polystyrene core, PMMA inner cladding, PTFEMA outer cladding, 250 µm diameter) arranged in four layers. Charged particles traversing the fibres generate scintillation photons, which travel along the fibre — partly by total internal reflection, partly scattered by the TiO₂ particles in the surrounding epoxy — to SiPM arrays at the fibre end. A mirror at the far end reflects photons back for a second pass. The pattern of activated SiPM channels (a cluster) encodes the particle's transverse position.

scifi mat structure
Fig. 1 — Structure of a SciFi mat. Scintillating fibres (ø 250 µm) are embedded in a TiO₂-loaded epoxy matrix. The mat is 4.85 m long in the LHCb detector; the simulation models a 2.424 m half-mat with a mirror at z = 0 and SiPMs at z = 2424 mm.

Why simulation matters: Accurately reproducing material properties and geometry in Geant4 allows the simulation to distinguish true physics signals from detector artefacts, optimise mat designs, and build confidence for extrapolating to new configurations such as the Upgrade II Mighty-SciFi.


Mat Designs & Geometry

Three SciFi mat designs were simulated, differing in how the flexible region near the SiPM end is constructed. The flexible region is important because it must bend around the edge of the detector support while maintaining photon guiding continuity. All designs place the SiPMs at z = 2424 mm and the mirror at z = 0 mm.

DesignairGapZ1 (mm)airGapL1 (mm)airGapZ2 (mm)airGapL2 (mm)
RIGID0024240
FLEX30017024240
Double_FLEX3001701980170

In the FLEX and Double_FLEX designs, the epoxy mat is interrupted by air gaps — the fibres span the gap freely. Only the epoxy section between the two air gaps is wrapped in black polyimide film. The air gaps introduce measurable dips in the photon yield as a function of position, which serve as a critical validation signature when comparing with measured data.

scifi mat designs
Fig. 2 — Geant4 visualisations of the three mat designs. The grey regions are the TiO₂-epoxy body; the dark bands in FLEX and Double_FLEX are the polyimide-wrapped sections between the air gaps.

The number of fibre layers was also varied. With nLayers = 4, the mat has four staggered fibre rows; with nLayers = 6, two additional rows are added, increasing the active material thickness and the average photon yield.

scifi geant4 4layer
Fig. 3a — 4-layer mat cross-section in Geant4.
scifi geant4 6layer
Fig. 3b — 6-layer mat cross-section in Geant4.

Code Modifications

The simulation framework was originally written by Peter Stromberger and Bastian Rössler. The following modifications were made during this internship, spanning both the Geant4 C++ code and the job submission infrastructure.

Mie Scattering in the TiO₂-Epoxy

The embedding matrix (80% Epo-Tek 301 glue, 20% TiO₂ by mass) scatters photons strongly due to the TiO₂ nanoparticles. This scattering is fundamentally Mie scattering — the particle size is comparable to the photon wavelength — and is not isotropic. Geant4's MIEHG model (Mie scattering with Henyey–Greenstein phase function) was chosen.

The mean free path table (mie_results.csv) was computed using a dedicated Python script (CalculateTiO2EpoxyMIE.py) with improved input parameters. In DetectorConstruction.cc, the table is loaded and three constant properties are added to the epoxy material properties table: MIEHG_FORWARD_RATIO, MIEHG_FORWARD, and MIEHG_BACKWARD. These were tuned to (0.8, 0.6, 0.6) for the main simulation run.

Mie scattering method: Rather than treating the epoxy as purely absorbing or scattering isotropically, the MIEHG model allows forward-preferring scattering that more accurately reflects the angular distribution of TiO₂ particle scattering at visible wavelengths.

SiPM Photon Detection Efficiency

Previously, the simulation treated every photon reaching the SiPM as detected. In reality, the Photon Detection Efficiency (PDE) is wavelength-dependent and peaks around 50–60% for modern SiPMs. A PDE table was loaded from a text file (H2024_50um_039_TP4b_ch38_OV_6V_PDE.txt) at the start of each run. For each photon arriving at the sensitive detector, its wavelength (computed from energy as λ = 1239.842 / EeV nm) is looked up in the table, and a random number draw decides whether it is recorded as detected. Two new branches are stored in the ROOT output: detProb (the PDE value) and ifDet (boolean, whether the photon was detected).

Air Gap Geometry & Flexible Designs

Four new parameters were added to parameters.json (airGapZ1, airGapL1, airGapZ2, airGapL2) and read by Parameters.cc. In DetectorConstruction.cc, the monolithic epoxy volume was replaced by five separate child volumes of detector_log: three epoxy slabs interleaved with two air slabs. Fibres are constructed as sub-volumes within each slab. The polyimide film is placed only on the second epoxy slab (the region between the two air gaps), with independent optical surface properties (5% reflectivity, dielectric-metal model).

SLURM Batch Submission

A submit.sh script was written to submit 24 parallel SLURM jobs, each simulating a different injection z-position in 100 mm steps from 50 mm to 2350 mm. Each job generates a temporary .mac file by substituting {{PARTICLE}}, {{ENERGY}}, {{NEVENTS}}, and {{ZPOS}} placeholders from a template. The output ROOT files are named by SLURM job ID, making them uniquely identifiable and automatically grouped per simulation batch.


Python Analysis Pipeline

The simulation produces one ROOT file per z-position, each containing two trees: DetectedPhotons (one entry per photon reaching the SiPM) and InitialParticle (one entry per event). Three Python scripts handle post-processing.

Cluster Identification

For each event, a 139-element array is built counting detected photons per SiPM channel. A cluster is identified as a contiguous group of channels where at least one channel exceeds a threshold of 3 photons, with a total cluster intensity above 10 photons. If channels exceed the threshold but are non-contiguous, the algorithm splits them into separate sub-clusters. This mirrors the real detector's reconstruction algorithm.

Landau Fit for Cluster Intensity MPV

Charged particles deposit energy following a Landau distribution — the distribution has a long high-energy tail and a well-defined Most Probable Value (MPV). The histogram of cluster intensities at each z-position is fit with an empirical Landau function A · exp(−½(ξ + exp(−ξ))), where ξ = (x − MPV) / η. The MPV and its uncertainty are extracted from the fit and plotted as a function of distance from the SiPM.

Huber mean for photon detection: The mean number of photons detected per event at each SiPM channel is computed using a Huber robust mean (tuning constant c = 1.345) rather than a simple mean, to suppress the influence of outlier channels at the edges of the active area where statistics are poor.

Multi-Dataset Comparison

A second script (extract_cluster_data.py) loops over all five simulation configurations (RIGID_6Layer, RIGID_6Layer_NoMirror, FLEX_6Layer, FLEX_4Layer, Double_FLEX_4Layer), extracts the cluster statistics, and saves them to a CSV file. A third script (plot_cluster_comparison.py) then overlays all five datasets on a single plot for direct comparison, with each configuration shown in a distinct colour.


Results

All results use 0.9 MeV electrons injected perpendicular to the mat, with 600 events per z-position and the Mie scattering parameters (MIEHG_FORWARD_RATIO = 0.8, MIEHG_FORWARD = 0.6, MIEHG_BACKWARD = 0.6).

Cluster Intensity MPV

The cluster intensity MPV — the most probable number of photons per cluster — is the primary observable for comparing simulation with test-beam data. It measures how many scintillation photons survive the full transport chain (reflection, absorption, Mie scattering, fibre guiding) to be detected at the SiPM end.

scifi cluster intensity mpv
Fig. 4 — Cluster Intensity MPV as a function of distance from the SiPM detectors. The RIGID 6-layer configuration with mirror (red) achieves the highest values (~47–53 photons at close range, ~40–44 at 2 m). The FLEX and Double_FLEX designs show clear dips at the air gap locations (~300 mm and ~1980 mm), matching the expected physics.

Key finding: The RIGID 6-layer design outperforms all other configurations by roughly 2× in cluster intensity. The air gap dips are clearly reproduced in FLEX and Double_FLEX designs, validating the geometry implementation.

Photon Detection (Huber Mean)

The Huber mean of detected photons per SiPM channel per event provides a complementary view of the detector response, measuring the average signal level rather than the most probable cluster total.

scifi photon detection huber
Fig. 5 — Photon Detection Huber Mean vs. distance from detectors. The RIGID 6-layer (red) maintains ~11–14 photons/channel near the SiPM end, declining to ~10–11 at 2 m due to increasing attenuation. All designs follow a smooth decreasing trend except at the air gap positions.

Cluster Size

The mean cluster size (number of SiPM channels above threshold per cluster) reflects how far scintillation photons spread transversely across channels before detection. It is sensitive to the optical cross-talk between fibres and the alignment of fibres with SiPM channel boundaries.

scifi cluster size
Fig. 6 — Mean cluster size vs. distance from detectors. The 6-layer designs (RIGID and FLEX) produce larger clusters (~5.0–5.5 channels) than 4-layer designs (~4.0–4.2 channels). Cluster size is nearly constant along the mat length, showing little dependence on how far photons travel before detection.

Comparison with Experimental Data

Each simulated configuration was compared against bench-top measurements taken with the same mat design and particle source. The simulation captures the overall shape and magnitude of the cluster intensity profile with good agreement, including the positions and depths of the air gap dips.

scifi data comparison
Fig. 7 — Direct comparison of simulation (solid lines) vs. experimental data (data points) for four mat configurations. The simulation reproduces both the absolute scale and the distance dependence well. Residual discrepancies — slightly larger simulated cluster sizes and slightly lower mean photon counts — point to remaining uncertainties in the material optical properties.

Agreement with data: The overall shape and scale of the cluster intensity profile matches experiment well. The simulated cluster sizes are systematically ~5–10% larger than measured, and the mean photon detection is slightly lower. Both effects are consistent with imperfect knowledge of the material refractive indices and Mie scattering parameters.


Summary

Mie scattering implementation: TiO₂-epoxy Mie scattering was successfully implemented via the Geant4 MIEHG model, using a mean free path table computed from first principles. This is essential for realistic photon transport in the embedding matrix.

Flexible geometry: A fully configurable air-gap geometry was added, enabling RIGID, FLEX, and Double_FLEX mat designs to be tested within a single simulation framework by changing four parameters in parameters.json.

Good overall agreement: The simulation reproduces experimental cluster intensity profiles — including the distinctive dips at air gap locations — across all five mat configurations studied, validating the geometry and material modelling.

Future work: Remaining discrepancies in cluster size and absolute photon count can be addressed by fine-tuning material refractive indices, absorption lengths, mirror reflectivity, and SiPM PDE. Once a close match is achieved, alternative mat designs for LHCb Upgrade II can be simulated with confidence.

This work contributes to the broader effort at LPHE, EPFL to develop and validate simulation tools for the LHCb SciFi detector family, including the Mighty-SciFi planned for Upgrade II, which will need to sustain significantly higher radiation doses and particle fluxes than the current Run 3 detector.



All Research