Re: [ROOT] TTree::Scan() and TTree::Draw() selection different?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Aug 16 2002 - 15:27:52 MEST


Hi Hannes,

I do not understand the meaning of your query.
Your two arrays Etac[Ncsc] and Eta2dsk[Ngen] do not have the
same loop index and size. What do you expect from
(abs(Etac-Eta2dsk)>0.1) ?

The reason why you have different results between Scan and Draw
is that Draw is attempting to make the operation by comparing
the min of Ncsc and Ngen elements and Scan is not doing it.
I agree that Scan and Draw should give the same result anyhow
and we will fix this.

Rene Brun

On Fri, 16 Aug 2002, Hannes Sakulin wrote:

> Hello,
> 
> I wanted to use TTree::Scan() to dump a few events that I had Drawn from a
> Tree. It seems that TTree::Draw() and TTree::Scan() use a different
> selection. While Draw() finds the events (in the example it is 1 event),
> Scan() does not find them. Is there any explanation for this?
> root [0] TFile f("gmt_1.root")
> root [1] h1.Draw("Event", "(abs(Etac-Eta2dsk)>0.1) && (Eta2dsk <99) &&
> (Ncsc==1)")
> <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
> (Int_t)1
> root [2] h1.Scan("Event", "(abs(Etac-Eta2dsk)>0.1) && (Eta2dsk <99) &&
> (Ncsc==1)")
> ************************
> *    Row   *     Event *
> ************************
> ************************
> ==> 0 selected entries
> (Int_t)0
> 
> The behavior is the same in versions 3.02/07, 2.03/02, 3.03/07. You can find
> the Tree in ~hsakulin/public/gmt_1.root.
> 
> Cheers,
>   Hannes.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Hannes Sakulin
> Institute for High Energy Physics, Vienna, Austria
> CERN / EP                           Phone: +41 22 767 7372
> CH-1211 Geneva 23, Switzerland      Fax:   +41 22 767 8940
> E-mail: Hannes.Sakulin@cern.ch
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:04 MET