Hi Stan, I do not understand your point about Clone! Why do you call this function? If you want to have a correct error calculation in the resulting histogram, at least one of the operand histograms (in your case em8 or all must have Sumw2. Before Dividing, do all->Sumw2(); em8->Sumw2(); see: http://root.cern.ch/root/htmldoc/TH1.html#TH1:Divide Rene Brun On Thu, 31 Jan 2002, Stanley Forrester wrote: > I'm having some trouble with displaying error bars on an efficency plot. > Can anyone tell me what I'm doing wrong? Also why does one need to call > Clone before "dividing." > > The data in the histo "em8" is a subset of the data in histo "all" so I'm > trying to use the binomial error method. The resulting histogram > displays error bars equal to the value the contents of the bin. > > TH1F* all = CEM8Track5Validation_All_electronEt; > TH1F* em8 = CEM8Track5Validation_Electron_Central_8_v_electronEt; > TH1F *e_ratioEt = > (TH1F*)CEM8Track5Validation_Electron_Central_8_v_electronEt > ->Clone(); > e_ratioEt->Divide(em8, all,1,1, "B"); > all->Draw(); > em8->Draw(); > e_ratioEt->Draw("e"); > > ________________________________________________________________ > Stanley S. Forrester > sforrest@lifshitz.ucdavis.edu > > I like pigs. Dogs look up to us. Cats look down on us. > Pigs treat us as equals. > Sir Winston Churchill > > >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:40 MET