Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some question about setting SigmaP. #86

Open
cy1034429432 opened this issue Feb 28, 2024 · 2 comments
Open

Some question about setting SigmaP. #86

cy1034429432 opened this issue Feb 28, 2024 · 2 comments

Comments

@cy1034429432
Copy link

@rtesse
Hi, I am sorry to bother you again.
I have a question about setting SigmaP (SigmaE, or SigmaEk, which all work to set energy spread). I can't find some functions for setting SigmaP (Similar to using BDSIM, set initial particles with Gaussian energy distribution), but I only find these parameters about energy spread as shown in the following figure.
image
Does Georges have a function similar to what I said?

@chernals
Copy link
Collaborator

Hello there !

We do not have specific functions to populate the dpp values in beam distributions. All in all these are simple numpy arrays, so it should be straightforward to use any type of generator (for example random Gaussian in numpy) and to set the 5th coordinate in the array using that vector array.

@rtesse
Copy link
Collaborator

rtesse commented Mar 1, 2024

Hello,

In the screenshot you showed, you have the parameter dpprms, which is equivalent to the SigmaP in BDSIM. If you know or if the distribution of your momentum is not Gaussian, you can set the distribution as Cedric said.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants