Re: Separate selections for 2D-plots

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Sep 24 1998 - 15:36:36 MEST


Manuel Sanchez wrote:
> 
> Hi Rooters,
> 
> Is it difficult to add support in TTree::Draw() for separate selections
> in 2D and 3D plots?. I'll explain myself; the idea is to do things like:
> 
> T.Draw("time:time","sector==1:sector==2")
> 
> So i can do a plot of times in sector 1 against times in sector 2
> eventhough i have all the times in one single branch. BTW, is there
> another way to do this?
> 
> Would it be enough to use fSelect1,fSelect2 and fSelect3, instead of
> only fSelect,  in the TTree class?
> 

Manuel,
You can try:
T.Draw(time*(sector==1):time*(sector==2");
This will have a side-effect to generate
  - time when sector==1 //ok
  - 0 when sector != 1  //you will see many entries at 0
An alternative solution is to loop yourself (using may be the code
generated by MakeCode) and fill your scatter-plot with
your conditions.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:38 MET