TH2F ProjectionX using TCut

I would like to project a TH2F histogram onto X axis by using ProjectionX function. But before doing it, I would like to apply a cut to the TH2F histogram (such as log10(x) + 10 < 6*y) prior to projection. In the ROOT documentation, ProjectionX is said to be used with a predefined TCutG. Can I use a TCut object instead of TCutG or is there any way to convert a TCut object into a TCutG object.


Seems to me, no …

The expression you want to use as a cut is (log10(x) + 10 < 6*y). This is fine when you have the x an y values like in a TTree or in a TNuple but you have an histogram, a TH2F, and the initial x and y values used to fill it are lost. The only kind of cut we can do on a TH2 is therefore a geometrical one ie: a TCutG