I am trying to draw my histogram with diferent draw options. I also need to normalize my histograms so following the instructions I found I am doing
from ROOT import * file=TFile("SingleTopNtuple/SingleTop.ntuple.TDR_012.root") tree=file.Get("UserData") histo=TH1F("histo","", 100, 100000, 300000) tree.Draw("top_m>>histo", "", "goff") histo.Sumw2() histo.Scale(1./histo.GetSumOfWeights()) histo.Draw("e")
This works OK, the errors are calculated correctly by using TH1::Sumw2. The problem is that once I use Sumw2, non-error options are ignored. For instance,
will now draw with “e”, no lines are drawn and error bars instead. Is there any solution to this?
(you might say, “why do you whant to do ‘l’, if you care about the error”, but it is still useful to be able to draw in different styles after doing the proper normalization:-)