Skip to content

Phi range #5

@szepfalvibalint

Description

@szepfalvibalint

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions