Re: Graphical cut

Rene Brun (Rene.Brun@cern.ch)
Sat, 11 Jul 1998 17:15:35 +0200


Laurent Aphecetche wrote:
>
> Hi,
>
> Is it still impossible to use graphical cuts for 2d histos ?
>

Graphical cuts may be used in the TTree::Draw command as the selection
or one of the elements of a selection mechanism. The output of
TTree::Draw can be a 1-D, 2-D, 3-D, TProfile or a selection list.
You can superimpose a graphical cut contour on top of a 2-D histogram
with cut->Draw("l");
Your question being imprecise, if you mean do not draw the bins
outside the cut region, this is not implemented, but trivial
to reproduce. Simply loop on the bins, check if the center of the bin
is within the cut (via TCutg::IsInside), set the bin content to 0
for bins outside the cut.

Rene Brun