[ROOT] draw option after TH1::Sumw2() call

From: helbich@mail.desy.de
Date: Thu Jun 05 2003 - 01:35:02 MEST


 Dear rooters and developers,

 I already repoted this problems once but I noticed that
it remained unchanged even in version 3.05/05 5 June 2003

 I am using both Redhat 7 and Suse 6.3

   I have problems with the following feature: After calling
TH1::Sumw2() method so that my error bars after reweighting are
calculated correctly I can only draw the histogram with errors
(e.g. draw option "E" is set automatically! and I cannot use options
like "L" or "C"). 
 
 TH1F* hh = new TH1F("hh","",10,0.,10.);
 hh->Sumw2();
 hh->Fill(4.5,0.5);
 hh->Fill(5.5,0.3);    
 hh->Draw("L"); // draws as with "E"
 


  I found that the problematic piece of code is 


Int_t THistPainter::MakeChopt(Option_t *choptin) {

...

   for (Int_t i=0;i<nch;i++) chopt[i] = toupper(chopt[i]);
   if (fH->GetDimension() > 1) Hoption.Scat = 1;
   if (!nch) Hoption.Hist = 1;
   //if (fH->GetSumw2N()) Hoption.Error = 1;
   if (fFunctions->First()) Hoption.Func = 2;
   //if (fH->GetSumw2N()) Hoption.Error = 2;

...

}

 where I uncommented unwanted lines of code.  I think this feature
should be removed and the user should decide how to draw the
histogram! In my case of reweighted Monte Carlo I want the error bars
to be calcalculated properly (using sumW2) but I want to draw it as
yellow filled area and put data points on the top. This is not
possible with the current version.

				Cheers,


						Miro



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET