Hello Rooters,
I have an admittedly simple query, it’s something that should be clear to me by now. However, much to my embarrassment, the following still puzzles me. I am simply trying to plot the entries of a branch in a TTree using a histogram, with given range
void M()
{
TFile *fin = new TFile("outfile_2CEP.root");
TTree *t1 = (TTree*)fin->Get("t1");
//Float_t M;
// t1->SetBranchAddress("M",&M);
TH1F *h1 = new TH1F("h1","M distribution",1000, 2500, 4000);
t1->Draw("M>>h1");
}
The resulting histogram seems OK, but the number of entries quoted is the number of entries in the tree (I checked, t1->GetEntries();
) and not the number of events binned in the mass range specified. Can someone help me understand this behaviour please?
Thanks,
Blaise