Set TCutG as an operator

Hi everyone,

I am trying to select some events by choosing an area on a contour plot with TCutG. I named the TCutG and saved it to a file named as “mycut.C”. Now I would like to use the chosen TCutG card as a bool operator for the later selections, and output the values of each point in the area to a ASCII (.txt) file.

Could anyone explain to me how to set the TCutG as an operator? Thanks!


ROOT Version: 6.06
_Platform:_Ubuntu
Compiler: Not Provided


Select_events

When you draw a 2D histogram you can specify a graphical cut as explained here.

Hi Couet,

Thanks for your comments!
The problem for me is that I can draw the sub-range of a 2D histogram as shown in following figure, but I don’t know how to apply the cut and extract the data in the area. Is there a way to set the cut as an operator with which I can extract the data in the interest area? Because I have many similar data files and I would like to apply the defined cut for selecting data. Thank you very much!

Cheers
Select_events_2

I think you can do something similar to this:

It works!!!
Thank you very much Couet! It’s really a good way to select the data!

Cheers!

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