I would like to do a cut on a scatter plot and/or 2d histogram with a line that is not a straight line.
For this reason I would really like to create it with a graphical cut but as far as I know the TCutG has to be a closed poly-line.
Hi,
how is your “not a straight line” defined?
The line m u s t be closed, otherwise points would “leak out”
Each line can be approximated by a polyline (to any accuracy)
Special cases (circle, ellipse…) should be straightforward.
Otto
I would like to do a sort of steps cut.
More in detail my problem is that I can create a cut from a graph/2Dhisto done with a certain (i.e. smaller) energy range but then I want to apply such cut on a more extended energy range so I cannot close the poly-line around the population I see in the first plot because the real data distribution is more extended in energy…
The idea is to draw a line and select all data below such line but the line cannot be straight and this makes it more complicated to be realized with a TCut like x<x0
You can close the polygon (last point = 1st point) but that’s not mandatory. If it is not closed TCutG will do it for you. Then, when the cut is applied, the inside of the polygon will be consider as 'true" and the outside as 'false".