Hi all,
I am trying to calculate the peak current of a bunch after a collimator. I did this by the following:
sddsprocess file.out file.zout "process=t,average,tavg" "-define=column,z,t tavg -2.9979E11 *, units=mm"
sddshist file.zout Peak.zhis -data=z -bin=200
sddsprocess Peak.zhis "-define=column,CPeak,frequency Particles / Charge * 2.99792458E8 * sddshistBinSize /, units=A"
This works seems to work fine for tracking through the linac. When used after a collimator, this seems to have a problem. (atleast i think so)
The question i have is: The "Charge" parameter in the output file doesn't change even after the collimator while the number of particle clearly does. If that is the case, how do i calculate the peak current column without knowing the charge per particle?
Am I missing something?
-Charles
peak current after collimator
Moderators: cyao, michael_borland
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: peak current after collimator
Charles,
The Charge parameter should definitely change when particles are lost. It does in my runs. Just be sure that the CHARGE element is before the collimator.
If you still think there is a problem, please send me a minimal example that shows the issue.
--Michael
The Charge parameter should definitely change when particles are lost. It does in my runs. Just be sure that the CHARGE element is before the collimator.
If you still think there is a problem, please send me a minimal example that shows the issue.
--Michael
-
- Posts: 1933
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: peak current after collimator
Charles,
Thanks for sending your files. The problem is that when using the SCRIPT element, the user is responsible for ensuring that the Charge parameter is correct in the file delivered back to elegant.
There was no easy way to know this, since the manual doesn't mention it explicitly. I'll fix that.
--Michael
Thanks for sending your files. The problem is that when using the SCRIPT element, the user is responsible for ensuring that the Charge parameter is correct in the file delivered back to elegant.
There was no easy way to know this, since the manual doesn't mention it explicitly. I'll fix that.
--Michael