Plotting angles in ROOT

Hello,

I have X and Y values in 2 1DHistograms and I need to find arctan(y/x).

I tried to do histo.Fill(arctan(events of y/events of x)). But it doesn’t work this way.

Is it possible to do it directly in python Script (PyROOT)?

Thank you!

Hello,

It is not very clear what is your goal.
Do the two histograms have the same ranges and binning?
What do you mean by ‘events of {y, x}’ ? The events in a give bin of the ‘y’ or ‘x’ histogram?
What is ‘not working this way’ ?

If a solution is found, it is likely available in pyroot too.

G Ganis

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.