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

Phi range #5

Open
szepfalvibalint opened this issue Apr 17, 2020 · 0 comments
Open

Phi range #5

szepfalvibalint opened this issue Apr 17, 2020 · 0 comments

Comments

@szepfalvibalint
Copy link

Hello,

I am using pythiaplotter to read in a vast amount of HepMC event files from Pythia8 for analysis. I have discovered a bug in calculating phi for particles. The math.asin functions have output values from -pi/2 to pi/2 (1st and 4th quarter plane), whereas the Pythia phi values range from -pi to +pi. The problem is easy to fix with something like:
if px<0:
if py>0: # we are in the second plane quarter
phi = math.pi - phi
if py<0: # we are in the third plane quarter
phi = -math.pi - phi
Please take a look at it.

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

1 participant