Hello everybody,
here is my problem : I have to get all entries from one leaf of a TTree with a condition on other leaves … To do so I use a cut the way described in the user guide, it works if I draw a TH1D but the cut is ignored when I use GetBranch. Here is what I do:
Data->Draw(">>ROOTCutData",MyCut);
CutData = (TEventList *) gDirectory->Get(“ROOTCutData”);
Data->SetEventList(CutData);
//Here if I draw an histo it’s well cut
TBranch *branch = Data->GetBranch(MyLeaf);
n = (int) branch->GetEntries();
branch->SetAddress(&val);
And then I use branch->GetEntry() to get data … but I get all the branch, the TCut “MyCut” being simply ignored.
Does anybody know a way to do this (I need to use TCuts as the cuts can be quite complex) ?
Thanks for your help