Count points inside a TGraph curve


Hello everyone,

I have a contour level curve in a TGraph object, also I have 100 points which coordinates are stored in x and y arrays, is there a way to count how many points are within this contour and how many are outside of it using ROOT?. Any suggestion would be really appreciate it.

Thanks,

David.

ROOT Version: 6.12/06


You can create a graphical cut from the contour points and then check the other points with IsInside:

@dastudillo, Thanks!, this is what I was looking for.