Hi Jyothsna Rani, Could you send me your signal.root and bgd.root files ? Rene Brun On Tue, 17 Sep 2002, Jyothsna Rani wrote: > > Hi, > > I would like to access two profile/ 2D histos from two different files and > would like to divide them. > > When I use the following code to do that I get a funny plot for sign. Is > there a better way of doing it? > > Thanks for any help, > Jyothsna > > //////////////////////////////////////////////////////////// > { > TFile bbh("signal.root"); > TFile qcd("bgd.root"); > > TCanvas *c1 = new TCanvas("c1","c1",600,600); > c1->cd(); > bbh->cd(); > signal_et1cut.Draw(); > > TProfile *sig_et1 = (TProfile*)signal_et1cut->Clone(); > > TCanvas *c2 = new TCanvas("c2","c2",600,600); > c2->cd(); > qcd->cd(); > bgd_et1cut.Draw(); > > TProfile *bgd_et1 = (TProfile*)bgd_et1cut->Clone(); > > TCanvas *c3 = new TCanvas("c3","c3",600,600); > c3->cd(); > TProfile *sign = new TProfile("sign","",50,0.,95.,0,800); > sign.Divide(sig_et1,bgd_et1,1.,1.,"B"); > sign.Draw(); > } > ------------------------------------------------------------- > K. Jyothsna Rani, Phone Number: > Tata Institute, 630-840-3590 (Office) > DZero Experiment, 630-840-4236 (Residence) > Mail Station : 352, FAX: > P.O.Box : 500, 630-840-8481 > Fermilab, E-mail: > Batavia, IL - 60510 jyothsna@fnal.gov > --------------------------------------------------------------- >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:10 MET