Cutting on an angle in 2D histogram


ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hello experts,

I’ve created a 2D plot via the following line:

ch.Draw("x:z>>h(1000,-20,20,100,-20,20)","(-20<x&&x<20)&&(-20<z&&z<20)","COL4Z");

This creates a full 40x40 2D plot.

What I want to do, is eliminate all the points above (or below) an angle of 45 degrees (or any angle) going from corner to corner. And then more specifically, I want to only apply angled cuts to points in the positive X regime.

My root skills are a little rusty… Is there a quick and easy way to do this?

Thanks.

You should apply the corresponding mathematical formulae as cut in the second parameter. Now you simply get the values between -20 and 20 for both x and z. You cut should be a bit more elaborated to perform the angular selection.

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