[ROOT] TTree::Draw into a predefined frame

From: Thomas Schietinger (Thomas.Schietinger@cern.ch)
Date: Tue Mar 12 2002 - 13:33:38 MET


Hello,

I would like to draw the entries of an ntuple into
a given frame. In PAW (sorry...) this was rather easy:

  null 2000 2800 -800 800
  nt/plot 200.x%z ! ! ! ! s

>From various examples I find online I gather that 
a TH2F and the "same" option should give me a similar
result:

  TH2F *TA1xz = new TH2F("TA1xz","TA1 x-z",100,2000,2800,100,-800,800);
  TA1xz->Draw();
  t200->Draw("x:z","","same");

However, this just gives me the empty histogram, 
no trace of the ntuple! (Canvas update doesn't help
either.) Of course I can draw directly into the histogram, 

  TH2F *TA1xz = new TH2F("TA1xz","TA1 x-z",100,2000,2800,100,-800,800);
  t200->Draw("x:z>>TA1xz");
  TA1xz->Draw(); 

but then all structures are washed out by the histogram
binning (unless I go to unreasonably fine binning).
Another work-around would be the application of cuts,
but I would *really* like to decide for myself where
exactly my plot starts (important for comparisons etc.).
So why does the first method above not work, or is there
another way to solve my problem, 2D tree drawing with
predefined boundaries?

Any advice much appreciated! Thanks,

Thomas



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