Skip to content

TRD ionisation model independent of the Geant4 energy loss - #16128

Open
sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:trd-primary-ionisation
Open

sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:trd-primary-ionisation

Conversation

@sawenzel

@sawenzel sawenzel commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

TRD-specific ionisation model for GPU simulation

This PR introduces an independent ionisation model for the TRD gas, removing the TRD's dependence on the Geant4 PAI energy-loss model. This is an important step towards running the full ALICE detector simulation with AdePT on GPUs, where G4HepEm does not yet support region-dependent combinations of electromagnetic models.

The new model can be enabled through TRDSimParams.ionisationModel. It derives the ionisation charge from a Poisson sampling of collisions using precomputed tables based on Geant4's PAI cross-sections. This preserves the characteristic TRD charge fluctuations without requiring PAI to be enabled in Geant4.

The validation shows good agreement with production TRD hit charges across electrons, pions and protons, with residual differences at the few-percent level, mainly due to delta electrons. TRD hit positions and the hit data format remain unchanged.

TRD charge per hit

Particle Energy deposit, no PAI TRD model, no PAI
e⁻, 1 GeV/c 1.013 0.975
π⁺, 1 GeV/c 1.053 0.985
p, 0.5 GeV/c 1.030 0.990
p, 0.3 GeV/c 1.202 0.969

Ratios are relative to production. The remaining differences are largely attributable to delta electrons above the 10 keV gas threshold, which continue to be transported by Geant4.

The existing simulation remains unchanged by default (ionisationModel=0), reproducing current production hits, including with PAI enabled. Enabling the new model allows PAI to be disabled in the TRD gas, resulting in an approximately 10% speedup in TRD-only simulation. A pp three-timeframe validation also shows no significant differences in TRD QC observables beyond statistical variations.

In summary: this decouples TRD ionisation from the Geant4 PAI configuration, providing a compatible path towards GPU-based electromagnetic simulation with G4HepEm and AdePT.

Related: O2-7326

Implementation assisted by Claude Code.

sawenzel and others added 2 commits November 15, 2026 15:01
This adds a collision model for the ionisation in the TRD gas, selected with TRDSimParams.ionisationModel, and a unit test.

- With ionisationModel=0, the default, the charge of a hit stays the Geant4 energy deposit divided by Wion.
- With ionisationModel=1 the charge comes from a Poisson number of collisions along the step, from the step length, beta*gamma before the step and the charge squared.
- The collision rate and energy spectrum below the 10 keV delta-ray cut are tabulated from the Geant4 PAI cross-section for Xe/CO2 and Ar/CO2, with macros/makeIonisationTables.cxx.
- Tracks below beta*gamma 0.04 or 30 keV kinetic energy keep the energy deposit, including the step that stops a track.
- The run stops if the delta-ray cut of the gas differs from the one of the tables.
- Hit class and hit creation points are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This moves the PAI model for the TRD gas from g4config.in to g4config_trd_pai.in, which g4Config.C applies only with TRDSimParams.ionisationModel=0.

- ionisationModel=0 keeps the current production: energy deposit with PAI.
- ionisationModel=1 runs without PAI, since the TRD collision model does not use the Geant4 energy loss in the gas.
- A custom G4.configMacroFile is applied as before, without PAI lines added.
- The README describes the two modes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sawenzel
sawenzel requested review from a team, bazinski, f3sch and wille10 as code owners November 15, 2026 17:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant