TCutG, GetPoint


I have a TCutG object drawn on a TH2F histo, and I move the TCutG with the mouse away a bit and I would like to get the border points of the TCutG. I tried to use:

Float_t cutareax[5] = {4300.0, 4300.0, 4700, 4700, 4300.0};
Float_t cutareay[5] = {4000.0, 4500.0, 4500.0, 4000.0, 4000.0};
TCutG * gcat = new TCutG(“cutarea”, 5, cutareax, cutareay);

and then:

Float_t tempx, tempy;
gcat->GetPoint(0, tempx, tempy);

but it always gives the (0,0) point for the tempx and tempy, although I should get first the
(4300, 4000).

What’s wrong with this?



TGraph::GetPoint returns Double_t, not Float_t.
Change your code to:

Double_t tempx, tempy; gcat->GetPoint(0, tempx, tempy);

Hi Rene,

Thanx, now it works!