RE: [ROOT] Drawing tree "array" variables

From: Philippe Canal (pcanal@popgtw.fnal.gov)
Date: Wed Nov 29 2000 - 17:02:05 MET


Hi Sabine,

The enhancement was actually introduced in ROOT v2.25/00.

In the cases your present, ROOT v2.23/12 is not complaining about the
syntax but plot something that is very unlikely to be was you need.

To use this syntax with the TTree::Draw command you have to upgrade
to root v2.25/00 or later.  Alternatively, you could use the TTree::MakeClass
facility to implement your cuts.

Philippe.

> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Sabine Crepe-Renaudin
> Sent: Wednesday, November 29, 2000 8:16 AM
> To: pcanal@fnal.gov
> Cc: roottalk@pcroot.cern.ch
> Subject: RE: [ROOT] Drawing tree "array" variables
> 
> 
> 
> 
> 	Hi Philippe,
> 
> 	Thanks for your answer ! 
> 
> It seems that with my version (2.23/12) 
>        t->Draw("var3[][0]");
>        t->Draw("var3[][1]");
> 
> does not work however :
> 
>        t->Draw("var3[0][]","ntrack != 0");
>        t->Draw("var3[1][]","ntrack != 0");
> (which is quite the same)
> or
>        t->Draw("var3[1,ntrack]","ntrack != 0");	 
>        t->Draw("var3[1,ntrack]","ntrack != 0");
> 
> seem OK ... even if in the browser I see in the last line : 
> var3[ntrack][2]
> 
> 
> 
> 			Sabine.
> 
> 
> 
> On Mon, 27 Nov 2000, Philippe Canal wrote:
> 
> > 
> > > If there is 10 events and ntrack=3 for each event, 
> > > 		if I do : t->Draw("var1");  I see 30 entries in my plot
> > > 			  t->Draw("var3");  I see 60 entries in my plot     
> > > 
> > > How can I do the equivalent of nt/plo 2.var3(ntrack,1) and  
> > > nt/plo 2.var3(ntrack,2), to see only the 30 entries 
> corresponding to my
> > > splitted variables.
> > 
> > Hi Sabine, 
> > 
> > In recent versions of ROOT you can do:
> > 
> > 	t->Draw("var3[][0]");
> > 	t->Draw("var3[][1]"); 	
> > 
> > Philippe.
> > 
> > 
> 
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:38 MET