Page 1 of 1

Lost particles viewed as red saved in dst

Posted: Thu 4 Dec 2025 14:53
by Emmanuel
Dear Didier,

In the plot of the distribution hereafter, there are lost particles viewed in red color on the border of the distribution.
Particules_rouge_perdues_visibles_ds_dst.png
Particules_rouge_perdues_visibles_ds_dst.png (6.92 KiB) Viewed 80 times
When saving the checked particles in a dst file, these lost particles are also saved in the file. That leads to errors when calculating the beam current and power left from the dst file.

Is there any way to avoid saving these lost particles ?

Thank you in advance for any help.

Emmanuel

Re: Lost particles viewed as red saved in dst

Posted: Thu 4 Dec 2025 17:33
by Didier
Dear Emmanuel,

I think that adding a drift of zero length after the element causing the losses allows you to obtain a dst without beam losses. No ?

Regards,

Didier

Re: Lost particles viewed as red saved in dst

Posted: Fri 5 Dec 2025 07:20
by Emmanuel
Dear Didier,

Following your advice, the particles lost seem to be really lost, but the number of particles in the dst is still higher than the one given by TraceWin by 1.5 %.

Then the result is closer to what it should be but a significant error remains.

Regards.

Emmanuel

Re: Lost particles viewed as red saved in dst

Posted: Fri 5 Dec 2025 15:33
by Didier
Dear Emmanuel,

I don't understand this 1.5% difference. I don't see this kind of thing, and I would need an example that I could reproduce in order to understand.

Regards,

Didier

Re: Lost particles viewed as red saved in dst  [SOLVED]

Posted: Tue 9 Dec 2025 15:42
by Emmanuel
Dear Didier,

Last Friday, I have updated TraceWin. Since then, the only discrepancy (about 0,2%) I noticed came from a filtering of particles while reading the file dst.

I consider the update solved the issue.

Emmanuel