Repository navigation
Conversation
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
requested review from
a team,
bazinski,
f3sch and
wille10
as code owners
November 15, 2026 17:54
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.