On Fri, 17 Mar 2000, Georges Lobo wrote:
> Hi all,
> I have a problem concerning use of graphical cuts.
> I've plotted a 2D histogram, then using the editor I defined a graphical
> cut.
> The first problem is that a double-click doesn't close the graph, I
> usually have to click more than twice to effectivelly close it.
It is closed when clicking twice at the same place (well within
2 points or so) double-click is no good since you tend to move
the mouse between the clicks.
> When it is done I import the graphical cut by
>
> root[3] TCutG *protoncut = (TCutG*)gPad->GetPrimitive("CUTG");
> root[4] protoncut->SetName("protoncut");
>
> and if I try to use this cut with a plotting I obtained
>
> root [5] h10->Draw("Ex:Ey>>hisde4","thp>0&&my==1&&protoncut","colz");
> *ERROR 4 :
> Empty String
>
> *ERROR 4 :
> Empty String
> If I try it again I have no plot at all and no more error message.
> What does this mean ?
>
I guess your protoncut has VarX and VarY not set, normally
2dim hists dont have the info which variable names were used.
If they are made by tree->Draw("x:y.. they have it however
So try:
cout << protoncut->GetVarX() << endl
cout << protoncut->GetVarY() << endl
and look for the result.
If this results in blanks I think you want to do:
protoncut->SetVarX("Ex");
protoncut->SetVarY("Ey");
before you use the cut in h10->Draw("...
Note that you could well apply the cut to some other variables of
your tree.
Hope this helps,
Otto
----------------------------------------------------------------------------
Otto Schaile Sektion Physik der LMU Muenchen
Phone: (+49 89)289 14070 Am Coulombwall 1, D-85748 Garching, Germany
FAX: (+49 89)289 14072 EMail: Otto.Schaile@Physik.Uni-Muenchen.DE
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:21 MET