[ROOT] loosing histogram resolution in 2D TTree->Draw()

From: Vuko Brigljevic (vuko@SLAC.stanford.edu)
Date: Tue Feb 26 2002 - 02:45:15 MET


Hi root friends,

still the first steps of a new rooter...

What I am trying to do: fill a 2D histogram
(some variable vs time) from a tree, change the
X-axis to represent time, and redraw:

  t1->Draw("temp:time >> temphist","");
  temphist->GetXaxis()->SetTimeDisplay(1);
  temphist->Draw();

Problem:
I am loosing completely the precision of the first
plot  (from the TTree::Draw()) in the histogram.
The binning must be too raw and the binning and
the entries must be drawn randomly 
second histogram is so raw that the structure 
of the plot completely disappears.

What I've tried so far:
1) I read in the root manual about the environment 
   variables:

Hist.Binning.2D.x: 500
Hist.Binning.2D.y: 500
Hist.Binning.2D.Prof: 10000

I added these lines to my ~/.rootrc (the values
are mine, not the default), and checked that
they have been correctly read:

root [0] gEnv->Print()
Hist.Binning.2D.x:        500                            [User]
Hist.Binning.2D.y:        500                            [User]
Hist.Binning.2D.Prof:     10000                          [User]

Still I have the same problem

2) I tried to predefine the histogram with a
   higher binning:
  TH2F * temphist=new TH2F("h2", "test", 1500,
initTime,                        endTime, 500, 10., 20.); 
  t1->Draw("temp:time >> temphist","");
  temphist->GetXaxis()->SetTimeDisplay(1);
  temphist->Draw();

  but this time the plot from the 2nd Draw() is empty.

Any idea?

In case it matters, I am running Root Version 2.23,
a bit old I know, but it's still the BABAR standard

Thanks,

Vuko

-- 
========================================================================
 Vuko Brigljevic                        | Mail : SLAC, Mail Stop 41
 Lawrence Livermore National Laboratory |        P.O. Box 4349, Stanford
 Nuclear and Particle Physics Division  |        CA 94309, USA
                                        | SLAC-Office : B280- room 143
 Member of the BaBar Collaboration      | Phone : +1-650-926 8512
 <vuko@slac.stanford.edu>          <http://www.slac.stanford.edu/~vuko>  
========================================================================



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