Open
Conversation
`compt_scale` is a multiplicative factor applied to the total Compton cross-section. Increasing this factor scales up photon generation in the radiative Bhabha model. This can be useful for testing or for producing a larger number of radiative Bhabha scattering events.
When a line is generated through MAD-X sequence conversion, the line end up having markers sequencename$start and sequencename$end. In the line table these are present, but they do not have an associated s position and this causes an error!
Prevented sampling of particles with |δ|>LMA in Touschek MC by reducing the
longitudinal cutoff per element where needed:
nz_eff = min(nz, 0.9 * min(|δN|, δP) / σδ)
This ensures sampled δ stays strictly within the LMA,
avoiding pathological small-angle events with huge weights that distorted
RMC/RP and Touschek lifetime estimates.
- Adjustment is local: only elements with tight acceptance are clamped
- Prints a warning when nz_eff < nz
- Restores stable RMC/RP≈1 and meaningful lifetime results
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.
Description
This PR introduces the possibility to perform Monte Carlo simulations of Touschek scattering in xfields.
It provides:
a new
TouschekScatteringbeam element implementing a Monte Carlo Touschek scattering kernel,a
TouschekManagerthat configures Touschek scattering centers using optics and a supplied local momentum aperture profile,a
TouschekCalculatorthat evaluates Piwinski Touschek scattering rates and integrated per-section rates, used to correctly weight scattered macroparticles.This enables end-to-end Touschek studies within Xsuite, including generation of Touschek-scattered particles, tracking, Touschek loss maps analysis, and Touschek lifetime evaluations.
Checklist
Mandatory:
Optional: