[ROOT] Superimposing histograms ?

From: Fred Sarazin (sarazin@triumf.ca)
Date: Thu Aug 15 2002 - 21:27:36 MEST


Hi,

I generate two histograms from a tree... in the following example, I
superimpose the results
of one "Branch" with the results for all the "Branch"'s... for some reason,
the Nbins of the first histogram is 100 whereas the other one
is 400 as expected (that's what I get from the "inspect" feature)...
Moreover, when I have a closer look in a zoomed arera, the edge of the bins
of both histograms don't seem to overlap (and I have roughly 2 bins
for h3368b2 for 1 bin of h3368 instead of a ratio of 4 to 1 if the "inspect"
statement was correct !)

What's wrong ?

thanks,

Fred

-------------------

  TH1F *h3368   = new TH1F("h3368  ","Total   ",400,3.2,3.5);
  TH1F *h3368b2 = new TH1F("h3368b2","Branch 2",400,3.2,3.5);

  TCanvas *c = new TCanvas();

  mc->Draw("Eg >> h3368","Eg>3 && Eg<3.5");
  mc->Draw("Eg >> h3368b2","Eg>3 && Eg<3.5 && Branch==2","same");



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