Hello
I need your help to understand how drawing a TCutG in a stand-alone program
usually, by using a canvas in intepreted root it is possible to draw open the toolbar and, after selecting the TGutG button, to draw the cut directly on the 2D-histogram
It is possible to make that of similar in a stand-alone program?
I understood that is possible to use this constructor
TCutG = cutg new TCutG("cutg¨,n,x,y);
where x,y are coordinates array (n long).
but I didn’t untestand how get the coordinates from Histogram.
can you help me?
Have a look to $ROOTSYS/exec3.C . This macro gets the x and y positions for all all events. Just modify it to get the x and y when you left click (see the value of “event” when executing the macro) and convert the x y postion in pixel into user coordinates using:
gPad->AbsPixeltoX(x);
gPad->AbsPixeltoY(y);
I hope it helps.