Hi all, I am using the following code to project a tree branch into a 1D histogram, the range of histogram declared is different than the one in the tree branch (actually a subset of that). but the no. of entries shown in statistics box of the histogram is still the same as that of full range. Does anybody know the possible problem here.
TChain *h10 = new TChain("h1");
h10->AddFile("d0_bar_f.root");
TCanvas *c1 = new TCanvas("c1","",550,400);
TH1F *h1000 = new TH1F("h1000","",100,0.144,0.147);
h10->Project("h1000","deltam",cut1);
h1000->Draw();
c1->Draw();
yes, they are different. Also, if I print double s = h1000->Integral(); then it prints the correct No. of events(into the small range specified while declaring the histogram)
The number of entries count the also the underflow and overflow that why they are the same even if you change the histogram range. This can be easily verified with the following commands:
Thanks couet, now I understand. Is there a way to make the statistics box display correct no. of entries(no underflows and overflows) like what h->Integral() returns?