Re: [ROOT] Superimpose histograms

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Jul 31 2002 - 21:59:22 MEST


Hi Tuan,

I am sorry, but I do not understand your point. The second histogram
is drawn on top of the first histogram using the coordinate system
defined by the first histogram. This may work if your MC histogram 
has about the same number of entries as the data histogram.
If this is not the case, you should rescale the MC histogram
via TH1::Scale to have the same integral as the data histogram.

Rene Brun


On Wed, 31 Jul 2002, Vu Anh Tuan wrote:

> Hi,
> 
> I've got a small question.
> 
> I'm currently using root v3_02_07. I want to compare two histograms, say
> Z mass from data and from MC, therefore I need to superimpose
> them: z_data and z_mc. They need not to have the same entries
> certainly. I thought normally I would have to scale one histogram to the
> other using the function Scale() or smth like this. But as I was a
> little bit lazy, I did first
> 
> z_mc.Draw(), then
> z_data.SetLineColor(kRed) and finally
> z_data.Draw("E1same")
> 
> in thinking of refining them later (I got about 60 histos to draw). But
> surprisingly the plot I see appears to be rescaled already as I wanted
> to be, was not supposed to do.
> 
> Are things actually implemented like this or my pleasant unexpectation
> turns out to be too early?
> 
> Thanks,
> 
> Tuan
> 



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