Re: [ROOT] suppressing THStack errors

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Mar 18 2004 - 21:45:59 MET


Hi Martin,

Thanks for reporting this problem.
The "e" of "same" was passed to the drawing option
of the histograms in the stack.
Now fixed in CVS

Rene Brun

On Thu, 18 Mar 2004, 
Martin Hennecke 
wrote:

> 
> Hi,
> 
> I have a set of histograms that I combine to a THStack. When 
> superimposing the THStack with a TH1F I'm unable to suppress the error 
> bars of the stack.  The effect is demonstrated in the little script below 
> that I addapted from limit.C in the tutorials.
> 
> I use the "hist" option to add the histograms to the stack and also draw
> the stack with the "hist" option. But the errors are still drawn.
> 
> Does somebody know how to get rid of the error bars ?
> 
> 
> Thanks,
> Martin
> 
> =======================================================================
> 
> 
> {
> 
> // Create some histograms
> TH1D* background = new TH1D("background","The expected background",30,-4,4);
> TH1D* signal     = new TH1D("signal","the expected signal",30,-4,4);
> TH1D* data       = new TH1D("data","some fake data points",30,-4,4);
> 
> background->SetFillColor(48);
> signal->SetFillColor(kGreen);
> data->SetMarkerStyle(21);
> data->SetMarkerColor(kBlue);
> 
> // Fill histograms randomly
> TRandom r;
> Float_t bg,sig,dt;
> for (Int_t i = 0; i < 25000; i++) {
>   bg  = r.Gaus(0,1);
>   sig = r.Gaus(1,.2);
>   background->Fill(bg,0.02);
>   signal->Fill(sig,0.001);
> }
> for (Int_t i = 0; i < 1000; i++) {
>   dt = r.Gaus(0,1);
>   data->Fill(dt);
> }
> 
> THStack *hs = new THStack("hs","Signal and background compared to data...");
> hs->Add(background, "hist");
> hs->Add(signal, "hist");
> 
> data->Draw("P");
> hs->Draw("SAME HIST");
> }
> 	
> 
> 
> 
> 



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET