Hi, I had problem to divide histograms. During simplified my problem, I found something strange. void test() { TH1F* dH = new TH1F("dH","dH",10,0,10); TH1F* nH = new TH1F("nH","nH",10,0,10); TH1F* rH = new TH1F("rH","rH",10,0,10); for(Int_t i=2; i<8; i++){ dH->SetBinContent(i,i); nH->SetBinContent(i,i); } rH->Sumw2(); rH->Divide(nH,dH,1,1,"B"); rH->SetMarkerStyle(20); rH->SetMarkerColor(2); rH->Draw("e"); for(Int_t i=1; i<=10; i++){ cout << i << "\t : " << rH->GetBinContent(i) << ", " << rH->GetBinError(i) << endl; } } I expected exact 1 efficiency plot, but I got the following: <output> : No points are ploted at all. root [0] .x test.C <TCanvas::MakeDefCanvas>: created default TCanvas with name c1 1 : 0, 0 2 : 1, -0 3 : 1, -0 4 : 1, -0 5 : 1, -0 6 : 1, -0 7 : 1, -0 8 : 0, 0 9 : 0, 0 10 : 0, 0 root [1] -- Best regards, Dongwook Jang. phone : 630-840-2118 (office B0 170-I) 630-840-6315 (FAX)
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET